Add a link to my iPhone app before submission ("Catch 22") - ios

I use the Facebook API for iOS, which enables posting content to the Facebook wall. The API allows custom links to be added next to "Like" and "Comment". I would like to add "Get App" here which links to my app on App Store, but how do I do this when my App ID will not be known to be before the app is actually approved? ("Chicken-and-egg" situation)
Possible solutions:
A) Link to a temporary URL which is changed to the App Store link after approval
B) Wait until version 1.1 to add this, when the App ID is known
Is there any other way to accomplish this?

You get an App ID once you create an app in iTunes Connect. That means you get the ID before you publish the app and it doesn't change when the app goes trough review or publishing process. I'm not able to make a screenshot right now, but it's easily found in top left corner when you click on manage apps > your app.

Some ISPs and independent providers offer domain name services that would help here, possibly.
I use EasyDNS, but there are other options.
The idea is that you register a domain name with them and purchase a plan that includes web forwarding. Web forwarding lets you send any web traffic for your domain to a specific URL.
You temporarily forward to any URL you like (presumably a page on your regular site, maybe a "Coming soon" page). Then, when you receive the real URL, change the forwarding to point there.
It might take a day or so for the change to percolate across the while interweb, but generally you can see and test results fairly quickly yourself, or at least that's been my experience.

Related

Branch.io how to migrate from universal links on primary domain

Currently we have universal links which look like http://example.com/sharing/< id >/ which open our iOS app through the safari smart banner. But smart banners sucks, so we'd like to use the Branch.io journeys banner, which actually appears when people load the page. Since these links are already in the wild, they need to continue to work have have some way into the app. In the future we'll generate branch.io sharing links from inside the app, but these landing pages on the web will continue to exist.
I'm calling branch.init('key_test_foo'); from javascript, and the Journeys banner appears. It only ever shows the "Get" button and never "Open". I'm not clear how I pass the object ID through branch.io so that the app can navigate to the right place.
The app is built in Xamarin, and I think I have the integration built correctly following the example. It is not in our production build through the app store, I'm just running the app through the debugger in Visual Studio.
I'd even settle for an "Open in App" link like imgur has, as long as there's something I can click in safari to open the app in the right place.
I don't feel like I should have to "make a link" every time this page gets viewed, right?
EDIT:
One additional question. I think I want to change my og:url so that when facebook scrapes my page, it will open through branch (instead of back to my site). But how would I set that? Facebook isn't going to run any JS when it loads the page is it? Can I just set it to my.app.link and magic will happen from the al:ios:url that drives the deeplink routing?
I think this: https://stackoverflow.com/a/34596340/401636 might be the solution.
1. The Journey's banner navigating to your app.
Branch uses the domain of the format -alternate.app.link domain for the link behind the Journeys button. To ensure that clicking on Journeys CTA, navigates to your app ensure that you have added the -alternate.app.link domain for your app in the 'Associated Domains' file. You can check the documentation providing information on how to add the domains here.
2. The Get v/s Open issue for the Journeys CTA
Branch uses a variable has_app to determine whether the device has the app or not. For this variable to be set to true, a user should click on the Journey CTA and be redirected to the app (not the App Store). Also, the issue of the CTA not updating is common during development, because the app is frequently re-installed on the device. Due to this testing, the flag, has_app, goes in a faulty state.
To force reset the has_app variable to change the Journey's banner CTA from 'Download' to 'Open', please follow these steps:
Click on the Download button - this should redirect to the Play or App Store
Install the app
Return to the web page with the Journeys banner, which should still display the Download button
Tap on the Download button again - the app should open
Close and then re-load the web page with the Journeys banner - the banner should now have an "Open" button
Tap on the "Open" button
Please note that the above steps are required only during development mode for testing purposes. Out in the wild in production, users will not see this issue. Also, it might take some time (as long as 30 minutes) for the flag to updated.
3. Navigating to the right place in your App
If you plan on using your old domain links for deeplinking, you can update your Link domain on the Branch dashboard to the domain your links are currently using. You can then recreate the links again with the Branch API. Please note, Branch will be the authoritative registrar for your domain and you cannot host anything on this domain.
If you do not wish to do that, you can append additional link parameters to your Journeys button. These link parameters will be available in your app when the user clicks on the Journey CTA and is redirected to the App Store/your app. You can refer to the documentation here for more information.
For both the above scenarios, in order to read the link parameters in your app, you should integrate the Branch SDK in your Xamarin app. (Reference documentation here)

Link to a specific section of my app, or the app store if it hasn't been downloaded?

I'm in the process of updating my iOS app, and one feature that I'd love to add would be the ability to create links (to send via email, or for social media) that would allow users who have downloaded the app to be taken to a certain section of the app, and users who haven't to be taken to the app store page for my app. I also want it to take desktop users to the itunes page for my app.
Now, I've been looking into url schemes as I think this is the way forward, and have managed to create a custom url scheme that will indeed take users to different parts of my app. However, I'm struggling to find a way to check if the app has been installed, and what device the user is on etc.
Would I need to use a server to redirect them to the correct place?
Thanks!
I found out the best way to do it is with universal links, introduced in iOS 9.
https://blog.branch.io/how-to-setup-universal-links-to-deep-link-on-apple-ios-9/

How to shorten a Firebase Dynamic Link using my own domain name

I'm trying to implement Firebase Dynamic Links in an iOS app. The goal is to have a clean URL for marketing purposes so folks can share links on social media. The idea is folks will share the clean URL that starts with my domain name.
When the app is installed following a click on that link, we want to be able to track who referred the app install by looking at the payload delivered by Firebase. I think this goal is similar to Firebase's use case to convert web users to mobile app users.
An example link I would like to provide for sharing on social media is: http://example.com/my-payload-here
I've tried several cases but I'm not able to get the behavior I'm looking for in any case. Has anyone implemented this successfully before?
Here is my test procedure:
Uninstall the app
Send the link to be tested in an iMessage to myself
Tap the link on my iOS device (not using a simulator)
Install the app from the App Store
Launch the app after download completes by tapping "Open" button in the App Store
Below are my findings:
Short link generated from the Firebase Console (https://xyz.app.goo.gl/ABCD) - Link opens in App Store. I install the app. When I launch the app after installing, the payload is not delivered. If I quit out of the app, go back to the link in iMessage, and launch a second time, the payload is delivered.
Long link identical to the "Long Dynamic Link" from the Firebase console for the link generated in #1 (https://xyz.app.goo.gl/?link=http://example.com/my-payload-here&isi=12345&ibi=com.example.MyApp) - behavior is identical to #1
Short link using my domain (http://example.com/redirect/my-payload-here, configured to 301 redirect to URL in #2) - Opens in App Store. I install. When I launch the app after installing, the payload is not delivered. If I quit out of the app, go back to the link in iMessage, and launch a second time, the link still goes to the App Store.
Some questions I have:
Why isn't the payload delivered on the first launch for cases 1 and 2?
How can we make this launch the app and deliver the payload instead of going to the App Store?
I've also consulted the Firebase flowchart for the deep link in case 2.
Google Firebase team added support for custom subdomains to Dynamic Links.
You can now specify up to five custom page.link subdomains for your Dynamic Links. Short links using these new custom subdomains look like the following example: https://example.page.link/abcXYZ
Firebase Dynamic Link domains assigned on projects couldn't be deleted at this time.( firebase team is working on it.)
You can now whitelist the URL patterns that can be used as a Dynamic Link's deep link (link) or fallback link (ifl, ipfl, afl, ofl). If you define a whitelist, Dynamic Links won't redirect to URLs that don't match a whitelisted pattern.
You can try both of these features in the Firebase console.
This is not currently possible with Firebase. If you need whitelabeled URLs, you either need to build it yourself or use a more powerful link platform like Branch.io (full disclosure: I'm on the Branch team).
To answer your questions specifically:
I have implemented Firebase Dynamic Links in a testbed app and can confirm that linking through installation the first time does work for both long and short URL variants. There is likely something wrong with your AppDelegate config, so we can take a look at that if you want to share code.
Firebase does not support custom domains at this time. In theory (if you can solve the first issue above) you could get this working for first install by using a redirect like you have tried. However, you'll never be able to get it to launch the app with Firebase link data once the app is installed. This is because Universal Links work based on the domain of the link, and don't even request the web destination. Even if you enable Universal Links manually on your own domain, the app will open immediately without ever calling Firebase and the link data will never be set.

Branch.io Generate the link at web end and then retrieve in app

Looking to integrate the branch.io in such a way that the admin gets the deep link at web end where he adds the content. And then he manually post the link to some social media say Twitter,Facebook etc. then user clicks on that link and it will take the user to app or app store.
Is it possible, please guide how to handle this. I am quite confused about branch.io. As far i understood branch.io creates the link send via sms and user clicks and gets redirected to app or app store. Is my requirement valid? How to achieve this please guide. Already spent more than a half day on it.
(Full disclosure: I am on the Branch.io team)
This is actually a very common Branch use case, so it's fairly straight forward to implement.
1. Sign up for Branch
Easy step!
2. Integrate the SDK into your app
This is a fairly simple process that should take less than half an hour, and the latest step-by-step docs for doing this are always at the link above. I won't include the full instructions in this answer because Apple creates new roadblocks fairly regularly, and we often have to make small tweaks to the guide.
After you complete this step, any time a user opens a Branch link associated with your app, either your app will launch (if installed) or that user will be sent to the App Store page to download it.
3. Create your marketing link
The link above takes you to the Branch dashboard. From that page, you can create a new Marketing Link, and use the Deep Link Data section to specify a key/value pair. For example, you can set a key of content and assign it the value mycustomvalue:
When your app launches after a user opens this link, the content : mycustomvalue pair will be magically returned to you.
4. Configure Deep Link Routing and Universal Links.
These methods are what actually call back to the Branch API every time your app opens, returning the content : mycustomvalue pair that you encoded in the link. You can do whatever you like with these values, but here are two common approaches:
Route the user to the content that you specify corresponds to mycustomvalue.
Use the values directly to display something customized (for example, if you encoded content : You've been sent a special invitation!
5. Share the link wherever you like!
The link you created can be put anywhere. Email, Twitter, Facebook, paid Google Ads, etc.

How to enable app on apple app store to view-able on browser?

This is the first time I upload an app to apple app store. After weeks for reviewing, finally, I get my app listed on apple app store. But the problem is, now seems like my app app-store page is only viewable from iTunes. When I try to open it in a browser, it will shows "Connecting to the iTunes Store...". Why is it my app can't be the view from the browser? Why did another app can? How to fix it?
Short answer: It seems, you cannot fully predict the behavior of an app store link for a certain user. You being redirected doesn't mean other people will be redirected right away as well. Your app's country/language availability, users' app store region and language settings, the specificity of the app store link (which has optional components and alternative styles), and the browser cache all seem to have a say.
Added details: After experimenting with this a lot, it seems to me that the behavior of the link (or rather the response from the Apple server to requesting it) depends on the language/country version being requested, my own current country/language defined in iTunes/my app store account, plus some caching issues. So, whether a preview page is shown in the browser, or iTunes is attempted to be opened right away depends on several factors and doesn't always have the same result (for different users). In fact, two consecutive attempts to open the same URL can have different redirect behavior.
I noticed that a full app store link like https://itunes.apple.com/us/app/keynote/id361285480 more likely leads to the preview web page, if the app is available in the language/country referenced ("us" in the example) and there is no prior request cached in which I clicked through to the app in iTunes. If the app isn't available in the referenced location, or any other information is missing in the link for the Apple server to identify a particular language version on the preview website, or there is cached data that makes Apple confident enough to redirect you to iTunes directly (or it's Friday 13th and the moon is right behind the sun by pure chance...) then you may see a redirect instead.
For posting app store links in the likes of Facebook, Apple's app linker seems to produce URLs with the nicest preview snippets (and not: "Connecting to the iTunes store"), when putting in the right country. So, these generated URLs seem to be most complete/specific.
If your app is intended for a specific region, AppStore connect will still give you a URL with .../us/... in it. Changing it to the respective local region seems to fix the problem for me.
For an example,
given URL: https://apps.apple.com/us/app/yourcompany/id123456
If the app is for Norway region, change the URL to: https://apps.apple.com/no/app/yourcompany/id123456

Resources