llfbandit / app_links

Android App Links, Deep Links, iOs Universal Links and Custom URL schemes handler for Flutter.
https://pub.dev/packages/app_links
Apache License 2.0
176 stars 68 forks source link

[IOS] click in link open my app but without get link , always null #19

Closed espitiajose closed 2 years ago

espitiajose commented 2 years ago
> <dict>
>   <key>com.apple.developer.associated-domains</key>
>   <array>
>       <string>applinks:farmatodoven.page.link</string>
>       <string>applinks:farmatodo.com.ve</string>
>       <string>activitycontinuation:farmatodo.com.ve</string>
>       <string>webcredentials:farmatodo.com.ve</string>
>       <string>applinks:farmatodo.onelink.me</string>
>       <string>applinks:ios-dot-ng-ftd.appspot.com</string>
>       <string>activitycontinuation:ios-dot-ng-ftd.appspot.com</string>
>       <string>webcredentials:ios-dot-ng-ftd.appspot.com</string>
>       <string>applinks:www.farmatodo.com.ve</string>
>       <string>applinks:*.farmatodo.com.ve</string>
>   </array>
> </dict>

command line https://www.farmatodo.com.ve/producto/111002864-removedor-valmy-original-vidrio-50-m

RobertoPelonara commented 2 years ago

Any updates?

llfbandit commented 2 years ago

Did you setup apple-app-site-association file on your web server without any redirection?

llfbandit commented 2 years ago

Ok, I checked your setup. All seems ok... What's the log says when running in debug with app not terminated?

espitiajose commented 2 years ago

I was overriding this method override func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {} which didn't let app_link work properly, sorry

MichaelDark commented 1 year ago

@espitiajose FYI, if you need to override one of these methods, this issue could be resolved by returning the result of the super-method call, like in this example:

    override func application(
        _ app: UIApplication,
        open url: URL,
        options: [UIApplication.OpenURLOptionsKey : Any] = [:]
    ) -> Bool {
        // Do your stuff
        return super.application(app, open: url, options: options) // return result of the super-call
    }

    override func application(
        _ app: UIApplication,
        continue userActivity: NSUserActivity,
        restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
    ) -> Bool {
        // Do your stuff
        return super.application(app, continue: userActivity, restorationHandler: restorationHandler) // return result of the super-call
    }

Might be related:

21 @dehypnosis