Wednesday, 28 August 2013

Demo iOS App - Demonstrating integrating a Custom URL Scheme with rdrct.it for iOS

Sourcecode for this demo can be found here.

I've been asked to demonstrate the whole process of integrating a Custom URL Scheme with an iOS app including configuring rdrct.it, so hopefully this post will help. The demo app can be downloaded and built - you will then be able to test the "Auto-redirect" functionality yourself.

1. Configuring rdrct.it:
We'll be using the "Custom URL Scheme" rdrctitdemo://
For testing purposes, I've created an app in rdrct.it with the following settings:

How my demo app has been configured in rdrct.it
I've deliberately left the "Auto-redirect" box unticked for the iPad so that you can see the difference between the two settings when you access the test URLs.

2. Test the URLs without the app installed:
Browse to this page on an iPhone (and if possible an iPad too), and tap one of the following links:



You'll see that you can use either a query string, or subfolders after your Unique Code. Both will be passed on "as-is" to the Custom URL Scheme, and therefore to your app.

iPhone (Auto-redirect enabled):
What you'll see now (when you don't have the app installed - and therefore before the Custom URL Scheme has been registered with the device) is that you'll be taken straight to the App Store and see one of our lovely client's apps because this demo app is not in the App Store.

iPad (Auto-redirect disabled):
You'll see a couple of options - open in app, or open the App Store. This gives your user the choice whether to open the app using the Custom URL, or to go to the App Store. If the app is not installed, then "Open in app" will fail, but at least your user has had the choice.

Here's the difference between Auto-redirect enabled or disabled:
Enabled - rdrct.it attempts to serve the "Custom URL Scheme". If that fails then it goes to the App Store.
Disabled - rdrct.it doesn't attempt to serve the "Custom URL Scheme". Instead, it gives the user a choice.

3. Install the demo app on your devices.
Now try the two URLs again.

iPhone (Auto-redirect enabled):
What you'll see now is that you'll be taken straight into the demo app using the Custom URL Scheme and the URL Resource will be shown - it is passed through rdrct.it to the Custom URL Scheme, and can therefore be used by your app.

iPad (Auto-redirect disabled):
You'll see the options again, but this time, "Open in app" will be able to open your app using the Custom URL Scheme, and as previously, the URL Resource will be passed to the app.

Summary
Hopefully this demonstrates the process and the functionality of rdrct.it. I'll be adding to the demo project over time and will update this post accordingly.

NOTE: The question of whether or not to use "Auto-redirect" depends on the situation. We will be improving the system when we find better solutions, but currently it works beautifully on iOS and Windows Phone. Less so on Android - we have a bit of a race condition with Android, so it will work most of the time, but will send your users to Google Play some times when they do have the app installed. My current recommendation is therefore to use "Auto-redirect" for iOS and Windows Phone, but not for Android.

Sourcecode for this demo can be found here.

6 comments:

  1. This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post. scaricare pdf

    ReplyDelete
  2. This is also a very good post which I really enjoyed reading. It is not every day that I have the possibility to see something like this.. Libri PDF

    ReplyDelete
  3. Great post. It is very true, people must learn how to learn before they can learn.You certainly fully understand what youre speaking about, and I can truly get behind that. Libri PDF Online

    ReplyDelete
  4. Java Training Java Training | Java Course in Chennai Java Course in Chennai | Java Training Chennai Java Training Chennai | Online Java Training India Online Java Training | Java Articles Java Articles Java Interview Training Courses. Java SE & Java EE Certification Courses Training Program. Java SE & Java EE Course Contents. Face To Face java SE Java EE Training Courses Materials.

    ReplyDelete
  5. Java Training in Chennai | Online Java Training | Java Training Institutes in Chennai | Java J2EE Training Institutes in Chennai | Online Java Training | IT Technical Articles Online / Class room Java SE & Java EE Training Courses. Instructor Led java SE Java EE Training Courses. Lecture / Practical ratio. Best Java Faculty Available.

    ReplyDelete