Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code Build failed for iOS Simulator #2

Closed
chrisvidal opened this issue Nov 9, 2021 · 3 comments
Closed

VS Code Build failed for iOS Simulator #2

chrisvidal opened this issue Nov 9, 2021 · 3 comments

Comments

@chrisvidal
Copy link

After setting up the news api key, I try to run the project but failed here:

flutter run
Launching lib/main.dart on iPhone 13 in debug mode...
Running Xcode build...                                                  
Xcode build done.                                            4.9s
Failed to build iOS app
Error output from Xcode build:
↳
    --- xcodebuild: WARNING: Using the first of multiple matching destinations:
    { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
    { platform:iOS Simulator, id:46691FB9-62BA-421D-A478-A308DE6F9601, OS:15.0, name:iPad (9th generation) }
    { platform:iOS Simulator, id:2393A493-2F87-4CB9-ADA6-525883A42B0E, OS:15.0, name:iPad Air (4th generation) }
    { platform:iOS Simulator, id:9C5694BE-C100-4937-BDF3-5E3CC2ECFAED, OS:15.0, name:iPad Pro (9.7-inch) }
    { platform:iOS Simulator, id:1F4CDD96-31CB-43F8-9506-1C8A9963FC73, OS:15.0, name:iPad Pro (11-inch) (3rd generation) }
    { platform:iOS Simulator, id:1250A5A2-D72D-492E-95EF-DA120E88F326, OS:15.0, name:iPad Pro (12.9-inch) (5th generation) }
    { platform:iOS Simulator, id:E95A2FB4-6CA3-4FA7-BDD9-3CFEBE5515B5, OS:15.0, name:iPad mini (6th generation) }
    { platform:iOS Simulator, id:EC64E46B-1684-449E-9354-B7FDA0863C9C, OS:15.0, name:iPhone 8 }
    { platform:iOS Simulator, id:9CC5B504-2793-44CA-AB47-FADD725F18B6, OS:15.0, name:iPhone 8 Plus }
    { platform:iOS Simulator, id:EB33EABC-7446-442E-97DA-606D2990C9A6, OS:15.0, name:iPhone 11 }
    { platform:iOS Simulator, id:BD9AAAF2-0B5B-4783-8018-EC85F14E6956, OS:15.0, name:iPhone 11 Pro }
    { platform:iOS Simulator, id:3744722D-DE5E-4FA0-BC0B-CAD90FB6E7A9, OS:15.0, name:iPhone 11 Pro Max }
    { platform:iOS Simulator, id:585DE18B-DBFE-4A7A-8627-460A7067B40C, OS:15.0, name:iPhone 12 }
    { platform:iOS Simulator, id:91EF8953-9A29-494C-AF7C-C04D620BD42B, OS:15.0, name:iPhone 12 Pro }
    { platform:iOS Simulator, id:DF79BA1C-9204-4781-955A-F66C3E19E583, OS:15.0, name:iPhone 12 Pro Max }
    { platform:iOS Simulator, id:7050E272-8FF3-43F4-B536-DB43800ED82F, OS:15.0, name:iPhone 12 mini }
    { platform:iOS Simulator, id:A97748DE-8097-4FBA-AB6B-5635AE6674E0, OS:15.0, name:iPhone 13 }
    { platform:iOS Simulator, id:6A1F97D8-358E-44C7-A2E0-02B2547647BB, OS:15.0, name:iPhone 13 Pro }
    { platform:iOS Simulator, id:43F48847-CA40-40A5-875F-9096BB06B790, OS:15.0, name:iPhone 13 Pro Max }
    { platform:iOS Simulator, id:D1521805-FC63-4241-9FC7-BACBA539A1DC, OS:15.0, name:iPhone 13 mini }
    { platform:iOS Simulator, id:48061000-63C0-42E8-BDB8-820996BC4D11, OS:15.0, name:iPhone SE (2nd generation) }
    { platform:iOS Simulator, id:BCD92AD3-A46E-45F3-91ED-F76D1CF68677, OS:15.0, name:iPod touch (7th generation) }
    { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008103-001A04943AD1001E }
    { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
    ** BUILD FAILED **


Xcode's output:
↳
    diff: /Podfile.lock: No such file or directory
    diff: /Manifest.lock: No such file or directory
    error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in parallel

Could not build the application for the simulator.
Error launching application on iPhone 13.
@31Carlton7
Copy link
Owner

Navigate to the project and in terminal run the following commands:

cd ios
pod update (If you have M1 Mac run `arch -x86_64 pod update`)
cd -
flutter clean
flutter pub get
flutter run

And see if that fixes the problem.

@chrisvidal
Copy link
Author

brilliant, thanks!
the arch -x86_64 pod update command was key and unlock the build
thanks

@31Carlton7
Copy link
Owner

You are very welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants