programmatically open an app in iOS - ios

I thought this was not possible but I have seen some apps do that: For example, if I receive a notification from Candy Crush in FB, it opens the Candy Crush Game. If I open a map in safari, I can open directly in Google Maps app. I think I have seen it in native apps, but I may be wrong.
So my question is whether this is possible. I have two apps, and I want the user to open the one inside of the other. So for instance, the one app has a button called "Open brother app"
and when I click it, it should open the Other app, if it is installed.
Both apps have the same company identifier, like : com.mycompany.ios.projectname.
Thanks

It is possible for apps supporting their own custom url schemes.
For more info have a look here.

Related

How to open Stocks app on ios from my app?

I know that popular apps usually have own links, f.e. whatsapp://app will open WhatsApp or if you have Instagram installed, it will open instagram.com/... links.
In my app, I would like to open the iOS "Stocks" app (it is installed by default). Do they have deep linking and can I for example in my app open the link like stocks://AAPL to navigate to the Apple stock prices page?
UPD: I've found that stocks:// really opens the Stocks app :)
but now the question still is how to open the exact company in it
Found that https://stocks.apple.com/symbol/AAPL will do what I want :)

Xcode swift: How to add a share screen where you can share your own app

I would like to add a share button to my Xcode project which, like for example by WhatsApp (if you press the share button there), displays a screen where you can share this app with a link to the AppStore (for example to share this app with your friends). Would this function also work if you have not yet published your app in the AppStore? Or do you have to publish the app first and then bring an update directly where this function has been added because otherwise, you won't get the app link?
How would that work?
I would be very happy to get help!
Warm greetings
The way I do it is by using firebase and dynamic links, its like getting your URL from apple but also being able to edit what page they see when they click on the link to go to your app.
if you go to the firebase website they have easy documentation and videos to set it up.

Switching between apps with URL Schemes (iOS)

I'm developing an iPhone app with Swift which acts on certain file types (.xml &.zip). I've added these filetypes to the project file as a UTI (Uniform Type Identifiers). When accessing these sorts of files, usually from my email, I press and hold the file and a menu pops up from below. I choose my app icon that says "Open in MyApp". Is there a way that I can return to the email which triggered this event from within the app?
I've done some research on this and found that URL Schemes are the best way for inter - app communication, but you cannot arbitrarily open an app just to open it.
https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/UTIRef/Introduction/Introduction.html
The vision I have in mind is sort of how Google apps communicate with each other. For example, when opening a link from gmail, it switches apps to chrome. When chrome loads, the page back navigator is in Chrome displays the text similar to "back to gmail"
In iOS 9 the system implements this automatically, as seen in this screenshot here.

Automatically check for iPad app when downloading specific file type from website?

I think I already know the answer to this ("can't be done"), but I figured I'd see what people think...
On my client's website they're posting files for download that specifically need to be viewed on iPads using the Cadwork Viewer app:
https://itunes.apple.com/us/app/cadwork-viewer/id505161598?mt=8
You can't open the file on an iPad unless you have that app, and I'm wondering if when clicking on the file to initiate download if there's a way to scan the device to see if Cadwork Viewer is already installed. If so, proceed with the download of the file. If not, pop up a notice "This file requires the Cadwork Viewer app, download it here from iTunes." Something like that.
Again, I think this is just not doable, but hey...there's all sorts of things I don't know!
Thoughts?
Check out this link: https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html
You can add a banner to the mobile site that lets you open the app from Safari.
Explanation from Apple:
If the app is already installed on a user's device, the banner
intelligently changes its action, and tapping the banner will simply
open the app. If the user doesn’t have your app on his device, tapping
on the banner will take him to the app’s entry in the App Store.
This should be a good starting place.

What Apple stock apps allow exported UTIs?

Using this guide, I made it so that my app is able to open jpeg's and pngs by clicking the "Open in (my app)" button.
This works say, when I open a photo in the messages app and click share. But, I can't seem to get it to work anywhere else. My app doesn't pop up in photos, or mail.
So my question is, am I doing something wrong or is messages the only app that supports exporting files? If not, which apps do? Is there a list?
Thanks,
Gabe

Resources