相关疑难解决方法(0)

使用Swift 5.1编译的模块不能由Swift 5.1.2编译器导入

我有一个框架(在本例中为RxSwift),已使用Xcode 11.0将其编译为传统RxSwift.framework样式包

这很好地导入了Xcode 11.0和11.1,从没有任何问题

今天,在Apple发布Xcode 11.2之后,我进行了升级,并看到以下错误消息:

使用Swift 5.1编译的模块不能由Swift 5.1.2编译器导入

我习惯于迅速地编译不匹配的东西,而且我知道我可以使用Xcode 11.2重新编译RxSwift并继续进行,但是Swift 5.1的主要特点是模块稳定性

我给人的印象是,既然我们已经有了模块稳定性,那么框架就不需要继续与每个新的Xcode版本一起重新编译,但是事实并非如此。

如果有人能解释这里发生的事情,我将不胜感激。Xcode 11.2是否存在错误?还是我最初用Xcode 11.0编译时需要某种方式告诉它我想要模块稳定性吗?

xcode ios swift swift5.1

62
推荐指数
2
解决办法
7111
查看次数

Xcode 10构建失败,并且'Command CompileSwift失败并返回非零退出代码

我最近将Xcode更新到了版本10,并在尝试构建我的项目时开始收到一个奇怪的错误.我目前正在使用Swift 4.0,我尝试升级到swift版本4.2.但是当我这样做时,我在许多框架中都收到了同样的错误.

命令编译Swift失败,出现非零退出代码

到目前为止,我已删除派生文件夹.更新了所有pod,还删除了所有pod并使用下面的终端命令重新安装它们.

sudo gem install cocoapods-deintegrate cocoapods-clean
pod deintegrate
pod clean
pod install
Run Code Online (Sandbox Code Playgroud)

这不能解决我的问题.但是,我找到了一些可以工作的东西,即添加arm64架构Build Setting -> valid architectures并启用自动代码但是,当我检查它已经存在并且代码签名已经启用.

另外,我确实有一些与框架有关的其他构建错误.

SwiftMessages

"SwiftMessages.Config"类型的值没有成员'presentationContext'

WhatsNewKit

在call`中缺少参数'backgroundColor'的参数

我向每个框架的开发人员提出了问题,以寻求这些问题的帮助.

关于SwiftMessage的问题GitHub 问题WhatsNewKit GitHub

当我点击presentationContext它时,会将我带到SwiftMessages框架内的结构.通常,当我有"没有会员"警告时,我无法点击查看其存在的原始位置.

我认为这与可可豆荚有关,但尚未能找到解决方案.我该怎么做才能解决这个问题?如果有人可以提供帮助,将会深深感激被困在这一天.

更新:两个框架的最新版本适用于swift 4.2.当我将每个框架的版本更改为在swift 4.0中构建的版本时,我得到了要构建的项目.

ios swift swiftmessages xcode10

18
推荐指数
4
解决办法
2万
查看次数

命令CompileSwiftSources失败,出现非零退出代码Xcode 10

我读了一些相同的问题,但他们的解决方案对我不起作用.我的项目在Xcode 9.4中工作,但是当我来到Xcode 10并重新创建我的项目时,我得到了这个错误.我的项目必须添加/ usr/include/libxml2,如果我添加它,我会得到一个不同的错误redefinition of madule libxml2.日志是:

将"-Xcc -I $(SDKROOT)/ usr/include/libxml2"添加到Xcode项目中的OTHER_SWIFT_FLAGS.

如果我添加"-Xcc -I $(SDKROOT)/ usr/include/libxml2",则会出现以下错误:

:0:错误:未知参数:' - Xcc -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/libxml2'Command CompileSwiftSources失败非零退出代码

我能做什么?

swift xcode10

8
推荐指数
1
解决办法
1万
查看次数

不支持使用带有模块接口的桥接头命令 CompileSwiftSources 失败,退出代码为非零

我的项目中有用于支付网关的 razor pay pod 和SWRevelViewController用于侧栏控制器的文件。我选择了 swift 5 和 iOS 版本 13 并更新了所有 pod,但仍然出现错误

错误:不支持使用带有模块接口的桥接头命令 CompileSwiftSources 失败,退出代码非零

pod 'Alamofire', '~> 4.5' pod 'TWMessageBarManager'
pod 'SwiftValidator', :git => 'https://github.com/jpotts18/SwiftValidator.git', :tag => '4.2.0'

pod 'SDWebImage', '~> 5.0'
pod 'DropDown'
pod 'MBRadioCheckboxButton'
pod 'SwiftyJSON', '~> 4.0'
pod 'razorpay-pod', '~> 1.1.1'
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'Firebase/Auth'
pod 'SVProgressHUD'     
pod 'FacebookLogin'
pod 'FacebookCore'
pod 'ImageSlideshow', '~> 1.8.0'
pod "ImageSlideshow/SDWebImage"
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'PopupDialog', '~> 1.1'
pod 'GoogleSignIn'
pod 'AppAuth','~> 1.2.0'
Run Code Online (Sandbox Code Playgroud)

ios swift swift4 swift5

3
推荐指数
2
解决办法
1万
查看次数

错误:不支持将桥接标头与模块接口一起使用命令 CompileSwiftSources 失败,退出代码非零

我已切换到Xcode12我的静态库应用程序之一。我正在尝试制作 XCFramework 发行版。运行构建命令后,

\n
xcodebuild archive -scheme "MySDK" -sdk iphoneos  -archivePath \xe2\x80\x9c./archives/ios.xcarchive\xe2\x80\x9d -SKIP_INSTALL=NO\n
Run Code Online (Sandbox Code Playgroud)\n

Build Settings -> Build Libraries for Distribution当我切换到时出现以下错误YES

\n
<unknown>:0: error: using bridging headers with module interfaces is unsupported\nCommand CompileSwiftSources failed with a nonzero exit code\n\n** ARCHIVE FAILED **\n\n\nThe following build commands failed:\n    CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler\n    CompileSwiftSources normal armv7s com.apple.xcode.tools.swift.compiler\n    CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler\n(3 failures)\n
Run Code Online (Sandbox Code Playgroud)\n

这个答案有效,但不幸的是创建.xcframework需要设置选项 distribution YES

\n

如何解决这个问题?

\n

xcode xcodebuild ios xcframework xcode12

3
推荐指数
1
解决办法
3706
查看次数

Flutter 使用 jitsi_meet flutter 包在 IOS 上生成错误

我正在尝试创建一个 flutter 应用程序并集成 jitsi_meet flutter 包,我按照文档中指示的说明进行操作。

\n

我的 flutter 版本和 IOS 通过 flutter doctor

\n
Flutter version 2.8.1\ndevelop for iOS and macOS (Xcode 13.1)\n
Run Code Online (Sandbox Code Playgroud)\n

我的配置 pubspec.yaml

\n
dependencies:\n  flutter:\n    sdk: flutter\n  jitsi_meet: ^4.0.0\n
Run Code Online (Sandbox Code Playgroud)\n

我的 Podfile

\n
platform :ios, '11.0'\n\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    target.build_configurations.each do |config|\n      config.build_settings['ENABLE_BITCODE'] = 'NO'\n    end\n  end\nend\n
Run Code Online (Sandbox Code Playgroud)\n

在我的 pslist 上添加了以下键/字符串

\n
<key>NSCameraUsageDescription</key>\n<string>$(PRODUCT_NAME) MyApp needs access to your camera for meetings.</string>\n<key>NSMicrophoneUsageDescription</key>\n<string>$(PRODUCT_NAME) MyApp needs access to your microphone for meetings.</string>\n
Run Code Online (Sandbox Code Playgroud)\n

在此配置之后,我还将部署构建更改为 ios 11,如其他解决方案所述,但在使用我的 …

jitsi flutter jitsi-meet

0
推荐指数
1
解决办法
1115
查看次数