From 1f3c358f0aef097c09169547a24ad13bdaf095c0 Mon Sep 17 00:00:00 2001 From: castdrian Date: Mon, 15 Jan 2024 07:02:58 +0100 Subject: [PATCH] feat: a bit of build documentation because ios is crazy stuff --- .github/workflows/build-mobile.yml | 2 +- README.md | 45 +++++++++++++++++++++++++++--- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-mobile.yml b/.github/workflows/build-mobile.yml index c59ba80..841300a 100644 --- a/.github/workflows/build-mobile.yml +++ b/.github/workflows/build-mobile.yml @@ -82,7 +82,7 @@ jobs: run: pnpm exec nx run mobile:prebuild --platform=ios - name: Build iOS app - run: cd apps/mobile/ios && xcodebuild archive -workspace movieweb.xcworkspace -scheme "movieweb" -configuration "Release" -archivePath "build/app.xcarchive" -destination generic/platform=iOS CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO + run: cd apps/mobile/ios && xcodebuild archive -workspace movieweb.xcworkspace -scheme "movieweb" -sdk iphoneos -configuration "Release" -archivePath "build/app.xcarchive" -destination generic/platform=iOS CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO - name: Export .ipa from .xcarchive run: | diff --git a/README.md b/README.md index 45a02e2..700a597 100644 --- a/README.md +++ b/README.md @@ -3,31 +3,68 @@ Native-app for movie-web. ## Getting started -``` + +```bash pnpm install // Having nx installed globally is recommended pnpm install -g nx // If you don't want nx installed globally, you can use the following command -(pnpm dlx or npx) nx +(pnpm exec or npx) nx ``` ## Running tasks To execute tasks with Nx use the following syntax: -``` +```bash nx <...options> ``` For example, to run the mobile app: + +### Android + +```bash +nx run mobile:android ``` -nx run mobile + +### iOS + +```bash +nx run mobile:ios +``` + +## Building archives + +### Android .apk + +```bash +nx run mobile:prebuild --platform=android +cd apps/mobile/android && ./gradlew assembleRelease +``` + +### iOS .app + +#### Real device + +```bash +nx run mobile:prebuild --platform=ios +cd apps/mobile/ios && xcodebuild archive -workspace movieweb.xcworkspace -scheme "movieweb" -sdk iphoneos -configuration "Release" -archivePath "build/app.xcarchive" -destination generic/platform=iOS CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO +``` + +#### Simulator + +```bash +nx run mobile:prebuild --platform=ios +cd apps/mobile/ios && xcodebuild archive -workspace movieweb.xcworkspace -scheme "movieweb" -sdk iphonesimulator -configuration "Release" -archivePath "build/app.xcarchive" -destination "generic/platform=iOS Simulator" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO ``` ## Repository information + This project uses Nx to manage the monorepo. For more information about Nx, visit [nx.dev](https://nx.dev). ### Mobile app + The mobile app is built with React Native and Expo. For more information about Expo, visit [expo.io](https://expo.io).