How to make ios App Store link with parameters? - iphone

The new "smart app banners" have a method where you can pass parameters to yor app so that it can know, for examples what page on your site the user was on before they bought your app. This is useful, for example, with a news site where you ant to show them the article you were previously displaying.
The way to do this with he smart app banners is:
<meta name="apple-itunes-app" content="app-id=311507490, app-argument=http://bookID/1234"/>
Is there a way to make a general link that does this, instead of a smart app banner?

The advantage of smart app banners is that the iOS detects if the app is installed or not. If it is installed on the device the banner opens the app directly. Otherwise it takes you to the app store.
A disadvantage is that they only show up in mobile safari and they require iOS 6.
As an alternative you could use custom URL schemes. The application has to implement this scheme. The URL would look like this: myapp://bookID/1234.
You can also check if this link works (app is installed) using javascript.

Related

when the dynamic link is opened from browser(especially in safari) it is always redirecting to the app store even though app is installed in iOS

My URL is same as below, i will get this link to my mail from sendgrid and in iOS when i tap on this it always loads the browser first (safari most of the case) and opens in app preview page even though app is installed.
URL:<a clicktracking="off" href="https://{project_name}.page.link/?link=https://{project_name}.page.link/users/email_check/{{ $email_token }}&apn=com.{project_name}.app&isi={applestoreid}&ibi=com.{project_name}.app&efr=1">https://{project_name}.page.link/?link=https://{project_name}.page.link/users/email_check/{{ $email_token }}&apn=com.{project_name}.app&isi={applestoreid}&ibi=com.{project_name}.app&efr=1</a>
When you access a dynamic link in a browser. It will intentionally not go to your app because the actions indicate that your intent is to open a web page.
If you have your custom domain from Firebase ie: [your custom domain].app.goo.gl, send it into your link like so:
https://[your custom code].app.goo.gl/
And then tap that link. Does it open the app, or does it go to Safari? If it goes to Safari, it means that you haven't configured your iOS app for universal links yet, which is needed to support opening your custom domain url directly in the app. In Xcode, go to the Capabilities tab, and ensure that you've added the universal link domain as described in Apple's docs.
If you tapped the site address on the far top-right on iOS, it disables universal linking on that iOS app, until you long-tap and ask to open in the app again.
Second, you can't type in universal links into Safari's address bar and navigate to the app. Safari, by design, will open that URL in the browser. The easiest, most reliable way to test whether universal links are working is to put a universal link into the app, and tap the link from there.

How does Facebook handle tablets?

I'm developing a Facebook app that has a responsive layout. Sometimes my app has to generate a link for the user. Whenever possible, the links will send the user to a Page Tab (when the user is on a desktop) and other times it will link directly to the app (when the user is on a mobile phone).
What is the default behavior for Facebook on tablets? Does it show the mobile site or the desktop site?
Should I use the mobile or desktop version of my app on tablets?
Update: In response to BBog's question in the comments:
My app prefers the desktop version because it includes a Like-gate. If the user experience is good for a tablet to view the app in a page tab (which is only available on www.facebook.com ie non-mobile), then that is preferred because the like button will be displayed at the top of the page, above the app's iframe. In contrast, the mobile version of the app requires that the user click a link that takes them to the (mobile) facebook page which they must like to un-gate the app. It adds an extra step for the user and requires that they navigate away from the app for a moment. Users might be discouraged by this extra step and decide not to enter the gate.
For Android tablets - Honestly, it depends on how you want Facebook to handle it. If you look at the android native app linking wiki - https://developers.facebook.com/docs/mobile/android/deep_linking/, Facebook provides you the option to choose the user experience. The facebook native android app itself treats tablets like mobile phones. It would be ideal if your app is compatible with tablets, and then you can enable deep-linking which will let the user view the content inside of your app.
For iOS, it's handled from within the iOS bundle id.
Unable to find a concrete answer, I ended up detected the user's referral on the first page access. Then if www.facebook.com is in the url, I go to desktop. Otherwise I go to mobile..
if ($detect->isTablet()) {
session_start();
if (!isset($_SESSION["tabletAsMobile"]))
$_SESSION["tabletAsMobile"] = (stripos($_SERVER["HTTP_REFERER"], 'www.facebook.com')===true):'0':'1';
}
$useMobileLinks = ($detect->isMobile() || ($detect->isTablet() && $_SESSION["tabletAsMobile"]));
}

Will mobile web apps ever gain bookmark distribution inside of the Facebook native iOS app?

I think bookmark distribution inside the Facebook native iOS app is a great opportunity. However, based on the table at http://developers.facebook.com/docs/mobile/support/, it appears that option is only available to native iOS apps. Does anyone know if there are future plans to make web app bookmarks available inside the native app?
It's possible that the bookmark feature within the native iOS Facebook app violates Apple's policies regarding content on their platform, i.e. a web app bookmarked within the Facebook native app would represent a different user experience from the one that was cleared by Apple when they let the Facebook app onto the App Store.
If this is the case, there will be no bookmarks available in the native app unless Apple changes their policy, or grants Facebook a waiver.

How to launch Native App from Web app in iPhone?

I want to access TTS (Text-To-Speech) and STT (Speech-To-Text) functionality of iOS from web app. Since web app dont access ios device functions, is it possible to launch Native app from Web app?
e.g. When user wants to access TTS (e.g. Dragon Dictation), web page will launch Native app, take recording and send the recorded text to web app again.
Or we can access TTS/STT functionality right from web app?
The only native apps you can access from web apps are those with custom URL schemes set up, and the built-in ones e.g. SMS (sms://), phone (tel://), iTunes (itms://) and YouTube (http://youtube.com/watch?...).
If the apps you mention don't have their own custom URL schemes which you can use to get to them, there's no other way you can do this.
I can answer one part of your question - using the functionality of an IOS native app from a web-app;
Apps can be developed such that they respond to custom URL schemes - like, for example, the mail app responds to mailto:// and youtube responds to youtube://. Calling a URL with one of these schemes will start the IOS app - but it's entirely on the developer to code this into their application.
You could therefore in theory develop an app to get triggered from a web-app, perform an action then return to a web app after! Probably not something I would try and do though.

How can I detect whether a user has installed a specific iPhone app via JavaScript?

I'd like to build a mobile Web app that:
If my iPhone app is already installed, launches it by redirecting to a URL handled by the app
If my iPhone app is not installed, displays a web page encouraging users to download it from the App Store
The problem is, I don't know how to detect whether the app is installed before redirecting. Does anyone know a trick for doing this? Maybe a JavaScript hack of some sort, leveraging the App registered URL in an iframe or similar?
You very likely can't do this. Even in a native app, all you can call is UIApplication's canOpenURL: method, which just tells you if some app will open the URL, not which one. I have no idea if this function is exposed in JavaScript; very likely not (I wouldn't want malicious javascript probing my phone for which URLs it can open).