Use this template and follow the instructions to build the app: Expo First App Tutorial
Note: Do not use the
.tsx
style 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 StickerSmash
npx expo prebuild
-
Open the
ios/StickerSmash.xcworkspace
file in Xcode. -
Click on the Project as shown below:
-
Click
Product
->Scheme
->Edit Scheme
: -
Under
Run
, selectRelease
instead ofDebug
: -
Solve problem for calling external url link or domain address: Under , select
Info
, selectApp Transport Security Settings
, makeAllow Arbitrary Loads
as Yes, AddException Domains
as shown below.
npm install expo
Start the app within the Expo app:
npx expo start
npm uninstall -g expo-cli
npm install expo-cli --global
Since you already have Node.js 20 installed, you can use npx
to run the local Expo CLI:
npx expo start
npm cache clean --force
rm -rf node_modules
npm install
npx expo start
git push origin zdong:main
git push origin zdong:backup
For 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
/visportapp
to avoid missingpackage.json
errors.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 --save
Problem: 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