Cocoa pods and Watchkit Extesion

后端 未结 8 1323
迷失自我
迷失自我 2021-02-06 00:50

I try to build a WatchKit Extension for my app...

I Updated the pods file to look like this:

platform:ios, \'8.0\'
use_frameworks!
source \'https://githu         


        
8条回答
  •  礼貌的吻别
    2021-02-06 01:10

    I'm using Pod 1.2.1 and facing the same problem i.e. No such module XYZ and for anyone who came across the same issue here what I did to overcome it:

    use_frameworks!
    
    def shared_pods
        pod 'XYZ'
    end
    
    target 'MyApp' do
        platform :ios, '8.0'
    
        shared_pods
    
        pod 'Blah'
        pod 'blah'
    
    end
    
    target 'Watch Extension' do
        platform :watchos, '3.2'
        shared_pods 
    end
    

    I just added platform under each target e.g platform :watchos, '3.2' which was missing before and it solved my problem.

提交回复
热议问题