New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enterprise (in-house Fabric) and Company (TestFlight) Builds - One Project and Fastfile #10895

Closed
furick1 opened this Issue Nov 13, 2017 · 13 comments

Comments

Projects
None yet
3 participants
@furick1

furick1 commented Nov 13, 2017

New Issue Checklist

Issue Description

I am trying to build an in-house (enterprise account) ipa and upload it to fabric. Our test flight (beta) lane works fine but the enterprise lane fails. I have put the enterprise settings under a different target in the Xcode project and set it to manual signing. The app for in-house vs App Store is the same but has different bundle ids, profiles and certs since it uses different teams. Fastlane seems to detect enterprise settings correctly upfront but fails on archive. To do this in xCode manually I have to change primary targets bundle id, cert and signing profile and build, archive and export then submit to Fabric. I was hoping fast lane could do this all and I can use my ci script in gitlab to run different portions of the pipeline depending on which build I wanted (TestFlight or Fabric). I have read about xCode 9 specific issues with fast lane and tried many workarounds with no luck. Can fast lane do what I'm trying to accomplish? I am running the latest Xcode, command line tools and fastlane on Mac mini with latest Mac OS. At this point I have spent way too many hours trying to get this working and need help.

Complete output when running fastlane, including the stack trace and command used

ios:mfa iosdev$ fastlane enterprise
[14:48:05]: fastlane detected a Gemfile in the current directory
[14:48:05]: however it seems like you don't use bundle exec
[14:48:05]: to launch fastlane faster, please use
[14:48:05]:
[14:48:05]: $ bundle exec fastlane enterprise
[14:48:05]:
[14:48:05]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[14:48:08]: -----------------------------
[14:48:08]: --- Step: update_fastlane ---
[14:48:08]: -----------------------------
[14:48:08]: Looking for updates for fastlane...
[14:48:10]: Nothing to update
[14:48:10]:
[14:48:10]: Please help us test early releases of fastlane by opting into nightly builds 🌃
[14:48:10]: Just replace your update_fastlane call with
[14:48:10]:
[14:48:10]: ▸ update_fastlane(nightly: true)
[14:48:10]:
[14:48:10]: Nightly builds are reviewed and tested just like the public releases 🚂
[14:48:10]:
[14:48:10]: -------------------------------------------------
[14:48:10]: --- Step: Verifying required fastlane version ---
[14:48:10]: -------------------------------------------------
[14:48:10]: Your fastlane version 2.64.0 matches the minimum requirement of 2.62.1
[14:48:10]: ------------------------------
[14:48:10]: --- Step: default_platform ---
[14:48:10]: ------------------------------
[14:48:10]: Driving the lane 'ios enterprise' 🚀
[14:48:10]: -----------------------------------
[14:48:10]: --- Step: clean_cocoapods_cache ---
[14:48:10]: -----------------------------------
[14:48:11]: $ pod cache clean --all
[14:48:11]: -----------------------
[14:48:11]: --- Step: cocoapods ---
[14:48:11]: -----------------------
[14:48:11]: $ bundle exec pod install
[14:48:15]: ▸ Analyzing dependencies
[14:48:15]: ▸ Downloading dependencies

REMOVED FOR BREVITY

[14:48:15]: ▸ Generating Pods project
[14:48:15]: ▸ Integrating client project
[14:48:15]: ▸ Sending stats
[14:48:15]: ▸ Pod installation complete! There are 30 dependencies from the Podfile and 33 total pods installed.
[14:48:15]: ▸ [!] Automatically assigning platform ios with version 10.3 on target mfa because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
[14:48:16]: ------------------------------------
[14:48:16]: --- Step: increment_build_number ---
[14:48:16]: ------------------------------------
Current version of project mfa is:
19

/Users/iosdev/Documents/projects/mfa
[14:48:16]: $ cd /Users/iosdev/Documents/projects/mfa && agvtool next-version -all && cd -
[14:48:16]: ▸ Setting version of project mfa to:
[14:48:16]: ▸ 20.
[14:48:16]: ▸ Also setting CFBundleVersion key (assuming it exists)
[14:48:16]: ▸ Updating CFBundleVersion in Info.plist(s)...
[14:48:16]: ▸ $(SRCROOT)/mfa-Info.plist
[14:48:16]: ▸ Cannot find "$(SRCROOT)/mfa-Info.plist"
[14:48:16]: ▸ Updated CFBundleVersion in "mfa.xcodeproj/../mfa/Info.plist" to 20
[14:48:16]: ▸ Updated CFBundleVersion in "mfa.xcodeproj/../mfaTests/Info.plist" to 20
[14:48:16]: ▸ Updated CFBundleVersion in "mfa.xcodeproj/../mfaUITests/Info.plist" to 20
[14:48:16]: ▸ /Users/iosdev/Documents/projects/mfa
[14:48:16]: -----------------------------------
[14:48:16]: --- Step: clean_build_artifacts ---
[14:48:16]: -----------------------------------
[14:48:16]: Cleaned up build artifacts 🐙
[14:48:16]: --------------------------------
[14:48:16]: --- Step: clear_derived_data ---
[14:48:16]: --------------------------------
[14:48:16]: Derived Data path located at: /Users/iosdev/Library/Developer/Xcode/DerivedData
[14:48:19]: Successfully cleared Derived Data ♻️
[14:48:19]: -------------------
[14:48:19]: --- Step: match ---
[14:48:19]: -------------------
[14:48:19]: Successfully loaded '/Users/iosdev/Documents/projects/mfa/fastlane/Matchfile' 📄

+----------+------------------------------------------+
| Detected Values from './fastlane/Matchfile' |
+----------+------------------------------------------+
| git_url | git@gitlab.measure.com:root/fastlane.git |
| username | iosdev@measure.com |
+----------+------------------------------------------+

+-----------------------+------------------------------------------+
| Summary for match 2.64.0 |
+-----------------------+------------------------------------------+
| type | enterprise |
| app_identifier | aero.measure.ipad.mfa |
| git_branch | enterprise |
| git_url | git@gitlab.measure.com:root/fastlane.git |
| username | iosdev@measure.com |
| keychain_name | login.keychain |
| readonly | false |
| team_id | J3SRA6AX7V |
| verbose | false |
| force | false |
| skip_confirmation | false |
| shallow_clone | false |
| clone_branch_directly | false |
| force_for_new_devices | false |
| skip_docs | false |
| platform | ios |
+-----------------------+------------------------------------------+

[14:48:19]: Cloning remote git repo...
[14:48:19]: If cloning the repo takes too long, you can use the clone_branch_directly option in match.
[14:48:20]: Checking out branch enterprise...
[14:48:20]: 🔓 Successfully decrypted certificates repo
[14:48:20]: Verifying that the certificate and profile are still valid on the Dev Portal...
[14:48:23]: Installing certificate...

+-------------------+----------------------------------------+
| Installed Certificate |
+-------------------+----------------------------------------+
| User ID | J3SRA6AX7V |
| Common Name | iPhone Distribution: Measure UAS, Inc. |
| Organisation Unit | J3SRA6AX7V |
| Organisation | Measure UAS, Inc. |
| Country | US |
| Start Datetime | Oct 28 22:52:08 2017 GMT |
| End Datetime | Oct 27 22:52:08 2020 GMT |
+-------------------+----------------------------------------+

[14:48:23]: Installing provisioning profile...

+---------------------+----------------------------------------------------+-------------------------------------------------------------+
| Installed Provisioning Profile |
+---------------------+----------------------------------------------------+-------------------------------------------------------------+
| Parameter | Environment Variable | Value |
+---------------------+----------------------------------------------------+-------------------------------------------------------------+
| App Identifier | | aero.measure.ipad.mfa |
| Type | | enterprise |
| Platform | | ios |
| Profile UUID | sigh_aero.measure.ipad.mfa_enterprise | 8020fc23-27ac-4c21-acc4-63f13eec38ba |
| Profile Name | sigh_aero.measure.ipad.mfa_enterprise_profile-name | match InHouse aero.measure.ipad.mfa |
| Profile Path | sigh_aero.measure.ipad.mfa_enterprise_profile-path | /Users/iosdev/Library/MobileDevice/Provisioning |
| | | Profiles/8020fc23-27ac-4c21-acc4-63f13eec38ba.mobileprovis |
| | | ion |
| Development Team ID | sigh_aero.measure.ipad.mfa_enterprise_team-id | J3SRA6AX7V |
+---------------------+----------------------------------------------------+-------------------------------------------------------------+

[14:48:23]: All required keys, certificates and provisioning profiles are installed 🙌
[14:48:23]: Setting Provisioning Profile type to 'enterprise'
[14:48:23]: -----------------------------------------
[14:48:23]: --- Step: /usr/local/bin/rbenv init - ---
[14:48:23]: -----------------------------------------
[14:48:23]: $ /usr/local/bin/rbenv init -
[14:48:24]: ▸ export PATH="/Users/iosdev/.rbenv/shims:${PATH}"
[14:48:24]: ▸ export RBENV_SHELL=ruby
[14:48:24]: ▸ command rbenv rehash 2>/dev/null
[14:48:24]: ▸ rbenv() {
[14:48:24]: ▸ local command
[14:48:24]: ▸ command="$1"
[14:48:24]: ▸ if [ "$#" -gt 0 ]; then
[14:48:24]: ▸ shift
[14:48:24]: ▸ fi
[14:48:24]: ▸ case "$command" in
[14:48:24]: ▸ rehash|shell)
[14:48:24]: ▸ eval "$(rbenv "sh-$command" "$@")";;
[14:48:24]: ▸ *)
[14:48:24]: ▸ command rbenv "$command" "$@";;
[14:48:24]: ▸ esac
[14:48:24]: ▸ }
[14:48:24]: -----------------
[14:48:24]: --- Step: gym ---
[14:48:24]: -----------------
[14:48:24]: $ xcodebuild -list -workspace mfa.xcworkspace -configuration Release
[14:48:25]: $ xcodebuild -showBuildSettings -workspace mfa.xcworkspace -scheme mfa -configuration Release
[14:48:26]: Detected provisioning profile mapping: {:"aero.measure.ipad.mfa"=>"match InHouse aero.measure.ipad.mfa", :"com.measure.mfa"=>"match AppStore com.measure.mfa"}

+-----------------------------------------------------------+---------------------------------------------------------------------------------------+
| Summary for gym 2.64.0 |
+-----------------------------------------------------------+---------------------------------------------------------------------------------------+
| workspace | mfa.xcworkspace |
| scheme | mfa |
| configuration | Release |
| xcargs | APP_IDENTIFIER='aero.measure.ipad.mfa' PROVISIONING_PROFILE_SPECIFIER='match InHouse |
| | aero.measure.ipad.mfa' -allowProvisioningUpdates |
| export_xcargs | -allowProvisioningUpdates |
| export_method | enterprise |
| export_options.method | enterprise |
| export_options.provisioningProfiles.aero.measure.ipad.mfa | match InHouse aero.measure.ipad.mfa |
| export_options.provisioningProfiles.com.measure.mfa | match AppStore com.measure.mfa |
| destination | generic/platform=iOS |
| output_name | mfa |
| build_path | /Users/iosdev/Library/Developer/Xcode/Archives/2017-11-13 |
| clean | false |
| output_directory | . |
| silent | false |
| skip_package_ipa | false |
| buildlog_path | ~/Library/Logs/gym |
| skip_profile_detection | false |
| xcode_path | /Applications/Xcode.app |
+-----------------------------------------------------------+---------------------------------------------------------------------------------------+

[14:48:26]: $ set -o pipefail && xcodebuild -workspace mfa.xcworkspace -scheme mfa -configuration Release -destination 'generic/platform=iOS' -archivePath /Users/iosdev/Library/Developer/Xcode/Archives/2017-11-13/mfa\ 2017-11-13\ 14.48.26.xcarchive APP_IDENTIFIER='aero.measure.ipad.mfa' PROVISIONING_PROFILE_SPECIFIER='match InHouse aero.measure.ipad.mfa' -allowProvisioningUpdates archive | tee /Users/iosdev/Library/Logs/gym/mfa-mfa.log | xcpretty

A BUNCH OF COMPILING AND COPYING WITH 3rd PARTY SDK COMPILE WARNINGS (REMOVED FOR BREVITY)

▸ Building mfa/mfa [Release]
▸ Check Dependencies
** ARCHIVE FAILED **

The following build commands failed:
Check dependencies
(1 failure)
[14:54:49]: Exit status: 65

+---------------+-------------------------+
| Build environment |
+---------------+-------------------------+
| xcode_path | /Applications/Xcode.app |
| gym_version | 2.64.0 |
| export_method | enterprise |
| sdk | iPhoneOS11.1.sdk |
+---------------+-------------------------+

[14:54:49]: ▸ Check dependencies
[14:54:49]: ▸ Code Signing Error: No profile for team 'Measure UAS, Inc' matching 'match InHouse aero.measure.ipad.mfa' found: Xcode couldn't find any provisioning profiles matching '7KVL9BJ8M5/match InHouse aero.measure.ipad.mfa'. 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.
[14:54:49]: ▸ Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
[14:54:49]: ▸ Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
[14:54:49]:
[14:54:49]: ⬆️ Check out the few lines of raw xcodebuild output above for potential hints on how to solve this error
[14:54:49]: 📋 For the complete and more detailed error log, check the full log at:
[14:54:49]: 📋 /Users/iosdev/Library/Logs/gym/mfa-mfa.log
[14:54:49]:
[14:54:49]: There seems to be a mismatch between your provided export_method in gym
[14:54:49]: and the selected provisioning profiles. You passed the following options:
[14:54:49]: export_method: enterprise
[14:54:49]: Bundle identifier: com.measure.mfa
[14:54:49]: Profile name: match AppStore com.measure.mfa
[14:54:49]: Profile type: app-store
[14:54:49]: Make sure to either change the export_method passed from your Fastfile or CLI
[14:54:49]: or select the correct provisioning profiles by updating your Xcode project
[14:54:49]: or passing the profiles to use by using match or manually via the export_options hash
[14:54:49]:
[14:54:49]:
[14:54:49]: Looks like fastlane ran into a build/archive error with your project
[14:54:49]: It's hard to tell what's causing the error, so we wrote some guides on how
[14:54:49]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[14:54:49]: Before submitting an issue on GitHub, please follow the guide above and make
[14:54:49]: sure your project is set up correctly.
[14:54:49]: fastlane uses xcodebuild commands to generate your binary, you can see the
[14:54:49]: the full commands printed out in yellow in the above log.
[14:54:49]: Make sure to inspect the output above, as usually you'll find more error information there
[14:54:49]:
+------------------------------------+------------------------------------------------------------------+
| Lane Context |
+------------------------------------+------------------------------------------------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios enterprise |
| BUILD_NUMBER | 20 |
| SIGH_PROFILE_TYPE | enterprise |
| MATCH_PROVISIONING_PROFILE_MAPPING | {"aero.measure.ipad.mfa"=>"match InHouse aero.measure.ipad.mfa"} |
+------------------------------------+------------------------------------------------------------------+
[14:54:49]: Error building the application - see the log above

+------+-------------------------------------+-------------+
| fastlane summary |
+------+-------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+-------------------------------------+-------------+
| 1 | update_fastlane | 2 |
| 2 | Verifying required fastlane version | 0 |
| 3 | default_platform | 0 |
| 4 | clean_cocoapods_cache | 0 |
| 5 | cocoapods | 4 |
| 6 | increment_build_number | 0 |
| 7 | clean_build_artifacts | 0 |
| 8 | clear_derived_data | 2 |
| 9 | match | 4 |
| 10 | /usr/local/bin/rbenv init - | 0 |
| 💥 | gym | 385 |
+------+-------------------------------------+-------------+

[14:54:49]: fastlane finished with errors

[!] Error building the application - see the log above
ios:mfa iosdev$

Environment

fastlane environment

Stack

Key Value
OS 10.13.1
Ruby 2.4.2
Bundler? false
Git git version 2.13.6 (Apple Git-96)
Installation Source ~/.rbenv/versions/2.4.2/bin/fastlane
Host Mac OS X 10.13.1 (17B48)
Ruby Lib Dir ~/.rbenv/versions/2.4.2/lib
OpenSSL Version OpenSSL 1.0.2l 25 May 2017
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 9.1

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
# Customise this file, documentation can be found here:
# https://docs.fastlane.tools/actions/
# All available actions: https://docs.fastlane.tools/actions
# can also be listed using the `fastlane actions` command

# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`

# If you want to automatically update fastlane if a new version is available:
update_fastlane

# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "2.62.1"

default_platform :ios

platform :ios do
  before_all do
    #sh "fastlane -v"
    #sh "fastlane env"
    clean_cocoapods_cache
    cocoapods
  end

  desc "Runs all the tests"
  lane :test do
    scan
  end
  
  desc "Submit a new Build to Fabric"
  lane :enterprise do
    # build your iOS app 
    # get build number from gitlab when run in pipeline but ignore for now as running manually
    increment_build_number(build_number: ENV['CI_BUILD_ID'])
    
    #change_log = change_log_since_last_tag
    #notify_testers = false unless options[:notify_testers]
    
    clean_build_artifacts
    clear_derived_data

    match(
      type: "enterprise",
      app_identifier: "aero.measure.ipad.mfa",
      git_branch: "enterprise",
    )
    

    sh "/usr/local/bin/rbenv init -"
    
    gym(
      workspace: "mfa.xcworkspace",
      scheme: "mfa",
      configuration: "Release",
      xcargs: "APP_IDENTIFIER='aero.measure.ipad.mfa' PROVISIONING_PROFILE_SPECIFIER='match InHouse aero.measure.ipad.mfa' -allowProvisioningUpdates",
      export_xcargs: '-allowProvisioningUpdates',
      export_method: "enterprise",
      #export_options: "fastlane/exportOptions.plist"
      export_options: {
        method: "enterprise",
        provisioningProfiles: { 
          "aero.measure.ipad.mfa": "match InHouse aero.measure.ipad.mfa"
        }
      }
    )

    # upload to Beta by Crashlytics
    crashlytics(
      api_token: "xyzzy",
      build_secret: "123",
      #notes: change_log,
      notifications: notify_testers
    )
    
  end

  desc "Submit a new Beta Build to Apple TestFlight"
  lane :beta do
    
    increment_build_number(
      build_number: latest_testflight_build_number + 1,
      xcodeproj: "mfa.xcodeproj"
    )
    
    clean_build_artifacts
    clear_derived_data
    
    match(
      type: "appstore",
      app_identifier: "com.measure.mfa",
      git_branch: "company",
    )
    
    sh "/usr/local/bin/rbenv init -"
    
    gym(
      workspace: "mfa.xcworkspace",
      scheme: "mfa",
      export_method: "app-store",
      export_options: {
        provisioningProfiles: {
          "com.measure.mfa": "match AppStore com.measure.mfa"
        }
      }
    ) 
    
    testflight(
      skip_submission: true,
      distribute_external: false
    )

  end

  desc "Deploy a new version to the App Store"
  lane :release do
    match(type: "appstore")
    # snapshot
    gym(scheme: "mfa") # Build your app - more options available
    deliver(force: true)
    # frameit
  end

  # You can define as many lanes as you want

  after_all do |lane|
    # This block is called, only if the executed lane was successful

    # slack(
    #   message: "Successfully deployed new App Update."
    # )
  end

  error do |lane, exception|
    # slack(
    #   message: exception.message,
    #   success: false
    # )
  end
end
`./fastlane/Appfile`
for_lane :enterprise do
  app_identifier "aero.measure.ipad.mfa" # The bundle identifier of your app
  apple_id "iosdev@measure.com" # Your Apple email address
  team_id "J3SRA6AX7V" # Developer Portal Enterprise Team ID
end

for_lane :beta do
  app_identifier "com.measure.mfa" # The bundle identifier of your app
  apple_id "iosdev@measure.com" # Your Apple email address
  team_id "7KVL9BJ8M5" # Developer Portal Companny Team ID
end

fastlane gems

Gem Version Update-Status
fastlane 2.64.0 Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.1.0
slack-notifier 1.5.1
CFPropertyList 2.3.5
claide 1.0.2
colored2 3.1.2
nanaimo 0.2.3
xcodeproj 1.5.3
rouge 2.0.7
xcpretty 0.2.8
terminal-notifier 1.8.0
unicode-display_width 1.3.0
terminal-table 1.8.0
plist 3.3.0
addressable 2.5.2
multipart-post 2.0.0
word_wrap 1.0.0
public_suffix 2.0.5
babosa 1.0.2
colored 1.2
highline 1.7.8
commander-fastlane 4.4.5
excon 0.59.0
faraday 0.13.1
unf_ext 0.0.7.4
unf 0.1.4
domain_name 0.5.20170404
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
fastimage 2.1.0
gh_inspector 1.0.3
mini_magick 4.5.1
multi_json 1.12.2
multi_xml 0.6.0
rubyzip 1.2.1
security 0.1.3
xcpretty-travis-formatter 1.0.0
dotenv 2.2.1
faraday_middleware 0.12.2
uber 0.1.0
declarative 0.0.10
declarative-option 0.1.0
representable 3.0.4
retriable 3.1.1
mime-types-data 3.2016.0521
mime-types 3.1
little-plugger 1.1.4
logging 2.2.2
jwt 1.5.6
memoist 0.16.0
os 0.9.6
signet 0.8.1
googleauth 0.6.1
httpclient 2.8.3
google-api-client 0.13.6
json 2.1.0
io-console 0.4.6
openssl 2.0.5
tty-screen 0.5.1
bundler 1.16.0

generated on: 2017-11-13

@fastlane-bot

This comment has been minimized.

fastlane-bot commented Nov 13, 2017

It seems like this issue might be related to code signing 🚫

Have you seen our new Code Signing Troubleshooting Guide? It will help you resolve the most common code signing issues 👍

@taquitos

This comment has been minimized.

Member

taquitos commented Nov 14, 2017

fastlane should be able to handle that, I'm sure you noticed that gym is using the wrong profile mapping:
match AppStore com.measure.mfa

Detected provisioning profile mapping: {:"aero.measure.ipad.mfa"=>"match InHouse aero.measure.ipad.mfa", :"com.measure.mfa"=>"match AppStore com.measure.mfa"}

I think you can add this: skip_profile_detection: true to your gym command so that it doesn't even try to guess, and then you should be left with just aero.measure.ipad.mfa

You might still be stuck with:

[14:54:49]: ▸ Code Signing Error: No profile for team 'Measure UAS, Inc' matching 'match InHouse aero.measure.ipad.mfa' found: Xcode couldn't find any provisioning profiles matching '7KVL9BJ8M5/match InHouse aero.measure.ipad.mfa'

Does the command gym prints out work?
xcodebuild -workspace mfa.xcworkspace -scheme mfa -configuration Release -destination 'generic/platform=iOS' -archivePath /Users/iosdev/Library/Developer/Xcode/Archives/2017-11-13/mfa\ 2017-11-13\ 14.48.26.xcarchive APP_IDENTIFIER='aero.measure.ipad.mfa' PROVISIONING_PROFILE_SPECIFIER='match InHouse aero.measure.ipad.mfa' -allowProvisioningUpdates archive

if you just run that by hand?

@furick1

This comment has been minimized.

furick1 commented Nov 15, 2017

Thanks @taquitos . I added skip_profile_detection: true but as suspected I still get the code signing error. I get the same error when running that command manually. It seems to be referencing the wrong team ID (company vs enterprise). I use Appfile to set Team ID by lane (ref Appfile below). I tried setting export_team_id in gym command and got the same error.

---Appfile---
for_lane :enterprise do
app_identifier "aero.measure.ipad.mfa" # The bundle identifier of your app
apple_id "iosdev@measure.com" # Your Apple email address
team_id "J3SRA6AX7V" # Developer Portal Enterprise Team ID
end

for_lane :beta do
app_identifier "com.measure.mfa" # The bundle identifier of your app
apple_id "iosdev@measure.com" # Your Apple email address
team_id "7KVL9BJ8M5" # Developer Portal Companny Team ID
end
---End Appfile----

---Current Error after adding skip profile detection---
[12:40:27]: ▸ Check dependencies
[12:40:27]: ▸ Code Signing Error: No profile for team 'Measure UAS, Inc' matching 'match InHouse aero.measure.ipad.mfa' found: Xcode couldn't find any provisioning profiles matching '7KVL9BJ8M5/match InHouse aero.measure.ipad.mfa'. 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.
[12:40:27]: ▸ Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
[12:40:27]: ▸ Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
-- End Current Error...---

@furick1

This comment has been minimized.

furick1 commented Nov 16, 2017

Can anyone point me to an example of a fastfile that builds an ios inhouse (enterprise) and an appstore (company) ipa from the same xcode project? I'm still wondering if this is even possible using the latest xcode and fastlane. I feel like i'm chasing a unicorn.

@furick1

This comment has been minimized.

furick1 commented Nov 20, 2017

Hi fastlane-bot, got any advice for me?

@taquitos

This comment has been minimized.

Member

taquitos commented Nov 20, 2017

@furick1

This comment has been minimized.

furick1 commented Nov 20, 2017

I am using fabric but can't get fastlane to archive and export the app using the enterprise settings to then send to fabric.

@fastlane-bot

This comment has been minimized.

fastlane-bot commented Jan 4, 2018

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@furick1

This comment has been minimized.

furick1 commented Jan 4, 2018

Just for the record there is no answer to this solution and while it doesn't surprise me, fastlane can't do both kinds of builds (in-house and appstore) within the same project. You may be able to do it by creating different schemes and copy code but at that point it is not much different than having two projects and somehow forking and keeping parts in sync via version control. In my case using gitlab CI you would then need separate build scripts which defeats the whole purpose of what I was trying to do. I think because of fastlane and xcode frequent changes that this type of solution might be possible but would break frequently.

@fastlane-bot

This comment has been minimized.

fastlane-bot commented Feb 28, 2018

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@fastlane-bot

This comment has been minimized.

fastlane-bot commented Apr 9, 2018

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@fastlane-bot

This comment has been minimized.

fastlane-bot commented Apr 17, 2018

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@furick1

This comment has been minimized.

furick1 commented May 16, 2018

I was able to use sed in a ci script to accomplish this same task. sed changes the bundle id, profile, signing identify, and sets some other app specific values. I can now switch between builds for TestFlight, AppStore, or InHouse with Crashlytics submission by clicking different stages in my Gitlab CE CI pipeline for the project/repo.

@fastlane fastlane locked and limited conversation to collaborators Jul 15, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.