jho
jho

Reputation: 243

How do you distribute a Xamarin Forms iOS archived container app with a share extension?

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:

Bundle Signing for Extension:

Bundle Signing for MainApp:

In addition, in my Identifiers I have an additional record which I did not add myself:

When I try to archive I get the following errors:

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.

Upvotes: 0

Views: 434

Answers (1)

Liqun Shen-MSFT
Liqun Shen-MSFT

Reputation: 8270

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~

Upvotes: 0

Related Questions