I have tried searching for solutions online, but I haven’t found anything that resolves my issue. It seems that the barcode_scan2 module is not found during the build. Does anyone have any ideas on how to fix this problem?
Things I have already tried:
Cleaning the project with flutter clean.
Ensuring all dependencies are updated in the pubspec.yaml file.
Checking that the barcode_scan2 plugin is correctly listed and configured.
Restarting Xcode and the simulator.
Verifying that the build settings in Xcode are correct.
Thanks in advance for any help!
Error:
Error output from Xcode build:
↳
2024-07-02 09:29:12.162 xcodebuild[7347:548346] [MT] DVTAssertions: Warning in IDEFrameworks/IDEFoundation/ContainerSettings/IDEWorkspaceSettings.m:184
Details: Error reading NSData for workspaceUserSettings: Error Domain=NSCocoaErrorDomain Code=3840 "Cannot parse a NULL or zero-length data" UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data}
Object: <IDEWorkspaceSharedSettings: 0x600000e32f20>
Method: -loadSettings
Thread: <_NSMainThread: 0x600001a801c0>{number = 1, name = main}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:05D3DC27-F567-4522-BD7E-95B69674014D, OS:17.0.1, name:iPhone 15 Pro }
{ platform:iOS Simulator, id:05D3DC27-F567-4522-BD7E-95B69674014D, OS:17.0.1, name:iPhone 15 Pro }
** BUILD FAILED **
Xcode's output:
↳
/Users/riccardo/Desktop/Progetti/Personali/quoteflutter/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'barcode_scan2' not found
@import barcode_scan2;
~~~~~~~^~~~~~~~~~~~~
1 error generated.
note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 15 Pro.