简体   繁体   English

Cordova fastlane xcode 8配置配置文件

[英]Cordova fastlane xcode 8 configure profile

I try to build my app via fastlane ( https://github.com/platanus/fastlane-cordova ) on xcode 8 How can I specify in cordova to select the "correct" provisioning profiles when geenerating the xcode.proj? 我尝试通过fastlane( https://github.com/platanus/fastlane-cordova )在xcode 8上构建我的应用程序如何在cordova中指定在生成xcode.proj时选择“正确”的配置文件?

=== BUILD TARGET app OF PROJECT app WITH CONFIGURATION Release ===
[ios] 
[ios] Check dependencies
[ios] Signing for "Eule" requires a development team. Select a development team in the project editor.
[ios] Code signing is required for product type 'Application' in SDK 'iOS 10.0'
[ios] 
[ios] ** BUILD FAILED **
[ios] 
[ios] 
[ios] The following build commands failed:
[ios]   Check dependencies
[ios] (1 failure)
[ios] Error: Error code 65 for command

I had the same issue, so I ended up creating a Cordova plugin for Fastlane to solve this. 我有同样的问题,所以我最终为Fastlane创建了一个Cordova插件来解决这个问题。

See how to use it in this blog post or below: 请参阅此博客文章或以下内容中的使用方法:

Use the Cordova Fastlane plugin 使用Cordova Fastlane插件

Add the Cordova Fastlane Plugin to your project: Cordova Fastlane插件添加到您的项目中:

fastlane add_plugin cordova

When asked Should fastlane modify the Gemfile at path 'Gemfile' for you? (y/n) 当被问到Should fastlane modify the Gemfile at path 'Gemfile' for you? (y/n) Should fastlane modify the Gemfile at path 'Gemfile' for you? (y/n) , reply with y . Should fastlane modify the Gemfile at path 'Gemfile' for you? (y/n) ,回复y

Then you can integrate the plugin into your Fastlane setup, for example: 然后,您可以将插件集成到Fastlane设置中,例如:

platform :ios do
  desc "Deploy ios app on the appstore"

  lane :create do
    produce(app_name: "myapp")
  end

  lane :deploy do
    match(
      type: "appstore",
      git_url: "https://bitbucket.org/Almouro/certificates" # REPLACE WITH YOUR PRIVATE REPO FOR MATCH
    )
    cordova(platform: 'ios') # Using the Cordova Fastlane Plugin
    appstore(ipa: ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'])
  end
end

platform :android do
  desc "Deploy android app on play store"

  lane :deploy do
    cordova(
      platform: 'android',
      keystore_path: './prod.keystore', # REPLACE THESE LINES WITH YOUR KEYSTORE INFORMATION
      keystore_alias: 'prod',
      keystore_password: 'password'
    ) # Cordova Fastlane Plugin
    supply(apk: ENV['CORDOVA_ANDROID_RELEASE_BUILD_PATH'])
  end
end

with an Appfile such as Appfile

app_identifier "com.awesome.app"
apple_id "apple@id.com"
team_id "28323HT"

Piece of cake now! 一块蛋糕吧!

For iOS, run fastlane ios create once to create your app on the developer member center and iTunes Connect. 对于iOS,运行fastlane ios create一次以在开发者成员中心和iTunes Connect上创建您的应用程序。

Now, you only have to run fastlane ios deploy and fastlane android deploy to deploy to the stores! 现在,您只需运行fastlane ios deployfastlane android deploy即可部署到商店!

Where to go from here 从这往哪儿走

  • You can see all the plugin options by running fastlane actions cordova at the root of your Cordova app 您可以通过在Cordova应用程序的根目录下运行fastlane actions cordova来查看所有插件选项

  • The Fastlane docs are great to learn more about how it can ease your life Fastlane文档非常适合了解它如何缓解您的生活

  • If you have any issue or idea for improvement on the plugin, please make them know here 如果您对插件有任何改进或想法,请在此处告知

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM