juricin
Posts: 0
Joined: Tue Jan 13, 2015 5:09 am

Return to specific page within app from Safari using Custom URL scheme

Hi, I need to be able to switch from iOS app to Safari to process payment (easy) and then switch back to a specific page within the iOS app.

This tutorial shows me how to use Custome URL scheme to switch from safari to iOS app but it simply opens up the app start page rather than a specific page.

Any advice on how this is possible?

Thanks, Ante

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Return to specific page within app from Safari using Custom URL scheme

Hello,

Could you clarify what tutorial do you use?
You should use redirect_url for redirecting from website to app. E.g. facebook API:
https://devcenter.appery.io/tutorials...

juricin
Posts: 0
Joined: Tue Jan 13, 2015 5:09 am

Return to specific page within app from Safari using Custom URL scheme

Hi Sergiy

This is the tutorial:
http://iosdevelopertips.com/cocoa/lau...

I can successfully switch back to App from Safari but it simply opens the app start page rather than going to a specific page, this is where im a bit lost.

How do I get it to target a specific page within Appery?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Return to specific page within app from Safari using Custom URL scheme

Hello -

If you are not using 'Render all pages in one HTML file (jQuery Mobile multi-page template)' in your App Settings, then the link to specific page should look like this -
precodehttp://appery.io/app/view/a3292e12-XXXX-XXXX-XXXX-XXXXXXXXXXX/your_page_name.html/code/pre

juricin
Posts: 0
Joined: Tue Jan 13, 2015 5:09 am

Return to specific page within app from Safari using Custom URL scheme

How do I actually open the link in the iOS Cordova app. I will need objective c code?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Return to specific page within app from Safari using Custom URL scheme

[quote:]
How do I actually open the link in the iOS Cordova app.
[/quote]
Cordova app uses JavaScript, so could you please clarify what kind of links you want to open inside your app?

[quote:]
I will need objective c code?
[/quote]
Based on tutorial you've mentioned above - yes.

juricin
Posts: 0
Joined: Tue Jan 13, 2015 5:09 am

Return to specific page within app from Safari using Custom URL scheme

As you had mentioned above, the link to the specific page would be:

codehttp://appery.io/app/view/a3292e12-XXXX-XXXX-XXXX-XXXXXXXXXXX/your_page_name.html/code

The tutorial shows (half way down) that you can "Pass Parameters To App Via Custom URL Scheme"

Once the app launches back from Safari are you suggesting to have javascript redirect the app to that specific page link?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Return to specific page within app from Safari using Custom URL scheme

I'm not sure if approach described in this tutorial will work in Cordova. Perhaps you can search for similar solution for PhoneGap/Cordova app.

Return to “Issues”