Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
909 views
in Technique[技术] by (71.8m points)

xcode12 - Problems after upgrading to Xcode 12:ld: building for iOS Simulator, but linking in dylib built for iOS, architecture arm64

I upgraded Xcode to Xcode 12, and build my project. Firstly, it come out an error such as below:

ld: building for iOS Simulator, but linking in dylib built for iOS, file '/Users/ethanli/Documents/Aspira/RA.com4iOS/RA.com4iOS/source/ReserveAmerica/ReserveAmerica4/External/Mapbox/MapboxMobileEvents.framework/MapboxMobileEvents' for architecture arm64

I wiped out this error by adding "arm64" to Excluded Architecture in Build Settings. Refer to https://developer.apple.com/forums/thread/656509

configuration like this

But... another error came out:

error: Build input file cannot be found: '/Users/ethanli/Library/Developer/Xcode/DerivedData/ReserveAmerica4-cgnruuknmgycgrbadguodtkwspmy/Build/Products/DEBUG-iphonesimulator/ReserveAmerica4.app/ReserveAmerica4' (in target 'ReserveAmerica4' from project 'ReserveAmerica4')

I went to the path in Finder, “ReserveAmerica4” really doesn't exist.

Is there any way to solve this problem?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I resolved this error.

The root reason is that Xcode 12 does not allow build arm64 architecture for Simulator. We should set x86_64 for Simulator building.

  1. Set "Build Active Architecture Only" to "YES" in target Build Settings tab;
  2. Set x86_64 for Simulator: enter image description here

For more answers: Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...