Skip to content

Commit 1baaa97

Browse files
committed
Don't prompt automatically in the ephemeral state
1 parent ad0fc5d commit 1baaa97

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

iOS_SDK/OneSignalDevApp/OneSignalDevApp/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<dict>
55
<key>CFBundleDevelopmentRegion</key>
66
<string>en</string>
7+
<key>CFBundleDisplayName</key>
8+
<string>OneSignalExample</string>
79
<key>CFBundleExecutable</key>
810
<string>$(EXECUTABLE_NAME)</string>
911
<key>CFBundleIdentifier</key>

iOS_SDK/OneSignalDevApp/OneSignalDevAppClip/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<key>CFBundleDevelopmentRegion</key>
66
<string>$(DEVELOPMENT_LANGUAGE)</string>
77
<key>CFBundleDisplayName</key>
8-
<string>OneSignalDevApp</string>
8+
<string>OneSignalExample</string>
99
<key>CFBundleExecutable</key>
1010
<string>$(EXECUTABLE_NAME)</string>
1111
<key>CFBundleIdentifier</key>

iOS_SDK/OneSignalSDK/Source/OneSignal.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ + (void)initSettings:(NSDictionary*)settings {
707707
providesAppNotificationSettings = [settings[kOSSettingsKeyProvidesAppNotificationSettings] boolValue];
708708

709709
// Register with Apple's APNS server if we registed once before or if auto-prompt hasn't been disabled.
710-
if (usesAutoPrompt || registeredWithApple) {
710+
if (usesAutoPrompt || (registeredWithApple && !self.currentPermissionState.ephemeral)) {
711711
onesignal_Log(ONE_S_LL_VERBOSE, @"uses auto prompt or registered with apple");
712712
if (usesAutoPrompt)
713713
onesignal_Log(ONE_S_LL_VERBOSE, @"uses auto prompt");

0 commit comments

Comments
 (0)