Sample iOS Convex app using SwiftUI
New to Convex? Take the tour.
- Clone this repository
- Run
npm i convex
to install Convex. - Create (or get access to) an Auth0 application configuration for a native iOS app.
- On the Auth0 Settings page for your application, the callback and logout URLs should be set to:
https://{yourAuth0Domain}/ios/dev.convex.WorkoutTracker/callback, dev.convex.WorkoutTracker://{yourAuth0Domain}/ios/dev.convex.WorkoutTracker/callback
- Make sure your Auth0 Application Type setting is set to "Native".
- Run
npx convex dev
and setup a new Convex application (or connect to an existing one for Workout Tracker) for the required backend functionality. - Setup the environment variables on the Convex backend:
AUTH0_CLIENT_ID
andAUTH0_DOMAIN
- Follow the local app configuration instructions below.
- Add a
ConvexEnv.swift
file inWorkoutTracker/
with contents like:
struct ConvexEnv { static let deploymentUrl = "YOUR_CONVEX_DEPLOYMENT_URL" }
- Create an
Auth0.plist
file inWorkoutTracker/
with contents like:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Domain</key> <string>YOUR_AUTH0_DOMAIN</string> <key>ClientId</key> <string>YOUR_AUTH0_CLIENT_ID</string> </dict> </plist>
- Make sure you substitute your real Convex and Auth0 values in the files above!
- Public domain icon
- Auth0 for iOS Login
- Convex for app backend