From bb49bbd0f7ffc1ff4e37a364e9d8058c41a9271e Mon Sep 17 00:00:00 2001 From: din4_4 Date: Mon, 25 May 2026 15:33:37 +0300 Subject: [PATCH] docs(ios): update README for simulator setup and build instructions - Translated and reorganized instructions for running the app on the iOS simulator. - Added specific commands for terminal usage and emphasized the importance of executing commands from the correct project directory. - Removed outdated sections and streamlined the content for clarity and relevance. This update enhances the documentation for developers working with the iOS simulator. --- ios/README.md | 55 +++++++++++---------------------------------------- 1 file changed, 12 insertions(+), 43 deletions(-) diff --git a/ios/README.md b/ios/README.md index 9098cc2..ab2bb47 100644 --- a/ios/README.md +++ b/ios/README.md @@ -1,54 +1,23 @@ -# iOS +# Запуск на симуляторе (Mac) -Flutter + CocoaPods. Нативка через плагины — зависимости смотри в `Podfile` / `Podfile.lock`. - -## Окружение - -Полный Xcode (не только CLT). После апдейта Xcode: +**Терминал** (⌘ + `): ```bash -sudo xcode-select -s /Applications/Xcode.app/Contents/Developer -sudo xcodebuild -runFirstLaunch +cd /Users/commercesparkit.by/Desktop/projekt/be_happy_public +export LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 +open -a Simulator +flutter run ``` -Нет нужного iOS в сборке — Xcode → Settings → Platforms, докачать runtime. `flutter doctor -v` для быстрой проверки toolchain. - -## Сборка из репозитория - -Из корня (важно для `Generated.xcconfig`): +Первый раз или после обновления кода: ```bash +cd /Users/commercesparkit.by/Desktop/projekt/be_happy_public +export LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 flutter pub get cd ios && pod install && cd .. +open -a Simulator +flutter run ``` -Открывать **`Runner.xcworkspace`**, не `Runner.xcodeproj`. - -Ключ **Yandex MapKit**: в `Info.plist` — `YandexMapKitApiKey` = `$(YANDEX_MAPKIT_API_KEY)`. Значение задаётся в `ios/Flutter/Debug.xcconfig`, `Release.xcconfig`, `Profile.xcconfig` (в конце файла; опционально перед этим `#include? "Secrets.xcconfig"` — см. `Secrets.xcconfig.example`). В `AppDelegate.swift` до `super.application` вызываются `YMKMapKit.setLocale` / `setApiKey` из plist — иначе SDK падает при регистрации плагина. - -## Подпись - -Runner → Signing & Capabilities, свой Team. Bundle id: `com.sparkit.beHappy` — должен совпадать с App ID в developer portal под TestFlight / App Store. - -## Артефакты - -```bash -flutter build ipa -``` - -`.ipa` — в `build/ios/ipa/` (точный путь Flutter печатает в конце). - -Альтернатива: Xcode → Archive → Distribute. `ExportOptions.plist` в репу не коммитим. - -## Симулятор - -```bash -flutter devices -flutter run -d -``` - -У `mobile_scanner` 5.x в Pods тянется Google ML Kit; на симуляторах Apple Silicon под свежим iOS Xcode часто ругается на arm64 и криво матчит destination. Если `flutter run` на симе отвалился — собери на **физическом устройстве** или проверь обновления плагина / обходы в `Podfile` под твою связку Xcode + runtime. - -## Ссылки - -[Flutter: iOS deployment](https://docs.flutter.dev/deployment/ios) +Важно: команды только из папки `be_happy_public`, не из `~`.