ios - 有没有办法在 Cocoa Pods 的单个目标中使用静态和动态框架
问题描述
跑步的时候install_dynamic_library
,我想用use_frameworks! :linkage => :dynamic
,all_binary!
另一方面,跑步的时候install_static_library
,我想用use_frameworks! :linkage => :static
。
有没有办法解决这个问题?
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
plugin 'cocoapods-binary'
plugin 'cocoapods-pod-linkage'
def install_dynamic_library
pod 'R.swift'
pod 'Alamofire'
pod 'Nuke'
pod 'Parchment', '~> 3.0'
pod 'SnapKit', '~> 5.0.0'
pod 'Kanna', '~> 5.2.2'
pod 'ImageViewer'
pod 'PanModal'
pod 'SideMenu'
pod 'Toast-Swift', '~> 5.0.1'
pod 'youtube-ios-player-helper', '~> 1.0.2'
pod 'SwiftDate'
pod "URLEmbeddedView"
pod 'ActiveLabel'
end
def install_static_library
pod 'GoogleMobileAdsMediationFacebook'
pod 'Google-Mobile-Ads-SDK'
pod 'Firebase/Analytics', '~> 8.1.0'
pod 'Firebase/Messaging'
pod 'Firebase/Auth'
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.1.0'
pod 'FirebaseFirestoreSwift', '8.2.0-beta'
pod 'Firebase/Storage'
end
target :'MyApp' do
install_dynamic_library
install_static_library
end
解决方案
推荐阅读
- azure-active-directory - Microsoft Graph:组请求失败,并出现有关扩展列表条目类型的错误
- macos - 更新 Gradle 版本
- javascript - 使 QuillJS 编辑器高度为 100%
- unity3d - Unity & Vuforia:未调用实现 ITrackableEventHandler 接口
- android - 如何在 android 键盘上添加数字行
- asp.net - Chrome 未在后续 API 请求中发送 FormsAuthentication cookie
- c - 切换编译器和 IDE 后,在 C 中位打包结构时出现语法错误
- ember.js - 是否可以将 mouseEnter 与 ember-bootstrap 组件一起使用?
- php - session_start():无法发送会话缓存限制器 - 标头已发送(qual vs prod)
- php - 为什么这个方法没有输出?