Universal URL does not work when build is archived - ios

I think I implemented universal URL correctly and it is working fine when I launch the app directly from the Xcode but if I am archiving the build and sharing it via tesflight or diawi I am not able to open the app using URL scheme.

Make sure your Associated Domains are in both entitlement files: "Debug" and "Release".
In my case all domains were listed in Entitlement-Debug.plist file but the Entitlement-Release.plist was empty.
After adding them manually to the 'Release' file - app installed via TestFlight started working with Universal Links.
Select All and Add your domain like this.
Make sure you have both release and debug entitlements.

Related

App groups are not working after deployment in release mode

I am working on an ionic iOS application. I have a shared extension in the application, to share information between ionic application and my iOS shared extension I have been using app groups to retrieve the values.
The application works expected when the deployment happens in debug mode.
In release mode user defaults does not work from share extension.
I have the distribution certificate with enabled app groups. All the other configuration looks fine.
There is another similar question asked although I did not see any answers for the same.
iOS Share Extension not working after deploy
When ionic app is created the entitlement needs to be added separately, adding entitlement in both main and shared extension app will have to edited in the build settings as well. Under code signing entitlements release need to add the entitlement file location.
The issue was by default the entitlement file is not provided by ionic when you use the shared extension or app group information sharing.
In my case, app groups were only configured for the debug mode.
By following these steps for both the runner and the share extension, I was able to resolve this issue -
Select Runner / Share Extension under "Targets"
Select "Signing and capabilities" tab
Press "+ Capability" button
Select "App Groups"
Set the correct app group for both release and debug modes

iOS Universal Links not working via TestFlight

I'm new to iOS and managed to implement the iOS Universal Links for an app following this.
I have created and uploaded the apple-app-site-association and configured/prepared the app to handle universal links.
It all works well and I can test it successfully when I build the app through xCode into a real device. However the universal links do not work when installing the app via TestFlight.
When installing the app via xCode I can see the HTTP request to the apple-app-site-association file in my web server. But when installing it via TestFlight doesn't seem to try to fetch the association file.
Does anyone knows if this is expected or how can get universal links working when deploying on TestFlight?
Make sure your Associated Domains are in both entitlement files: "Debug" and "Release".
In my case all domains were listed in Entitlement-Debug.plist file but the Entitlement-Release.plist was empty.
After adding them manually to the 'Release' file - app installed via TestFlight started working with Universal Links.
Distribution via Testflight will also not work, if you have protected test-Environments and use ?mode=developer to bypass Apple's CDN. Developer mode is only taken into account if the App is signed with a development profile.
Reference here: https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_associated-domains
I was facing the same issue. The fix was to use the same BRANCH_KEY for both Debug and Release mode.

iOS Universal Deeplinking not Working

When I long press on the hyperlink https://www.myapp.com in the Notes app, I don't see any "Open in My App" option. I have made sure of the following:
I have a apple-app-site-association file hosted at
https://www.myapp.com/apple-app-site-association
I have added applinks:www.myapp.com in associated domains in the
entitlement file.
Entitlement file is added in the target bundle resources
How else do I debug this? Universal deeplinking is just not working!
I was supposed to test the testFlight build and not the one installed from XCode.

iOS Share Extension not working after deploy

I have created a Share extension which working fine while I am running it though xcode on device or simulator. But when I creating IPA or using TestFlight, it is not passing my list from host app to extension.
I am creating this extension for posting an image in host app ( without uploading on server just in local sqlite ). For this I have checked, App Group and it is fine, cross checked the provisioning certificate and it is also attached with app group.
If you have any idea please let me know.
The entitlement file needs to have the group id information and same should be reflected in build settings.
For me it was just that entitlement file was missing from build settings under code signing entitlements for release.
In debug the app does not require entitlement file.

TestFlight beta-testing iOS app

I completed to develop my first app. Right now i want to distribute my beta throught https://testflightapp.com
I tried to create .ipa file with this tutorial - http://help.testflightapp.com/customer/portal/articles/402782-how-to-create-an-ipa-xcode-4
In the very beginning i should select Entitlements, but there is not such category as Code Signing..
Any helps? Thnx.
PS I have a developer account.
UPD. Does somebody create ipa files for TestFlight on XCode 4.3? How do you do that?
I skipped entitlements altogether. With Xcode 4.2 and later I have not needed them.
Make sure your Archive Scheme uses your Debug configuration. Then just do an Archive of the project (under the Product menu). Save the Archive someplace. Then drag that Archive file onto the TestFlightApp's green "Upload Build" button. That easy. No messing around with entitlements, etc.
Before you do this, make sure you can actually build a correctly formed archive by building, and e-mailing it to one of your testers and see if it can be loaded. There are a bunch of things that have to work before you can use TestFlightApp. Just because you can Build and Run from Xcode doesn't mean that it will work on a remote device that doesn't already have your provisioning file. For example, you have to have your App ID, provisioning profiles and Device ID's all configured correctly via the Provisioning Portal. Once I did that, and verified that my .ipa files can be installed manually, then just uploading to TestFlightApp.com worked without having to do entitlements.
I wrote this up and put it on TestFlightApp's support forum, but for some reason TestFlightApp.com won't let me into the support area so I can find it - I can't use my login to access their "Tender" account.
That's because that tuturial was done for another version of Xcode.
Just create a new property list file (Entitlements.plist) in your Xcode project and it let you edit it as a Entitlements file just fine.
The What's New in Xcode (pdf) documentation states that:
The iOS platform has supported entitlements for a while, and with Lion, Mac OS X does as well. With Xcode 4.1, the project editor provides a UI for setting up entitlements for Mac OS X applications. You can set entitlements for each target in the project editor. There is also a default code-signing entitlements file available in the file templates in the utilities pane.
In the Summary tab of your project editor is a section titled Entitlements. Check the "Enable Entitlements" box to have Xcode automatically create an Entitlements plist for you. This section also governs the entitlements' interaction with iCloud and Keychain.

Resources