我目前正在尝试将React-Native集成到应用程序中,方法是将其作为组件pod,如下所述: https://artsy.github.io/blog/2018/04/17/making-a-components-pod/
我能够让它适用于他们提到的流程。但是当在遗留代码库中实现它时,我看到了问题
有关代码库的一些详细信息: - ObjC和Swift的混合。 - 将CocoaPod用于第三方依赖。
问题我正面临
- 无法在UIKit
的桥接标头以及string.h
中构建Folly
等系统框架/模块(请参见下面的屏幕截图)。也会发生CoreFoundation
,Darwin
。
Podfile的内容
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
inhibit_all_warnings!
def shared_pods
pod 'AFNetworking', '3.1'
pod 'AFNetworkActivityLogger', :git => 'https://github.com/AFNetworking/AFNetworkActivityLogger.git', :branch => '3_0_0'
pod 'AppsFlyerFramework'
pod 'Crashlytics'
pod 'Fabric'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'GoogleAnalytics'
pod 'KeychainAccess'
pod 'LGSemiModalNavController', '0.2.0'
pod 'ObjectMapper', '~> 2.2'
pod 'MZFormSheetPresentationController', '~> 2.4.2'
pod 'SDWebImage', '~> 3.7.2'
pod 'TRVSDictionaryWithCaseInsensitivity', '0.0.2'
pod 'SwiftLint'
pod 'SwiftMoment'
# React Native Support
plugin 'cocoapods-fix-react-native'
pod 'GitDawg', :path => '../GitDawg'
pod 'React', :podspec => 'Local Pods/React.podspec.json'
pod 'yoga', :podspec => 'Local Pods/yoga.podspec.json'
end
target 'RedMart' do
shared_pods
end
target 'RedMartAlphaTests' do
shared_pods
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
end
end
end
RN组件来自GitDawg
pod。