0

I am building a flutter chat app,

here on running it on an ios device, I am getting the below error.

ld: building for iOS Simulator, but linking in dylib built for iOS, file '/Users/drole/Documents/chat/ios/Pods/AgoraRtcEngine_iOS/AgoraAIDenoiseExtension.framework/AgoraAIDenoiseExtension' for architecture arm64

What should I do to resolve the error, I've tried surfing on the internet but I don't get a proper solution.

S4NJ33V
  • 21
  • 1
  • 4
  • See here https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-an-object-file-built-for-io/64139830#64139830 – Varun Kumar Jan 30 '22 at 08:12
  • 1
    Try googling without your specific file path and SDK names and you should find some results ;) – Warpling Feb 08 '22 at 15:03

2 Answers2

0

in Podfile add this

post_install do |installer|
  projects = installer.aggregate_targets
   .map{ |t| t.user_project }
   .uniq{ |p| p.path }
   .push(installer.pods_project)
   installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
   end

  projects.each do |project|
   project.build_configurations.each do |config|
    config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 
   'arm64'
   end

   project.save()
 end
 end
Ja Mal
  • 1
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 23 '22 at 18:01
0

in Podfile add this or check this link https://github.com/mapbox/mapbox-gl-native-ios/issues/487#issuecomment-1163332686

post_install do |installer|
  projects = installer.aggregate_targets
   .map{ |t| t.user_project }
   .uniq{ |p| p.path }
   .push(installer.pods_project)
   installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
   end

  projects.each do |project|
   project.build_configurations.each do |config|
    config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 
   'arm64'
   end

   project.save()
 end
 end
Ja Mal
  • 1
  • 1