cloudy45man
cloudy45man

Reputation: 391

iOS Share Extension not working

I have a share extension allowing users to upload videos directly from other applications (eg. photos). It has a custom view (not SLComposeServiceViewController).

It was working just fine but currently I'm having strange issue that share extension won't showing up without any reason in particular. I tried to breakpoint in the viewDidLoad & viewWillAppear methods. But non of these methods are called. It seems like nothing happen when I press the app icon in the share sheet.

The only time I'm able to make it work is after cleaning project and run it. Does anybody experience problem like this before? And any suggestion what could be the reason? Thanks in advance.

Upvotes: 4

Views: 770

Answers (1)

Ilya Muradymov
Ilya Muradymov

Reputation: 175

Does anybody experience problem like this before?

I am, but without any details of what your code looks like and what are you doing there - it is hard to say what exactly the reason.

What I can say is that you have crash on start, it is not "nothing happen". The reasons list are just too wide, so shortly:

  • check your threads
  • check existing of objects
  • check potential buggy-spots
  • handle correctly subscribing/unsubscribing to events of NSNotification Center
  • be noticed that after you call completeRequestReturningItems and extension is gone, and you trying to share something again, it probably could be not cleaned from memory and can keep some garbage, so take care about this also.
  • try to be as efficient in memory usage as possible

Upvotes: 1

Related Questions