Skip to content

Commit 4624a2c

Browse files
committed
Fix Invalid App ID Error
• Fixes an iOS specific issue with the OneSignal Unity SDK where "Fatal: Invalid AppId Format" error was printed to console and initialization didn't finish on the first init() call (OneSignal-Unity-SDK Error #77)
1 parent a9231ee commit 4624a2c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

iOS_SDK/OneSignalSDK/Source/OneSignal.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,11 @@ +(bool)initAppId:(NSString*)appId withUserDefaults:(NSUserDefaults*)userDefaults
431431
}
432432

433433
if (!app_id) {
434+
app_id = [userDefaults stringForKey:@"GT_APP_ID"];
434435
if (![settings[kOSSettingsKeyInOmitNoAppIdLogging] boolValue])
435436
onesignal_Log(ONE_S_LL_FATAL, @"OneSignal AppId never set!");
436-
app_id = [userDefaults stringForKey:@"GT_APP_ID"];
437+
else
438+
return true;
437439
}
438440
else if (![app_id isEqualToString:[userDefaults stringForKey:@"GT_APP_ID"]]) {
439441
// Handle changes to the app id. This might happen on a developer's device when testing

0 commit comments

Comments
 (0)