Description:
When using custom @IBDesignable on Storyboard, it fails to render views.
Environment
Anything else:
The process seems now named "IBDesignablesAgent-iOS" instead of "IBDesignablesAgentCocoaTouch" (see stack)
Stack
Process: IBDesignablesAgent-iOS [18120]
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/IBDesignablesAgent-iOS
Identifier: IBDesignablesAgent-iOS
Version: 10.0 (14283.14)
Code Type: X86-64 (Native)
Parent Process: launchd_sim [14010]
Responsible: IBDesignablesAgent-iOS [18120]
User ID: 501
Date/Time: 2018-09-19 15:40:48.865 +0200
OS Version: Mac OS X 10.13.6 (17G65)
Report Version: 12
rashed Thread: 0
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: bundleProxy != nil'
_LSContextInit() failed with error -10813
terminating with uncaught exception of type NSException
abort() called
CoreSimulator 572.2 - Device: iPhone 8 - Runtime: iOS 12.0 (16A366) - DeviceType: iPhone 8
Application Specific Backtrace 1:
0 CoreFoundation 0x000000011098d29b __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010f442735 objc_exception_throw + 48
2 CoreFoundation 0x000000011098d022 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010ee46b47 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 UserNotifications 0x000000011ecfc951 -[UNUserNotificationCenter initWithBundleProxy:] + 292
5 UserNotifications 0x000000011ecfc72c __53+[UNUserNotificationCenter currentNotificationCenter]_block_invoke + 81
6 libdispatch.dylib 0x0000000116ae7587 _dispatch_client_callout + 8
7 libdispatch.dylib 0x0000000116ae8d8e _dispatch_once_callout + 20
8 UserNotifications 0x000000011ecfc6d8 +[UNUserNotificationCenter currentNotificationCenter] + 45
9 Dev-X 0x00000002269a579e +[OneSignalHelper registerAsUNNotificationCenterDelegate] + 46
10 Dev-X 0x000000022699baf3 +[UIApplication(OneSignal) setupUNUserNotificationCenterDelegate] + 83
11 Dev-X 0x000000022699b9f0 +[UIApplication(OneSignal) load] + 832
12 libobjc.A.dylib 0x000000010f443dae call_load_methods + 234
13 libobjc.A.dylib 0x000000010f444c04 load_images + 77
14 ??? 0x000000010d644068 0x0 + 4519641192
15 ??? 0x000000010d651532 0x0 + 4519695666
16 ??? 0x000000010d650704 0x0 + 4519692036
17 ??? 0x000000010d650798 0x0 + 4519692184
18 ??? 0x000000010d647162 0x0 + 4519653730
19 ??? 0x000000010d64c5ab 0x0 + 4519675307
20 libdyld.dylib 0x0000000116b5a214 dlopen + 171
21 IBFoundation 0x000000010ea18180 -[IBAbstractInterfaceBuilderTool _resultByLoadingUnloadedBundleInstance:] + 154
22 IBFoundation 0x000000010ea18829 -[IBAbstractInterfaceBuilderTool loadBuiltLiveViewBundleInstances:] + 809
23 IBFoundation 0x000000010ea12a53 __80-[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:]_block_invoke + 94
24 IBFoundation 0x000000010ea12924 -[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:] + 483
25 IBFoundation 0x000000010ea122f6 __88-[IBMessageReceiveChannel runBlockingReceiveLoopNotifyingQueue:notifyingTarget:context:]_block_invoke + 143
26 libdispatch.dylib 0x0000000116ae7587 _dispatch_client_callout + 8
27 libdispatch.dylib 0x0000000116af4072 _dispatch_async_and_wait_invoke + 109
28 libdispatch.dylib 0x0000000116ae7587 _dispatch_client_callout + 8
29 libdispatch.dylib 0x0000000116af33bc _dispatch_main_queue_callback_4CF + 1290
30 CoreFoundation 0x00000001108f07f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
31 CoreFoundation 0x00000001108eae86 __CFRunLoopRun + 2342
32 CoreFoundation 0x00000001108ea221 CFRunLoopRunSpecific + 625
33 Foundation 0x000000010eec7522 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 277
34 IBFoundation 0x000000010e9ce15e -[IBAbstractPlatformTool startServingReceiveChannel:] + 447
35 IBFoundation 0x000000010e9ce41a -[IBAbstractPlatformTool startServingWriteDescriptor:readDescriptor:] + 119
36 IBFoundation 0x000000010e9cef41 +[IBAbstractPlatformTool main] + 1205
37 IBDesignablesAgent-iOS 0x000000010d63d957 main + 34
38 libdyld.dylib 0x0000000116b57551 start + 1
39 ??? 0x0000000000000005 0x0 + 5
I was about to file the same report when I saw this ticket. I have the exact same stacktrace as above. A little googling led me to this stackoverflow question. https://stackoverflow.com/questions/46595434/ios-11-crashing-with-bundleproxy-nil-error-on-using-unusernotificationcenter
@remy-shopopop let me know if that suggestion resolves your issue - it should work.
@earthmaniebo Thanks ! I also saw this thread and tried an implementation but it didn't work since the issue is at the launch of OneSignal.
@Nightsd01 Do you have an implementation example ? Thanks !
@remy-shopopop No problem. :) I also tried an implementation but it failed.
@Nightsd01 would love to have an example on this. Thank you
@remy-shopopop @earthmaniebo As an explanation, our SDK performs some swizzling early on in the app/process launch with the Objective-C runtime to make it as easy as possible for developers to use the SDK. This way they don't have to add a whole bunch of boilerplate.
We had a condition to check if the process was an IBDesignable agent process, but as you mentioned, it appears Apple changed the process name in Xcode 10. We will also start checking for the new name. Hopefully no one releases an app called IBDesignablesAgent-iOS 😂
We will be releasing an update - most likely today - to fix this issue.
This issue has been fixed in our beta release (checkout README on the beta branch for installation details).
I will be keeping this issue open though until we merge this into the master branch and create an official iOS 12 release! Expecting this to happen early next week.
@Nightsd01 Awesome! Thank you for the detailed explanation, appreciate it.
I already installed the beta version in my project and the fix worked perfectly. Thanks! 😀
On this issue, do we continue to use the 'OneSignal', '>= 2.6.2', '< 3.0' or just use 'OneSignal' for IOS 12?
@bradlgray01 Until we finalize our Beta SDK and make a public release, you should install our Beta SDK, you can see the instructions for this on the beta branch readme here: https://github.com/OneSignal/OneSignal-iOS-SDK/blob/beta/README.md
Thank you for the instructions. Out of curiosity, are you thinking this will be released by next week? Or it's TBD?
@bradlgray01 We delayed this week due to challenges users are facing with Xcode 10 - however we will _definitely_ be releasing the beta by next week at the latest.
Ok, thanks for your help. Much appreciated
@Nightsd01 I'm hitting this as well. I tried installing the beta SDK with Cocoapods, but I get an error:
Analyzing dependencies
Pre-downloading:OneSignalfromhttps://github.com/OneSignal/OneSignal-iOS-SDK.git, branchbeta
[!] TheOneSignalpod failed to validate due to 1 error:
- ERROR | File Patterns: The OneSignal (2.8.5) spec is empty (no source files, resources, resource_bundles, preserve paths, vendored_libraries, vendored_frameworks, dependencies, nor subspecs).
@subdigital can you share your Podfile? Our spec is fine on the beta branch.
New update has been released with support for iOS 12! The new version (2.9.0) includes the fix for this issue. https://github.com/OneSignal/OneSignal-iOS-SDK/releases/tag/2.9.0
Most helpful comment
This issue has been fixed in our beta release (checkout README on the beta branch for installation details).
I will be keeping this issue open though until we merge this into the master branch and create an official iOS 12 release! Expecting this to happen early next week.