|
| 1 | +# Examples |
| 2 | + |
| 3 | +This directory contains example applications demonstrating the usage of Supabase Swift SDK. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +[Requirements](../README.md#requirements) |
| 8 | + |
| 9 | +## Running the Examples App |
| 10 | + |
| 11 | +1. Open the `Examples.xcodeproj` file in Xcode |
| 12 | +2. Select your target device or simulator |
| 13 | +3. Build and run the project (⌘R) |
| 14 | + |
| 15 | +## Authentication Setup |
| 16 | + |
| 17 | +### Supabase Credentials Setup |
| 18 | + |
| 19 | +The examples app uses a local Supabase instance by default. To set up your Supabase credentials: |
| 20 | + |
| 21 | +1. Open `Supabase.plist` in the Examples project |
| 22 | +2. Update the following values: |
| 23 | + - `SUPABASE_URL`: Your Supabase project URL |
| 24 | + - `SUPABASE_ANON_KEY`: Your Supabase project's anon/public key |
| 25 | + |
| 26 | +You can find these values in your Supabase project dashboard under Project Settings > API. |
| 27 | + |
| 28 | +### Google Sign-In Setup |
| 29 | + |
| 30 | +To enable Google Sign-In in the examples app: |
| 31 | + |
| 32 | +1. Create a project in the [Google Cloud Console](https://console.cloud.google.com/) |
| 33 | +2. Enable the Google Sign-In API |
| 34 | +3. Create OAuth 2.0 credentials for iOS |
| 35 | +4. Update the `Info.plist` file with your credentials: |
| 36 | + - Replace `{{ YOUR_IOS_CLIENT_ID }}` with your iOS client ID |
| 37 | + - Replace `{{ YOUR_SERVER_CLIENT_ID }}` with your server client ID |
| 38 | + - Replace `{{ DOT_REVERSED_IOS_CLIENT_ID }}` with your reversed client ID |
| 39 | + |
| 40 | +### Facebook Sign-In Setup |
| 41 | + |
| 42 | +To enable Facebook Sign-In in the examples app: |
| 43 | + |
| 44 | +1. Create an app in the [Facebook Developers Console](https://developers.facebook.com/) |
| 45 | +2. Add iOS platform to your Facebook app |
| 46 | +3. Update the `Info.plist` file with your Facebook credentials: |
| 47 | + - Replace `{{ FACEBOOK APP ID }}` with your Facebook App ID |
| 48 | + - Replace `{{ FACEBOOK CLIENT TOKEN }}` with your Facebook Client Token |
0 commit comments