This code fails to decode when running on iOS 18.0 or 18.1 beta device. But succeeds below iOS 18, such as iOS 17.5.
Xcode Version 16.0 (16A242d)
let base64String = "1ZwoNohdE8Nteis/IXl1rg=="
if let decodedData = Data(base64Encoded: base64String, options: .ignoreUnknownCharacters) {
if let decodedString = String(data: decodedData, encoding: .ascii) {
print("Decoded string: \(decodedString)")
} else {
print("Failed to decode string using ascii encoding")
}
} else {
print("Failed to decode Base64 string")
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Why Xcode12.3 takes up more than 18GB of RAM?
I don't want to show navigation stacknot work
if #available(iOS 14.0, *) {
navigationItem.backBarButtonItem?.menu = nil
}
not work either
class CustomBackBarButtonItem: UIBarButtonItem {
@available(iOS 14.0, *)
override var menu: UIMenu? {
get {
return nil
}
set { }
}
}
protocol SetNaviBackBarProtocol {
func setNavBackItem()
}
extension SetNaviBackBarProtocol where Self: UIViewController {
func setNavBackItem() {
self.navigationItem.backBarButtonItem = CustomerBackBarButtonItem(title: "", style: .plain, target: self, action: nil)
}
}
class BaseViewController: UIViewController, SetNaviBackBarProtocol {
.....
}