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
407 views
in Technique[技术] by (71.8m points)

ios - Xcode 11.0 Beta 4 Builds and Runs, but can't Archive

My Swift project builds and runs normally, but fails every attempt to Archive with errors, caused by the following warnings:

Could not find or use auto-linked library 'swiftFoundation'
Could not find or use auto-linked library 'swiftMetal'
Could not find or use auto-linked library 'swiftDarwin'
Could not find or use auto-linked library 'swiftUIKit'
Could not find or use auto-linked library 'swiftCoreFoundation'
Could not find or use auto-linked library 'swiftObjectiveC'
Could not find or use auto-linked library 'swiftDispatch'
Could not find or use auto-linked library 'swiftCoreImage'
Could not find or use auto-linked library 'swiftQuartzCore'
Could not find or use auto-linked library 'swiftCoreGraphics'
Could not find or use auto-linked library 'swiftCore'
  1. This issue seems to be closely related, yet none of the proposed solutions seem to be helpful.
  2. Errors appear under this Pod in Issue Navigator.
  3. I was able to Archive this project in Xcode 11.0 Beta (1).
  4. Xcode 10.2.1 gets stuck compiling and indexing this project.
See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

I've been running into the same issue, and it looks to be caused by the known bitcode issue in the Xcode beta release notes:

Targets that contain Swift code with the Enable Bitcode build setting set to Yes fail to link correctly when built with the Archive action. (52804818)

Workaround: Add a custom build setting with the name LD_VERIFY_BITCODE, and set it to NO. Make a note to yourself to delete this custom build setting once this issue is resolved.

You will need to add a User-Defined Build Setting since it doesn't show up as a normal Build Setting. Click the + In your Build Settings to add one:

Where To Add User-Defined Setting

After Adding A User-Defined Setting, scroll all the way to the bottom of your build settings to find the one you just added, then modify it like so.

Final User-Defined Setting


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

...