From 17b53cf9a604d753aad88fd489402bf4f36d83a4 Mon Sep 17 00:00:00 2001 From: bongolegend Date: Sat, 6 Jul 2024 21:15:55 -0400 Subject: [PATCH] try to make local build work --- .gitignore | 8 +++++++- app.json | 9 +++++++-- eas.json | 21 +++++++++++++++++++++ package-lock.json | 19 ++++++++----------- package.json | 6 +++--- readme.md | 38 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 84 insertions(+), 17 deletions(-) create mode 100644 eas.json diff --git a/.gitignore b/.gitignore index 3ce8de9..bb0289d 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,10 @@ yarn-error.* *.tsbuildinfo master_file.txt -config.yaml \ No newline at end of file +config.yaml + +ios/ + +# EAS +credentials.json +build-* \ No newline at end of file diff --git a/app.json b/app.json index 2bf5fe4..7466faf 100644 --- a/app.json +++ b/app.json @@ -3,7 +3,6 @@ "name": "stacks-client", "slug": "stacks-client", "version": "1.0.0", - "entrypoint": "./App.tsx", "orientation": "portrait", "icon": "./assets/icon.png", "userInterfaceStyle": "light", @@ -13,7 +12,8 @@ "backgroundColor": "#ffffff" }, "ios": { - "supportsTablet": true + "supportsTablet": true, + "bundleIdentifier": "com.bongolegend.stacksclient" }, "android": { "adaptiveIcon": { @@ -23,6 +23,11 @@ }, "web": { "favicon": "./assets/favicon.png" + }, + "extra": { + "eas": { + "projectId": "dbdaf225-1eae-412d-837d-f7de8ec20b71" + } } } } diff --git a/eas.json b/eas.json new file mode 100644 index 0000000..ce54e35 --- /dev/null +++ b/eas.json @@ -0,0 +1,21 @@ +{ + "cli": { + "version": ">= 10.1.0" + }, + "build": { + "development": { + "developmentClient": true, + "distribution": "internal", + "env": { + "ENV": "dev-device" + } + }, + "preview": { + "distribution": "internal" + }, + "production": {} + }, + "submit": { + "production": {} + } +} diff --git a/package-lock.json b/package-lock.json index 28cc285..9e16b37 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "expo-notifications": "~0.28.9", "expo-router": "^3.5.14", "expo-status-bar": "~1.12.1", + "fs": "^0.0.1-security", "js-yaml": "^4.1.0", "react": "18.2.0", "react-datepicker": "^7.2.0", @@ -46,7 +47,6 @@ "devDependencies": { "@babel/core": "^7.20.0", "@types/react": "^18.3.3", - "@types/react-native": "^0.73.0", "typescript": "^5.4.5" } }, @@ -6075,16 +6075,6 @@ "csstype": "^3.0.2" } }, - "node_modules/@types/react-native": { - "version": "0.73.0", - "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.73.0.tgz", - "integrity": "sha512-6ZRPQrYM72qYKGWidEttRe6M5DZBEV5F+MHMHqd4TTYx0tfkcdrUFGdef6CCxY0jXU7wldvd/zA/b0A/kTeJmA==", - "deprecated": "This is a stub types definition. react-native provides its own type definitions, so you do not need this installed.", - "dev": true, - "dependencies": { - "react-native": "*" - } - }, "node_modules/@types/stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", @@ -8749,6 +8739,12 @@ "node": ">= 0.6" } }, + "node_modules/fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==", + "license": "ISC" + }, "node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -10222,6 +10218,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, diff --git a/package.json b/package.json index d17ae4c..ddaa848 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "main": "expo/AppEntry.js", "scripts": { "start": "expo start", - "android": "expo start --android", - "ios": "expo start --ios", + "android": "expo run:android", + "ios": "expo run:ios", "web": "expo start --web" }, "dependencies": { @@ -29,6 +29,7 @@ "expo-notifications": "~0.28.9", "expo-router": "^3.5.14", "expo-status-bar": "~1.12.1", + "fs": "^0.0.1-security", "js-yaml": "^4.1.0", "react": "18.2.0", "react-datepicker": "^7.2.0", @@ -47,7 +48,6 @@ "devDependencies": { "@babel/core": "^7.20.0", "@types/react": "^18.3.3", - "@types/react-native": "^0.73.0", "typescript": "^5.4.5" }, "private": true diff --git a/readme.md b/readme.md index 1366e4e..bd6ce30 100644 --- a/readme.md +++ b/readme.md @@ -26,3 +26,41 @@ Build with the EAS service. Submit to App Store. ```eas submit -p ios``` + + +### install development build onto physical device +```eas build --platform ios --profile development``` +Then copy the QR code to download the build onto your device. + +### build locally +The prebuild may not be necessary, but this generates the native code for the target OS, +a base layer of sorts. +```npx expo prebuild -p ios``` + +```eas build -p ios --local --profile development``` +This may fail on several accounts. I had the following errors: +```fastlane not found``` +So i did +```sudo gem install fastlane -NV``` +then I got some error like +```some dep is too old, or ruby version too old``` +so I had to install a newer version of ruby +``` +brew install rbenv\nbrew install ruby-build +rbenv init +eval "$(rbenv init - zsh)" +rbenv install 3.3.3 +rbenv global 3.3.3 +``` +Then I could finally install fastlane. +```sudo gem install fastlane -NV``` +Then I could finally run the build +```eas build -p ios --local --profile development``` +The build errored +```Distribution certificate with fingerprint xxxxxxxxxxx hasn't been imported successfully``` +So I downloaded my Apple Cert and added it to my keychain +https://developer.apple.com/account/resources/certificates/list + +But I still got the same error, so I installed this other universal cert and got past that error. +https://github.com/expo/eas-cli/issues/1331#issuecomment-1235603312 +