Forum Documentation Showcase Pricing Learn more

Open new Safari window/tab from iOS native

I’m getting rejected from the App Store because my design for a “Donate” button opens a Patreon donation page within the native app. I want a workflow, script, or link that will open a Patreon page in Safari (or whatever the default browser is).

I understand there is a preference war with opening new windows vs tabs, and I couldn’t care less. I just want the Donate button to open the Patreon page outside of the native app so I can get approved by the App Store and iterate later.

I’ve tried solutions from these pages without success:


Namely, I’ve tried running a Javascript, and external website. I can’t try out the hyperlink option because of weird display issues that I’m figuring out. Screenshots attached:

(A) 35 PM
(B) 21 PM

Any clue? I’m on the 2-yard line for getting into the App Store. Thanks in advance!!!

Let`s see if this helps you out:

Use a cordova inappbrowser plugin.
Assuming you have cordova installed you can add the plugin from console with:

cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git

Then add in the cordova config.xml file:

<feature name="InAppBrowser">
    <param name="ios-package" value="CDVInAppBrowser" />
</feature>

Allow the launch of URL`s: (try also without these at first)

   <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />

And then for the link use:

<a href="javascript: window.open('http://www.yourpatreonurl.here/', '_system'); return false;">Donate all your money here</a>

More documentation here:
https://cordova.apache.org/docs/en/3.0.0/cordova/inappbrowser/inappbrowser.html

IF this did NOT work…
Explore this:

1 Like

Hi @gurun, I appreciate it! One question: How do I use a cordova inappbrowser plugin?

I looked to the Bubble plugins list and couldn’t find anything.

Cordova sounds like one problem I had while wrapping the Bubble web app so I could submit to the App Store…

You need to add it using cordova. Did you even install cordova on your computer?
Unzip your “app” package bubble sent you.

To install cordova:

Go to your app folder.
To configure your plugin: (learn from this but use my guide)

After all of this. Zip your app folder back up and upload to the phonegap build service.

Good luck!

1 Like

I installed PhoneGap but not Cordova, I think. Thanks.