Skip to content

Commit

Permalink
Merge pull request #1468 from OneSignal/feat/fix_misleading_error_log…
Browse files Browse the repository at this point in the history
…_for_wrappers

Omit misleading fatal-level log for wrappers
  • Loading branch information
nan-li authored Aug 9, 2024
2 parents d63855d + d2eca16 commit cf90a80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion iOS_SDK/OneSignalSDK/Source/OneSignal.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion iOS_SDK/OneSignalSDK/Source/OneSignalFramework.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ NS_SWIFT_NAME(login(externalId:token:));
+ (Class<OSNotifications>)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;

Expand Down

0 comments on commit cf90a80

Please sign in to comment.