https://casatwy.com/CTMediator_in_Swift.html#seg1
問題1:宏定義、枚舉重復定義
修改宏定義名字,加上類名做前綴
問題2:不支持在.h文件中導入其他模塊的頭文件 BMKLocationkit
解決:將其他模塊頭文件在.m文件中導入
問題3:?import xx 報錯“No such module 'xx'” ??swift文件無法直接導入某些OC庫
原因:這些OC庫缺少module.modulemap 文件,導致無法支持swift組件化
解決:在framework下添加module.modulemap文件,修改文件內(nèi)容,就能支持swift組件化
frameworkmoduleBaiduMapAPI_Map {
? umbrella header "BMKMapComponent.h"
? export *
? module * { export * }
}

問題4:SDCycleScrollView提示SDWebImage庫的兩個文件找不到
解決:修改SDCycleScrollView pod 源碼,將文件改為<SDWebImage/SDWebImage.h>導入
問題5:Undefined symbols for architecture arm64:
"__swift_FORCE_LOAD_$_swiftWebKit", referenced from:
解決:build Setting Other Linker Flags:添加? -undefined dynamic_lookup
問題6:找不到資源文件路徑error: Resource "/Users/xxx/Library/Developer/Xcode/DerivedData/xxx/Build/Products/Debug-iphoneos/BaseModuleT/BaseModule.framework/image.car" not found. Run 'pod install' to update the copy resources script.
解決:將cocapods 升級到1.10.1版本
問題7:The following Swift pods cannot yet be integrated as static libraries:
解決1:檢查podspec文件中pod_target_xcconfig配置:CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
解決2:檢查工程的ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES