0

运行失败并出现以下错误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,但如果我添加然后得到这个错误和断点

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

4

1 回答 1

0

SwiftStoreKitSwift 包管理器集成解决了这个问题。

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

  1. 单击文件
  2. 斯威夫特包
  3. 添加包依赖...
  4. 指定 SwiftyStoreKit 的 git URL。

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

于 2021-03-10T10:39:21.910 回答