[英]Cocoapods Swift Frameworks Custom Configuration
我正在创建一个具有自定义配置和架构的全新项目,但是当使用自己的自定义swift框架时,出现“找不到框架”的信息 。
如果我将UI框架中的配置从“ Debug
更改为“ Debug - Development
则可以使用,但是我认为这不是一个很好的解决方案,因为我打算添加更多框架。
如果我不更改UI框架中的配置名称,这就是我得到的错误。
自定义配置:
Debug - Production
Debug - Development
Release - Production
Release - Development
模式:
Production
Development
自定义配置:
Debug
Release
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'
# Define workspace and use of frameworks.
workspace 'Exs.xcworkspace'
use_frameworks!
inhibit_all_warnings!
# Create simple struct to organize the pod names & versions.
CCPod = Struct.new(:name, :version)
# Define CCPods structs
RxSwift = CCPod.new('RxSwift', '~> 5.0.1')
RxOptional = CCPod.new('RxOptional', '~> 4.1.0')
RxCocoa = CCPod.new('RxCocoa', '~> 5.0.1')
# Define Global Dependencies
def rx_swift
pod RxCocoa.name, RxCocoa.version
pod RxSwift.name, RxSwift.version
pod RxOptional.name, RxOptional.version
end
# Pods in main target
target 'Exs' do
use_frameworks!
rx_swift
target 'ExsTests' do
inherit! :search_paths
# Pods for testing
end
target 'ExsUITests' do
# Pods for testing
end
end
# Pods to use in modules
target 'UI' do
project '../UI/UI.xcodeproj'
rx_swift
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.