简体   繁体   English

档案失败:Fastlane与Ionic 3

[英]Archive failed : Fastlane with Ionic 3

I try to deploy my Ionic 3 App on Testflight in a first time. 我尝试在Testflight上第一次部署我的Ionic 3应用程序。

But When I run my command : "sudo fastlane beta" I always have this error : 但当我运行我的命令时:“sudo fastlane beta”我总是有这个错误:

Check dependencies

Code Signing Error: No profile for team '(TEAM_ID)' matching 'match AppStore (APP_BUNDLE)' found:  Xcode couldn't find any provisioning profiles matching '(TEAM_ID)/match AppStore (APP_BUNDLE)'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'

** ARCHIVE FAILED **

I really don't know what I have to do to solve this. 我真的不知道我要做些什么来解决这个问题。

What I have done : 我做了什么 :

In first, I follow this to generate my certifcates and my profils 首先,我按照这个来生成我的证书和我的个人资料
https://codesigning.guide/ I haven't problem with this. https://codesigning.guide/我对此没有任何问题。 I can see my profils on my account developper iOS. 我可以在我的帐户开发者iOS上看到我的个人资料。

So I Installed plugin fastlane Ionic. 所以我安装了插件fastlane Ionic。 And I edited my Fastfile like this : 我编辑了我的Fastfile,如下所示:

fastlane_version "2.68.0"
generated_fastfile_id "(FAST LANE ID)"

default_platform :ios

desc "Submit a new Beta Build to Apple TestFlight"
desc "This will also make sure the profile is up to date"
lane :beta do
  match(type: "appstore")
  ionic(platform: 'ios')
  pilot(ipa: ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'])
end

My App File : 我的应用文件:

app_identifier "(APP_BUNDLE)"
apple_id "(MY APPLE ID)"
team_id "(TEAM_ID)"

But when I run : sudo fastlane beta , this step fail : ionic cordova compile ios --release --device -- --packageType=app-store --developmentTeam=(TEAM_ID) --provisioningProfile=(PROFILE_GUID) 但是当我运行:sudo fastlane beta时,这一步失败: ionic cordova compile ios --release --device -- --packageType=app-store --developmentTeam=(TEAM_ID) --provisioningProfile=(PROFILE_GUID)

EDIT : My Ionic Info : 编辑:我的离子信息:

cli packages: (/Users/ox/Documents/Mobile/ox/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 2.1.0
    Cordova Platforms  : ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.2 
    ios-sim    : 5.1.0 
    Node       : v6.11.3
    npm        : 5.6.0 
    OS         : macOS Sierra
    Xcode      : Xcode 9.1 Build version 9B55 

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

EDIT 编辑

I remove and add again my platform ios : ionic cordova platforms remove ios ionic cordova platforms add ios 我删除并再次添加我的平台ios:离子cordova平台删除ios离子cordova平台添加ios

I tried to run fastlane beta. 我试图运行fastlane beta。 I keep my error but a little bit different : 我保留我的错误但有点不同:

Code Signing Error: No profile for team '(TEAM_ID)' matching '(PROFILE_UUID)' found:  Xcode couldn't find any provisioning profiles matching '(TEAM_ID)/(PROFILE_UUID)'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.
    Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'

I check in xcode and I have this errors : 我检查xcode,我有这个错误:

在此输入图像描述

If you want to build for the app store, your have to also create a release (and optimally prod ) build with ionic() . 如果你想为app商店进行构建,你还必须使用ionic()创建一个release (并且最佳prod ionic() Otherwise the Xcode project is setup in the wrong way for the certificate you are setting via match() . 否则,Xcode项目将通过match()以错误的方式设置您正在设置的证书。

This should work for you: 这应该适合你:

lane :beta do
  match(type: "appstore")
  ionic(
    platform: 'ios',
    prod: true,
    release: true
  )
  pilot(ipa: ENV['CORDOVA_IOS_RELEASE_BUILD_PATH'])
end

Also see https://ionic.zone/fastlane/build-your-project-with-ionic-plugin#ios-release-build 另见https://ionic.zone/fastlane/build-your-project-with-ionic-plugin#ios-release-build

  1. You should not do sudo fastlane... ! 你不应该做sudo fastlane... try to go with fastlane beta if it requires root - probably you have to reinstall the tools. 如果需要root,请尝试使用fastlane beta - 可能你必须重新安装这些工具。 Also, recommended way is to use bundler to manage your ruby dependencies 此外,推荐的方法是使用bundler来管理ruby依赖项
  2. Try to do Archive command in Xcode and make sure you able to build and sign project manually 尝试在Xcode中执行Archive命令,并确保您能够手动构建和签署项目
  3. run fastlane match command to get ur provisioning profile (you might be asked to login to iTunesConnect...) 运行fastlane match命令以获取您的配置文件(可能会要求您登录iTunesConnect ...)
    • in case match fails - please, use parameters to specify ur team/app: fastlane action match - this command with show you the options you have 万一匹配失败 - 请使用参数指定你的团队/应用程序: fastlane action match - 此命令显示你有的选项
  4. try fastlane beta no sudo! 尝试fastlane beta 没有sudo!

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

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