I can not build my app on iOS emulator I keep getting this error:
Launching lib/main.dart on iPhone 16 Pro Max in debug mode...
Xcode build done. 498.9s
Failed to build iOS app
Parse Issue (Xcode): Module 'mobile_scanner' not found
/Users/mike_jones/Documents/development/projects/vaygo_bingo/ios/Runner/GeneratedPluginRegistrant.m:53:8
Could not build the application for the simulator.
Error launching application on iPhone 16 Pro Max.
Exited (1).
Flutter doctor:
[✓] Flutter (Channel stable, 3.29.2, on macOS 15.3.2 24D81 darwin-arm64, locale en-US) [2.5s]
• Flutter version 3.29.2 on channel stable at /Users/mike_jones/Documents/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c236373904 (3 weeks ago), 2025-03-13 16:17:06 -0400
• Engine revision 18b71d647a
• Dart version 3.7.2
• DevTools version 2.42.3
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [2.9s]
• Android SDK at /Users/mike_jones/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• ANDROID_HOME = /Users/mike_jones/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.2) [1,243ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16C5032a
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [13ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.2) [12ms]
• Android Studio at /Applications/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 21.0.5+-12932927-b750.29)
[✓] VS Code (version 1.98.2) [10ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.106.0
[✓] Connected device (5 available) [7.8s]
• Michael’s iPad (wireless) (mobile) • 00008103-000C650902B8A01E • ios • iOS 18.3.2 22D82
• iPhone 16 Pro Max (mobile) • 91F78B5D-F71B-4E10-B810-F23D2E03799C • ios •
com.apple.CoreSimulator.SimRuntime.iOS-18-2 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 15.3.2 24D81 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.3.2 24D81 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 134.0.6998.166
[✓] Network resources [895ms]
• All expected network resources are available.
• No issues found!
I feel like I have tried everything, Flutter clean, flutter pub get… I also deleted the pod.lock and ran pod repo update / install.
Any other things for me to look at?
I tried running pod install in ios as well and get this:
mike_jones@macbookpro ios % pod install
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '11.10.0' defined in 'firebase_core'
firebase_analytics: Using Firebase SDK version '11.10.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '11.10.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '11.10.0' defined in 'firebase_core'
Downloading dependencies
Installing BoringSSL-GRPC (0.0.37)
Installing Firebase (11.10.0)
Installing FirebaseAnalytics (11.10.0)
Installing FirebaseAppCheckInterop (11.10.0)
Installing FirebaseAuth (11.10.0)
Installing FirebaseAuthInterop (11.10.0)
Installing FirebaseCore (11.10.0)
Installing FirebaseCoreExtension (11.10.0)
Installing FirebaseCoreInternal (11.10.0)
Installing FirebaseFirestore (11.10.0)
Installing FirebaseFirestoreInternal (11.10.0)
Installing FirebaseInstallations (11.10.0)
Installing FirebaseSharedSwift (11.10.0)
Installing Flutter (1.0.0)
Installing GTMSessionFetcher (3.5.0)
Installing Google-Mobile-Ads-SDK (11.13.0)
Installing GoogleAppMeasurement (11.10.0)
Installing GoogleDataTransport (10.1.0)
Installing GoogleMLKit (7.0.0)
Installing GoogleToolboxForMac (4.2.1)
Installing GoogleUserMessagingPlatform (3.0.0)
Installing GoogleUtilities (8.0.2)
Installing MLImage (1.0.0-beta6)
Installing MLKitBarcodeScanning (6.0.0)
Installing MLKitCommon (12.0.0)
Installing MLKitVision (8.0.0)
Installing PromisesObjC (2.4.0)
Installing PurchasesHybridCommon (13.26.0)
Installing PurchasesHybridCommonUI (13.26.0)
Installing RecaptchaInterop (101.0.0)
Installing RevenueCat (5.20.0)
Installing RevenueCatUI (5.20.0)
Installing abseil (1.20240722.0)
Installing app_tracking_transparency (0.0.1)
Installing cloud_firestore (5.6.6)
Installing firebase_analytics (11.4.5)
Installing firebase_auth (5.5.2)
Installing firebase_core (3.13.0)
Installing gRPC-C++ (1.69.0)
Installing gRPC-Core (1.69.0)
Installing google_mobile_ads (5.3.1)
Installing image_picker_ios (0.0.1)
Installing leveldb-library (1.22.6)
Installing mobile_scanner (6.0.2)
Installing nanopb (3.30910.0)
Installing path_provider_foundation (0.0.1)
Installing permission_handler_apple (9.3.0)
Installing purchases_flutter (8.7.0)
Installing purchases_ui_flutter (8.7.0)
Installing share_plus (0.0.1)
Installing shared_preferences_foundation (0.0.1)
Installing sqflite_darwin (0.0.4)
Installing url_launcher_ios (0.0.1)
Installing webview_flutter_wkwebview (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 18 dependencies from the Podfile and 54 total pods installed.
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).
[!] The `Runner [Debug]` target overrides the `EXCLUDED_ARCHS[sdk=iphonesimulator*]` build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Runner [Release]` target overrides the `EXCLUDED_ARCHS[sdk=iphonesimulator*]` build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Runner [Profile]` target overrides the `EXCLUDED_ARCHS[sdk=iphonesimulator*]` build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
mike_jones@macbookpro ios %
try this:
pod install --repo-update
I get this:
mike_jones@macbookpro ios % pod install --repo-update
Updating local specs repositories
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '11.10.0' defined in 'firebase_core'
firebase_analytics: Using Firebase SDK version '11.10.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '11.10.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '11.10.0' defined in 'firebase_core'
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 18 dependencies from the Podfile and 54 total pods installed.
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).
[!] The `Runner [Debug]` target overrides the `EXCLUDED_ARCHS[sdk=iphonesimulator*]` build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Runner [Release]` target overrides the `EXCLUDED_ARCHS[sdk=iphonesimulator*]` build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Runner [Profile]` target overrides the `EXCLUDED_ARCHS[sdk=iphonesimulator*]` build setting defined in `Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
mike_jones@macbookpro ios %
then same issue:
Launching lib/main.dart on iPhone 16 Pro Max in debug mode...
Xcode build done. 34.1s
Failed to build iOS app
Parse Issue (Xcode): Module 'mobile_scanner' not found
/Users/mike_jones/Documents/development/projects/vaygo_bingo/ios/Runner/GeneratedPluginRegistrant.m:53:8
Could not build the application for the simulator.
Error launching application on iPhone 16 Pro Max.
I wounder if its an issue with the latest version of this plugin… I “upgraded” to the beta to as a test and it works: mobile_scanner 7.0.0-beta.8 | Flutter package
No issues there…
Do you have swift package manager on? You can check with flutter config —list
.
If so, could you try:
- Close Xcode
- In your project, run
flutter clean
- Open Xcode
open ios/Runner.xcworkspace
, then File > Packages > Reset packages cache
- Run
flutter build ios
delete podfile.lock
flutter clean
flutter pub get
cd ios
pod install
then → flutter run