Skip to Content

When I started developing iOS apps a couple of years ago, I was concerned that enterprise apps were going to quickly succumb to the world of development scope creep. Since the apps were fairly focused and provided a single function or process solution, what if the business wanted more? For example, you have a CRM app displaying your customer contact information and some high level details regarding order history and credit limits, but what if the user wanted some additional details from your BI solution drilling down into historical orders and profit analysis? Well, in that case, you had a few options:

1) Extend the scope of the app – by adding functionality and options, sometimes a reasonable option if the scope is not excessive or the functionality is relative to the app. In our  above example, probably not.

2) Build another app with replicated functionality – duplicate code to display the customers and overview details in both apps.

3) Build 2 separate apps – But this would require the user to re-enter information (such as searching for and entering the Customer ID) in the 2nd app.

The fourth option is to use option 3 but with a twist, by enabling communication between the 2 apps by using URL Schemes. As the majority of iOS developers know, you can open other standard iOS apps like Safari, Mail or the Phone using the UIApplication SharedApplication class, what many developers and mobility architects overlook is that, not only standard apps can be called from your code, but any app which has a URL scheme defined. This gives you the ability to separate processes by application, and in the event a user would like drill deeper into additional information or functions, you can pass information to another app where that can be handled. What if the app is not installed? Good question … You device will smartly open the Apple App Store giving you the ability to install the missing app. Configuring and consuming the communication between 2 apps is very simple and straight forward.

http://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Art/app_open_url_2x.png

You can read about the URL Schemes within the apple documentation here:

http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html

and here: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW18

Within the SAP Suite of iOS Apps you can also find URL Schemes already configured and in use, some examples of these are:

CRM @ SAP

Find account by number: crmatsap://openAccount?accountid=<number>

Open opportunity by number: crmatsap://openOpportunity?opportunityid=<number>

Open account by number: crmatsap://openAccount?accountid=<number>

SAP Pricing

Open Product by ID: pricingapp://openProduct?productid=<productid>

If you are still not sure if iOS URL Schemes are right for you here are a couple of Pro’s and Con’s

Pros:

– Use other custom apps to augment yours

– Use other companies apps to augment yours

– No need to redevelop similar functionality

– Communicate between apps

– Launch your app from a hyperlink (online/in a web page?)

– No need to be online for base functionality

Cons:

– Shouldn’t pass sensitive data

– Clearly define the scope of each app and avoid over simplifying (e.g. an app for searching for customers by name, another for searching by ID.)

– Should not be a critical function, since there is no guarantee that the data is being received by the other application

I am curious to know how many app developers out there are using URL Schemes within their custom development?

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Matthias Fueller

    Hi Paul,

    thanks for this useful information!

    Is there a place where we can consult the url schemes and parameters offered by the SAP standard apps?

    Regards, Matthias

    (0) 
    1. Paul Aschmann Post author

      Hi Matthias,

      Glad to hear you found it useful – however, unfortunately I am unaware of a list of URL Schemas from the SAP apps which we could reference. I know to open the SAP Mobile BI app, you would use sapbi:// – but unsure of any others.

      Cheers, Paul

      (0) 
    2. Martin Lang

      Hi Matthias,

      I work within SAP internally (where we run SAP for SAP) in our internal Mobile CoE.

      We have a list of in the meantime about 40 or so applications that use URL schemes at the very least to open up an app from another app, but in some cases also for more functionality. E.g. we have an app to create IT Support tickets (we use Solution Manager for these kinds of tickets) and through URL schemes we can e.g. open this app from another app and pre-default the right component, a short text for the ticket, the priority etc. still giving the user the chance to change these fields and of course enter his specific problem, but still making it much easier to create a ticket as all major info is prepopulated through a URL scheme.

      I am not aware of a list of URL schemes for all SAP Standard apps, the one Paul mentioned is certainly used a lot. Check out this post for more detail on the possible parameters behind sapbi:// -> http://scn.sap.com/thread/2019077

      Are you using any of the former native SAP apps currently? If you give me a list I could check if there is a chance if these apps use URL schemes with the respective owners.

      Cheers, Martin

      (0) 
      1. Matthias Fueller

        Hi Martin,

        thanks for your help, I’m looking especially for the details for the SAP CRM Sales V2.1 mobile app. The URL scheme is sapcrmsales:// but I don’t know which parameters I can pass in. We woud like to jump directly to a certain account or activity, if possible. Any help is appreciated.

        Cheers, Matthias

        (0) 
    3. John Astill

      Hi Matthias,

      For any iOS app you can determine which url schemes are implemented by looking at the included Info.plist file.

      The IPA file e.g. somegreatapp.ipa is an archive file that can be unzipped. I use the command line so I would simply ‘unzip somegreatapp.ipa’ .

      This will create a folder called Payload with another folder of the app name inside.

      cd Payload/somegreatapp .

      In this directory are the resources for the app including Info.plist.

      From the command line ‘open Info.plist’ will open Xcode with the plist editor.

      Inside the plist is where the URL schemes are defined (Apple docs: iOS App Programming Guide: Advanced App Tricks ).

      This is where you will find something like somegreatapp:// .

      Unfortunately this is not the whole story. That scheme will point to the app, however the app itself may be expecting more parameters to be attached to the url scheme. For example you may be able to open a financial app directly to the account, if an account is not passed the app may not open.

      akosma.com has a list of schemes for a number of apps (IPhone URL Schemes – akosma wiki), unfortunately none SAP that would help you.

      Regards

      JohnA

      (0) 

Leave a Reply