fastlane: after migration to XCode 16 fastlane does not build ipa files anymore
Issue Description
Hello together, I just upgraded to XCode 16 and now my fastlane script does not run successfully anymore. My app is build successfully and its archive appears in the XCode Organizer. However, a .ipa file which I expect to be generated is not generated. I do not get any error messages and the pipeline believes it succeeded. When I distribute the app via the XCode Organizer, the ipa file is successfully build, signed and uploaded to the Appstore. Hence the issue is not related to the project.
The problem seems to be the build_app command. I would expect this to result in the mnd.ipa file. However, pipeline stops once .archive was generated rather then .ipa file
If someone knows a workaround please let me know.
Command executed
lane :build_prod do
sh("ns", "prepare", "ios", "--release", "--for-device", "--clean", "--env.production", "--env.environment='prod'", "--env.uglify", "--env.aot", "--no-hmr")
match(type: "appstore")
build_app(scheme: "mnd", workspace: "./platforms/ios/mnd.xcworkspace", export_method: "app-store")
increment_version
end
Complete output when running fastlane, including the stack trace and command used
I just provide the last part of the command line output. It shows that fastlane thinks it finished successfully. However, ipa file was not generated
INFO [2024-10-02 23:26:26.46]: ▸ Copying InfoPlist.strings
INFO [2024-10-02 23:26:27.18]: ▸ Compiling LaunchScreen.storyboard
INFO [2024-10-02 23:26:28.10]: ▸ Processing mnd-Info.plist
INFO [2024-10-02 23:26:28.10]: ▸ Generating 'mnd.app.dSYM'
INFO [2024-10-02 23:26:28.10]: ▸ Running script 'NativeScript PostBuild'
INFO [2024-10-02 23:26:28.94]: ▸ Running script '[CP] Embed Pods Frameworks'
INFO [2024-10-02 23:26:32.17]: ▸ Touching mnd.app (in target 'mnd' from project 'mnd')
INFO [2024-10-02 23:26:32.52]: ▸ Archive Succeeded
DEBUG [2024-10-02 23:26:32.54]: Stored the archive in: /Users/cjohn/Library/Developer/Xcode/Archives/2024-10-02/mnd 2024-10-02 23.26.05.xcarchive
WARN [2024-10-02 23:26:32.55]: No output path received from gym
INFO [2024-10-02 23:26:32.55]: --------------------------------------------------
INFO [2024-10-02 23:26:32.55]: --- Step: Switch to ios increment_version lane ---
INFO [2024-10-02 23:26:32.55]: --------------------------------------------------
INFO [2024-10-02 23:26:32.55]: Cruising over to lane 'ios increment_version' 🚖
INFO [2024-10-02 23:26:32.55]: ----------------------------------
INFO [2024-10-02 23:26:32.55]: --- Step: get_info_plist_value ---
INFO [2024-10-02 23:26:32.55]: ----------------------------------
INFO [2024-10-02 23:26:32.55]: ----------------------------------
INFO [2024-10-02 23:26:32.55]: --- Step: set_info_plist_value ---
INFO [2024-10-02 23:26:32.55]: ----------------------------------
INFO [2024-10-02 23:26:32.55]: ----------------------------------
INFO [2024-10-02 23:26:32.55]: --- Step: set_info_plist_value ---
INFO [2024-10-02 23:26:32.55]: ----------------------------------
INFO [2024-10-02 23:26:32.55]: Cruising back to lane 'ios build_prod' 🚘
INFO [2024-10-02 23:26:32.55]: Successfully generated documentation at path '/Users/cjohn/Entwicklung/MND/mnd/fastlane/README.md'
+-------------------------------------------------------------+
| fastlane summary |
+------+----------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+----------------------------------------+-------------+
| 1 | Verifying fastlane version | 0 |
| 2 | opt_out_usage | 0 |
| 3 | ns prepare ios --release --for-device | 39 |
| | --clean --env.productio | |
| 4 | match | 3 |
| 5 | build_app | 28 |
| 6 | Switch to ios increment_version lane | 0 |
| 7 | get_info_plist_value | 0 |
| 8 | set_info_plist_value | 0 |
| 9 | set_info_plist_value | 0 |
+------+----------------------------------------+-------------+
DEBUG [2024-10-02 23:26:32.56]: All plugins are up to date
INFO [2024-10-02 23:26:32.56]: fastlane.tools finished successfully 🎉
DEBUG [2024-10-02 23:26:32.56]: All plugins are up to date
Environment
✅ fastlane environment ✅
Stack
Key Value OS 15.0 Ruby 3.3.5 Bundler? false Git git version 2.46.2 Installation Source /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane Host macOS 15.0 (24A335) Ruby Lib Dir /opt/homebrew/Cellar/ruby/3.3.5/lib OpenSSL Version OpenSSL 3.3.2 3 Sep 2024 Is contained false Is homebrew false Is installed via Fabric.app false Xcode Path /Applications/Xcode.app/Contents/Developer/ Xcode Version 16.0 Swift Version 6.0 System Locale
Variable Value LANG en_US.UTF-8 ✅ LC_ALL en_US.UTF-8 ✅ LANGUAGE fastlane files:
`./fastlane/Fastfile`
# check minimum fast lane version fastlane_version '2.187.0' # opt out from telemetry opt_out_usage # ios build targets platform :ios do before_all do end lane :build_prod do sh("ns", "prepare", "ios", "--release", "--for-device", "--clean", "--env.production", "--env.environment='prod'", "--env.uglify", "--env.aot", "--no-hmr") match(type: "appstore") build_app(scheme: "mnd", workspace: "./platforms/ios/mnd.xcworkspace", export_method: "app-store") end lane :deploy_testflight do build_prod changelog_from_git_commits upload_to_testflight( beta_app_feedback_email: "", beta_app_description: "", demo_account_required: true, distribute_external: true, notify_external_testers: true, groups: ["External Testers"], beta_app_review_info: { contact_email: "", contact_first_name: "", contact_last_name: "", contact_phone: "", notes: "" }, ) end lane :test do api_key = app_store_connect_api_key( key_id: "", issuer_id: "", key_filepath: "", duration: 1200, in_house: false ) deliver( api_key: api_key, precheck_include_in_app_purchases: false) end end`./fastlane/Appfile`
app_identifier "" apple_id "" team_id "" json_key_file("") package_name("")fastlane gems
Gem Version Update-Status fastlane 2.223.1 ✅ Up-To-Date Loaded fastlane plugins:
Plugin Version Update-Status fastlane-plugin-huawei_appgallery_connect 1.0.31 ✅ Up-To-Date Loaded gems
Gem Version error_highlight 0.6.0 did_you_mean 1.6.3 syntax_suggest 2.0.0 addressable 2.8.7 artifactory 3.0.17 babosa 1.0.4 bundler 2.5.18 CFPropertyList 3.0.7 colored 1.2 highline 2.0.3 commander 4.6.0 dotenv 2.8.1 emoji_regex 3.2.3 excon 0.112.0 faraday-em_http 1.0.0 faraday-em_synchrony 1.0.0 faraday-excon 1.1.0 faraday-httpclient 1.0.1 multipart-post 2.4.1 faraday-multipart 1.0.4 faraday-net_http 1.0.2 faraday-net_http_persistent 1.2.0 faraday-patron 1.0.0 faraday-rack 1.0.0 faraday-retry 1.0.3 faraday 1.10.4 faraday_middleware 1.2.1 domain_name 0.6.20240107 http-cookie 1.0.7 faraday-cookie_jar 0.0.7 fastimage 2.3.1 gh_inspector 1.1.3 uber 0.1.0 declarative 0.0.20 trailblazer-option 0.1.2 representable 3.2.0 retriable 3.1.2 mini_mime 1.1.5 jwt 2.9.1 multi_json 1.15.0 os 1.1.4 signet 0.19.0 googleauth 1.8.1 httpclient 2.8.3 google-apis-core 0.11.3 google-apis-androidpublisher_v3 0.54.0 google-apis-playcustomapp_v1 0.13.0 google-cloud-env 1.6.0 google-cloud-errors 1.4.0 google-cloud-core 1.7.1 google-apis-iamcredentials_v1 0.17.0 google-apis-storage_v1 0.31.0 digest-crc 0.6.5 google-cloud-storage 1.47.0 mini_magick 4.13.2 naturally 2.2.1 plist 3.7.1 rubyzip 2.3.2 security 0.1.5 simctl 1.6.10 terminal-notifier 2.0.0 unicode-display_width 2.6.0 terminal-table 3.0.2 tty-screen 0.8.2 tty-cursor 0.7.1 tty-spinner 0.9.3 word_wrap 1.0.0 atomos 0.1.3 claide 1.1.0 colored2 3.1.2 nanaimo 0.3.0 xcodeproj 1.25.0 rouge 2.0.7 xcpretty 0.3.0 xcpretty-travis-formatter 1.0.1 set 1.1.0 public_suffix 6.0.1 aws-eventstream 1.3.0 aws-sigv4 1.10.0 aws-partitions 1.983.0 jmespath 1.6.2 aws-sdk-core 3.209.1 aws-sdk-kms 1.94.0 aws-sdk-s3 1.167.0 rexml 3.3.8 nkf 0.2.0 base64 0.2.0 ruby2_keywords 0.0.5 rake 13.2.1 json 2.7.2 optparse 0.5.0 forwardable 1.3.3 logger 1.6.0 pathname 0.3.0 shellwords 0.2.0 cgi 0.4.1 date 3.3.4 timeout 0.4.1 stringio 3.1.1 securerandom 0.3.1 uri 0.13.1 ipaddr 1.2.6 openssl 3.2.0 digest 3.1.1 io-nonblock 0.3.0 zlib 3.1.1 resolv 0.3.0 io-wait 0.3.1 time 0.3.0 open-uri 0.4.1 mutex_m 0.2.0 net-http 0.4.1 net-protocol 0.2.2 english 0.8.0 erb 4.0.3 strscan 3.0.9 abbrev 0.1.2 io-console 0.7.1 tempfile 0.2.1 delegate 0.3.1 fileutils 1.7.2 tmpdir 0.2.0 singleton 0.2.0 open3 0.2.1 prettyprint 0.2.0 pp 0.5.0 find 0.2.0 ostruct 0.6.0 yaml 0.3.0 psych 5.1.2 fastlane-plugin-huawei_appgallery_connect 1.0.31 generated on: 2024-10-02
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 19
After fiddling with it some more, changing
gymtobuild_ios_appalso fixed the problem for us.After few hours of searching, I’ve fixed this issue by replacing build_app() with build_ios_app(). build_app produced an xcarchive, but haven’t exported it into ipa. You can check xcarchive(s) in /Users/YOU/Library/Developer/Xcode/Archives/2024-10-04 There are options to convert from *.xcarchive to *ipa too
I am not sure if this solved your issues but mine are gone.
I was having the same problems as mentioned in this comment: https://github.com/fastlane/fastlane/issues/22276#issuecomment-2450737617
Also the same problem as mentioned here: https://github.com/fastlane/fastlane/discussions/20759
The fix?
TLDR, your XCode project must not have support for Mac Catalyst -> SUPPORTS_MACCATALYST= ‘NO’
I came across the same issue. “Archive Succeeded” but the .ipa file is not being generated.
Looking through gym/lib/gym/runner.rb, the run function does a check for Gym.building_for_ios (line 27), before exporting the archive as .ipa. https://github.com/fastlane/fastlane/blob/94a5585f6b7589786243f8df4b96f220f770445c/gym/lib/gym/runner.rb#L26-L28
When your xcode project supports mac catalyst, Gym.building_for_ios would return false. Thus bypassing the export of the archive file. https://github.com/fastlane/fastlane/blob/94a5585f6b7589786243f8df4b96f220f770445c/gym/lib/gym/module.rb#L28-L31
During my build process, I created a ruby script to set SUPPORTS_MACCATALYST = ‘NO’ before doing fastlane gym
According to the documentation, “build_ios_app” is just an alias for gym, with only iOS options. We also tried it, but without success.
Also, gym command is failing with the error “… .app: Not a directory”. I’m using Xcode 16.2.
This is the exact command we are using: