Found an unexpected mach-o header code in Xcode?

情到浓时终转凉″ 提交于 2020-02-13 21:04:42

问题


So the error I'm having is this : "found an unexpected mach-o header code"

Everything I found online told me to check my target build phases and see what doesn't belong in the Copy Bundle Resources.

What doesn't belong here because I feel everything is in the right spot.

UPDATE : I removed everything in the list and I still encounter this error :(


回答1:


If you are using Cocoapods, you should add this to the end of your Podfile:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
        end
    end
end

Credits should go to https://github.com/CocoaPods/CocoaPods/issues/5598




回答2:


After 2 hours of trying everything on the internet this is what fixed my solution

  1. If you are using fabric, remove it. ( This helped some but not me, if it still didn't solve the problem move on to next one)
  2. Remove Pod framework from "General" > "Embedded binaries" and add it back in "Linked Frameworks"
  3. Remove Derived Data
  4. Pod Update
  5. Clean and Build

This finally helped me ( step 2 helped me the most) hope it helps you too




回答3:


i got the same error... Clean project and build again works for me...



来源:https://stackoverflow.com/questions/38213903/found-an-unexpected-mach-o-header-code-in-xcode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!