Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Archive failed : Fastlane with Ionic 3

I try to deploy my Ionic 3 App on Testflight in a first time.

But When I run my command : "sudo fastlane beta" I always have this error :

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. I can see my profils on my account developper iOS.

So I Installed plugin fastlane Ionic. And I edited my Fastfile like this :

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)

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

I tried to run 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 :

enter image description here

like image 594
V. Pivet Avatar asked Jan 09 '18 11:01

V. Pivet


1 Answers

  1. You should not do sudo fastlane...! try to go with fastlane beta if it requires root - probably you have to reinstall the tools. Also, recommended way is to use bundler to manage your ruby dependencies
  2. Try to do Archive command in Xcode and make sure you able to build and sign project manually
  3. run fastlane match command to get ur provisioning profile (you might be asked to login to 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
  4. try fastlane beta no sudo!
like image 137
Oleg Shanyuk Avatar answered Sep 27 '22 20:09

Oleg Shanyuk