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
Related
I'm having problems archiving my Xamarin iOS app which has a Share Extension.
I am using Visual Studio 2022 for Windows paired to a Mac.
I have created:
a distribution profile in App Store Connect
identifiers for app and extension with App Group entitlements
App Store profiles for app and extension
Bundle Signing for Extension:
Manual Provisioning
Distribution: Automatic
Provisioning Profile: No matching profiles found (Why not found?)
Bundle Signing for MainApp:
Manual Provisioning
Distribution: Automatic
Provisioning Profile: MyAppName
In addition, in my Identifiers I have an additional record which I did not add myself:
XC com companyname MyAppName Share (Where has this come from?)
When I try to archive I get the following errors:
Cannot create an IOS archive 'MyAppName'. Process cannot be executed on XMA server.
"ditto" exited with code 1
I've searched for documentation or examples on how to distribute a Share Extension, but can't find anything helpful. I've also been able to successfully upload an archive to the store without the Share Extension attached.
What is going on here?
UPDATE
Just tried to release through VS on Mac, and getting a whole lot of new errors. The Mac VS is horribly designed and seems like it was just thrown out as an afterthought. There is no proper output window for archiving issues; the issue messages are squashed, non-wrapped into the single line status bar at the bottom of the screen in a way that I need to open the application on a large monitor to see; I have no idea whether they are warnings or errors and if the build has stopped or not.
I hope the suggested response is not: release it on VS Mac.
Here, i would like to share the way of publishing my app with share extension using VS for MAC, for the purpose of helping others.
First, create iOS Distribution Certificate in your Apple Developer account. Before doing this, you have to generate a Certificate Signing Request file in your KeyChain.
Second, if you use AppGroup, you should generate an App Group ID, which would be used for your share extension as well as its container app. Then in Xamarin Forms project, for your share extension and its container, both set the App Group ID in the Entitlements.plist.
Third, generate App IDs for both your app and share extensions. In Capabilities, you have to configure to choose your AppGroup in previous step.
Then, generate profiles for both your container and share extension. You should select the proper iOS Distribution Certificate and App ID. Then download and refresh your profiles.
Now in Visual Studio for MAC, you could select profiles for your App and extension respectively in iOS Bundle Signing. Then you can archive them for publishing~
According to the App Check Firebase Documentation, it is said to add the App Attest capability to your app.
However, I am not able to find any such capability in XCode. Any insights on this?
Note: We have enabled capability in the provision profiles
Documentation Link: https://firebase.google.com/docs/app-check/ios/app-attest-provider#install-sdk
Screenshot of Documentation
A Firebase developer here.
Currently you need to set App Attest environment to production in your app entitlements file. You can achieve it by adding the key directly to the file or you can follow the steps below (relevant for Xcode 12.5):
Open Signing & Capabilities tab in the settings of your app target
Press + Capability button
Select App Attest(see screenshot)
Open the corresponding entitlements file usually named like YourAppTargetName.entitlements
Set value production for App Attest Environment key(see screenshot)
Sorry if the docs don't contain enough details, we will try to make them more clear.
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.
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.
Symptoms
My app is using Facebook to let users log in. It works fine while debugging from XCode and testing through AdHoc deployment, in order to have external testers we submitted our app for review but it seems that Facebook is complaining during the OAuth Process "App Not Setup: The developers of this app have not setup this app properly for Facebook Login".
Hypothesis
The FacebookDisplayName and FacebookAppId present in the Custom iOS target properties in the info section of my target in XCode are matching the Facebook app development version. Somehow, the SDK must detect that during the review the app is not anymore in development and an error occures.
Question
How do I define in that target some Custom iOS target properties with different release and debug values?
You can add a user defined setting in Target's settings with different values for each scheme (Debug, Release, Ad-Hoc, AppStore etc) and use the user defined variable in info.plist file (or as you call it Custom iOS target properties).
Here is an example of how i did it for an app's bundle identifier. I wanted separate bundle identifier and server URLs for the Debug and AdHoc versions so both could be installed and tested on same device:
Add required data as a user defined settings in Target Settings.
Set different values for the variable for different scheme. (Make sure to check the target settings reflects the changes and not just project settings.):
EDIT: Detailed image for adding user defined settings:
In above image, BUNDLE_ID_PREFIX and BUNDLE_ID_SUFFIX have different values for each scheme.
Use this variable instead of default values in info.plist:
You will by default use debug scheme for running the app from xcode. If you use release scheme for archiving the app for upload, it will automatically pick up the correct value from target settings.