0

I have a share-extension bounded with my app. I have all the required app-ids and provisioning-profiles related to the extension, for both development and distribution. When I run the extension in the simulator, it works perfectly fine. On device (i.e. iPhone 6), for example, when choose my app's share extension within Safari, Safari freezes and nothing opens. I cannot even debug it, not because that I don't know how to do it but because it runs and immediately stops running afterwards on Xcode.

I think that something might be wrong with the provisioning-profiles or app-ids or it might be a bug or a 'missing functionality prior to distribution' caused by Apple.

I would very much appreciate it if someone has any solution to or explanation about it.

EDIT:

I changed the background-color of the extension's view on storyboard to see if it does not work at all. It does open, but SLComposeServiceViewController did not show up. Thus, the problem must be caused by it.

Burak
  • 525
  • 4
  • 24
  • Please try to run the extension on a device while plugged into your Mac. Take a look at the device console and find the relevant error message and update your post. Most likely it is a provisioning profile / cert issue. But we'll need to know more if we are to help you. – wottle Aug 17 '16 at 12:50

2 Answers2

6

If there is anyone still having this issue, please check your Share Extension deployment info and ensure your target OS is lower than your phone's OSenter image description here

knig_T
  • 1,916
  • 16
  • 16
  • Worked for me too. The problem is that when adding the new target Xcode defaults to the latest and greatest. – Martin Nov 22 '20 at 13:11
2

I finally solved my problem. It was not a provisioning-profile nor an app-id issue. I had written

override func viewDidAppear(animated: Bool) {}

method in the SLComposeServiceViewController class. It turns out that the only culprit was this method. I removed that and the share extension worked perfectly.

Burak
  • 525
  • 4
  • 24
  • 1
    Thank you. It was like a weird bug in my case too. I had made the text view non-editable while sharing. It caused the entire view to be hidden when opening the extension. – Midhun Darvin Apr 25 '20 at 11:46