如何在iOS和tvOS上使用相同的Pod?

问题描述 投票:0回答:1

我想为iOS和tvOS使用相同的pod。为此,我在这样的pod文件中编写了代码,

def shared_pods
    pod 'Moya', '~> 9.0' #Alamofire wrapper
    pod 'AlamofireNetworkActivityLogger', '~> 2.0'
    pod 'AlamofireObjectMapper'
    pod 'ReachabilitySwift', '~> 4.0'
    pod 'SDWebImage', '~> 4.4.5'

end

target 'iosApp' do
  platform :ios, '9.0'
  use_frameworks!
  inhibit_all_warnings!
  shared_pods

end

target 'TVApp' do
    platform :tvos, '9.0'
    use_frameworks!
    inhibit_all_warnings!
    shared_pods
end

但是我收到错误The platform of the target TVApp (tvOS 9.0) is not compatible with Stripe, which does not support tvOS.

[其他豆荚,pod 'DynamicCodable' pod 'Stripe', '~> 15.0.1' pod 'GooglePlacesSearchController' pod 'Google-Mobile-Ads-SDK' pod 'NTMonthYearPicker' pod 'NYTPhotoViewer', '~> 1.1.0' pod 'MGSwipeTableCell' pod 'SendBirdSDK', '~> 3.0' pod 'FLAnimatedImage' pod 'RSKImageCropper' #tappable label pod 'ActiveLabel' #calendar pod 'FSCalendar' #Location pod 'GooglePlaces' pod 'CreditCardValidator' pod 'FittedSheets' pod 'Branch' pod 'CarbonKit' pod 'AWSS3'也与tvOS不兼容,但我想在tvOS中使用它们。

我如何在两个操作系统上使用相同的框架?

ios swift cocoapods tvos
1个回答
-1
投票

该库与iOS 9.0及更高版本兼容

这就是为什么它不适用于您的tvos平台目标。
© www.soinside.com 2019 - 2024. All rights reserved.