From b1125efe31d280d129a2c477f6baad57462a0106 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Thu, 13 Mar 2025 18:15:14 +0100 Subject: [PATCH] Add Gemfile for Ruby gem management and update README for iOS setup troubleshooting --- app/Gemfile | 5 +++++ app/README.md | 34 ++++++++++++++++++++++++++++++++++ app/setup.sh | 24 +++++++++++++++++++----- 3 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 app/Gemfile diff --git a/app/Gemfile b/app/Gemfile new file mode 100644 index 00000000000..5528418594b --- /dev/null +++ b/app/Gemfile @@ -0,0 +1,5 @@ +source "https://rubygems.org" + +gem "fastlane" +gem "cocoapods" +gem "nkf" \ No newline at end of file diff --git a/app/README.md b/app/README.md index 4cf19f983d0..014ff9375ce 100644 --- a/app/README.md +++ b/app/README.md @@ -44,3 +44,37 @@ The Omi App is a Flutter-based mobile application that serves as the companion a ## Need Help? - 💬 Join our [Discord Community](http://discord.omi.me) + +## Troubleshooting + +### iOS Setup Issues with Ruby Gems + +If you encounter Ruby gem dependency errors during iOS setup (particularly with fastlane), follow these steps: + +1. Install Bundler (if not already installed): + ```bash + sudo gem install bundler + ``` + +2. Create a Gemfile in the app directory with required gems: + ```bash + cat > Gemfile << EOL + source "https://rubygems.org" + + gem "fastlane" + gem "cocoapods" + gem "nkf" + EOL + ``` + +3. Install gems using Bundler: + ```bash + bundle install + ``` + +4. Run the iOS setup using Bundler: + ```bash + bundle exec bash setup.sh ios + ``` + +This approach ensures all required Ruby dependencies are properly installed and managed. diff --git a/app/setup.sh b/app/setup.sh index 4d22aaf7c2e..6b2e630c62b 100644 --- a/app/setup.sh +++ b/app/setup.sh @@ -9,7 +9,7 @@ # - Android Studio (for Android) # - NDK 26.3.11579264 or above (to build Opus for ARM Devices) # - Opus Codec: https://opus-codec.org -# Usages: +# Usages: # - $bash setup.sh ios # - $bash setup.sh android @@ -88,10 +88,24 @@ function setup_provisioning_profile() { echo "Installing fastlane..." brew install fastlane fi - - MATCH_PASSWORD=omi fastlane match development --readonly \ - --app_identifier com.friend-app-with-wearable.ios12.development \ - --git_url "git@github.com:BasedHardware/omi-community-certs.git" + + # Check if bundler is installed + if ! command -v bundle &> /dev/null; then + echo "Installing bundler..." + gem install bundler + fi + + # Use bundler to run fastlane if Gemfile exists + if [ -f "Gemfile" ]; then + echo "Using bundler to run fastlane..." + MATCH_PASSWORD=omi bundle exec fastlane match development --readonly \ + --app_identifier com.friend-app-with-wearable.ios12.development \ + --git_url "git@github.com:BasedHardware/omi-community-certs.git" + else + MATCH_PASSWORD=omi fastlane match development --readonly \ + --app_identifier com.friend-app-with-wearable.ios12.development \ + --git_url "git@github.com:BasedHardware/omi-community-certs.git" + fi }