cocoapod引入FLEX,debug模式正常,Release报错library not found for -lXXX

cocoapod引入FLEX,debug模式正常,Release报错library not found for -lXXX,

因为podfile是这么写的:

pod 'FLEX', '~> 2.0', :configurations => ['Debug']

所以只有在debug模式下才会编译FLEX,在Release模式下并不会编译FLEX

在appDelegate里面如果直接import FLEX的头文件,在Release模式下仍然会去查找FLEX的文件,肯定找不到啊,所以报错了

所以改成只有在Release模式下才import FLEX就不会报错了:

#import "AppDelegate.h"
#if (defined(DEBUG) && DEBUG)
#import <FLEX.h>
#endif

 

posted on 2018-07-13 11:24  土匪7  阅读(449)  评论(0编辑  收藏  举报