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

Universal Links in Air 19

Community Beginner ,
Jan 28, 2016 Jan 28, 2016

Copy link to clipboard

Copied

According to the release notes (http://labsdownload.adobe.com/pub/labs/flashruntimes/shared/air19_flashplayer19_releasenotes.pdf‌) and a guide provided by Adobe (Adobe Developer Connection | Universal Links for iOS) Air 19 should support Universal Links in iOS 9.

Having completed all the steps I should be able to receive the url information via the InvokeEvent. However, while old openUrl style deeplinks still work I find that there is no handling for applinks.

As a point of reference I have:

  • enabled Associated Domains on my app regenerated a provisioning profile
  • hosted an apple-app-site-association file on my domain with correct formatting and signing
  • entered my root url (as applinks:root.url) into the iOS Entitlements under com.apple.developer.associated-domains

Right now, pointing to my site (for example root.url/foo/bar) will open the app but I only receive a standard invoke.

As an additional measure, I have attempted some Air hackery in an ANE. By swizzling (http://nshipster.com/method-swizzling/‌) the application:continueUserActivity:restorationHandler: selector in a category of the CTAppController I should be able to gain access to the NSUserActivity object but this method never appears to be called. I also tried this with application:didFinishLaunchingWithOptions: (while of course calling the original selector otherwise Air won't run!) which is properly called but launchOptions is always null when launching via my link.


Hope there is an answer out there to resolve this problem. Thanks.

edited for clarifications

TOPICS
Air beta

Views

2.1K

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
Adobe Employee ,
Jan 28, 2016 Jan 28, 2016

Copy link to clipboard

Copied

Hi adevforgama, there are two invoke events generated. The first one doesn't contain any data. While the second one contains the url information. Have you checked the second invoke event? It should contain the required url information.

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
Community Beginner ,
Jan 29, 2016 Jan 29, 2016

Copy link to clipboard

Copied

The app is not generating two events, only one.

NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, function onMainInvoke(event:InvokeEvent):void {

  trace(event.reason + ' - ' + event.arguments);

});

Only gives me one instance of [trace] standard - in the console and no other messages.

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
Community Beginner ,
Jan 29, 2016 Jan 29, 2016

Copy link to clipboard

Copied

For reference the formatting in my entitlements:


<key>com.apple.developer.associated-domains</key>
  <array>
    <string>applinks:www.foo.com</string>

  </array>


apple-app-site-association:


{

    "applinks": {

        "apps": [],

        "details": [

            {

                "appID": "TEAMID.com.COMPANY.GAME",

                "paths": [ "/foo*", "/bar*", "/baz/*" ]

            }

        ]

    }

}

and a link I am using to open the app:

https://www.foo.com/baz/2874bv8

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
Adobe Employee ,
Jan 31, 2016 Jan 31, 2016

Copy link to clipboard

Copied

I think the problem is that the domain you are using is not accessible through HTTPS. www.foo.com if accessed through HTTPS is giving an certificate authority invalid exception. For universal links to work your domain should be accessible through HTTPS.

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
Contributor ,
Aug 21, 2017 Aug 21, 2017

Copy link to clipboard

Copied

LATEST

I'm having the same problem. The entitlements are added to the app ID and app template the links open the app, but they aren't present in the InvokeEvent parameters, and adding the handler to the appDelegate doesn't have an effect - the handler is never called, whether the app is running in the background or not - other handlers added to the appDelegate are working just fine. The JSON is correct, the site is accessible over HTTPS with a working certificate and indeed the associated domains are showing up as being approved in the iOS console when the app is installed on the device.

Did you ever find a solution to this?

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