flutterxcode11.3

Flutter won't run on iOS after updating to 1.15.22-pre.18. Xcode build failing


I am writing a flutter app that was working fine up until tonight. It compiled and ran on both iOS simulator and iOS device. This evening, VSCode informed me there was a new version of Flutter so I upgraded. After the upgrade, Flutter Doctor told me to upgrade cocoapods, which I also did (after having to mess around with the Ruby 2.3 SDK since i'm on OSX 10.14.6. However, now my project won't build for either iOS simulator or iOS device.

I've tried 'flutter clean' but to no avail.

The error I get is:

    ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/lib/libSystem.tbd, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/lib/libSystem.tbd (4 slices)
    ld: building for iOS, but linking in object file (/var/folders/fh/fs6qqn7x5_5c3bbq36ct4nj40000gn/T/debug_app-2d4374.o) built for iOS Simulator, file '/var/folders/fh/fs6qqn7x5_5c3bbq36ct4nj40000gn/T/debug_app-2d4374.o' for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
      Command: xcrun clang -x c -arch x86_64 /var/folders/fh/fs6qqn7x5_5c3bbq36ct4nj40000gn/T/flutter_tools_stub_source.F8IoZt/debug_app.cc -dynamiclib -fembed-bitcode-marker -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -install_name @rpath/App.framework/App -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -o /Users/paul/Documents/Development/flutter/scale_practice_app2/.dart_tool/flutter_build/eabd0dc878995215df4262cdd052ace8/simulator_framework
    build failed.
    note: Using new build system
    note: Planning build
    note: Constructing build description
Could not build the precompiled application for the device.

It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
  open ios/Runner.xcworkspace

Error launching application on Paul's iPhone XR.**

Here is the output of 'flutter doctor -v':

**[✓] Flutter (Channel master, v1.15.22-pre.18, on Mac OS X 10.14.6 18G3020, locale en-GB)
    • Flutter version 1.15.22-pre.18 at /Users/paul/Apps/flutter
    • Framework revision 8bff33e497 (2 hours ago), 2020-03-13 17:26:02 -0700
    • Engine revision 9226a3881e
    • Dart version 2.8.0 (build 2.8.0-dev.14.0 a303769fad)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/paul/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.9.1

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 43.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

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

[✓] Connected device (3 available)
    • Paul's iPhone XR • 00008020-001B64482ED8003A            • ios        • iOS 13.3.1
    • iPhone XR        • 154A94BD-01CF-40B0-B25E-88073359CA3E • ios        • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
    • macOS            • macOS                                • darwin-x64 • Mac OS X 10.14.6 18G3020

• No issues found!

I followed some Google suggestions to re-create my pod files etc but that hasn't fixed it. I have also created a fresh Flutter project, copied in my .dart and assets files but the new project still won't build, with the same errors.

Any help would be greatly appreciated.


Solution

  • Complete uninstall and re-install of cocoapods, flutter, and xcode (including manually clearing out all preferences) worked.