• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
1

AIR iOS URL Scheme

Explorer ,
May 01, 2014 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?

TOPICS
Development

Views

2.9K

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
community guidelines

correct answers 1 Correct answer

Advocate , May 01, 2014 May 01, 2014

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>

  

...

Votes

Translate

Translate
LEGEND ,
May 01, 2014 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?

Votes

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
community guidelines
Advocate ,
May 01, 2014 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

Votes

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
community guidelines
Explorer ,
May 07, 2014 May 07, 2014

Copy link to clipboard

Copied

LATEST

Thanks Anton, I can confirm that this works.

Votes

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
community guidelines