微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

dyld:库未加载:@rpath/SwiftyStoreKit.framework/Versions/A/SwiftyStoreKit - macCatalyst

如何解决dyld:库未加载:@rpath/SwiftyStoreKit.framework/Versions/A/SwiftyStoreKit - macCatalyst

运行失败,错误 mac Catalyst

require 'cocoapods-catalyst-support'
 platform :ios,'10.0'

target 'MyApp' do
 use_frameworks!

pod 'SwiftyStoreKit'
end

# Configure your macCatalyst dependencies
catalyst_configuration do
    # Uncomment the next line for a verbose output
     verbose!

    # ios '<pod_name>' # This dependency will only be available for iOS
    # macos '<pod_name>' # This dependency will only be available for macOS
end

post_install do |installer|

    installer.configure_catalyst
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
      config.build_settings['ALWAYS_EMbed_SWIFT_STANDARD_LIBRARIES'] = 'Yes'
     end
  end
end
end

这是我的 podfile ,这包含更多其他的豆荚。比SwiftyStoreKit。 我可以在没有 SwiftyStoreKit 的情况下运行,但是如果我添加 at 则会收到此错误和断点

dyld: Library not loaded: @rpath/SwiftyStoreKit.framework/Versions/A/SwiftyStoreKit
  Referenced from: /Users/admin/Library/Caches/...../Build/Products/Debug-maccatalyst/MyApp.app/Contents/MacOS/MyApp
  Reason: image not found

我正在使用此工具为 mac 催化剂排除 Pod:https://github.com/fermoya/cocoapods-catalyst-support

使用

Xcode:12.4 macOS:大苏尔 11.2.2

解决方法

SwiftStoreKitSwift Package Manager 集成可解决此问题。

如果您使用的是 Xcode 11 或更高版本:

  1. 点击文件
  2. Swift 包
  3. 添加包依赖...
  4. 为 SwiftyStoreKit 指定 git URL。

https://github.com/bizz84/SwiftyStoreKit.git

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?