ios13

failed to get credential.state and getCredentialStateForUserID

一曲冷凌霜 提交于 2020-06-15 09:59:12
问题 I can't get the credentialState from method getCredentialStateForUserID while other members got returned well. I ran the app on iPhone 8, iOS 13 simulator. - (void)authorizationController:(ASAuthorizationController *)controller didCompleteWithAuthorization:(ASAuthorization *)authorization { if ([authorization.credential isKindOfClass:[ASAuthorizationAppleIDCredential class]]) { ASAuthorizationAppleIDCredential *credential = authorization.credential; NSString *state = credential.state;

From IOS 13.0 cookiesDidChange is never triggered when cookies change on webview

会有一股神秘感。 提交于 2020-06-15 05:47:06
问题 I am using Cookie Store Observer to to track changes in the cookies value on my webview. It was working fine on all versions of IOS. but since IOS 13.0 came out, this no longer works. I am not getting any call to @available(iOS 11.0, *) func cookiesDidChange(in cookieStore: WKHTTPCookieStore){ cookieStore.getAllCookies { cookies in //Store cookies to UserDefaults on Background Thread DispatchQueue.global(qos: .userInitiated).async { self.storeCookies(cookies: cookies) } } } I am setting

iOS Swift Combine: cancel a Set<AnyCancellable>

若如初见. 提交于 2020-06-14 04:37:05
问题 If I have stored a cancellable set into a ViewController: private var bag = Set<AnyCancellable>() Wich contains multiple subscription. 1 - Should I cancel subscription in deinit? or it does the job automatically? 2 - If so, how can I cancel all the stored subscriptions? bag.removeAll() is enough? or should I iterate through the set and cancel all subscription one by one? for sub in bag { sub.cancel() } Apple says that the subscription is alive until the stored AnyCancellable is in memory. So

launchOptions always nil when launching from a push notification

走远了吗. 提交于 2020-06-12 09:16:20
问题 I'm sending push notifications from a Django app (using django-push-notifications) to an iOS app. The app targets iOS 13 and I'm running it on an iPhone 7 running iOS 13.3.1. I'm debugging in Xcode 11.3.1 I'm trying two different methods to send the notification from the Django side: Method 1: devices.send_message(message={"title" : title, "body" : message}, thread_id="events", extra={"foo": "bar"}) Method 2: devices.send_message("[will be overwritten]", extra={ "aps": { "alert": { "title":

launchOptions always nil when launching from a push notification

坚强是说给别人听的谎言 提交于 2020-06-12 09:14:43
问题 I'm sending push notifications from a Django app (using django-push-notifications) to an iOS app. The app targets iOS 13 and I'm running it on an iPhone 7 running iOS 13.3.1. I'm debugging in Xcode 11.3.1 I'm trying two different methods to send the notification from the Django side: Method 1: devices.send_message(message={"title" : title, "body" : message}, thread_id="events", extra={"foo": "bar"}) Method 2: devices.send_message("[will be overwritten]", extra={ "aps": { "alert": { "title":

Does AUGraph deprecation means no more audio render callbacks?

北城余情 提交于 2020-06-12 08:17:30
问题 I have an app with an elaborated render callback that I doubt could do with AVAudioEngine. Anyway to use my AUGraph render callback ( with multiple buses ) with AVAudioEngine ? Any sample code ? 回答1: The Audio Unit API is not deprecated, only AUGraph which is presumably built on top of it. Make connections using AudioUnitSetProperty with kAudioUnitProperty_MakeConnection with an AudioUnitConnection struct. Start and stop your output unit with AudioOutputUnitStart and AudioOutputUnitStop. Set

Does AUGraph deprecation means no more audio render callbacks?

余生长醉 提交于 2020-06-12 08:17:07
问题 I have an app with an elaborated render callback that I doubt could do with AVAudioEngine. Anyway to use my AUGraph render callback ( with multiple buses ) with AVAudioEngine ? Any sample code ? 回答1: The Audio Unit API is not deprecated, only AUGraph which is presumably built on top of it. Make connections using AudioUnitSetProperty with kAudioUnitProperty_MakeConnection with an AudioUnitConnection struct. Start and stop your output unit with AudioOutputUnitStart and AudioOutputUnitStop. Set

Not getting APNS Device token on ios 13

徘徊边缘 提交于 2020-06-10 02:37:29
问题 I have issue related to APNS device token . Before I was using Xcode 10.2 and iOS 12.1. At this moment I used to get the device token in delegate method -(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken I am registering for APNS like this and it was working fine. UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; center.delegate = self; [center requestAuthorizationWithOptions:

How get current keywindow equivalent for multi window SceneDelegate Xcode 11?

心已入冬 提交于 2020-06-09 18:27:11
问题 I'm converting my iOS13 app for iPadOS to SceneDelegate (multi window). How can I get the current UIWindow from the current SceneDelegate? I know that a can access the current scene using UIView.window or UIViewController.view.window , but I have a non UI class (AppDelegate) where I need to get the window (keyWindow until iOS12) to show a snack bar on top of everything. I used to do [UIApplication sharedApplication].keyWindow but now, of course, that's wrong. 回答1: You'll want to simply

iOS 13 Schedule iOS background tasks

孤者浪人 提交于 2020-06-09 12:17:59
问题 I am implementing BackgroundTasks Framework for updating the data. But I got the below issue Could not schedule refreshApp: Error Domain=BGTaskSchedulerErrorDomain Code=1 "(null)" Could not schedule data featch: Error Domain=BGTaskSchedulerErrorDomain Code=1 "(null)" 2019-10-01 19:19:32.550320+0530 SOBackgroundTask[34131:1129470] Can't end BackgroundTask: no background task exists with identifier 3 (0x3), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to