Firebase dynamic link is not working on IOS - ios

We have been using firebase dynamic link on android for a while.It was working fine in android.
We have decided to build our project on IOS platform also.Now we are facing some problems in dynamic link.
On pressing the link our application does not open.We also following the tutorial to integrate dynamic link on IOS.
1.Added .Plist file.
2.Added associated Domain in capabilities.(applinks:domain-link)
3.Added URL Types in info.
4.Added Team ID.
Seems like we are following the exact steps in the documentation. And yet Dynamic link is not working for us.
Can anyone help us in resolving this issue?

check
Apple Developer enable your Associated Domains from your app Identifiers
check AASA file team id and bundle id from https://{your set domain}.page.link/apple-app-site-association
AASA effective not real time
open your note app input https://xxx.page.link/ooo test (not on browser)
I hope I can help you

You need to update your AppDelegate.m file as well. Follow from steps 4 mentioned in the section Open Dynamic Links in your app here

please cross check associated domains : (it must not contain http or https e.g. applinks:myapp.page.link ) .and Dynamic link is easily work on iOS Simulator , I don't get any issues.
And if you creating dynamic link from firebase ios sdk then below code will be useful
guard let link = URL(string: "Write your link here and parameters") else { return }
let dynamicLinksDomainURIPrefix = "https://racematesios.page.link" //domain-link
let linkBuilder = DynamicLinkComponents(link: link, domainURIPrefix: dynamicLinksDomainURIPrefix )
linkBuilder!.iOSParameters = DynamicLinkIOSParameters(bundleID: "Bundle ID")
linkBuilder!.iOSParameters?.appStoreID = "App store ID"
guard let longDynamicLink = linkBuilder?.url else { return }
print("The long URL is: \(longDynamicLink)")

i'm using a Flutter App and on Android i can read internal link with custom parameter, however, on iOS i can not, the App is opened but onLink.listen is never called. I did all iOS platform configuration posted on documentation.
The link used to open the App looks like (Long Dynamic Link):
https://sample.page.link/?link=https://sample.page.link/test?CUSTOM_PARAM=fooBar&apn=br.com.test&isi=12345&ibi=br.com.test
The idea is to use only one dynamic link and pass dynamic data as custom parameter. Did anyone face that problem?

Related

Universal Links query string removed/lost while generating share link, IOS, ReactNative Share

Project workspace
Mobile Project: ReactNative 0.64.3 / Expo with Managed Workflow / IOS 14.6 / NPM
Sharing Library: ReactNative's default Share library.
Website/Domain: Statically hosted via S3, single page app built with TS/Gatsby. Caching handled with CloudFront.
Synopsis: I'm using universal links and query params to allow my users to share tickets. The Universal links are being stripped of all route params and query strings when the link is shared by the native sharing dialog. Using the COPY/PASTE function in the native sharing dialog always copies a complete link, which can be pasted anywhere and used successfully to open the app. The EMAIL option also works, opening Mail with the correct url string and autofilled as expected. The problem arrises when I try to share the link via iMessage. I'm running the project on an iPhone as a fully deployed Apple Testflight standalone app.
The app does download the AASA file on app install, which is statically hosted via an S3 bucket. I have verified its availability via postman and the online AASA validator here https://branch.io/resources/aasa-validator/
The app always opens when opening a valid universal link, such as when I manually type it into iMessage or other sharing medium -- email, etc. Because of this, I'm inclined to believe I have a problem with where the link string is being generated rather than the AASA system.
const ticketShare = (ticket: Ticket) => {
const link = Linking.createURL("www.sample.com/share_ticket", { //Expo Linking library
scheme: "https",
queryParams: {
...ticket
}
}).replaceAll("%25", "%"); //double encoding problem I have yet to properly fix.
console.log("link: ", link); //always the correct url here.
Share.share({ url: link }); // request to open the native sharing dialog activity. ('url' for ios)
};
Correct url is something like:
https://www.sample.com/share_ticket?my=query&params=here
Stripped url is something like:
https://www.sample.com/
sharing dialog image.
https://www.sketchappsources.com/resources/source-image/simple-share-actionsheet-ios-13-hugo.png
"COPY" actions always copy the correct url, "MAIL" works as well.
Using "MESSAGE" or any of the "recent" actions in the top row fails, sharing the base url only.
The title and website abbreviation at the top of the action sheet do render properly, pulling metadata/images from the website.
To make it more complicated, the share function does yield the correct url directly after a fresh install, but then never again. Console.logs always log the correct url.
I have tried react-native-share's library with the same results. (Wraps the same native bridge code?)
I have checked the react-native github page for issues related to this with no result. I have combed StackOverflow for a few days without results. Usually that means its something simple.. here's to hoping.
Anyone out there run into this issue? Thanks!

How to open line app with specified line user id chat screen?

I am opening LINE app from my native iOS app and my requirement is, i need to open line app with specified user chat screen.
I am not able to open specified user chat screen with line URL scheme. I tried below URL schemes but it only open line app. Please help me on this where i am doing wrong.
line://oaMessage/UserlineID
https://line.me/R/ti/p/UserlineID
line://ti/p/UserlineID
I had similar issue. I finally found a solution:
http://line.me/ti/p/~{LINE_id}
Just add ~ in front of {LINE ID}
With this way you can open line app with specified user.
if let url = URL(string: "line://ti/p/#UserlineID") {
UIApplication.shared.openURL(url)
}
Put your line id after #. Like line://ti/p/#jld859s8
Swift 4:
if let url = URL(string: "line://ti/p/#UserlineID") {
UIApplication.shared.openURL(url, options: [:],completionHandler:nil)
}
For Line Messenger you can follow three general strategies to connect with other users:
Firstly, some others have already suggested this, you can use this link:
line://ti/p/<LINE_ID>
The problem is that this link has been depreciated due to a security vulnerability
source: https://developers.line.biz/en/docs/messaging-api/using-line-url-scheme/#if-the-user-hasn-t-installed-line
Secondly you can use the more recent link:
https://line.me/ti/p/<LINE_ID>
This redirects to a page with a Line Messenger QR Code, that your user can use to trigger the opening of the app. Its a halfway solution (although safer than #1)
Lastly if you want to save your users from the extra action/click, Line also allows you to download the QR Code from the app itself, so you could display that directly to your users in the desired location.
They have updated their documentation.
What we shall do now is follow this pattern
https://line.me/R/oaMessage/{LINE ID}/?{text_message}
For instance, if we want to send "Hello" to Line ID #abc, we shall use https://line.me/R/oaMessage/#abc/?Hello
I hope this helps someone who is searching for the latest available approach.
line://ti/p/~phuongledao?oat_referrer=PROFILE
use this link to open the app from the browser
https://line.me/R/ti/p/UserlineID
line://ti/p/UserlineID
The above schemes don't always work (it could work with some UserID but not with others), I called Line support and they give me another alias for the UserID (this time without the #) and it works normally.

How to open app store in ios app?

I'm using this code to rate app from an ios application.
let appLink = "https://itunes.apple.com/us/app/[name of the app]/id[idnumber]?mt=8"
let url = URL(string: appLink)
UIApplication.shared.openURL(url!)
the problem is Safari says "the page address is invalid"
Is there any way to make it work? I'm using xcode 9 and swift 4
Your URL can simply be:
https://itunes.apple.com/app/id<App ID Here>?mt=8
Better yet, use SKStoreProductViewController so you can show the app in an App Store page without the need to leave your app.
And as of iOS 10.3 you can SKStoreReviewController specifically to allow a user to post a review or rate an app.
Use the STORE KIT request review based on the new guidelines and documentation found here.
https://developer.apple.com/documentation/storekit/skstorereviewcontroller/2851536-requestreview
On older version you can use
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=<AppId>&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software

Firebase.google.com Firebase Dynamic Links in iOS ( Swift )

How to Open an iOS App using Firebase Dynamic Links and Pass or get Parameters To an App Via Custom URL Scheme in iOS(swift)?

for eg :- https://q3tyj.app.goo.gl/abcd
My URL Scheme is ‘q3tyj.app.goo.gl’ in iOS app in Url Types.
If I type q3tyj.app.goo.gl in safari, I am able to open the application. But if I type q3tyj.app.goo.gl with some extra parameter like https://q3tyj.app.goo.gl/abcd in safari, , I am not able to open the application.

please also explain me how to get “link” parameter (which associated with dynamic link) from dynamic link in iOS app ( Swift ) .


I followed steps which were mentioned in Firebase.google.com for iOS ( Swift ).but its not working.
Thanks,
Nirav Virpara
It's hard to know exactly where your error is, but a few things to help you debug:
If you go to https://q3tyj.app.goo.gl/apple-app-site-association, you should see some JSON that points to your app. If you don't see this, make sure you've entered your team ID and your App Store ID in the project settings in the Firebase console
Make sure you're using your Bundle ID, not the shortlink domain, as your custom URL scheme in Xcode
Make sure you've enabled Associated Domains in the Capabilities tab of your Xcode project, and your domain looks like applinks:q3tyj.app.goo.gl
Universal Links (and, therefore, Dynamic Links) generally don't work if you type them directly into the Safari address bar. Instead, try typing the URL into an app like Notes and then clicking on them from there.
Good luck!
If you type https://q3tyj.app.goo.gl/apple-app-site-association this link in your browser and check, you will end up seeing a json, meaning your apple-app-site-association is correctly configured on your google website. However, you need to make sure that teamid in your google console or appid is correct.

Google Map APIs not working after adding bundle identifier - iOS

I Google developer console I created an iOS key as below:
I want to restrict this key to one app only, so I "Edit allowed iOS application" add my bundle Id to it. My bundle Id is easily found in General tab of my project target as following:
I don't know if it is case-sensitive or not, but I copy exactly the identifier from there to add to the key. As you can see, it cannot be mistaken. I also followed Google's instruction, one bundle Identifier per line (I only input one line):
Accept requests from an iOS application with one of the bundle
identifiers listed below (Optional) One bundle identifier per line.
Example: com.example.MyApp
Or if you leave this blank, requests will be accepted from any iOS
application. Be sure to add bundle identifiers before using this key
in production.
This screen show that I enabled all necessary services, to be sure:
The problem with me is that, whenever I added a bundle identifier to the key, my app stops working. But then when I deleted it (now "Any application allowed" as in the picture), everything goes back to work fine.
Could anyone please tell me what could possible cause this?
UPDATE: To clarify more: When I add my bundle ID to the key in Developer Console, now I can still use nearby search in my app. But Autocomplete search and Google URL shortener have stopped working..
whatever request that is getting 403 should be sent with additional header X-Ios-Bundle-Identifier, where your bundle id should be set. This seems undocumented, I only found it through jumping between links, see this...
The reason Autocomplete stops working when you add an iOS Bundle ID is that Google Places API Web Service is specifically not designed for using on iOS. As a gentle hint, I suggest you poke around Google Places API for iOS after Google I/O happens later this week. =)
I also ran into this issue and solved it by following #zhywu's answer above
The Swift 5 code that leverages URLSession/URLSessionDataTask looks like this:
if var urlComponents = URLComponents(string: "https://www.googleapis.com/...") {
...
guard let url = urlComponents.url else { return }
var request = URLRequest(url: url)
request.setValue(Bundle.main.bundleIdentifier ?? "", forHTTPHeaderField: "X-Ios-Bundle-Identifier")
dataTask = defaultSession.dataTask(with: request) { ... }
...
}

Resources