- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有两个项目的 iOS 工作区:
Core
- 是一个带有框架的项目。它还通过 swift 包管理器具有 RxSwift
依赖性。
App
- 是一个将 Core.framework
作为嵌入依赖项并将 RxSwift
作为 swift 包管理器依赖项的应用程序。
我在应用运行时收到这些警告:
objc[8296]: Class _TtC7RxSwiftP33_AB3B9E8806A71B46FB498A7594F5E0D919AnonymousDisposable is implemented in both /Users/andrey/Library/Developer/Xcode/DerivedData/App-dypyskhwoifkwagjjvtjblqppdnd/Build/Products/Debug-iphonesimulator/Core.framework/Core (0x10e092400) and /Users/andrey/Library/Developer/CoreSimulator/Devices/53D234F9-F917-46BA-B376-F28BA905EE9D/data/Containers/Bundle/Application/D4C69694-8515-44CF-B077-0CB3256D1F84/App.app/App (0x10bf95430). One of the two will be used. Which one is undefined.
但如果我尝试访问 MainScheduler.instance
这是一个静态变量,我将得到 EXC_BAD_ACCESS
堆栈崩溃:
#0 0x000000010e7d5c07 in swift_checkMetadataState ()
#1 0x000000010e7d9a17 in checkTransitiveCompleteness(swift::TargetMetadata<swift::InProcess> const*)::$_18::operator()(swift::TargetMetadata<swift::InProcess> const*) const ()
#2 0x000000010e7d97ac in bool findAnyTransitiveMetadata<checkTransitiveCompleteness(swift::TargetMetadata<swift::InProcess> const*)::$_18&>(swift::TargetMetadata<swift::InProcess> const*, checkTransitiveCompleteness(swift::TargetMetadata<swift::InProcess> const*)::$_18&) ()
#3 0x000000010e7d96a6 in checkTransitiveCompleteness(swift::TargetMetadata<swift::InProcess> const*) ()
#4 0x000000010e7da278 in swift::MetadataCacheEntryBase<(anonymous namespace)::SingletonMetadataCacheEntry, int>::doInitialization(swift::ConcurrencyControl&, swift::MetadataCompletionQueueEntry*, swift::MetadataRequest) ()
#5 0x000000010e7d0078 in swift_getSingletonMetadata ()
#6 0x000000010b3bb9b8 in type metadata accessor for MainScheduler ()
#7 0x000000010af4b1c5 in static RxSchedulers.mainScheduler.getter
修复此崩溃的可能方法是什么?
最佳答案
问题是 App
模块有两个 RxSwift
依赖项,它们相互冲突。第一个是来自 Core.framework
的传递依赖,第二个是在 App
模块中。它导致了这次崩溃。
另一个迹象表明你有两个相同的依赖关系的问题可能是警告应用程序启动。就像这个:
objc[8296]: Class _TtC7RxSwiftP33_AB3B9E8806A71B46FB498A7594F5E0D919AnonymousDisposable is implemented in both /Users/andrey/Library/Developer/Xcode/DerivedData/App-dypyskhwoifkwagjjvtjblqppdnd/Build/Products/Debug-iphonesimulator/Core.framework/Core (0x10e092400) and /Users/andrey/Library/Developer/CoreSimulator/Devices/53D234F9-F917-46BA-B376-F28BA905EE9D/data/Containers/Bundle/Application/D4C69694-8515-44CF-B077-0CB3256D1F84/App.app/App (0x10bf95430). One of the two will be used. Which one is undefined.
对于这种情况,可能的解决方法是从 App
模块中删除 RxSwift
依赖项。它不会破坏代码,因为 RxSwift
是传递依赖,并且将在 App
模块中可用。
关于swift - 不同项目中的 SPM 依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58223845/
我们有 xcode 项目几乎没有 swift-package-manager 依赖项,但其中一个依赖项托管在 Gitlab 私有(private)仓库 faSTLane 用于构建和交付我们的应用程序
我正在尝试使用 swift 包驱动程序安装 MongoDB swift 驱动程序。我关注了their instructions并使用自制软件安装了 mongo-c-driver。然后我创建了一个新目录
刚刚得知还有另一个包管理器:静态包管理器 或 spm.js - http://spmjs.io/ .从对文档的简要回顾来看,该工具似乎与“老好”的 Bower 非常相似。 是这样吗? Bower 或
我遇到了 swiftlint 自动更正的奇怪行为。我的项目使用通过 SPM 导入的库。但是当我运行 linter 时,它会更改如下设置 B4621A7323D0A90F00545ADE /* Libr
我正在尝试测试依赖于 CryptoKit 的 swift 包( SHA256 哈希使用 debug 配置非常慢),我想使用优化标志运行测试。 使用 Xcode 11.4 Beta和 macOS Cat
想象一下这种情况,当您的 App项目使用两个自定义库 .xcworkspace |- App.xcodeproj |- LibraryA.xcodeproj |- LibraryB.xcodeproj
我们正在维护一个私有(private)的 SPM 库,我想介绍一个应该使用的函数,而不是现有的函数。最终结果应该是某种弃用。 到目前为止,我发现函数可以相对于操作系统版本弃用,但我需要相对于库版本弃用
我们正在维护一个私有(private)的 SPM 库,我想介绍一个应该使用的函数,而不是现有的函数。最终结果应该是某种弃用。 到目前为止,我发现函数可以相对于操作系统版本弃用,但我需要相对于库版本弃用
我有两个项目的 iOS 工作区: Core - 是一个带有框架的项目。它还通过 swift 包管理器具有 RxSwift 依赖性。 App - 是一个将 Core.framework 作为嵌入依赖项并
我想使用 Swift 包管理器编写我的项目代码。获得代码完成的唯一可能方法是通过 Xcode AFAIK。在 Vim 中获得代码完成的所有其他尝试对我来说都失败了。 我的 Swift 包的设置: $
我是 Swift 包管理器的新手,但它已集成到 Xcode 11 中,是时候尝试一下了。我在新工作区中有一个新的应用程序和 SPM 库。我有一个带有测试的工作库,并且已成功将该库导入到应用程序中。 我
我开始使用 xcode 11,我非常喜欢新功能 Swift Package Manger。我目前正在用它移动我的一些项目。 我的框架之一是围绕 C++ 库的 Swift 包装器。这些库是静态库,我无法
有没有办法在 XCode 中抑制来 self 的 SPM 包的所有警告?! ⚠️found 1 file(s) which are unhandled; explicitly declare them
我想创建一个基于 Objective-C 代码的 SwiftPackageManager 库,但我似乎无法掌握我缺少的内容。 我对包含文件夹中的 vanilla ObjC 接口(interface)
是否可以在 xcode 11 中将本地依赖项与 SPM 集成, 文件 > Swift 包 > 添加包依赖... 它似乎只填充并让我选择托管在 bitbucket 上的 git repos 我只是不确定
我正在开发一个需要包含 SwiftUI View 的 Swift 包管理器包。 每个 SwiftUI View 都应该有一个预览。 但是,当我尝试运行任何 View 的预览时,我收到以下错误: 我找到
我开始使用 Swift 包管理器,当我使用 https ( https://github.com/Alamofire/Alamofire.git ) 添加存储库时,当我尝试使用我的 github 帐户
我的应用程序由许多项目(框架)组成,一个用于每个主要功能,一个通用框架包含我需要在多个功能中访问的各种东西。 我正在使用 Xcode 11 的 Swift 包管理器来添加依赖项。 通用框架包含一个 R
我刚刚将一个 git 存储库转换为 Swift 包管理器 (spm),一切顺利,它编译并且我可以将它导入到项目中。 不好的是项目没有编译,没有看到协议(protocol)。我的库是一个单一的泛型类,我
我们正尝试使用 SPM 分割脑组织类型,但几乎不可能在线找到如何在不使用 GUI 的情况下调用其底层 matlab 函数。 我找到的一些资源没有帮助: SPM Manual SPM Book on W
我是一名优秀的程序员,十分优秀!