-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Damus Purple initial Proof-of-Concept support
This commit includes various code changes necessary to get a basic proof of concept of the feature working. This is NOT a full working feature yet, only a preliminary prototype/PoC. It includes: - [X] Basic Storekit configuration - [X] Basic purchase mechanism - [X] Basic layout and copywriting - [X] Basic design - [X] Manage button (To help user cancel their subscription) - [X] Thank you confirmation + special welcome view - [X] Star badge on profile (by checking the Damus Purple API) - [X] Connection to Damus purple API for fetching account info, registering for an account and sending over the App Store receipt data The feature sits behind a feature flag which is OFF by default (it can be turned ON via Settings --> Developer settings --> Enable experimental Purple API and restarting the app) Testing --------- PASS Device: iPhone 15 Pro simulator iOS: 17.0.1 Damus: This commit damus-api: 59ce44a92cff1c1aaed9886f9befbd5f1053821d Server: Ubuntu 22.04 (VM) Setup: 1. On the server, delete the `mdb` database files to start from scratch 2. In iOS, reinstall the app if necessary to make sure there are no in-app purchases 3. Enable subscriptions support via developer settings with localhost test mode and restart app 4. Start server with mock parameters (Run `npm run dev`) Steps: 1. Open top bar and click on "Purple" 2. Purple screen should appear and show both benefits and the purchase options. PASS 3. Click on "monthly". An Apple screen to confirm purchase should appear. PASS 4. Welcome screen with animation should appear. PASS 5. Click continue and restart app (Due to known issue tracked at #1814) 6. Post something 7. Gold star should appear beside your name 8. Look at the server logs. There should be some requests to create the account (POST), to send the receipt (POST), and to get account status 9. Go to purple view. There should be some information about the subscription, as well as a "manage" button. PASS 10. Click on "manage" button. An iOS sheet should appear allow the user to unsubscribe or manage their subscription to Damus Purple. Feature flag testing -------------------- PASS Preconditions: Continue from above test Steps: 1. Disable Damus Purple experiment support on developer settings. Restart the app. 2. Check your post. There should be no star beside your profile name. PASS 3. Check side menu. There should be no "Damus Purple" option. PASS 4. Check server logs. There should be no new requests being done to the server. PASS Closes: #1422
- Loading branch information
1 parent
f7e407e
commit 4703ed8
Showing
35 changed files
with
1,171 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
{ | ||
"identifier" : "64C21A2D", | ||
"nonRenewingSubscriptions" : [ | ||
|
||
], | ||
"products" : [ | ||
|
||
], | ||
"settings" : { | ||
"_applicationInternalID" : "1628663131", | ||
"_developerTeamID" : "XK7H4JAB3D", | ||
"_failTransactionsEnabled" : false, | ||
"_lastSynchronizedDate" : 704848066.26849198, | ||
"_locale" : "en_US", | ||
"_storefront" : "USA", | ||
"_storeKitErrors" : [ | ||
{ | ||
"current" : null, | ||
"enabled" : false, | ||
"name" : "Load Products" | ||
}, | ||
{ | ||
"current" : null, | ||
"enabled" : false, | ||
"name" : "Purchase" | ||
}, | ||
{ | ||
"current" : null, | ||
"enabled" : false, | ||
"name" : "Verification" | ||
}, | ||
{ | ||
"current" : null, | ||
"enabled" : false, | ||
"name" : "App Store Sync" | ||
}, | ||
{ | ||
"current" : null, | ||
"enabled" : false, | ||
"name" : "Subscription Status" | ||
}, | ||
{ | ||
"current" : null, | ||
"enabled" : false, | ||
"name" : "App Transaction" | ||
}, | ||
{ | ||
"current" : null, | ||
"enabled" : false, | ||
"name" : "Manage Subscriptions Sheet" | ||
}, | ||
{ | ||
"current" : null, | ||
"enabled" : false, | ||
"name" : "Refund Request Sheet" | ||
}, | ||
{ | ||
"current" : null, | ||
"enabled" : false, | ||
"name" : "Offer Code Redeem Sheet" | ||
} | ||
] | ||
}, | ||
"subscriptionGroups" : [ | ||
{ | ||
"id" : "21283177", | ||
"localizations" : [ | ||
|
||
], | ||
"name" : "Purple", | ||
"subscriptions" : [ | ||
{ | ||
"adHocOffers" : [ | ||
|
||
], | ||
"codeOffers" : [ | ||
|
||
], | ||
"displayPrice" : "6.99", | ||
"familyShareable" : false, | ||
"groupNumber" : 1, | ||
"internalID" : "6446591615", | ||
"introductoryOffer" : null, | ||
"localizations" : [ | ||
{ | ||
"description" : "Support damus development with Damus Purple!", | ||
"displayName" : "Damus Purple", | ||
"locale" : "en_CA" | ||
} | ||
], | ||
"productID" : "purple", | ||
"recurringSubscriptionPeriod" : "P1M", | ||
"referenceName" : "Purple", | ||
"subscriptionGroupID" : "21283177", | ||
"type" : "RecurringSubscription" | ||
}, | ||
{ | ||
"adHocOffers" : [ | ||
|
||
], | ||
"codeOffers" : [ | ||
|
||
], | ||
"displayPrice" : "69.99", | ||
"familyShareable" : false, | ||
"groupNumber" : 2, | ||
"internalID" : "6448764101", | ||
"introductoryOffer" : null, | ||
"localizations" : [ | ||
|
||
], | ||
"productID" : "purpleyearly", | ||
"recurringSubscriptionPeriod" : "P1Y", | ||
"referenceName" : "Purple Yearly", | ||
"subscriptionGroupID" : "21283177", | ||
"type" : "RecurringSubscription" | ||
} | ||
] | ||
} | ||
], | ||
"version" : { | ||
"major" : 3, | ||
"minor" : 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
damus/Assets.xcassets/Purple/damus-dark-gray-logo.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Damus dark-gray.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+122 KB
damus/Assets.xcassets/Purple/damus-dark-gray-logo.imageset/Damus dark-gray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
damus/Assets.xcassets/Purple/damus-dark-logo.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Damus dark.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
damus/Assets.xcassets/Purple/special-features.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "special-features.svg", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "special-features.svg", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "special-features.svg", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Oops, something went wrong.