ios13

iOS 13: threading violation: expected the main thread

拈花ヽ惹草 提交于 2019-12-02 08:07:15
The app is being crashed when trying to hide the navigation bar for a viewcontroller only for iOS 13 users. I got the crash on Crashlytics of Fabric which titled as below, Fatal Exception: NSInternalInconsistencyException threading violation: expected the main thread The app is being crashed on this line of viewWillAppear method, self.navigationController?.isNavigationBarHidden = true To hide the navigation bar on the viewWillAppear method of UIViewController, I am using below code, override func viewWillAppear(_ animated: Bool) { self.navigationController?.isNavigationBarHidden = true super

iOS 13 SwiftUI: app crashes upon launch on real device

自闭症网瘾萝莉.ら 提交于 2019-12-02 06:19:04
问题 After the releases of SwiftUI and Apple’s new betas (macOS 10.15, iOS 13, and Xcode 11), I began developing an application built on the new technologies. Development had gone smoothly, considering all the software and systems involved were in beta. However, upon trying to run the SwiftUI-based app on a real device (iPhone 8 Plus, running iOS 13 beta 2), the application refused to start, instead crashing on launch with a simple (lldb) in the Xcode debugger. The app had worked properly in the

Cannot change Main.storyboard's name on iOS 13 [Xcode 11 GM seed 2]

假如想象 提交于 2019-12-02 06:07:55
问题 On iOS 13 simulator with Xcode 11 GM seed 2, the app crashes after Main.storyboard 's name changed (Info.plist changed also). Setting option Main Interface to empty cause the same problem. The iOS 13 system always try to find the Main.storyboard , and failed with crashing message: *** reason: 'Could not find a storyboard named 'Main' in bundle Everything is fine on iOS 12 and earlier versions. It looks like a bug in iOS 13. Does anyone meet same problem? And any solutions? 回答1: Swift 5 with

Xcode 11 Build System Bugged?

不羁的心 提交于 2019-12-02 03:40:28
i have Xcode 11 GM with macOS Mojave 10.14.6. I have been experiencing problems with my app builds. What i mean is that the first time i compile and app on my iPhone, its okay but then if i make changes to the code and compile again it doesn't show those changes. But when i do it in the simulator the changes do show. In order to see the changes on my phone i have to uninstall and reinstall the app. I have also been looking for known issues on apples website: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_release_notes?preferredLanguage=occ but i cant seem to find a

iOS 13 presentation style default

本小妞迷上赌 提交于 2019-12-02 01:22:54
In my iOS app I have about 60 present(_:animate:complition) calls from legacy code. iOS 13 just changed the default presentationStyle to Automatic which actually means .formSheet style. Is there a quick way to change the default back to .fullScreen on all the app? maybe like in the infoPlist or some global protocol like UIAppearance Protocol? If there's no way i need to set the presentationStyle manually in 60 places... Unfortunately there is no global variable to override to change this. This is all part of updating for the new OS's! Embrace the change, and change them all manually. This

iOS 13 SwiftUI: app crashes upon launch on real device

允我心安 提交于 2019-12-02 00:34:32
After the releases of SwiftUI and Apple’s new betas (macOS 10.15, iOS 13, and Xcode 11), I began developing an application built on the new technologies. Development had gone smoothly, considering all the software and systems involved were in beta. However, upon trying to run the SwiftUI-based app on a real device (iPhone 8 Plus, running iOS 13 beta 2), the application refused to start, instead crashing on launch with a simple (lldb) in the Xcode debugger. The app had worked properly in the simulator, and Xcode has provided no helpful messages as to why the app will not run on a real device.

hasDifferentColorAppearance is true when app is backgrounded

末鹿安然 提交于 2019-12-01 23:43:14
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 (hasUserInterfaceStyleChanged) { //Update UI } } } I use this to update the UI, clear some caches etc

Multithreaded rendering only crashes on iOS 13

可紊 提交于 2019-12-01 20:02:23
问题 In my game engine, I have an option to enable the multithreaded rendering. In iOS 12 (and below) my app did not crash. I have not changed anything in my code, but it crashes on iOS 13. 2019-10-02 11:36:07.931 SimpleGame[293:11150] ---> (Inner Exception #0) Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: threading violation: expected the main thread Oct 2 09:57:48 GL04207-MT SimpleGame[923] <Notice>: 0 CoreFoundation

Multithreaded rendering only crashes on iOS 13

戏子无情 提交于 2019-12-01 19:24:35
In my game engine, I have an option to enable the multithreaded rendering. In iOS 12 (and below) my app did not crash. I have not changed anything in my code, but it crashes on iOS 13. 2019-10-02 11:36:07.931 SimpleGame[293:11150] ---> (Inner Exception #0) Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: threading violation: expected the main thread Oct 2 09:57:48 GL04207-MT SimpleGame[923] <Notice>: 0 CoreFoundation 0x00000001aace1c44 97285ACB-7B21-393A-ABF6-03F1DBB5D2A2 + 1256516 Oct 2 09:57:48 GL04207-MT SimpleGame[923] <Notice>: 1

Cannot read the NFC chip of the ePassport using iOS13

与世无争的帅哥 提交于 2019-12-01 18:36:31
import UIKit import CoreNFC class ViewController: UIViewController, NFCTagReaderSessionDelegate { var nfcTagReaderSession: NFCTagReaderSession? func tagReaderSessionDidBecomeActive(_ session: NFCTagReaderSession) { print("Tag reader did become active") print("isReady: \(nfcTagReaderSession?.isReady)") } func tagReaderSession(_ session: NFCTagReaderSession, didInvalidateWithError error: Error) { print("\(error)") } func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { // this part is never called! print("got a Tag!") print("\(tags)") } @IBAction func clickedNFC(_