skip to Main Content

I am setting a flutter project on Mac M3. I am getting the following error

Running Xcode build...                                                  
 └─Compiling, linking and signing...                      2,794ms
Xcode build done.                                           36.8s
Failed to build iOS app
Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swift_Builtin_float


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swift_errno


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swift_math


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swift_signal


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swift_stdio


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swift_time


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swiftsys_time


Error (Xcode): Undefined symbol: __swift_FORCE_LOAD_$_swiftunistd


Error (Xcode): Linker command failed with exit code 1 (use -v to see
invocation)


Could not build the application for the simulator.
Error launching application on iPhone 15 Pro Max.

OS : mac OS Sonama Version 14.7 (23H124)

Xcode : 15.4

Flutter : 3.22.2

2

Answers


  1. I encountered this issue as well. I found that it was related to an upgrade of some Facebook libraries. Here’s the error log:

    CopyUndefined symbols for architecture x86_64:
      "__swift_FORCE_LOAD_$_swift_Builtin_float", referenced from:
          __swift_FORCE_LOAD_$_swift_Builtin_float_$_FBAudienceNetworkSwift in FBAudienceNetwork[x86_64][2](FBAudienceNetworkSwift.o)
          __swift_FORCE_LOAD_$_swift_Builtin_float_$_FBAdFilterEngine in FBAudienceNetwork[x86_64][3](FBAdFilterEngine.o)
          __swift_FORCE_LOAD_$_swift_Builtin_float_$_FBAdMAISKOverlayManager in FBAudienceNetwork[x86_64][4](FBAdMAISKOverlayManager.o)
          __swift_FORCE_LOAD_$_swift_Builtin_float_$_FBAudienceNetwork in FBAudienceNetwork[x86_64][406](FBAudienceNetwork.o)
    

    I’ve updated the Podfile.lock to use these versions of Facebook libraries:

    - FBAEMKit (17.0.2):
        - FBSDKCoreKit_Basics (= 17.0.2)
    - FBAudienceNetwork (6.15.1)
    - FBSDKCoreKit (17.0.2):
        - FBAEMKit (= 17.0.2)
        - FBSDKCoreKit_Basics (= 17.0.2)
    - FBSDKCoreKit_Basics (17.0.2)
    
    Login or Signup to reply.
  2. For me, the issue is because of the FBAudienceNetwork. I have facebook_app_events dependency in my Flutter app.

    FBAudienceNetwork is updated recently with version 16.6.0.

    I have override the facebook_app_events from https://github.com/oddbit/flutter_facebook_app_events/tree/fix/iOS-issue-0.19.4. It is using the FBAudienceNetwork version 16.5.0

      facebook_app_events:
        git:
          url: https://github.com/oddbit/flutter_facebook_app_events
          ref: fix/iOS-issue-0.19.4
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search