platform :ios,'12.0'
use_frameworks!
inhibit_all_warnings!
source 'https://github.com/CocoaPods/Specs.git'
source 'https://cdn.cocoapods.org/'
第三方庫
def thirdPods
下拉刷新
pod 'MJRefresh', '3.7.2'
YY組件
pod 'YYKit'
自動布局
pod 'Masonry'
提示框
pod 'Toast'
UUID
pod 'FCUUID'
Socket
pod 'CocoaAsyncSocket'
pod 'CocoaHTTPServer'
pod 'Socket.IO-Client-Swift', '~> 15.2.0'
圖片加載
pod 'SDWebImage', '5.19.0' #'5.13.3'
pod 'SDWebImageWebPCoder'
keychain
pod 'SAMKeychain', '~> 1.5.3'
loading
pod 'MBProgressHUD', '~> 1.1.0'
鍵盤管理
pod 'IQKeyboardManager'
base64
pod 'GTMBase64'
包解壓
pod 'SSZipArchive', '~> 1.2'
加載json動畫
pod 'lottie-ios', '=2.5.3'#oc版本
MD5驗證
pod 'NSData+MD5Digest'
snap
pod 'SnapSDK', :subspecs => ['SCSDKLoginKit']
svga播放
pod 'SVGAPlayer'
播放器
pod 'youtube-ios-player-helper', '1.0.4'
tab動畫
pod 'TABAnimated', '2.6.1'
數(shù)據(jù)庫
pod 'FMDB'
tableView框架
pod 'ZXTableView'
svg加載
pod 'SVGKit'
列表圓角背景布局
pod 'JJCollectionViewRoundFlowLayout'
pag加載(4.4.8版本有問題,循環(huán)播放內(nèi)存會一直無限增加)
pod 'libpag', '4.4.20'
崩潰防護
pod 'YDPreventCrash'
end
運營商SDK
def thirdSDKPods
Crash
pod 'Bugly'
pod 'FBSDKCoreKit', '17.0.2'
pod 'FBSDKLoginKit', '17.0.2'
pod 'FBSDKShareKit', '17.0.2'
谷歌的集成
pod 'GTMSessionFetcher/Core', '~> 3.3'
pod 'FirebaseAnalytics', '~> 10.29.0'
pod 'FirebaseAuth', '~> 10.29.0'
pod 'GoogleSignIn', '~> 7.1.0'
pod 'FirebaseCore', '~> 10.29.0'
pod 'FirebaseMessaging', '~> 10.29.0'
pod 'FirebaseDynamicLinks', '~> 10.29.0'
pod 'FirebaseRemoteConfig', '~> 10.29.0'
亞馬遜
pod 'AWSAuthCore', '~> 2.6.1'
pod 'AWSS3', '~> 2.6.1' # For file transfers
pod 'AWSCognito', '~> 2.6.1' #For data sync
聲網(wǎng)
pod 'AgoraRtcEngine_Special_iOS', '4.1.1.32.SHIBO'
統(tǒng)計歸因
pod 'AppsFlyerFramework', '~> 6.14.5'
pod 'ThinkingSDK'
阿里云
pod 'AliyunOSSiOS'
end
Debug工具
def debugTool
pod 'DoraemonKit/Core', '~> 3.1.3', :configurations => ['Debug']
pod 'DoraemonKit/WithLoad', '~> 3.1.3', :configurations => ['Debug']
pod 'DoraemonKit/WithLogger', '~> 3.1.3', :configurations => ['Debug']
pod 'DoraemonKit/WithMLeaksFinder', '~> 3.1.3', :configurations => ['Debug']
end
target 'Weeka' do
thirdPods
thirdSDKPods
debugTool
end
post_install do |installer|
#----------解決M1芯片電腦不能模擬機運行 xcode16打包提審要加這個去掉bitcode 不然會報錯
bitcode_strip_path = xcrun --find bitcode_strip.chop!
def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
framework_path = File.join(Dir.pwd, framework_relative_path)
command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
puts "Stripping bitcode: #{command}"
system(command)
end
framework_paths = [
"/Pods/AgoraRtcEngine_Special_iOS/AgoraDav1d.xcframework/ios-arm64_armv7/AgoraDav1d.framework/AgoraDav1d",
]
framework_paths.each do |framework_relative_path|
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
end
#------------------
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
Fix for XCode 12.5
find_and_replace("Pods/FBRetainCycleDetector/FBRetainCycleDetector/Layout/Classes/FBClassStrongLayout.mm",
"layoutCache[currentClass] = ivars;", "layoutCache[(id<NSCopying>)currentClass] = ivars;")
end
def find_and_replace(dir, findstr, replacestr)
Dir[dir].each do |name|
FileUtils.chmod("+w", name) #add
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