-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application is open, but Won't go to callback #4
Comments
I have been facing same issue. |
Same here, callback won't hit for iOS app. For Android works fine though. |
This is an error I was facing as well. My problem was related to a custom delegate we had created to handle a custom event not yet supported by Nativescript. Commenting out the custom delegate, actually fixed the issue and I can get the callback on iOS as well. |
Thanks for sharing that @arsentabaku will check my app for such custom events too. |
I am having the same error where my application opens from a universal link, but the function registerUniversalLinkCallback don't get executed on iOS... It happens opening the app from scratch or waking it up from the background. I am using Nativescript 6 and iOS 9+ ngOnInit(): void { @deni-begaj did you manage to get this working? Is there any angular application example someone could refrence? |
Any progress on this? |
Could someone that has this issue send me a project that I can try to replicate the issue on? I tried to do it myself but I couldn't recreate the issue. It worked on iOS and Android even when the app was not previously open. |
Hi, Did you try to declaring the |
@keerl I believe what's occurring here is in addition to
Combined with the other delegate wiring, this would handle all scenarios better (first launch and resume). |
Thanks @NathanWalker ! I added your suggestion and published a new version Could anyone that encountered this issue test the new version out and confirm it has been resolved? |
Further context can be seen in this discussion (bit older but still relevant): Further comments in that thread the extra consideration if the app is using other delegates methods through other plugins - for example firebase modifies the app delegate as well, which is why having both delegate methods helps. |
Found a solution for Android and Angular. in app.component.ts
it works when the application is launched fresh. And for resume mode:
|
@Bezlepkin thanks for this, where did you put the code for resume mode, also in ngOnInit ? |
Hi, I spending a little bit of time on this, the solution of @NathanWalker is really nice but still had some issue to populate the getUniversal Link when the delegate is manually set! The work around is to user if (global.isIOS) {
@NativeClass()
@ObjCClass(UIApplicationDelegate)
class UIApplicationDelegateImpl extends UIResponder implements UIApplicationDelegate {
applicationContinueUserActivityRestorationHandler(application: UIApplication, userActivity: NSUserActivity, restorationHandler: (p1: NSArray<UIUserActivityRestoring>) => void): boolean {
setUniversalLink(userActivity.webpageURL.absoluteString)
console.error("getUniversalLink", getUniversalLink())
return true;
}
applicationOpenURLOptions(app: UIApplication, url: NSURL, options: NSDictionary<string, any>): boolean {
console.error(">>>applicationOpenURLOptions")
console.error(url.absoluteString)
console.error("<<<applicationOpenURLOptions")
setUniversalLink(url.absoluteString)
return true; this is for Stripe
}
}
Application.ios.delegate = UIApplicationDelegateImpl;
} |
Also it may help! I use the // app.ts
Application.on(Application.displayedEvent, (args) => {
console.error("APP DESPLAYED EVENT");
registerUniversalLinkCallback(link => {
console.error("Link", link);
// Handle the navigation
});
}) |
When the app is already opened in the background and i click the link its goes there with all the right details, but when the app is closed and i click the link the app will open, but as if i opened it regulary, without reaching the callback
The text was updated successfully, but these errors were encountered: