【问题标题】:dyld: Library not loaded: @rpath/SwiftyStoreKit.framework/Versions/A/SwiftyStoreKit - macCatalystdyld:库未加载:@rpath/SwiftyStoreKit.framework/Versions/A/SwiftyStoreKit - macCatalyst
【发布时间】:2021-06-07 07:45:15
【问题描述】:

运行失败,出现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,是的,它包含更多其他的 pod。比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

【问题讨论】:

    标签: macos cocoapods catalyst mac-catalyst swiftystorekit


    【解决方案1】:

    SwiftStoreKitSwift 包管理器 集成可以解决问题。

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

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

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

    【讨论】:

      猜你喜欢
      • 2013-12-18
      • 2017-05-06
      • 1970-01-01
      • 2014-08-23
      • 2021-04-28
      • 2016-05-24
      • 2017-04-20
      • 2016-05-29
      相关资源
      最近更新 更多