diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignal.m b/iOS_SDK/OneSignalSDK/Source/OneSignal.m index c3937cdbd..b18d5ffdc 100755 --- a/iOS_SDK/OneSignalSDK/Source/OneSignal.m +++ b/iOS_SDK/OneSignalSDK/Source/OneSignal.m @@ -293,7 +293,10 @@ + (void)setAppId:(nullable NSString*)newAppId { + (BOOL)isValidAppId:(NSString*)appId { if (!appId || ![[NSUUID alloc] initWithUUIDString:appId]) { - [OneSignalLog onesignalLog:ONE_S_LL_FATAL message:[NSString stringWithFormat:@"OneSignal AppId: %@ - AppId is null or format is invalid, stopping initialization.\nExample usage: 'b2f7f966-d8cc-11e4-bed1-df8f05be55ba'\n", appId]]; + if (!OneSignalWrapper.sdkType) { + // Fatal log if not a wrapper SDK, wrappers will call init with null App Id + [OneSignalLog onesignalLog:ONE_S_LL_FATAL message:[NSString stringWithFormat:@"OneSignal AppId: %@ - AppId is null or format is invalid, stopping initialization.\nExample usage: 'b2f7f966-d8cc-11e4-bed1-df8f05be55ba'\n", appId]]; + } return false; } return true; diff --git a/iOS_SDK/OneSignalSDK/Source/OneSignalFramework.h b/iOS_SDK/OneSignalSDK/Source/OneSignalFramework.h index a1a2d557b..fd5f70c55 100755 --- a/iOS_SDK/OneSignalSDK/Source/OneSignalFramework.h +++ b/iOS_SDK/OneSignalSDK/Source/OneSignalFramework.h @@ -76,7 +76,6 @@ NS_SWIFT_NAME(login(externalId:token:)); + (Class)Notifications NS_REFINED_FOR_SWIFT; #pragma mark Initialization -+ (void)setLaunchOptions:(nullable NSDictionary*)newLaunchOptions; // meant for use by wrappers + (void)initialize:(nonnull NSString*)newAppId withLaunchOptions:(nullable NSDictionary*)launchOptions; + (void)setProvidesNotificationSettingsView:(BOOL)providesView;