Debug iOS App Share Extension with Contacts - ios

I am just starting out with iOS App Share Extension and dutifully followed the instructions for Xcode 8.1 to create a new target. Great, it gave me some simple boilerplate code and a scheme. I then put some breakpoints on the code view that was generated and tried to run the extension target.
It asks me for an app. Hm, I didn't see Contacts, so chose my app instead.
My app appears in the simulator.
I close (home) my app and start Contacts.
I go to share a contact and my extension shows!!!
I tap it and a generic dialog appears.
But nothing shows up in my debugger or in my log from print.
What switch am I missing?

Related

Universal links not working in iOS 12.2 , 12.3

I recently implemented universal links in iOS. It works fine in iOS version 12.1 and below but fails to redirect back to the app in iOS 12.2 and 12.3.
Issue in 12.2 and higher:
The browser doesn’t redirects back to the app but I do get a banner(with an ‘OPEN’ button) in the browser to open the content in the app.
Even when I copy the link in Notes and long press it, it shows me the option to open the link in my app.
I read in some article that there is a possibility that universal links get disabled and by choosing the option to ‘Open in {myApp}’ re-enables it. But this is not the case.
Despite trying the above method, universal links still doesn’t works the way it should.
Pre-Checks:
AASA link is verified through Branch.io validator
Applink is registered in entitlements.plist file
Proper handling of redirected url is performed (Note that I do get a banner in the browser to open the url in my app and upon clicking
on it, the app functions as it needs to)
Is there any change from 12.2 that I am missing?
I went through the release notes and was unable to find anything about universal links.
Any help is appreciated.

react-native iOS App receives firebase dynamic links when run in debug scheme but not when run in release scheme

I have integrated the dynamic links sdk using react-native firebase. I tested the deep links by opening the url by tapping on them in a text message which lead to a screen displaying my apps name and the information along with the open button. Tapping the open button took me to the app store's page for my application. I then installed the app using xcode in a debug scheme. The dynamic link was received correctly and everything worked fine. I then did the same process but changed the scheme to release. This time the url received was unfortunately null. I have debugged the native code as well and can see that dynamicLinkFromCustomSchemeURL:url contains the correct deep link in debug scheme but not in release scheme.

Dynamic link does not open the app, and "open in app" option not available in context menu

I just encountered a very weird behaviour with Firebase dynamic links.
It works perfectly on all of our test devices except for one.
This specific device is an iPhone-x, and the account was restored via iTunes (Not sure if this info is relevant, but i'm trying to give a full picture).
Our app is installed on this device from the app store (also tried deleting and reinstalling), but when trying to open a dynamic link it opens Safari instead, there we have the "open" button that opens the app store page of this app.
When trying to long tap on the link as suggested by developers that experienced the same issue, we have only one button that says "Open" which opens Safari again. I would expect that when the app is installed we would have two options:
1. "Open in Safari"
2. "Open in [App]"
Has anyone experienced this issue before? Anyone has any idea how to solve this?
The overall diagnoses here is that Universal Linking is not configured properly on the device. If Universal Links works on all other devices, then it is probably the case that the AASA file is not being downloaded properly. iOS 11.2 has had issues with this recently.
Check device logs
I suggest that you check the device logs when installing the application to see if the AASA file is being downloaded properly.
1) Delete your app and plug in the device to your computer
2) Open up Xcode and navigate to Window > Devices & Simulators
3) Select the device in the left-hand menu
4) In the bottom of the window you should see a triangle in a box. Clicking this will bring up the device logs.
5) Use a cmd-f to search for applinks and if your app downloaded the AASA correctly. You should see something like
Added service 'applinks', appID 'RXXXXXXXP.io.branch.Branchsters', domain 'branchster.app.link'
If this is not the case, then it looks like you AASA file is not being downloaded and you may need to delete the app, restart your phone, and try again.

How to transfer a firebase dynamic link to a newly installed application?

Everything I say pertains to ios 9 and above.
Firebase documentation says:
When a user opens one of your Dynamic Links, if your app isn't yet
installed, the user is sent to the Play Store or App Store to install
your app (unless you specify otherwise), and your app opens. You can
then retrieve the link that was passed to your app and handle the link
as appropriate for your app.
I succeeded to install my application by FB-link and to open my installed application by the link. But when I try install and open in single step the application is opened without link passed. That is if my application already installed and I click on the link then the application is opened with link passed. But if application is not installed and I click on FN-link then iOS open AppStore and install the application and then I click on 'open' button and the application is opened without links. I am sorry for my bad English but hope that you are understanding me.
UPDATE
I've seen same similar question and question.
Check points.
Application starts (openURL is executed) by custom schema url (in my case it is same as bundle id)
Application starts (continueUserActivity is executed) by dynamic link.
I tryed to use cellular instead of wi-fi without success.
If application not installed taping on dynamic link open AppStore with my app.
In didFinishLaunchingWithOptions I call [FIRApp configure].
Nothing helped.
I didn't say that I use Xamarin and Xamarin FireBase
May be it uses the old version of native FireBase library.
SOLVED!
Xamarin Firebase plugin has been updated and problem have been solved.
Let me suggest how to test the Firebase Dynamic Links on iOS in the case when the iOS App is not installed.
Remove the iOS App from iPhone (ensure to use actual device, not Simulator);
Generate Firebase Dynamic Link and paste the link to the iOS Notes App;
Tap on the link in Notes App;
Ensure that you see Interstitial page, where you tap on "Open" button. After this you should be navigated to Apple AppStore;
Put breakpoint or NSLog to [UIApplicationDelegate application:openURL:options:] and observe the url value;
Install and launch the App using Xcode;
Shortly after App is launched you should observe call to the [UIApplicationDelegate application:openURL:options:] with url. Here you will call:
FIRDynamicLink *dynamicLink = [[FIRDynamicLinks dynamicLinks]
dynamicLinkFromCustomSchemeURL:url];
If Firebase Dynamic Link is found you should see dynamicLink.url property being non-nil. If Firebase Dynamic Link not found, you will see dynamicLink.url property being nil.
When this scenario working well, you can re-check FDL behavior in Safari, Facebook, Email and other apps.
If App is already installed, then tapping on Firebase Dynamic Link should launch the App with the link. Watch out for [UIApplicationDelegate application:continueUserActivity:restorationHandler:], value userActivity.webpageURL.
I was able to solve this issue on my end without any code changes, and by simply running pod update and updating to the latest version of Firebase.

Firebase iOS is not opening my app from Safari

I tested the dynamic links Firebase. Configured everything in the project, the implementation did exactly like the Google documentation and created links on the console. When I test in Safari it does not open the application.
Thank you
iOS 9+
Due to the limitations on the iOS platform, Firebase Dynamic Links must rely on Apple's Universal Link system to open the app directly from a link when it is installed. One of the constraints placed on Universal Links is that the app-open behavior is only triggered from a user's click and not by a redirect or copy/paste into Safari.
We have found it very challenging to test Universal Links in the simulator and pretty much always use a real device for this type of thing. Basic steps: install app > SMS link to your test device > click link > observe app open.
iOS 8 and prior
iOS versions prior to 9 handle opening the app from a Dynamic Link through Safari, so if the app is not opening when you copy/paste the link into Safari then some setup is incomplete. Please review your Firebase project for information and confirm that your bundle IDs/custom schemes match on the project page, in your link, and in your app; be sure that the bundle ID is listed in URL Types in your Xcode project setup along with any custom scheme you wish to use.
Other Info
Here is a link to a prior answer that may be helpful as well.
Firebase dynamic link not opening the app iOS

Resources