This is an iOS app that allows our users to both view sales data and charts as a creator, and also consume the content they buy on Gumroad. Audio, video, PDF and ePub files are viewable in the app. All other content can be shared to other apps or downloaded.
- We use CocoaPods as a dependency manager. Install it as
gem install cocoapods- Once CocoaPods is installed, install the dependencies using
pod install- Set up credentials - Copy the example credential files and populate with real values:
cp Credentials/Development.xcconfig.example Credentials/Development.xcconfig
cp Credentials/Production.xcconfig.example Credentials/Production.xcconfig
cp Credentials/Staging.xcconfig.example Credentials/Staging.xcconfig- Add Google Services configuration:
cp "Gumroad/Supporting Files/GoogleService-Info.plist.example" "Gumroad/Supporting Files/GoogleService-Info.plist"Open the newly copied GoogleService-Info.plist and replace the placeholder values with your Firebase credentials.
- Always open the Xcode workspace of the project instead of the project file.
open Gumroad.xcworkspaceIf you are on Apple silicon, run Xcode using Rosetta:
- Enable Rosetta from
Applications→Xcode(right click) →Get Info→ EnableOpen using Rosetta - If you cannot find the
Open using Rosettaoption inGet Info, enableProduct→Destination→Show All Run Destinationsin Xcode, then choose a Rosetta enabled iOS simulator fromProduct→Destination
- Choose an iOS simulator and build + run the project as shown below.
You can also use Cmd+R shortcut to build + run the project.
Connecting to the locally running antiwork/gumroad server
If the intended API is not yet deployed to production or staging, you can build the app to point to your locally running gumroad/web server on https://gumroad.dev.
To do so:
-
Get the
uidandsecretcredentials from thedevelopment mobile oauth appOAuth application -
Encrypt them using the ROT13 cipher:
echo "credential-value-here" | tr 'A-Za-z' 'N-ZA-Mn-za-m'-
Update the
OAUTH_CLIENT_IDandOAUTH_SECRET_IDvalues inCredentials/Development.xcconfigwith these encrypted credentials. -
Fill in the other required credentials in the same file (see the example files for guidance).
Now you should be able to login in the app (in simulator) as any user registered in your locally running gumroad/web server.
For information about connecting to staging and production environments, see the Environment Connections Guide.
For information about archiving builds, submitting to TestFlight, and releasing to the App Store, see the Deployment Guide.
