I'am getting some crashes on SLComposeViewController
Crashed: com.apple.extension.global-state-queue
0 libobjc.A.dylib 0x18167cbb4 objc_loadWeakRetained + 156
1 libobjc.A.dylib 0x18167cd64 objc_copyWeak + 24
2 Social 0x1933abdbc __66-[SLComposeViewController initWithExtension:requestedServiceType:]_block_invoke + 84
3 Foundation 0x182b30b04 __85-[NSExtension _completeRequestReturningItems:forExtensionContextWithUUID:completion:]_block_invoke + 108
4 libdispatch.dylib 0x181ad1088 _dispatch_call_block_and_release + 24
5 libdispatch.dylib 0x181ad1048 _dispatch_client_callout + 16
6 libdispatch.dylib 0x181adae48 _dispatch_queue_serial_drain$VARIANT$mp + 528
7 libdispatch.dylib 0x181adb7d8 _dispatch_queue_invoke$VARIANT$mp + 340
8 libdispatch.dylib 0x181adc200 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 400
9 libdispatch.dylib 0x181ae44a0 _dispatch_workloop_worker_thread$VARIANT$mp + 644
10 libsystem_pthread.dylib 0x181d76fe0 _pthread_wqthread + 932
11 libsystem_pthread.dylib 0x181d76c30 start_wqthread + 4
Looks like to me like the reference got lost somehow? any idea?
I don't do anything special
- (void)presentTwitterShareWithURL:(NSURL *)url {
if (url == nil) {
return;
}
SLComposeViewController * cvc = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[cvc addURL:url];
[cvc setCompletionHandler:^(SLComposeViewControllerResult result) {
if (SLComposeViewControllerResultDone == result) {
[[Analytics shared] trackWithCategory:@"Web" action:@"Tap" label:@"Share - Twitter"];
}
}];
[self.navigationController presentViewController:cvc animated:YES completion:nil];
}
Note: it looks to me iOS11 related as i cannot recall having this issue before, also it was not tracked besides iOS11
SLServiceTypeTwitteris removed in iOS 11. You need to use Twitter's own share solution to implement this functionality.See this page for information about migrating to
TwitterKitfrom your current solution: https://dev.twitter.com/twitterkit/ios/migrate-social-framework