Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit misleading fatal-level log for wrappers #1468

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading