# 下面两行是指明依赖库的来源地址 # CocoaPods官方spec仓库 source 'https://github.com/CocoaPods/Specs.git' # 广告SDK 源 source 'https://gitee.com/huazi-rongchuang/cxhadsdk-ios-repo.git' # 清华源 #source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git' # Private Speces #source 'https://github.com/ScareCrowInMountain/RQPrivateSpec.git' # 说明平台是ios,版本是13.0 platform:ios,'13.0' # 忽略引入库的所有警告(强迫症者的福音啊) inhibit_all_warnings! target 'jiaPei' do # CocoaPods # Private #pod 'RQAPPEventModuleComponent' # Base pod 'AFNetworking' pod 'FCUUID' pod 'FDFullscreenPopGesture' # 侧滑手势 pod 'FMDB' pod 'JSONModel' pod 'Masonry' pod 'MBProgressHUD' pod 'MJExtension' pod 'MJRefresh' pod 'QMUIKit', '~> 4.8.0' # 腾讯UI控件 pod 'ReactiveObjC' pod 'RealReachability' pod 'SDCycleScrollView' pod 'SDWebImage' pod 'SDWebImageWebPCoder', '0.8.3' pod 'WebViewJavascriptBridge' # YYKit pod 'YYText' # 富文本 pod 'YYModel' # 字典转模型 pod 'YYWebImage' # 高性能的 iOS 异步图像加载框架。 pod 'YYImage/WebP' # AD pod 'ADSuyiSDK','~> 3.9.9.12031' # 主SDK 必选 pod 'ADSuyiSDK/ADSuyiSDKPlatforms/bu' # 穿山甲(头条) pod 'ADSuyiSDK/ADSuyiSDKPlatforms/gdt' # 优量汇(广点通) pod 'ADSuyiSDK/ADSuyiSDKPlatforms/ks' # 快手(非内容版本,内容与非内容版本不可同时导入) pod 'ADSuyiSDK/ADSuyiSDKPlatforms/tianmu' # 天目 #必选 # 客服模块 pod 'QMLineSDK', '~> 4.4.0' pod 'MLEmojiLabel' pod 'GKPhotoBrowser' # BUG pod 'MLeaksFinder', :git => "https://github.com/Tencent/MLeaksFinder.git" pod 'FBRetainCycleDetector' pod 'LookinServer', :configurations => ['Debug'] pod 'Bugly' # pod 'WKVCDeallocMonitor' # 视频播放器 pod 'ZFPlayer' pod 'ZFPlayer/ControlView' pod 'ZFPlayer/AVPlayer' pod 'ZFPlayer/ijkplayer' pod 'GTSDK' pod 'IDMPhotoBrowser' # 图片浏览器 pod 'IQKeyboardManager' # 键盘管理 pod 'TZImagePickerController' pod 'BaiduMapKit' # 百度地图 pod 'BMKLocationKit', :inhibit_warnings => true # 百度地图定位sdk pod 'XHLaunchAd' # 启动广告 pod 'SCLAlertView-Objective-C' # 第三方弹窗 pod 'SAMKeychain' # 钥匙串存储 pod 'DOUAudioStreamer' # 流音乐播放器 pod 'JXPagingView/Pager' pod 'JXCategoryView' pod 'CocoaSecurity' # 加密 pod 'CGXVerticalMenuView-OC' # 分类菜单 pod 'HWPanModal' # 弹出方式 pod 'KTVHTTPCache' # 缓存 pod 'WechatOpenSDK' pod 'OpenSSL-Universal' pod 'GKPhotoBrowser' pod 'SGQRCode' #// 使用https://gitee.com/huazi-rongchuang/cxhadsdk-ios-repo.git源可以快速导入SDK。 # 挑选其中需要导入的平台 #pod 'CXHAdSDK/GDT' (gdt 版本冲突) pod 'CXHAdSDK/BWT' pod 'CXHAdSDK/Channel' pod 'CXHAdSDK/RC' #pod <友盟+SDK名> 按需复制相应SDK名称代码 pod 'UMCommon' #必须集成 pod 'UMDevice' #必须集成 #依赖库 pod 'UMCCommonLog' #可选,日志插件 # MobShareSDK # pod 'mob_smssdk', :inhibit_warnings => true # 短信 # 主模块(必须) # pod 'mob_sharesdk' # UI模块(非必须,需要用到ShareSDK提供的分享菜单栏和分享编辑页面需要以下1行) # pod 'mob_sharesdk/ShareSDKUI' #shareSDK的分享UI界面 # pod 'mob_sharesdk/ShareSDKPlatforms/QQ' #shareSDK QQ平台 # pod 'mob_sharesdk/ShareSDKPlatforms/WeChat' #只包含了分享 # pod 'mob_sharesdk/ShareSDKPlatforms/WeChatFull' #(微信sdk带支付的命令,和上面不带支付的不能共存,只能选择一个) # 导入libwebp失败的话要去本地仓库修改 /Users/zhangrong/.cocoapods/repos/cocoapods/Specs/1/9/2 # "source": { # "git": "https://chromium.googlesource.com/webm/libwebp", # "tag": "v1.1.0" # } # 把git的值修改为https://github.com/webmproject/libwebp.git end post_install do |installer| ## Fix for XCode 12.5 find_and_replace("Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayout.mm", "layoutCache[currentClass] = ivars;", "layoutCache[(id)currentClass] = ivars;") installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' #消除TwitterCore警告 xcconfig_path = config.base_configuration_reference.real_path xcconfig = File.read(xcconfig_path) xcconfig_mod = xcconfig.gsub(/-framework "TwitterCore"/, "") File.open(xcconfig_path, "w") { |file| file << xcconfig_mod } if config.name == 'Debug' config.build_settings['OTHER_SWIFT_FLAGS'] = ['$(inherited)', '-Onone'] config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Owholemodule' end if config.name == 'Test' config.build_settings['OTHER_SWIFT_FLAGS'] = ['$(inherited)', '-Onone'] config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Owholemodule' end end end installer.pods_project.build_configurations.each do |config| config.build_settings[‘EXCLUDED_ARCHS[sdk=iphonesimulator*]’] = ‘arm64’ end end def find_and_replace(dir, findstr, replacestr) Dir[dir].each do |name| text = File.read(name) replace = text.gsub(findstr,replacestr) if text != replace puts "Fix: " + name File.open(name, "w") { |file| file.puts replace } STDOUT.flush end end Dir[dir + '*/'].each(&method(:find_and_replace)) end #删除WebViewJavascriptBridge中的WebViewJavascriptBridge.h和WebViewJavascriptBridge.m文件 pre_install do |installer| dir_web = File.join(installer.sandbox.pod_dir('WebViewJavascriptBridge'), 'WebViewJavascriptBridge') Dir.foreach(dir_web) {|x| real_path = File.join(dir_web, x) if (!File.directory?(real_path) && File.exist?(real_path)) if(x == 'WebViewJavascriptBridge.h' || x == 'WebViewJavascriptBridge.m') File.delete(real_path) end end } end