ios13

Keychain Query Always Returns errSecItemNotFound After Upgrading to iOS 13

五迷三道 提交于 2019-12-31 08:57:38
问题 I am storing passwords into the iOS keychain and later retrieving them to implement a "remember me" (auto-login) feature on my app. I implemented my own wrapper around the Security.framework functions ( SecItemCopyMatching() , etc.), and it was working like a charm up until iOS 12. Now I am testing that my app doesn't break with the upcoming iOS 13, and lo and behold: SecItemCopyMatching() always returns .errSecItemNotFound ...even though I have previously stored the data I am querying. My

Super/Subscript appear to be broken in iOS13 (NSAttributedString)

十年热恋 提交于 2019-12-31 07:18:07
问题 Trying to display super/subscript text using NSAttributedString in a UITextView seems broken in iOS13 - unless anyone knows otherwise? Curiously if I use the UIFont systemFont then it works - but if I use any other font it doesn't. See below for my code to setup a UITextView in my test app. - (void)viewDidLoad { [super viewDidLoad]; UIFont* font = [UIFont systemFontOfSize:32]; //UIFont* font = [UIFont fontWithName:@"Helvetica Neue" size:32]; //UIFont* font = [UIFont fontWithName:@"Courier"

hasDifferentColorAppearance is true when app is backgrounded

夙愿已清 提交于 2019-12-31 00:45:51
问题 Apple recommends that we use traitCollectionDidChange and compare trait collections using hasDifferentColorAppearance to catch when dark mode is toggled, and act on it if we need to. Like this: override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) if #available(iOS 13.0, *) { let hasUserInterfaceStyleChanged = previousTraitCollection?.hasDifferentColorAppearance(comparedTo: traitCollection) ?? false if

How can I check ios device's current userInterfaceStyle programmatically?

那年仲夏 提交于 2019-12-30 05:20:05
问题 I am able to get userInterfaceStyle using TraitCollection of any view or ViewController ie. Dark or Light. But when I forced app to use Dark or light Mode, then I want to know what is the current userInterfaceStyle of iOS device irrespective of app? I tried Traitcollection of UIScreen but still its provide userInterfaceStyle of app not device. 回答1: Try UIScreen.main , swift 5 example: // OS-wide theme available on iOS 13. @available(iOS 13.0, *) var osTheme: UIUserInterfaceStyle { return

iOS 13 Animating View Not Changing Frame

半城伤御伤魂 提交于 2019-12-30 00:36:10
问题 I have an app which is compiled in Xcode 10 on iOS 13 simulator. In one view there is a "tray" view which shows from the bottom when tapped, in iOS 12 it works perfectly, in iOS 13, the tap is calling the method, but the changes to the frame are not saving - I have included outputs from the debugger in comments so you can see what the outputs of the frame values are; - (void) userClickActivityTray: (UITapGestureRecognizer *) gestureRecognizer { if(self.activityTrayShown) { /* (lldb) po self

iOS 13 UIBarButtonItem not clickable and overlapping UINavigationBars when using UISearchController

孤街醉人 提交于 2019-12-28 02:33:05
问题 I got a navigation bar containing some UIBarButtonItem buttons and a UISearchBar hooked up like this var searchController: UISearchController! override func viewDidLoad() { super.viewDidLoad() title = "Test" tableView.delegate = self tableView.dataSource = self searchController = UISearchController(searchResultsController: nil) navigationItem.searchController = searchController // This leads to the bug searchController.hidesNavigationBarDuringPresentation = false navigationItem

UIAlertController disappearing since iOS 13

跟風遠走 提交于 2019-12-25 01:25:14
问题 I have the following function that pops up a UIAlert which allows the user to update their Haptic Feedback setting: - (void)requestHapticSetting{ UIWindow *alertWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; alertWindow.rootViewController = [[UIViewController alloc] init]; alertWindow.windowLevel = UIWindowLevelAlert + 1; [alertWindow makeKeyAndVisible]; if(isHapticOn){ hapticMessage = @"Haptic feedback is currently\nturned ON.\nPlease update preference."; } else {

NSAttributedString not working as expected in iOS 13

核能气质少年 提交于 2019-12-24 20:09:16
问题 I am using NSMutableAttributedString to show multi font and colour text in a label. NSMutableAttributedString is not working as expected in iOS 13, but same code works fine in iOS 11 and 12 versions. let hdAttributedText = NSMutableAttributedString(string: "Sample", attributes: [NSAttributedString.Key.font: UIFont(name: "HelveticaNeue", size: 14.0)!, NSAttributedString.Key.foregroundColor: UIColor.black]) hdAttributedText.append(NSAttributedString(string: " ")) hdAttributedText.append

WWDC 2019 - iOS13 April 2020 requirement

折月煮酒 提交于 2019-12-24 19:37:04
问题 In the WWDC 2019 video Modernizing Your UI for iOS 13 , Apple mentions a requirement that by April 2020 all apps should Adopt Launch Storyboards Support any size Support Split Screen Multitasking Does "Support Split screen multitasking" mean as described in Session 258: Architecting Your App for Multiple Windows OR in Session 212: Introducing Multiple Windows on iPad? So then the apps have to up the Base SDK version to iOS 13 in Xcode and implement the scene methods. So we need to up the

Crash :Foundation NSClassFromString+200 in iOS 13

故事扮演 提交于 2019-12-24 18:06:06
问题 We have released the latest build with the minimum deployment target 10.We are getting the same many crashes in iOS 13 related to the background issues. We are enabling the following capabilities:
 1.background fetch 2.push notification(FireBase) 3.data protection as NSFileProtectionComplete. When checking the link : https://forums.developer.apple.com/thread/122858 Most answers are switching to NSFileProtectionCompleteUntilFirstUserAuthentication from NSFileProtectionComplete. Is this correct