繁体   English   中英

Cocoapods Swift框架自定义配置

[英]Cocoapods Swift Frameworks Custom Configuration

我正在创建一个具有自定义配置和架构的全新项目,但是当使用自己的自定义swift框架时,出现“找不到框架”的信息

如果我将UI框架中的配置从“ Debug更改为“ Debug - Development则可以使用,但是我认为这不是一个很好的解决方案,因为我打算添加更多框架。

如果我不更改UI框架中的配置名称,这就是我得到的错误。

在此处输入图片说明

主要项目目标

自定义配置:

Debug - Production 
Debug - Development
Release - Production
Release - Development

模式:

Production
Development

UI框架:

自定义配置:

Debug 
Release

Podfile:

# 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM