Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5884] iOS: Add support for adding custom URL schemes to Info.plist

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2016-08-22T17:56:29.000+0000
Affected Version/sRelease 1.8.0
Fix Version/sRelease 3.0.0
ComponentsiOS
Labelsn/a
ReporterRuben Fonseca
AssigneeIngo Muschenetz
Created2011-10-26T09:22:05.000+0000
Updated2017-03-21T18:28:17.000+0000

Description

On some of my projects, I needed to add additional URL schemes to my iOS applications. Right now that involves manually editing the build/iphone/Info.plist file. With this change I can just make a new property on tiapp.xml and it automatically adds the custom url scheme on the next build. Github push request [https://github.com/appcelerator/titanium_mobile/pull/591]

Comments

  1. Chris Barber 2016-08-22

    We've had support for this since Titanium SDK 3.0.0. You can simply specify any custom URL schemes in the tiapp.xml like this:
       <?xml version="1.0" encoding="UTF-8"?>
       <ti:app xmlns:ti="http://ti.appcelerator.org">
           <!-- other stuff -->
           <ios>
               <plist>
                   <dict>
                       <key>CFBundleURLTypes</key>
                       <array>
                           <dict>
                               <key>CFBundleURLName</key>
                               <!-- same as ti:app/id -->
                               <string>my.app.id</string>
                               <key>CFBundleURLSchemes</key>
                               <array>
                                   <!-- your custom scheme -->
                                   <string>myapp</string>
                                   <!-- same as 'fb' plus ti:app/property[name=ti.facebook.appid] -->
                                   <string>fb123456789</string>
                               </array>
                           </dict>
                       </array>
                       <!-- other ios/plist stuff -->
                   </dict>
               </plist>
               <!-- other ios stuff -->
           </ios>
       </ti:app>
       
    Source: http://fokkezb.nl/2013/08/26/url-schemes-for-ios-and-android-1/
  2. Ingo Muschenetz 2016-08-22

    Don't resolve as done please. Resolve it as fixed in 3.0.0 then
  3. Lee Morris 2017-03-21

    Closing ticket as fixed.

JSON Source