ios13

How get rootViewController with iPadOS multi window (SceneDelegate)?

牧云@^-^@ 提交于 2019-12-04 11:13:02
问题 I am using Xcode 11 (beta3) and building an app for iOS 13. In my project I created the delegate methods for UIWindowSceneDelegate declaring it in Info.plist. Now I'm able to create multiple windows (and UIScene). How can I access the rootViewController now I've not anymore a single window? I need it to get some reference to objects and bounds it holds. In my AppDelegate window is nil , and in my ViewController (child view controller) instance I tried using self.view.window.rootViewController

CoreBluetooth API MISUSE - Issues with CBCentralManager in iOS 13 features like Siri Shortcuts

▼魔方 西西 提交于 2019-12-04 05:49:18
问题 I added Siri Shortcuts to my application and to utilize voice commands The error Im getting in the debugger is: [CoreBluetooth] API MISUSE: can only accept this command while in the powered on state I have looked at a vast number of duplicates of this for issue on here and the consensus is that CBCentralManager needs to be a class level variable, which I have. I still cannot get UpdatedState delegate method to execute more than one time in the context of Siri Voice Commands or the new iOS 13

Adding a drag gesture in SwiftUI to a View inside a ScrollView blocks the scrolling

孤者浪人 提交于 2019-12-04 05:31:24
So I have a ScrollView holding a set of views: ScrollView { ForEach(cities) { city in NavigationLink(destination: ...) { CityRow(city: city) } .buttonStyle(BackgroundButtonStyle()) } } In every view I have a drag gesture: let drag = DragGesture() .updating($gestureState) { value, gestureState, _ in // ... } .onEnded { value in // ... } Which I assign to a part of the view: ZStack(alignment: .leading) { HStack { // ... } HStack { // ... } .gesture(drag) } As soon as I attach the gesture, the ScrollView stop scrolling. The only way to make it scroll it to start scrolling from a part of it which

“Missing required entitlement” for NFCTagReaderSession

有些话、适合烂在心里 提交于 2019-12-04 05:11:23
I'm diving into iOS 13's new CoreNFC capabilities, and I'm struggling to get NFCTagReaderSession working. After setting up my entitlements and instantiating an NFCTagReaderSession and delegate I attempt to start the session by calling nfcTagReaderSession?.begin() . My session immediately gets invalidated with this error: Error Domain=NFCError Code=2 "Missing required entitlement" UserInfo={NSLocalizedDescription=Missing required entitlement} I followed the documentation here for my entitlements file: https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_nfc

How to set backgroundColor of UISegmentedControl to white in iOS 13

倾然丶 夕夏残阳落幕 提交于 2019-12-04 05:09:02
iOS 13 introduced some changes to the UISegmentedControl including a really nice animation when switching the selected segment. However I'm noticing that it's not displaying the backgroundColor property correctly, it always seems to have a bit of a tint to it. I've seen questions that answer how to set the selectedSegmentTintColor and such but I'm struggling to set the backgroundColor to say .white , no matter what I do it always shows up a bit of a gray even though there's no tintColor or similar setting applied. Setting the backgroundColor to other colors shows the same behavior but its most

Cannot read the NFC chip of the ePassport using iOS13

佐手、 提交于 2019-12-04 04:09:18
问题 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])

How to fix “IPA processing failed” error in xcode 11?

99封情书 提交于 2019-12-04 03:28:54
When I tried to create IPA file using Distribute APP option. It gave "IPA processing failed" error. I have checked logs file: IDEDistribution.standard.log file. 2019-08-06 18:36:52 +0000 warning: Configuration issue: platform iPhoneSimulator.platform doesn't have any non-simulator SDKs; ignoring it Scanning IPA... 2019-08-06 18:36:52 +0000 Assertion failed: Expected 4 archs in otool output: /var/folders/4t/rpjk7pd55t16jfrd32y98gf0lb2t68/T/IDEDistributionOptionThinning.~~~a4cZJc/Payload/demo.app/Frameworks/AppAuth.framework/AppAuth: Mach header magic cputype cpusubtype caps filetype ncmds

@Published property wrapper not working on subclass of ObservableObject

两盒软妹~` 提交于 2019-12-03 22:42:09
I have a class conforming to the @ObservableObject protocol and created a subclass from it with it's own variable with the @Published property wrapper to manage state. It seems that the @published property wrapper is ignored when using a subclass. Does anyone know if this is expected behaviour and if there is a workaround? I'm running iOS 13 Beta 8 and xCode Beta 6. Here is an example of what I'm seeing. When updating the TextField on MyTestObject the Text view is properly updated with the aString value. If I update the MyInheritedObject TextField the anotherString value isn't updated in the

App is getting crashed on app launch in iOS 13 beta version

纵然是瞬间 提交于 2019-12-03 16:25:31
Here is the crash report and the crash is only happening on iOS 13 beta version :- Crashed: com.apple.main-thread 0 libsystem_pthread.dylib 0x1ae056484 pthread_get_qos_class_np + 8 1 Foundation 0x1ae664340 -[NSThread qualityOfService] + 80 2 Foundation 0x1ae626ebc -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 280 3 Foundation 0x1ae628df8 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:] + 116 4 libAXSpeechManager.dylib 0x1d0176884 -[AXSpeechManager isSpeaking] + 112 5 libAXSpeechManager.dylib 0x1d0171b60

How get rootViewController with iPadOS multi window (SceneDelegate)?

谁说我不能喝 提交于 2019-12-03 16:01:35
I am using Xcode 11 (beta3) and building an app for iOS 13. In my project I created the delegate methods for UIWindowSceneDelegate declaring it in Info.plist. Now I'm able to create multiple windows (and UIScene). How can I access the rootViewController now I've not anymore a single window? I need it to get some reference to objects and bounds it holds. In my AppDelegate window is nil , and in my ViewController (child view controller) instance I tried using self.view.window.rootViewController but I found out that viewDidLoad() is too soon (I think) and the window is still nil, works in