Skip to content

Commit f557824

Browse files
committed
Prevent Xcode storyboard rendering process from crashing with custom IBDesignable Views
1 parent 7586aef commit f557824

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

iOS_SDK/OneSignal/OneSignal.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,12 @@ @implementation UIApplication (OneSignal)
12411241
+ (void)load {
12421242
[OneSignal onesignal_Log:ONE_S_LL_VERBOSE message:@"UIApplication(OneSignal) LOADED!"];
12431243

1244+
// Prevent Xcode storyboard rendering process from crashing with custom IBDesignable Views
1245+
// https://github.com/OneSignal/OneSignal-iOS-SDK/issues/160
1246+
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
1247+
if ([[processInfo processName] isEqualToString:@"IBDesignablesAgentCocoaTouch"])
1248+
return;
1249+
12441250
if (SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(@"7.0"))
12451251
return;
12461252

0 commit comments

Comments
 (0)