Share iOS extension does not terminate

I created an iOS Sharing Extension with a UI (not using SLComposeServiceViewController) and everything works fine.

Once the extension is called, the generic url or text is used and sent. That's all it does, and it works well.

The user interface is simple. One kind of image that displays a graphic to indicate that it is being sent and then changes to say "Sent" when completed. Then it disappears.

What happens is, if this happens, the extension seems to disappear, but I can no longer control the host application. It's like an invisible window or top view. (For example, the image rotator in Safari still rotates, but I can't scroll or click on links or buttons, etc.)

I am calling [self.extensionContext completeRequestReturningItems:nil completionHandler:nil];

after this resource is done and from what I understand this should reject my UI. I have also tried [self.view removeFromSuperview]

with no luck.

Happens on simulator and device. Is there something I am missing?

Edit: This is what the view hierarchy of a simple app built to test sharing looks like in Reveal before and after sharing. The app has two buttons, a shared text and a shared url, each of which creates a standard shared personal page.

Before

http://joshh.is/1utYnKS

After

http://joshh.is/1rdVo34

+3


source to share


1 answer


Ok, I don't know why it took me 10 hours to figure out that I was not including the super call inside my method beginRequestWithExtensionContext:

.



I don't know what caused the other problems, but it certainly caused my problem above.

+2


source







All Articles