英文:
xcodebuild archive failing with SwiftEmitModule normal arm64 Emitting
问题
我有一个框架,它有其他框架作为依赖关系。我想为设备和模拟器存档框架,以创建 XCFramework。当我运行下面的命令时,存档失败,并显示以下错误。
命令已使用:
xcodebuild archive \
-scheme XXXX \
-sdk iphoneos \
-archivePath "archives/ios_devices.xcarchive" \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
SKIP_INSTALL=NO
从命令行中失败,并显示以下错误:
存档失败
以下构建命令失败:
SwiftEmitModule normal arm64 Emitting module for XXXX (in target 'XXXX' from project 'XXXX')
(1 failure)
英文:
I have a framework and it has other frameworks as dependency. I wanted to archive the framework for Device, Simulator to create XCFramework. when i run below command archive is failing with below command.
Command Used:
xcodebuild archive \
-scheme XXXX \
-sdk iphoneos \
-archivePath "archives/ios_devices.xcarchive" \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
SKIP_INSTALL=NO
Failing with below error from command line.
** ARCHIVE FAILED **
The following build commands failed:
SwiftEmitModule normal arm64 Emitting\ module\ for\ XXXX (in target 'XXXX' from project 'XXXX')
(1 failure)
答案1
得分: 1
I solved this issue. If you are using workspace, you should add this line to your archive building commands.
-workspace SampleFramework.xcworkspace
I saw this solution here
============================================
I want to include Alamofire in my framework, and I want to build it as an xcframework. So when I build it, I encountered the same problem you had.
The things I tried:
- Include 'VALID_ARCHS="i386 x86_64"' in the iPhone simulator archive building command.
- Include -destination in the archive building command.
- Try changing the framework's Mach-O Type to dynamic or static library.
- Check the framework's build settings to exclude the arm64 architecture when it's running on a phone.
Unfortunately, none of the things I tried could solve the problem. Did you find any solution? Also, I'm not good at English. Please excuse me for this.
英文:
I solved this issue. If you are using workspace, you should add this line to your archive building commands.
-workspace SampleFramework.xcworkspace \
I saw this solution here
============================================
I want include Alamofire to my framework and I want build it as xcframework. So when I build it, I have the same problem which you got.
The things what i tried :
- include 'VALID_ARCHS="i386 x86_64" to the iphone simulator archive building command
- include -destination to the archive building command
- try the framework's Mach-O Type to dynamic, static library
- check the framework's build settings. not to include amr64 architecture when it running as phone.
All I did cannot solve the problem. Did you find any solution? Also I'm not good at English. Please excuse me for this.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论