cocoapod Podfile use frameworks swift/oc混编 could not build module xxx

 

前置:

知名的pod: AFNetworking

我自己的pod:  AFNetworking+RX  3.1.0.18

里面有一段代码是:

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

  

引用AFNetworking 是用  双引号的方式引用.

在自己的工程中,Podfile有:

platform :ios, '9.0'
use_frameworks!
inhibit_all_warnings!
target 'AAA' do
    pod 'AFNetworking+RX'
end

  

整个AAA target是使用oc/swift混编

无论是在swift 中 import

import AFNetworking_RX

  还是在oc中import:

#import <AFNetworking_RX/AFNetworking+RXHeader.h>

  会出现:

could not build module 

这种错误.

 

错误的最终根源是在:

我自己的pod:  AFNetworking+RX

import  AFNetworking的方式错误了.

正确的应该是:

#import <AFNetworking/AFNetworking.h>

  

ok 搞定.

 

posted on 2018-01-10 18:07  传说中的汽水枪  阅读(679)  评论(0编辑  收藏  举报

导航