Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature/licensing] Licensing support (#571)
* - Initial OCLicense draft * - Start expanding concept with OCLicenseEnvironment and provide first pseudo example code * OCLicensing: - advance first implementation - add first unit tests * Autoplay Media / Show album artwork in the media player view (#566) * [fix/fp-offline-browsing] Allow offline browsing of folders in the File Provider (#547) * - Fix Swift and SwiftLint warnings - Remove unused UploadsSettingsSection (was replaced by MediaUploadSettings) * - address libzip Xcode project upgrade warning - add research note to FileProviderExtension - update SDK * - Allow offline browsing of folders in the File Provider * Revert "[fix/fp-offline-browsing] Allow offline browsing of folders in the File Provider (#547)" (#553) This reverts commit 9a0bc93. * Autoplay media files implemented as described in issue #59 * Added album artwork as overlay in the player * Fixed playing next media item in BG and lock screen - Now multiple items can be played contignuously in the background - Now playing info in the lock screen contains artwork, title, artist info and displays correct playback timeline - Audio can be paused / resumed from the lock screen - Added skip controls allowing to jump 10s backwards and forwards from the play-head position in the lock screen * Small fixes * [fix/open-in-on-ipad] Share sheet not visible on iPad (#570) * [fix/fp-offline-browsing] Allow offline browsing of folders in the File Provider (#547) * - Fix Swift and SwiftLint warnings - Remove unused UploadsSettingsSection (was replaced by MediaUploadSettings) * - address libzip Xcode project upgrade warning - add research note to FileProviderExtension - update SDK * - Allow offline browsing of folders in the File Provider * Revert "[fix/fp-offline-browsing] Allow offline browsing of folders in the File Provider (#547)" (#553) This reverts commit 9a0bc93. * Fix for issue #568: Share sheet was now visible on iPad, if tableview was scrolled down, after first visible page rect * - implemented OCLicenseManager - implemented OCLicenseProvider - implemented App Store Receipt parser, helper classes, helper categories and receipt object tree - extended OCLicenseEnvironment with bookmark UUID - removed OCLicenseTrialProvider (=> can be handled through App Store IAPs via updated guidelines) - added OCLicenseDuration - added OCLicenseTransaction - added InAppPurchasesReceiptViewController (to be removed again) - added LicenseTransactionsViewController (which sparked OCLicenseTransaction) - added LicenseOffersViewController (testing only) - list of changes is incomplete, but commit needed to bring in changes from the origin branch * - Licensing additions: - extend OCLicenseEnvironment with more possible properties - add OCCore+LicenseEnvironment to be able to get a OCLicenseEnvironment directly for every OCCore - add OCLicenseEnterpriseProvider to selectively unlock products if connected to an Enterprise instance - Add License gating support to Action - LicenseRequirements to encapsulate license requirements - isLicensed: quick way to determine if an Action is licensed - proceedWithLicensing: method to check licensing status and present licensing options if not licensed; allows simple gating - add "PRO" labeling to actions that are unlicensed but require licensing - ScanAction uses new License gating - adapt LicenseOffersViewController to be usable from Action license gating as a POC implementation (that can serve as starting point for the full implementation) - LicenseTransactionsViewController now refreshes the view after restoring purchases - removed InAppPurchasesReceiptViewController as it was replaced by LicenseTransactionsViewController - fix various warnings in other parts of milestone/1.2 * - Improve layout of license offers view controller * - remove IAP-based "trial.pro.30days" trial AppStoreItem - make MoreViewController properly add provided view controllers as child view controllers (fixing broken presentation from these) - LicenseOffers: new view, button and view controller classes for flexible presentation of IAPs and subscriptions - OCLicenseManager+AppStore: utility IAP functions like f.ex. to restore purchases - LicenseTransactionsViewController: add support for adding (a) link(s) at the bottom of a transaction - ThemeButton: provide additional options to configure the inner padding and corner rounding of the button - ownCloudApp/OCLicensing: - OCLicenseDuration: .localizedDescription now returns just the word for single units ("month" instead of "1 month") - OCLicenseOffer: - new OCLicenseOfferStateExpired state to differentiate between a subscription that has already been subscribed to in the past but expired, and those that the user has not yet ever subscribed to - stateInEnvironment now also performs a feature-level check to ensure offers for whose features valid entitlements already exist are OCLicenseOfferStateRedundant - OCLicenseTransaction: - added .links property to allow adding links to a transaction - OCLicenseAppStoreProvider: - .purchasesAllowed property provides info on whether purchases are allowed on this device - active subscription transactions now also include a link to manage the subscription - the state of offers is updated as transactions happen - OCLicenseAppStoreReceipt: - fix bug that would drop all but the last IAP in a receipt * - Fix warnings from merge with milestone/1.3 * ios-app: - move license management setup to ownCloudAppShared framework - move all app-side licensing code to ownCloudAppShared framework ownCloudApp: - add new OCLicenseEnvironment(withBookmark:) convenience method - fix unit test errors ownCloudAppShared: - create new IntentSettings singleton to manage enabled and purchased states across all intents - adopt IntentSettings in all existing Intents * - fix code signing settings for Intents appex * ios-app: - ThemeCollection: add .purchaseColors set for purchase buttons - ThemeItemStyle, NSObject+ThemeApplication: add .purchase item style - StaticTableRow: add actionTriggered() action method - Settings - PurchasesSettingsSection: add dedicated settings section for IAPs - LicenseTransactionsViewController: add sorting to ensure that the latest purchases are shown first - LicenseInAppProductListViewController, LicenseInAppPurchaseFeatureView: provides an overview of Pro Features, their status and purchase/subscription options - SDK update to be able to use new OCBookmark.userInfo.statusInfo data ownCloudApp: - OCLicenseEnvironment - extend with .bookmark property - make .bookmarkUUID and .bookmark dynamic - OCLicenseFeature: extend with optional .localizedName and .localizedDescription properties - OCLicenseManager: add method to retrieve all features, or only features for which offers exist - OCLicenseAppStoreProvider: - fix import typo - reload receipt after SKPaymentTransactions updates have been processed - take subscription expiration date into account when updating the state of OCLicenseOffers - add setReceiptNeedsReload - OCLicenseEnterpriseProvider: extend applicability rule to also use Enterprise edition hint in bookmark.userInfo - OCLicenseTransaction: put the product name in the first table row ownCloudAppShared: - complete IAP setup and descriptions - change Intents .unlicensed error message to (hopefully) be suitable in all situations * ownCloudAppFramework: - OCLicenseAppStoreProvider: - break out product request handling into its own method - add convenience method that allows loading of products if previous requests failed - Fix error in and extend Licensing README.md ownCloudAppShared: - IntentSettings: add class settings support App: - add missing localizations - add error handling to when no product list can be loaded from the App Store - turn "PRO" label into a variable of its own - remove test code * - change Intents error message from "Premium Feature" to "Pro Feature" (addressing (1)). - hide IAPs in versions of iOS preceeding version 13 (addressing (5)). * - Remove trailing semicolon * App: - LicenseOfferView: add error handler that present an alert AppFramework/Licensing: - turn OCLicenseOfferCommitOption into a typed enum - add OCLicenseOfferCommitErrorHandler type to handle errors from the user committing to an offer - extend OCLicenseOffer.commit() with support for an error handler - OCLicenseAppStoreProvider - add error domain and missing code for when purchases are not allowed - add error handler tracking and calls in the appropriate places - add new Localized.strings file to localize "Purchases are not allowed on this device." errors * Address finding (8) in PR #571 - LicenseOfferButton: preserves original title for recovery - LicenseOfferView: change back from "Unlocked" button title if appropriate - OCLicenseAppStoreProvider: recompute offers after (re-)loading the receipt * ownCloudApp.framework/Licensing: - OCLicenseEntitlement: add debug description - OCLicenseManager: - add log tagging - add additional logging - add new API that allows to perform blocks only after all pending internal refreshes have been carried out - OCLicenseAppStoreProvider: - add IPC notification support to notify app extensions of changes to the receipt ownCloudAppShared.framework: - change IntentSettings.isLicensedFor() to support asynchronous computation as well as optimized waiting for pending refreshes, fixing finding (9) in feature/licensing (#571) * - Update SDK Co-authored-by: Michael Neuwert <[email protected]> Co-authored-by: Matthias Hühne <[email protected]>
- Loading branch information