diff --git a/mobile/Makefile b/mobile/Makefile index b1d84a0..723788a 100644 --- a/mobile/Makefile +++ b/mobile/Makefile @@ -1,4 +1,5 @@ check-program = $(foreach exec,$(1),$(if $(shell PATH="$(PATH)" which $(exec)),,$(error "Missing deps: no '$(exec)' in PATH"))) +check-file = $(foreach file,$(1),$(if $(wildcard $(file)),,$(error "Missing file: $(file)"))) node_modules: package.json package-lock.json $(call check-program, npm) @@ -9,14 +10,28 @@ ios: node_modules # Run the iOS app npx expo run:ios .PHONY: ios -ios.release: node_modules # Run the iOS app in release mode +# - IOS + +ios.release_mode: node_modules # Run the iOS app in release mode npx expo run:ios --configuration Release -.PHONY: ios.release +.PHONY: ios.release_mode + +ios.release_production: node_modules + $(call check-file, GoogleService-Info.plist) + eas build --platform ios --profile production +.PHONY: ios.release_production + +# - Android android: node_modules # Run the Android app npx expo run:android .PHONY: android +android.release_production: node_modules + $(call check-file, google-services.json) + eas build --platform android --profile production +.PHONY: android.release_production + android.reverse: $(call check-program, adb) $(if $(ANDROID_DEVICE),,$(eval ANDROID_DEVICE = $(shell adb devices | tail +2 | head -1 | cut -f 1))) @@ -50,6 +65,8 @@ asdf.install_tools: asdf.add_plugins @echo "Installing asdf tools..." @asdf install +# - Other + clean: $(call check-program, npm) @@ -75,15 +92,6 @@ clean_install: clean node_modules cd ios && pod install .PHONY: clean_install -release.ios: node_modules - npm run build - eas build --platform ios --profile production -.PHONY: release.ios - -release.android: node_modules - eas build --platform android --profile production -.PHONY: elease.android - help: @echo "Available make commands:" @cat Makefile | grep '^[a-z]' | grep -v '=' | cut -d: -f1 | sort | sed 's/^/ /' diff --git a/mobile/README.md b/mobile/README.md index 5190fab..e7fb66a 100644 --- a/mobile/README.md +++ b/mobile/README.md @@ -87,7 +87,7 @@ To launch Android Studio, in a terminal enter: make asdf.install_tools ``` -If you get an error like "https://github.com/CocoaPods/CLAide.git (at master@97b765e) is not yet checked out" then reinstall cocoapods like this: +If you get an error like "https://github.com/CocoaPods/CLAide.git (at master@97b765e) is not yet checked out" then reinstall cocoapods like this: ```sh asdf uninstall cocoapods @@ -96,7 +96,7 @@ make asdf.install_tools ```sh # to build and run on ios: -make ios +make ios ``` ### Build for Android @@ -120,10 +120,26 @@ make asdf.install_tools ```sh # to build and run on android: -make android +make android # to start Metro Bundler: make start ``` +## Manual release to Google Play Store and Apple App Store + +The manual release process uses the [`eas`](https://docs.expo.dev/build/setup/#install-the-latest-eas-cli) CLI to submit the app to the stores. + +### Apple App Store + +1. Download the `GoogleService-Info.plist` file from the Firebase Console. +2. Run `make ios.release_production` to build the app. +3. After the build is complete, submit it to the App Store running `eas submit --platform ios` + +### Google Play Store + +1. Download the `google-services.json` file from the Firebase Console. +2. Run `make android.release_production` to build the app. +3. After the build is complete, submit it to the Play Store running `eas submit --platform android` +You'll need to have a [service account json file](https://developers.google.com/android/management/service-account) to authenticate with Google Play Store. diff --git a/mobile/app.json b/mobile/app.json index c173d20..bbb96b1 100644 --- a/mobile/app.json +++ b/mobile/app.json @@ -28,7 +28,7 @@ } } }, - "buildNumber": "9" + "buildNumber": "12" }, "android": { "adaptiveIcon": { @@ -36,7 +36,7 @@ "backgroundColor": "#ffffff" }, "package": "tech.berty.dsocial.android", - "versionCode": "9" + "versionCode": "12" }, "web": { "favicon": "./assets/images/favicon.png" diff --git a/mobile/package-lock.json b/mobile/package-lock.json index 9cc581c..4653f78 100644 --- a/mobile/package-lock.json +++ b/mobile/package-lock.json @@ -7417,9 +7417,9 @@ "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==" }, "node_modules/fast-xml-parser": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.0.tgz", - "integrity": "sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", "funding": [ { "type": "github",