通过CocoaPods集成React Native到现有iOS应用程序 - 无法构建UIKit,CoreFoundation

时间:2018-05-06 17:02:12

标签: ios xcode react-native cocoapods

我目前正在尝试将React-Native集成到应用程序中,方法是将其作为组件pod,如下所述: https://artsy.github.io/blog/2018/04/17/making-a-components-pod/

我能够让它适用于他们提到的流程。但是当在遗留代码库中实现它时,我看到了问题

有关代码库的一些详细信息:   - ObjC和Swift的混合。   - 将CocoaPod用于第三方依赖。

问题我正面临   - 无法在UIKit的桥接标头以及string.h中构建Folly等系统框架/模块(请参见下面的屏幕截图)。也会发生CoreFoundationDarwin

Screenshot of issue navigator

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。

0 个答案:

没有答案