2017-02-15 52 views
0

我被Crysfel別墅,斯坦Bershadskiy如何將「目標」添加到pod文件? (如HockeyApp)

我在一章關於使用hockeyapp閱讀React Native Cookbook和不知道如何設置podfile。這些方向:

怎麼做... 首先,我們需要安裝的反應,本機hockeyapp 模塊在我們的應用程序。打開終端,轉到您的應用程序的 根項目目錄並輸入以下命令:$ npm install react-native-hockeyapp --save進入您的ios /目錄並 初始化您的Podfile:$ pod init打開您的Podfile並添加pod 「HockeySDK」到你的目標。早在終端,安裝Podfile: $ pod install

我不是100%地肯定「添加莢HockeySDK你的目標」

我podfile:

# Uncomment the next line to define a global platform for your project 
# platform :ios, '9.0' 

target 'MyApp' do 
    # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 
    # use_frameworks! 

    # Pods for MyApp 

    target 'MyApp-tvOSTests' do 
    inherit! :search_paths 
    # Pods for testing 
    end 

    target 'MyAppTests' do 
    inherit! :search_paths 
    # Pods for testing 
    end 

end 

target 'MyApp-tvOS' do 
    # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 
    # use_frameworks! 

    # Pods for MyApp-tvOS 

    target 'MyApp-tvOSTests' do 
    inherit! :search_paths 
    # Pods for testing 
    end 

end 

任何想法關於如何在這裏正確修改pod文件?

回答

0

如果你想包括HockeySDK模塊MyApp目標(這是你builidng應用程序),你只需要添加pod 'HockeySDK'一行:然後運行pod install開放.xcworkspace文件,而不是之後

target 'MyApp' do 
    (...) 
    pod 'HokeySDK' 
    (...) 
end 

.xcproj。您可以在官方指南CocoaPods中找到更多信息。

相關問題