在OC项目中使用swift时,遇到Cannot find protocol declaration for 'xxx'时,可能需要在桥接文件中import相应的头文件,比如:Cannot find protocol declaration for 'SKPaymentTransactionObserver' 和 Cannot find protocol declaration for 'SKProductsRequestDelegate',我需要在桥接文件中添加#import <StoreKit/StoreKit.h>,再编译就通过了.
记录一下.








网友评论