Highlighted

AIR iOS URL Scheme

Explorer ,
May 01, 2014

Copy link to clipboard

Copied

I'm developing an AIR for iOS app for my client to run on an iPad, and my app needs to be able to launch other apps using a URL scheme, and also to be launched by another app, by receiving a URL scheme from it. From what I have read, it would appear that AIR for iOS apps can receive and respond to URL schemes, but they cannot send URL schemes to launch other apps, due to security restrictions.

Does anyone know if it is possible to both send and receive URL schemes?

Yes, you can.

Open installed "Wikitude" app can be done via this script

import flash.events.MouseEvent;

btn.addEventListener(MouseEvent.CLICK, callURL);

function callURL(e:MouseEvent):void{
    navigateToURL(new URLRequest("wikitude://"));
}

Same way you can open your app from any other. In example above Wikitude app it's URI id. The same as below iPadARIconAppB

Here is part of Application-xml.xml descriptor from my old project:

<iPhone>

    <InfoAdditions><![CDATA[

  <key>UIDeviceFamily</key>

  <array>

    <string>1</string>

    <string>2</string>

  </array>

  <key>CFBundleURLTypes</key>

  <array>

    <dict>

      <key>CFBundleURLName</key>

      <string>com.camel.geo.iPadARIconAppB.iPadARIconAppB-scheme</string>

      <key>CFBundleURLSchemes</key>

      <array>

        <string>iPadARIconAppB</string>

      </array>

    </dict>

  </array>

  <key>UIApplicationExitsOnSuspend</key>

  <true/>

]]></InfoAdditions>

    <requestedDisplayResolution>standard</requestedDisplayResolution>

  </iPhone>

You need to change CFBundleURLName to your app ID by my sample and CFBundleURLSchemes put there your own app name.

If you want open your app from any other - you must open "iPadARIconAppB://" and if you need pass params - just make "iPadARIconAppB://myparams" and read it via Invoke from Adobe Air.

Air is great and allow many things

TOPICS
Development

Views

2.7K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

AIR iOS URL Scheme

Explorer ,
May 01, 2014

Copy link to clipboard

Copied

I'm developing an AIR for iOS app for my client to run on an iPad, and my app needs to be able to launch other apps using a URL scheme, and also to be launched by another app, by receiving a URL scheme from it. From what I have read, it would appear that AIR for iOS apps can receive and respond to URL schemes, but they cannot send URL schemes to launch other apps, due to security restrictions.

Does anyone know if it is possible to both send and receive URL schemes?

Yes, you can.

Open installed "Wikitude" app can be done via this script

import flash.events.MouseEvent;

btn.addEventListener(MouseEvent.CLICK, callURL);

function callURL(e:MouseEvent):void{
    navigateToURL(new URLRequest("wikitude://"));
}

Same way you can open your app from any other. In example above Wikitude app it's URI id. The same as below iPadARIconAppB

Here is part of Application-xml.xml descriptor from my old project:

<iPhone>

    <InfoAdditions><![CDATA[

  <key>UIDeviceFamily</key>

  <array>

    <string>1</string>

    <string>2</string>

  </array>

  <key>CFBundleURLTypes</key>

  <array>

    <dict>

      <key>CFBundleURLName</key>

      <string>com.camel.geo.iPadARIconAppB.iPadARIconAppB-scheme</string>

      <key>CFBundleURLSchemes</key>

      <array>

        <string>iPadARIconAppB</string>

      </array>

    </dict>

  </array>

  <key>UIApplicationExitsOnSuspend</key>

  <true/>

]]></InfoAdditions>

    <requestedDisplayResolution>standard</requestedDisplayResolution>

  </iPhone>

You need to change CFBundleURLName to your app ID by my sample and CFBundleURLSchemes put there your own app name.

If you want open your app from any other - you must open "iPadARIconAppB://" and if you need pass params - just make "iPadARIconAppB://myparams" and read it via Invoke from Adobe Air.

Air is great and allow many things

TOPICS
Development

Views

2.7K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 01, 2014 1
Adobe Community Professional ,
May 01, 2014

Copy link to clipboard

Copied

I haven't tried this, but what happens if you navigateToURL() to a custom url scheme address?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 01, 2014 0
Advocate ,
May 01, 2014

Copy link to clipboard

Copied

Yes, you can.

Open installed "Wikitude" app can be done via this script

import flash.events.MouseEvent;

btn.addEventListener(MouseEvent.CLICK, callURL);

function callURL(e:MouseEvent):void{
    navigateToURL(new URLRequest("wikitude://"));
}

Same way you can open your app from any other. In example above Wikitude app it's URI id. The same as below iPadARIconAppB

Here is part of Application-xml.xml descriptor from my old project:

<iPhone>

    <InfoAdditions><![CDATA[

  <key>UIDeviceFamily</key>

  <array>

    <string>1</string>

    <string>2</string>

  </array>

  <key>CFBundleURLTypes</key>

  <array>

    <dict>

      <key>CFBundleURLName</key>

      <string>com.camel.geo.iPadARIconAppB.iPadARIconAppB-scheme</string>

      <key>CFBundleURLSchemes</key>

      <array>

        <string>iPadARIconAppB</string>

      </array>

    </dict>

  </array>

  <key>UIApplicationExitsOnSuspend</key>

  <true/>

]]></InfoAdditions>

    <requestedDisplayResolution>standard</requestedDisplayResolution>

  </iPhone>

You need to change CFBundleURLName to your app ID by my sample and CFBundleURLSchemes put there your own app name.

If you want open your app from any other - you must open "iPadARIconAppB://" and if you need pass params - just make "iPadARIconAppB://myparams" and read it via Invoke from Adobe Air.

Air is great and allow many things

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 01, 2014 0
Explorer ,
May 07, 2014

Copy link to clipboard

Copied

Thanks Anton, I can confirm that this works.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 07, 2014 0