I'm trying to create call-to-action button that will open my app.
What I've done:
1 . Added url scheme to my up.
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>myapp</string>
</array>
<key>CFBundleURLName</key>
<string>com.myid.myapp</string>
</dict>
</array>
2 . Added metadata to my website.
<meta property="al:ios:url" content="myapp://open"/>
<meta property="al:ios:app_store_id" content="12345"/>
<meta property="al:ios:app_name" content="My App"/>
3 . Added a link with the deeplink on my site. It works great and launches my app.
Run the app
4 . Added call-to-action button on my facebook page, filled al the fields with:
web-site: url to my website;
ios deeplink: myapp://open;
app store url: app store url;
But clicking on the call-to-action button always leads to appstore.
https://developers.facebook.com/docs/applinks don't answer some questons:
How does facebook know that metadata locates on my website? I mean, when facebook searches for metadata, how does it know that it must search on my website?
If Facebook just opens deeplink, why doesnot it open my app?
Related
I can't get any part of deep linking working in my Flutter app. None of the documentation I can find on this is anywhere near adequate. eg none mention this, but it appears https://developer.apple.com/documentation/xcode/supporting-associated-domains?language=objc that I need to provide a file on my server? Nor is there any discussion I can find of that or in what way I need to set up an associated domain.
May app on launch directs to the login page of a local copy of my website. Following login, my site redirects to myappname:mywebsite.
In my Info.plist, I have:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>mywebsite</string>
<key>CFBundleURLSchemes</key>
<array>
<string>myappname</string>
</array>
</dict>
</array>
Following a tip from someone on reddit (as I say, this stuff isn't documented anywhere!), I added an associated domain in XCode applinks:mywebsite?mode=developer
I also redirected my domain in my local hosts file to my local machine. I've verified in the browser in the iOS simulator that the domain redirect is working in the simulator.
It appears from Apple's documentation that I should see a hit on my website to .well-known/apple-app-site-association but I get nothing.
My app successfully redirects on launch to the login page, but when I complete the login, my site issues a redirect to myappname://mywebsite but the browser in the simulator is just ignoring this.
I opened the console on the device browser from Safari, but nothing is reported.
I have tried to side-load YouTube, but the issue is in login. I get the web login page for Google, and login fine but afterwards I get the message inside app that I am using YouTube in signed-out mode. If I press the account settings page, I get the "Sign in" button.
The console keeps displaying this message:
YouTube(Module_Framework)[11300] <Notice>: Keychain Error: Unable to add new item: -34018
I am not making any modifications to app, and simply got a decrypted IPA (v13.32.7) to play with.
I have the following in my entitlements:
<key>keychain-access-groups</key>
<array>
<string>6Gxxxxxxxx.com.xxxxx.ULYouTube</string>
</array>
<key>get-task-allow</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
</array>
<key>com.apple.developer.default-data-protection</key>
<string>NSFileProtectionComplete</string>
Any help would be appreciated.
I am currently running the example codes provided by Uber SDK (Objective C version).
I encounter a problem when I clicked on the Native Login and Ride Request Widget Button provided by the Objective C example.
After setting up the app in Uber and also copied the Client ID to the info.plist, I counter the error below:
When I click at the Ride Request Widget Button, the app will load a new view with the "Ride there with Uber" button. After clicking the "Ride there with Uber" button, the example app will flag a UIAlert with a message of "There seems to be a problem connecting to Uber. Please go back to AppName and try again". What could be the problem?
Btw, I fill in the redirect URL as "myapp://oauth/callback" on both the dashboard and the app info.plist.
Anything I miss out during the setup of this example?
Thanks.
Make sure the URL Scheme in Targets > Info is set to something like sampleApp, and not sampleApp://uberSSO. This solved my problem.
For reference, here is the snippet from the Info.plist:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>MySampleAppName</string>
<key>CFBundleURLSchemes</key>
<array>
<string>sampleApp</string>
</array>
</dict>
</array>
I am debugging my integration of Facebook iOS SDK 4.10 on iOS 9 (it works but the login is always done through a webview and doesn't open the Facebook app).
I have a problem with CFBundleUrlTypes, I have added it (many times) through XCode: Project > Info > Url Types... In fact it is persisted, because I can: cat Info.plist|grep -C 10 -i urltypes and get:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string></string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb$(FACEBOOK_APP_ID)</string>
</array>
</dict>
</array>
But I relaunch XCode it's not visible anymore in the project info.
Starting from iOS9, Facebook uses the Safari View Controller for Login rather than a fast app switch. The SDK basically tries to determine the best possible experience for the user so this is probably why you are always routed to the web based login.
It is also partly to get around the "APPNAME wants to open OTHERAPP" you will see in iOS9.
The documentation slightly touches on this here https://developers.facebook.com/docs/ios/ios9#faq
I try to implement App Link in my IOS project. I've setup URL Schemes, and tested by typing testApps:// into mobile safari. Open apps dialog is prompt.
Im also setup a html file, access by public domain, www.testSite.com/testApps.html and include basic meta tag recommend by most Apps Link tutorial website. The file is shown as below:
<html>
<head>
<meta property="al:ios:url" content="testApps://default" />
<meta property="al:ios:app_name" content="testApps" />
</head>
</html>
However, safari do not prompt to open Apps when i key in the URL.
I also setup facebook apps setting, FB_test_Apps, set URL Scheme Suffix to be testApps, turn on Single sign on and Deep Linking.
I share www.testSite.com/testApps.html in facebook, and also from apps which register under facebook apps FB_test_Apps (which it will show as "Via FB_test_Apps" under the post).
When i click on this two post, Facebook will load it in facebook's webview. However it do not prompt to open my apps as well.
Is there anything i've missed out?
Update
I found out this issue only happen in IOS9. iOS 8 able to work well.
Regard
Steven
Yes iOS 9 has made some changes. You need to whitelist the url schemes you're using in your project.
Just add LSApplicationQueriesSchemes of type array in your info-plist and mention the urls you need to open in your project under it.
I guess too late to the party.
As mentioned above by Bhavuk, you have to white list the fb app for iOS9 and up.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fb</string>
<string>fbapi</string>
<string>fbauth2</string>
<string>fbshareextension</string>
<string>fb-messenger-api</string>
</array>
Referring from here.
iOS 9 not opening Instagram app with URL SCHEME