File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
iOS_SDK/OneSignalSDK/Source Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -321,10 +321,16 @@ + (BOOL)isValidAppId:(NSString*)appId {
321321 1/2 steps in OneSignal init, relying on setAppId (usage order does not matter)
322322 Sets the iOS sepcific app settings
323323 Method must be called to successfully init OneSignal
324+ Note: While this is called via `initialize`, it is also called directly from wrapper SDKs.
324325 */
325326+ (void )setLaunchOptions : (nullable NSDictionary *)newLaunchOptions {
326327 [OneSignalLog onesignalLog: ONE_S_LL_VERBOSE message: [NSString stringWithFormat: @" setLaunchOptions() called with launchOptions: %@ !" , launchOptions.description]];
327328
329+ // Don't continue if the newLaunchOptions are nil
330+ if (!newLaunchOptions) {
331+ return ;
332+ }
333+
328334 launchOptions = newLaunchOptions;
329335
330336 // Cold start from tap on a remote notification
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ NS_SWIFT_NAME(login(externalId:token:));
8282+ (Class <OSNotifications>)Notifications NS_REFINED_FOR_SWIFT;
8383
8484#pragma mark Initialization
85+ + (void )setLaunchOptions : (nullable NSDictionary *)newLaunchOptions ; // meant for use by wrappers
8586+ (void )initialize : (nonnull NSString *)newAppId withLaunchOptions : (nullable NSDictionary *)launchOptions ;
8687+ (void )setLaunchURLsInApp : (BOOL )launchInApp ;
8788+ (void )setProvidesNotificationSettingsView : (BOOL )providesView ;
You can’t perform that action at this time.
0 commit comments