I'm using native iOS sdk and i'm setting the property kOSSettingsKeyInAppLaunchURL to false.. but it doesn't seem to have any effect as the Safari browser is being open when I click on the notification.
I'm using pod version OneSignal (2.5.2)
@rodrigoreis22 Setting kOSSettingsKeyInAppLaunchURL to false will launch Safari when a launch URL is set on the notification. A WebView is shown in app by default if this isn't set.
If you are targeting web push users you will need to send 2 notifications. One with a URL set to web push users. And another to iOS users without a URL set.
@jkasten2 oh really do I need 2 notifications just because of this? Is there a way to configure it to ignore any launchUrl on iOS? Android SDK doesn't have this behavior...
One of the key things I use OneSignal is that I can send push to multiple platforms with just one API call...
@rodrigoreis22 Correct for iOS. For Android I am guessing you are using the AndroidManifest.xml below to start your own Activity?
<meta-data android:name="com.onesignal.NotificationOpened.DEFAULT" android:value="DISABLE" />
We are looking to not requiring 2 different notifications in this case in the future.
@jkasten2 yes we use that meta-data tag on our Android app. the kOSSettingsKeyInAppLaunchURL should be an enum: .none, .safari, .inApp . maybe the property name should be kOSSettingsKeyLaunchURLMode
@rodrigoreis22 Thanks for the suggestion. We will consider this as well as possibly providing more options on the REST API and dashboard to handle this scenario better.
@jkasten2 great. thanks.
@jkasten2 are you planning to release this any time soon ?
Hi there! I think it's a great idea from @rodrigoreis22 !
Any progress on this small CR?
@iDevo funny you mention this - we actually just started working on a fix for this the other day. I will re-open this issue so that I remember to update everyone when the improvement is released
Fortunately the solution is even more flexible than adding a none case to kOSSettingsKeyInAppLaunchURL. I will keep you posted.
We have added a web_url option you can set instead of url if you only want to open a page for your web push devices and not effect your app users. Currently this is only available for notifications sent through the REST API.
https://documentation.onesignal.com/reference#section-attachments
Will this feature be on the Dashboard in the future? Thank you!
Can I ignore the launchURL in the latest SDK?
I'm using OneSignal WordPress plugin so I will have a launchURL. Ca I ignore it in the application, meaning to prevent opening WebView or Safari? I have seen that in the current SDK kOSSettingsKeyInAppLaunchURL is still a boolean.
Most helpful comment
@iDevo funny you mention this - we actually just started working on a fix for this the other day. I will re-open this issue so that I remember to update everyone when the improvement is released
Fortunately the solution is even more flexible than adding a
nonecase tokOSSettingsKeyInAppLaunchURL. I will keep you posted.