We have implemented the deep link activity in our application. It worked in iOS 11. When we send SMS via a web portal. Its received in iPhone. After updated into iOS 12 the link messages are not received for my iPhone devices. Here is my code below:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let branch: Branch = Branch.getInstance()
branch.initSession(launchOptions: launchOptions, automaticallyDisplayDeepLinkController: true, deepLinkHandler: { params, error in
if error == nil {}}
// Respond to URI scheme links
func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
Branch.getInstance().handleDeepLink(url);
return true
}
we have added branch_app_domain, branch_key and URL Type in plist also.
Do we need to add anything in my code ??
After updating a device to iOS 11.2+,the app's AASA file is no longer downloaded reliably onto your user’s device after an app install. As a result, clicking on Universal Links will no longer open the app consistently. You can set forced uri redirect mode on your Branch links to open the app with URI schemes. View details of the issue on the Apple Bug report.
For any further questions, please write to integrations#branch.io.
Related
I am using the following line in my AppDelegate:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
Database.database().isPersistenceEnabled = true
return true
}
Is this all I need to add to make my ReactJS app available offline? When I compile and run and test through Testflight - I turn off WIFI and use Airplane Mode and my app just returns a blank screen ... do I have to enable something else?
The Database.database().isPersistenceEnabled = true only ensures that data that you app has recently loaded while online is also available when you call the same API next time while offline.
If the app itself doesn't load, it is unrelated to this API call and you'll want to look at how to make a React app available while offline.
currently I'm working on a swift project. Here I implemented deep linking using universal link for verify my email address. And it's working fine. What I need is how to check whether if the app is opened by clicking the universal link or not. Because in the didFinishLaunchingWithOptions method, I'm checking like whether the user is already logged in or not. And if the user is logged in I'm navigating to the home screen else navigating to the login screen. And the checking is happening in the
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
method. And when I click the universal link I also get the callback in
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: #escaping ([Any]?) -> Void) -> Bool
method. And in this method i'm navigating to email verification screen
But the problem is when I click the universal link, it open my app and its navigating to the login screen(because the user is not logged in) and then immediately navigating the email verification screen. Actually, what I need is I don't what to navigate to the login screen or home screen if I came to the app by clicking the universal link. Please help me.
You can try checking the launchOptions available in didFinishLaunchingWithOptions delegate for the key
UIApplicationLaunchOptionsURLKey
A key indicating that the app was
launched so that it could open the specified URL.
When opens with deep linking below method triggers in AppDelegate
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool {
//Enter Logic Here based on your URL
}
I am integrating gigya facebook and google to my app. The login process works when using webview, but i am having problems when i use the native apps.
For facebook, i am able to open the native app and it proceeds all the way to the screen where it says "You previously logged in with...", but upon clicking continue, it just returns to the screen where it prompts you to choose between using the facebook app or not.
For google, i have downloaded the Google app into my iOS device. But it is still using the webview with no way to use the Google app.
I am using GigyaSwift v1.0.1. Google and Facebook Wrapper is included in my Compile sources.
I have configured the following ID's into my app:
Basically GigyaSwift using GoogleSign-In SDK and it open the webView, Also you can see the implementation at GoogleWrapper.swift file.
For facebook, i apparently forgot to input some code in my AppDelegate to handle the return from Facebook native app to my app.
This is the code:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
//insert other code here
ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
return true
}
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
return ApplicationDelegate.shared.application(app, open: url, sourceApplication: options[.sourceApplication] as? String, annotation: options[.annotation])
}
For Google #Sagi Shmuel was right. Opening of Webview is the expected behavior. Thanks!
I am trying to implement background fetch in my iOS app (it's a simple http call that downloads some data for later processing).
I enabled background fetch in my project capabilities:
Also in AppDelegate I set minimum fetch interval:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
UIApplication.shared.setMinimumBackgroundFetchInterval(UIApplication.backgroundFetchIntervalMinimum)
return true
}
And implemented fetch handler:
func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: #escaping (UIBackgroundFetchResult) -> Void) {
do {
try api.downloadInBackground()
} catch {
Debug(self).error(error)
}
completionHandler(.newData)
}
Testing with Debug -> Simulate Background Fetch or custom scheme with enabled background fetch mode work fine and data gets downloaded:
However, when the app is not being debugged background fetch is never invoked. I've read that there's no strict rule when it happens and some time and networking has to be done. However, I've tried leaving device over a weekend (connected to wifi) after I've tried reading some emails browsing, and still nothing happened. What could be wrong?
(At first, I thought it might something to do with a provisioning profile because I did not update it in the apple developer portal, but there's no option to do that, so I suspect that enabling this capability only in the project locally is enough?
Im having a issue with Firebase and Dynamic Links.
func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool
is triggered more than once.
For example after using the dynamic link on the device - the app opens and "open url" is called. Then i delete the app, reinstall and the "open url" is triggered again with the dynamic link.
Any idea why this could be happening?
Is maybe issue correlated with this similar problem on android?
Firebase dynamic links handled twice