Onesignal-ios-sdk: kOSSettingsKeyInAppLaunchURL set to false not working

Created on 27 Apr 2017  路  13Comments  路  Source: OneSignal/OneSignal-iOS-SDK

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)

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 none case to kOSSettingsKeyInAppLaunchURL. I will keep you posted.

All 13 comments

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

konkontos picture konkontos  路  3Comments

dirkoswanepoel picture dirkoswanepoel  路  5Comments

adambolcsfoldi picture adambolcsfoldi  路  4Comments

luai-kalkatawi picture luai-kalkatawi  路  4Comments

reza-khalafi picture reza-khalafi  路  5Comments