mapbox / mapbox/mapbox-maps-flutter

iOS 17 Cannot properly build release version

Offen
#385 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Dart
Sterne
380
Forks
204
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## 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?

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere den Release-Build auf einem M1 Mac mit macOS 14.3, Xcode 15.2, iOS 17, Flutter 3.19.0-9.0.pre.206 und MapboxMaps. Untersuche den Modulkonflikt des Simulators zwischen arm64 und x86_64 sowie die Rosetta-Buildschleife; abgeschlossen ist die Aufgabe, wenn die iOS-Release-Version ohne diesen Fehler erfolgreich gebaut wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
dart, flutter, ios
Bereich
build-system, mobile-dev
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.