-
Notifications
You must be signed in to change notification settings - Fork 5
/
Podfile
73 lines (60 loc) · 3.87 KB
/
Podfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# source 'https://github.com/CocoaPods/Specs.git' # https://github.com/CocoaPods/CocoaPods/issues/2861
source 'https://cdn.cocoapods.org/' # 指明依赖库的来源地址
inhibit_all_warnings! # 忽略引入库的所有警告(强迫症者的福音啊)
platform :ios, '9.0' # 平台是ios,版本是9.0
#use_frameworks!
install! 'cocoapods', generate_multiple_pod_projects: true, :warn_for_unused_master_specs_repo => false # 安装引入Podfile里面的依赖库
target 'Template' do
inherit! :search_paths
# pod 'FlutterBusiness', :subspecs => ["FlutterBusinessDebug"], :path => '/Users/krmao/workspace/libsforios-flutter'
# pod 'FlutterBusiness', '0.1.0', :subspecs => ["FlutterBusinessDebug"]
# pod 'FlutterEngineDebug', :podspec => '/Users/krmao/workspace/libsforios-flutter/FlutterEngine/FlutterEngineDebug_v1.22.400.podspec'
# pod 'FlutterBusiness', '0.1.0'
# pod 'FlutterEngineDebug', '1.22.400'
# pod 'FlutterBusiness/FlutterBusinessDebug', :path => '/Users/krmao/workspace/libsforios-flutter/FlutterBusiness'
# pod 'FlutterBusiness/FlutterEngineDebug', :path => '/Users/krmao/workspace/libsforios-flutter/FlutterBusiness'
# pod 'FlutterBusiness/FlutterBusinessRelease', :path => '/Users/krmao/workspace/libsforios-flutter/FlutterBusiness'
# pod 'Masonry' # 会出现大量警告 https://github.com/SnapKit/Masonry/issues/566
pod 'Masonry', :git => 'https://github.com/warpling/Masonry.git' # , :tag => 'v1.1.0' # https://github.com/SnapKit/Masonry/issues/566#issuecomment-544136418
pod 'AFNetworking', '~> 4.0' # 网络请求库
pod 'SDWebImage', '~> 5.0' # 异步加载图片
pod 'YYModel' # 解析数据 json to model
pod 'MJRefresh' # 下拉刷新 pull to refresh
pod 'IQKeyboardManager' # 键盘遮挡问题 https://github.com/hackiftekhar/IQKeyboardManager
pod 'MBProgressHUD', '~> 1.2.0' # 加载框
pod 'SDCycleScrollView', '>= 1.80' # 轮播图 https://github.com/gsdios/SDCycleScrollView
pod 'DZNEmptyDataSet' # 数据为空时显示的页面 https://github.com/dzenbot/DZNEmptyDataSet
pod 'lottie-ios', '2.5.3' # 动画 https://github.com/airbnb/lottie-ios
pod 'SSZipArchive' # 压缩/解压缩工具 https://github.com/ZipArchive/ZipArchive
eval(File.read('PodReactNative.rb')) # eval方式支持解析source源, load加载的方式则不支持 # load 'PodReactNative.rb'
# rnpodremote # rnpodlocal "../../react_native/node_modules"
rnpodlocal
load 'PodFlutter.rb'
flutterPodWithSourceCode
flutterPodWithCocoaPodSpec
# load 'PodTools.rb'
# removeLibDeploymentTarget
# https://stackoverflow.com/questions/67287092/react-native-ios-sdk-no-matching-function-for-call-to-rctbridgemodulenamefor
post_install do |installer|
# Fix after updating to Xcode 13.1
find_and_replace("../../react_native/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm",
"_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules", "_initializeModules:(NSArray<Class> *)modules")
find_and_replace("../../react_native/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm",
"RCTBridgeModuleNameForClass(strongModule))", "RCTBridgeModuleNameForClass(Class(strongModule)))")
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
end
# Podfile 规则参考
# https://www.jianshu.com/p/b8b889610b7e
# http://saitjr.com/ios/the-best-practice-of-parsing-podfile.html?utm_source=tuicool&utm_medium=referral