ios - Using in-app purchases for glances and complications in WatchKit -
i making native apple watch app, , wondering if can have glances , complications available users have paid in-app purchase.
also, if have not upgraded in-app purchase, when go glance, or click on (disabled) complication, view show saying: "please upgrade pro complications , glances". , there button saying "go app", open app on phone, in-app purchase button be.
is possible?
from developer's perspective:
is possible developer? yes. in regard complication controller, return timeline entries based on existence of valid receipt.
since storekit isn't available on watch, phone have had validate receipts, provide details watch.
you need handle edge cases, such when in-app purchase state indeterminate complication controller (since launches in background before watch app has been launched first time).
complication controllers aren't designed asynchronously fetch (from phone or network). it's expected data on hand, , return results data source requests.
it's not practical have complication controller try fetch (receipt validation) data. @ best, can request data 1 update, manually update complication second time after watch extension knows offer pro data in future.
a more modular approach apple recommends separate functionality session manager provides data data manager, , complication controller retrieves data data manager.
but should following question answered apple, before spend time designing watch app conditional features.
will apple approve it?
what you're proposing show placeholder information on glance or complication.
while there apps on store provide in-app purchases additional complications, apps support @ least 1 complication start.
would app make through review process, since provides no complication (data) start.
that's off-topic question no 1 here able with.
a simple answer "also" feature:
there's no way open ios app (in foreground) watch app. user have open phone app on own, navigate controller offers in-app purchase.
Comments
Post a Comment