mapbox / mapbox/mapbox-maps-flutter

iOS 17 Cannot properly build release version

Aperta
#385 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Dart
Stelle
380
Fork
204
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Description
All started by this error:
```Could not find module 'MapboxMaps' for target 'arm64-apple-ios-simulator'; found: x86_64-apple-ios-simulator```

I've found other closed issue but they were old and not currently working.

## Context:
I'm using an M1 chip

Flutter doctor

```bash
[✓] Flutter (Channel master, 3.19.0-9.0.pre.206, on macOS 14.3 23D56 darwin-arm64, locale it-IT)
• Flutter version 3.19.0-9.0.pre.206 on channel master at /Users/rafaelbenetton/Documents/Core/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 7e46394178 (8 ore fa), 2024-01-29 01:46:24 -0500
• Engine revision 210ed1dfb8
• Dart version 3.4.0 (build 3.4.0-82.0.dev)
• DevTools version 2.31.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/rafaelbenetton/Library/Android/sdk
• Platform android-33, build-tools 33.0.2
• Java binary at: /Users/rafaelbenetton/Desktop/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C500b
• CocoaPods version 1.14.3

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
• Android Studio at /Users/rafaelbenetton/Desktop/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.85.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.80.0

[✓] Connected device (3 available)
• iPad 17.2 (mobile) • 96F06AA2-37BD-4212-9E6E-A6DB4C6601F9 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.3 23D56 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 120.0.6099.234

[✓] Network resources
• All expected network resources are available.

• No issues found!
```

## Troubleshooting
Ok so the problem is (i think) this package does not support Apple Silicon chip.
Ok the solutions would be searching for xcode.app > "Get info" > and toggle "Open with Rosetta"

![photo_2024-01-29_15-23-24](https://github.com/mapbox/mapbox-maps-flutter/assets/34171011/6f336bb1-2462-476c-b245-703bfe12c5e6)
Well, I don't have this toggle so, by opening xcode instead of vscode (I build with vscode yes) and build the project a dialog shows up:
![photo_2024-01-29_15-23-01](https://github.com/mapbox/mapbox-maps-flutter/assets/34171011/6626cd69-4dd7-45d4-90fa-c4f0b94dd768)

Nice, let's build with Rosetta then!
![photo_2024-01-29_15-23-08](https://github.com/mapbox/mapbox-maps-flutter/assets/34171011/ba8017dd-3abd-4fb6-a593-6a1b4371c6f6)

Hurray, you have a loop.

What I have to do?

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci la build di release su un Mac M1 con macOS 14.3, Xcode 15.2, iOS 17, Flutter 3.19.0-9.0.pre.206 e MapboxMaps. Analizza l’incompatibilità dei moduli del simulatore tra arm64 e x86_64 e il ciclo di build di Rosetta; il lavoro è completato quando la versione release iOS viene compilata correttamente senza quell’errore.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
dart, flutter, ios
Ambito
build-system, mobile-dev
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.