Reputation: 1879
I'm trying to test Universal Links which only opens the app but doesn't link to the right screen. The App installed from Xcode doesn't even work at all, but the one installed from the store does which makes it impossible to debug with break points. How can I make universal link work with the app installed from Xcode on my device so that i can debug it?
Upvotes: 1
Views: 861
Reputation: 1879
Here is how I did it. From this Debugging procedure I found out that if the app is installed from Xcode and TestFlight one would be able to test Universal Links, but I couldn't when I installed the app to my device from Xcode. So I archived the app and exported it to TestFlight after I had added some alert to show at some points in the code. So by installing the app from TestFlight I was able to test why the Universal Link only opened the app but didn't go to the specific screen. I don't know if there is an easier way to do this. And for those that it might be useful to, here is what I found: The code was written in Objective-C and I discovered that this
if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
// do stuffs
}
is somehow not the same as this
if (userActivity.activityType == NSUserActivityTypeBrowsingWeb) {
// do stuffs
}
in Objective-C.
Upvotes: 1