### Start Development Server Source: https://docs.rork.com/payment-guides/superwall This command starts the development server for your application using Bun. It's used to run your app locally and test changes. Ensure Bun is installed and configured in your project. ```bash bun start ``` -------------------------------- ### Run iOS Prebuild and Open Xcode Source: https://docs.rork.com/how-to-set-up-xcode/how-to-set-up-xcoe Installs project dependencies, generates the native iOS project files using Expo prebuild, and then opens the generated Xcode project. This is a key step to start iOS development. ```shellscript yarn && npx expo prebuild -p ios && xed ios ``` -------------------------------- ### Verify Node.js and npm Installation Source: https://docs.rork.com/how-to-set-up-xcode/how-to-set-up-xcoe Checks the installed versions of Node.js and npm to ensure they were installed correctly. This is a crucial verification step before proceeding with further installations. ```shellscript node -v npm -v ``` -------------------------------- ### Install Project Dependencies with Yarn Source: https://docs.rork.com/how-to-set-up-xcode/how-to-set-up-xcoe Installs all project dependencies listed in the package.json file using Yarn. This command should be run from the root directory of the project. ```shellscript yarn ``` -------------------------------- ### Install Project Packages with Bun Source: https://docs.rork.com/payment-guides/superwall Installs all necessary project dependencies using the Bun package manager. This command should be run after cloning the repository to ensure all required libraries are available for development. ```bash bun install ``` -------------------------------- ### Verify Yarn Installation Source: https://docs.rork.com/how-to-set-up-xcode/how-to-set-up-xcoe Confirms that Yarn has been installed successfully by displaying its version. This step ensures Yarn is ready for use in managing project dependencies. ```shellscript yarn -v ``` -------------------------------- ### Install Homebrew Package Manager Source: https://docs.rork.com/how-to-set-up-xcode/how-to-set-up-xcoe Installs Homebrew, a package manager for macOS, which is a prerequisite for installing other development tools. This script downloads and executes the official Homebrew installation script. ```shellscript /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -------------------------------- ### Install Node.js and npm Source: https://docs.rork.com/how-to-set-up-xcode/how-to-set-up-xcoe Installs Node.js, which includes npm (Node Package Manager), using Homebrew. Node.js is essential for running JavaScript outside of a browser and managing project dependencies. ```shellscript brew install node ``` -------------------------------- ### Install Expo Dev Client Source: https://docs.rork.com/payment-guides/superwall Installs the `expo-dev-client` package, which is crucial for creating custom development builds that work with native code changes. This package allows for real-time code updates during development. ```bash npx expo install expo-dev-client ``` -------------------------------- ### Install Supabase SDK and Expo SQLite Source: https://docs.rork.com/backend/supabase Installs the necessary packages for integrating Supabase and local storage with Expo. This step is crucial for enabling backend connectivity and data persistence in your application. ```bash $ @supabase/supabase-js expo-sqlite ``` -------------------------------- ### Verify Expo CLI Installation Source: https://docs.rork.com/how-to-set-up-xcode/how-to-set-up-xcoe Checks the installed version of the Expo CLI to ensure it is operational. This command verifies that the Expo CLI is accessible and ready for use. ```shellscript npx expo --version ``` -------------------------------- ### Install Xcode Command Line Tools Source: https://docs.rork.com/how-to-set-up-xcode/how-to-set-up-xcoe Installs the Xcode Command Line Tools, which are necessary for development on macOS, especially for iOS and macOS applications. This includes compilers and other essential build tools. ```shellscript xcode-select --install ``` -------------------------------- ### Install EAS CLI and Login Source: https://docs.rork.com/payment-guides/superwall Installs the Expo Application Services (EAS) Command Line Interface globally and logs the user into their Expo account. EAS is required for building and deploying development builds. ```bash npm install -g eas-cli && eas login ``` -------------------------------- ### Initialize Expo Project Source: https://docs.rork.com/payment-guides/superwall Initializes a new Expo project. This command will prompt the user to set up the project, and the default responses are generally suitable for most cases. ```bash eas init ``` -------------------------------- ### Verify CocoaPods Installation Source: https://docs.rork.com/how-to-set-up-xcode/how-to-set-up-xcoe Checks the installed version of CocoaPods to confirm its successful installation. This verifies that CocoaPods is available for managing iOS project dependencies. ```shellscript pod --version ``` -------------------------------- ### Install Yarn Package Manager Source: https://docs.rork.com/how-to-set-up-xcode/how-to-set-up-xcoe Installs Yarn, an alternative JavaScript package manager, globally using npm. Yarn is often preferred for its speed and reliability in dependency management. ```shellscript npm install -g yarn ``` -------------------------------- ### Install Expo Superwall Package Source: https://docs.rork.com/payment-guides/superwall Installs the 'expo-superwall' package, which is essential for integrating Superwall's paywall functionality into an Expo application. This command uses the Expo CLI to manage dependencies. ```bash npx expo install expo-superwall ``` -------------------------------- ### Initialize Supabase Client in TypeScript Source: https://docs.rork.com/backend/supabase Sets up the Supabase client using your API URL and publishable key. This TypeScript code initializes the Supabase client with authentication configurations, including session persistence and auto-refresh, leveraging `expo-sqlite` for storage. ```typescript import 'expo-sqlite/localStorage/install'; import { createClient } from '@supabase/supabase-js'; const supabaseUrl = "YOUR_API_URL"; const supabasePublishableKey = "YOUR_PUBLISHABLE_KEY"; export const supabase = createClient(supabaseUrl, supabasePublishableKey, { auth: { storage: localStorage, autoRefreshToken: true, persistSession: true, detectSessionInUrl: false, }, }); ``` -------------------------------- ### Run Development Server Source: https://docs.rork.com/how-to-set-up-xcode/how-to-set-up-xcoe Starts the Expo development server, allowing for live reloading and debugging of the application in the simulator or on a physical device. This command is typically run in conjunction with the Xcode project. ```shellscript yarn start ```