carsten-klaffke / send-intent

Repository for send-intent Capacitor plugin
MIT License
106 stars 12 forks source link

[solved] Manual signing #80

Closed davide-bontempelli-zupit closed 1 year ago

davide-bontempelli-zupit commented 1 year ago

Since in our company we are using "appcenter" for building and distributing the app we can not use the "Automatically manage signing" capability of XCode and we need to generate and use a "Provisioning Profile" (aka the .mobileprovision file).

I was able to make the sharing feature work on the XCode's simulator but not on a real device. I think it's because the signing is ignored on the simulators.

This is what I tried:

  1. I created a Group Id on developer.apple.com: group.it.mycompany.stp.sharing
  2. I created an App Id for my sharing extension. I already had an App Id for my app. My app's App Id is it.mycompany.stp and extension's App Id is it.mycompany.stp.share-extension
  3. From the Apple's developer portal I added the "App groups" capabilities to both of my identifiers. E.g. image
  4. From the Apple's developer portal I created 2 profiles: one connected to my App's App ID and one for the sharing extension's App Id
  5. I downloaded the two .mobileprovision files and imported them into XCode: For the App image

And for the extension: image

  1. I then completed the setup as described in the readme e.g. by editing the ShareViewController and adding group.it.mycompany.stp.sharing where required

At this point the share functionality was working on the simulator, but when download from test flight the app do not show up in the share window

davide-bontempelli-zupit commented 1 year ago

I tried differentiating debug and release and setting the debug build with "Automatically manage signing" but with the same result: on the xcode simulator it works but not when i build and deploy on my iphone image

Share extension: image

davide-bontempelli-zupit commented 1 year ago

Found the problem: it didn't have nothing to do with the manual signing, it was a problem with the extension's deployment target version Apparently when you create a new target the "iOS deployment target" is set by default to the latest version (in my case 16.4) but on my iphone I still have installed the 16.2. I lowered it to 13 and it worked

You might add this info in the readme @carsten-klaffke

Sources:

carsten-klaffke commented 1 year ago

Hello Davide, I'm very glad you've solved this! I added a hint to the Readme. Thanks for the info!