2

I'm writing an iOS Photo Editing extension for my app. The app has some premium features which can be unlocked through in-app purchases. I want to have the same features locked/unlocked in my extension if they are locked/unlocked in the app.

I figured that I can use shared user defaults to find out in the extension if features were purchased in the app. However, I can't let the user perform purchases inside the extension since it has a different app ID.

So I decided to prompt the user about the limitations due to not-yet-purchased features and point him/her to the app using a custom URL that will directly open the shop inside the main app. But this also does not work, because the [NSExtensionContext -openURL:completionHandler] method seem to only work in Today extensions.

Do you have any suggestions on how to handle unlockable content in iOS 8 extensions—especially concerning user experience?

Community
  • 1
  • 1
Frank Rupprecht
  • 9,191
  • 31
  • 56

1 Answers1

0
  1. Save data in user defaults using initwithSuiteName

  2. Call host app through load request https://stackoverflow.com/a/24614589/2578035

  3. Get the data in host app in UIAplication openURL....(nsuserdefaults)

Community
  • 1
  • 1
Vitalya
  • 166
  • 4
  • I read about this approach in other SO answers, but it is clearly a work-around and I somehow doubt that Apple will approve. I think I will submit a UX-wise ugly solution for the initial iOS 8 release (to be on the safe side) and try to get that workaround approved in a later update. – Frank Rupprecht Sep 05 '14 at 15:29