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

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.

Related

Firebase Universal links disabled and not working (iOS)

I am trying to get Firebase Dynamic links that I have integrated on my ios app to open. Following the youtube tutorial (https://www.youtube.com/watch?v=KLBjAg6HvG0) I have downloaded my app onto my phone from Xcode. When I try to open up the link I automatically get redirected into safari browser and I'm presented with this image.
https://imgur.com/a/e6AJMhj
The tutorial runs threw several things that could be the reason for my link not opening up my app
Make sure to have the correct URL in the Associated Domain Setting which I do. https://imgur.com/a/lJExtjU
Check and make sure that you have the correct App ID prefix entered in the console which is true because Xcode verifies that. https://imgur.com/a/LVytoni
Universal link for the domain was disabled because I opened it in Safari and I have to now long press on the link and open it in the app. Now heres the problem.
In mail app, imessages app, and notes app all dont have an option to "Open in .
Mail (https://imgur.com/a/Pz81IqN), iMessages (https://imgur.com/a/2ykChUM), and Notes app (https://imgur.com/a/lwoejEH).
Even referencing these guides I am unable to solve my problem (Universal Links iOS) (Universal Links not working on iOS10)
Check to make sure the apple-app-association file in created which it is and it shows that #2's image.
I have exhausted all options and googling for answers is now getting me nowhere. I need help on how to get my Universal Link working again.
It helps if applinks is not spelled "applink" in the Info.plist associated domains.

Firebase dynamic link always goes to app store URL even if the app is installed

I am trying to integrate Firebase dynamic link into IOS app but the problem is that even if the app is installed the dynamic link is taking me to app store page to download the App from app store.
Did anybody face the same problem and have solution for the same.
Edited the link through firebase console. With the 'Skip the app preview page' enabled and 'Use a custom scheme when universal links aren't supported' disabled I was always redirected to the app store.
The solution for me was to enable both universal links and a custom
scheme.
Can't say why, but maybe it will help someone.
After spending my whole one day, I am able to figure it out finally. It is working if your app is live, just set App ID & TeamID in Firebase App settings.
Issue comes up when app is not live and we are setting another App ID. Just add following line, it will work like a charm:
FirebaseApp.configure()
FirebaseOptions.defaultOptions()?.deepLinkURLScheme = Bundle.main.bundleIdentifier
Setting deepLinkURLScheme with your bundle id.
TL;DR: To make it work, you must also set up the Firebase Dynamic Link as a universal link in your app settings. To do so, see below.
My dynamic link worked with the preview page, but then I added "&efr=1" to skip the preview page and redirect directly to either the App Store or my app. It worked with the preview page because it called the universal link that was already set up with the app.
Example: My app is named Spontit. Preview page worked because the "Open" button redirected to spontit.com, which is linked to my app. But the dynamic link is spontit.page.link - a different domain name - and therefore, if you skip the preview page, it opens spontit.page.link and not spontit.com in Safari and so not my app, and subsequently redirected to the App Store always.
You must set up the custom dynamic link (e.g. spontit.page.link) as a universal link. Follow these steps to do so.
Source: https://firebase.google.com/docs/dynamic-links/ios/receive
I faced the exact same problem.
To work around this, I give up href attribute and use onclick on <a/>
<a onclick="location.href=https://somedynamiclink.url">Dynamic Link</a>
Please note, no href attribute on a tag.

Sharing an image/link to my app in IOS

I'm trying to find out how I can add sharing support to my app using React Native. I've found documentation for displaying the action sheet from within my app but nothing on how I can add support for users to share images/links to my app. I'm not even sure what Apple calls this feature so it's possible I may not be searching with the right keywords.
e.g.
On #1 if you press the share button at the bottom middle of the safari app it will bring up a popup where you can choose an app e.g. Facebook, then if you press on Facebook it will open Facebook with a url to the page you want to share from safari where you can add a comment about the link. I want to replicate this behavior but within my own app. I want my app to be available to choose when I press the share button on the safari app which I will then open a popup window that displays the link the user wants to share allowing them to add a comment before posting the link. Is this possible with react native? I see that I have the option share with other apps (my fidelity app, sears shop your way, etc so It seems like you can have a non system app do this.
They are called Share extensions and they are part of the Extensibility features. They are system-wide Share Sheets. Not to be mistaken with Action Extensions.
Share extensions have colored icons.
Action extensions use monochromatic icons.
Anyway the links do not display UNTIL you have clicked the app in the share sheet.
Editor > Add Target > iOS > Application Extension > Share Extension
Configure the App Group for your app target.
On the Capabilities tab, turn on the App Groups switch and select the group you created. (if you want to enable code sharing between the extension and container app you can put the code in a framework and link to it)
Expand the group you created and you will see a storyboard file, an entitlements file, a view controller and a plist file under the Supporting Files group.
You can use the storyboard file to create a custom interface or do it programatically but Share extensions come with a default compose view that looks like the Facebook and Twitter views.

iOS Deep linking and Universal link, how to deep link in ios

I read that from iOS 9, Universal links are introduced. Please explain the different between Deep-linking and universal links.
My objective is, a link will be sent in mail to customers. Let the mail says there is an offer for item A, and a link. On clicking the link
If the app is installed then, open the app and launch specific screen showing item A
If app is not installed then, download it from App Store and open it and launch specific screen showing item A
What if there is a user login feature?
If app is installed and user is not logged in then,
open the app
Launch login screen
After login is success launch specific screen showing item A.
How can these be implemented? How the links are configured for these?
As of iOS 9.2, released December 8th, 2015, Apple has sounded the death knell for URI scheme based redirects, the standard for deep linking for the last seven years. They’ve decided that Universal Links are the future.
Earlier in order to use a URI scheme, you have to manually handle the case of the app not being installed.The problem with this is that when the app is not installed, it shows a ‘Cannot Open Page’ error. I’m sure you’ve all seen it. It’s the bane of deep linking.We were able to bypass this in iOS 7 and iOS 8, but it is not possible now from iOS 9.
Get more details form this link
To clarify, 'deep links' are simply links that, when clicked, cause your app to open directly to content. Universal Links are a type of deep link, as are URL scheme links, but neither is a perfectly bulletproof solution right now so to cover all edge cases, you'll want to implement both.
Fortunately Branch can handle all of that complexity behind the scenes so you don't have to worry about it! As mentioned in the answer above, the guide here will get you up and running with exactly the implementation you described!
I found a usable link here . It gives step by step details about deep linking using Branch.io

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