小编cot*_*ton的帖子

在需要之前,必须从模块“yyy”导入“xxx”的定义

例如,我们有一个 pod 'Dependency3' 声明为 A 类

@interface A : NSObject

- (void)test;

@end
Run Code Online (Sandbox Code Playgroud)

pod 'Dependency1' 声明为 B 类和 A 类类别

@interface B : NSObject

@property (nonatomic, copy) NSString *bText;

@end

@interface A (Dep1)

@property (nonatomic, copy) NSString *aTextDep1;

@end
Run Code Online (Sandbox Code Playgroud)

pod 'Dependency2' 声明了 A 类和 B 类类别

@interface A (Dep2)

@property (nonatomic, copy) NSString *aTextDep2;

@end

@interface B (Dep2)

- (NSString *)bTextDep2;

@end
Run Code Online (Sandbox Code Playgroud)

并且依赖关系没有问题:

Dependency2 -> Dependency3 & Dependency1
Dependency1 -> Denpendency3
Run Code Online (Sandbox Code Playgroud)

在podfile中,我们启用其中一些的modular_headers

  pod 'Dependency1', :path => './Dependency1', :modular_headers => true …
Run Code Online (Sandbox Code Playgroud)

module objective-c clang

6
推荐指数
0
解决办法
1576
查看次数

标签 统计

clang ×1

module ×1

objective-c ×1