Use this template and follow the instructions to build the app: Expo First App Tutorial
Note: Do not use the
.tsxstyle file; it's too complicated and unnecessary for this project. Your folder structure should look like the screenshot below:
# Create a project named StickerSmash
npx create-expo-app StickerSmash --template blank
# Navigate to the project directory
cd StickerSmashnpx expo prebuild- 
Open the
ios/StickerSmash.xcworkspacefile in Xcode. - 
Click on the Project as shown below:
 - 
Click
Product->Scheme->Edit Scheme:
 - 
Under
Run, selectReleaseinstead ofDebug:
 - 
Solve problem for calling external url link or domain address: Under , select
Info, selectApp Transport Security Settings, makeAllow Arbitrary Loadsas Yes, AddException Domainsas shown below.
 
npm install expoStart the app within the Expo app:
npx expo startnpm uninstall -g expo-clinpm install expo-cli --globalSince you already have Node.js 20 installed, you can use npx to run the local Expo CLI:
npx expo startnpm cache clean --force
rm -rf node_modules
npm installnpx expo startgit push origin zdong:maingit push origin zdong:backupFor detailed instructions, refer to the Expo Prebuild Documentation.
- 
Install the iOS and Android folders:
npx expo prebuild
 - 
Build the Native iOS Project:
npx expo run:ios
 - 
Build on Device (Note: Do not build simultaneously on Simulator and Device):
npx expo run:ios --device
Ensure you are in the main directory
/visportappto avoid missingpackage.jsonerrors.If you encounter a sandbox error during the build, refer to this StackOverflow post and set User Script Sandboxing to No under All options.
 
- 
Uninstall Watchman:
brew uninstall watchman
 - 
Replace Watchman Formula:
brew install watchman
 - 
Pin the Watchman Version (remember to unpin once the problem is solved):
brew pin watchman
 - 
Restart Server and Give Full Disk Access to Watchman in Settings - Privacy (MacOS 14.5):
watchman shutdown-server
 
- 
Start the Expo app:
npx expo start
 - 
Press
shift + i. - 
Select the device you want to work with.
 
Problem: Error Cannot find module '@react-native/metro-config'
Solution:
npm install @react-native/metro-config --saveProblem: Error No Metro config found in /Users/zihan/Desktop/TradeApp.
Solution: Add a file named metro.config.js in the main folder containing:
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const config = {};
module.exports = mergeConfig(getDefaultConfig(__dirname), config);Problem: Folder has no main.jsbundle file
Solution:
react-native bundle --platform ios --dev false --entry-file /Users/zihan/Desktop/TradeApp/app/tabs/Home.js --bundle-output ios/main.jsbundle --assets-dest ios