Class is implemented in both, One of the two will be used. Which one is undefined

后端 未结 5 888
感情败类
感情败类 2020-12-04 19:15

I have an issue with dependencies included in Cocoapods.

I have a Framework project (MyFramework target), which also has App target (MyFrameworkExampleApp). When I t

5条回答
  •  我在风中等你
    2020-12-04 20:16

    I was facing the same problem and in my case just defining "use_frameworks!" as global resolved the problem.

    After Podfile changes you should,

    1. Clean project
    2. Quit from xcode
    3. Delete derived data
    4. Pod install

    similar Podfile to mine below,

    workspace 'sample'
    # Comment the next line if you don't want to use dynamic frameworks
    use_frameworks!
    platform :ios, '13.0'
    
    def sample_pods
      pod 'Alamofire' , '~> 5.1.0'
      pod 'RxSwift'
      pod 'CodableAlamofire'
    end
    
    def sample_framework_pods
      pod 'Alamofire' , '~> 5.1.0'
      pod 'RxSwift'
      pod 'CodableAlamofire'
    end
    
    target 'sample' do
      # Pods for sample
        sample_pods
    end
    
    target 'sample_framework' do
      project 'sample_framework/sample_framework.xcodeproj'
      # Pods for sample_framework
      sample_framework_pods
    end
    

提交回复
热议问题