fastlane / fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps
https://fastlane.tools
MIT License
39.59k stars 5.71k forks source link

automatic_release not working #13777

Closed timothycosta closed 5 years ago

timothycosta commented 5 years ago

New Issue Checklist

Issue Description

I set automatic_release to true but when viewing the app in ITC it was still set to manual. After the app finished review it still needed to be released manually.

+--------------------------------------------------------------------+----------------------------------------------------+
|                                                 deliver 2.108.0 Summary                                                 |
+--------------------------------------------------------------------+----------------------------------------------------+
| submit_for_review                                                  | true                                               |
| skip_metadata                                                      | true                                               |
| skip_screenshots                                                   | true                                               |
| automatic_release                                                  | true                                               |
...
Complete output when running fastlane, including the stack trace and command used
fastlane --env de upload submit:1 release:1
[✔] 🚀
[17:59:01]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
(eval):4: warning: already initialized constant FastlaneCore::ConfigurationFile::MATCH_SHALLOW_CLONE
(eval):4: warning: previous definition of MATCH_SHALLOW_CLONE was here
[17:59:02]: ----------------------------------------
[17:59:02]: --- Step: Verifying fastlane version ---
[17:59:02]: ----------------------------------------
[17:59:02]: Your fastlane version 2.108.0 matches the minimum requirement of 2.20.0  ✅
[17:59:02]: ------------------------------
[17:59:02]: --- Step: default_platform ---
[17:59:02]: ------------------------------
[17:59:02]: Loading from './fastlane/.env.de'
[17:59:02]: Driving the lane 'ios upload' 🚀
[17:59:02]: ---------------------
[17:59:02]: --- Step: deliver ---
[17:59:02]: ---------------------
[17:59:02]: Successfully loaded '/Users/timothycosta/Desktop/lingq/iLingQ/fastlane/Deliverfile' 📄

+--------------------------------------+-------------------------------------------------------------------------------------------------+
|                                             Detected Values from './fastlane/Deliverfile'                                              |
+--------------------------------------+-------------------------------------------------------------------------------------------------+
| metadata_path                        | ./fastlane/de/metadata/                                                                         |
| screenshots_path                     | ./fastlane/de/screenshots/                                                                      |
| app_icon                             | ./fastlane/de/app_icon.png                                                                      |
| primary_category                     | Education                                                                                       |
| secondary_category                   | Travel                                                                                          |
| force                                | true                                                                                            |
| ignore_language_directory_validation | true                                                                                            |
| submission_information               | {:add_id_info_tracks_install=>true, :add_id_info_tracks_action=>true,                           |
|                                      | :add_id_info_uses_idfa=>true, :export_compliance_uses_encryption=>false,                        |
|                                      | :export_compliance_encryption_updated=>false,                                                   |
|                                      | :content_rights_contains_third_party_content=>false, :content_rights_has_rights=>true}          |
| app_review_information               | {:first_name=>"Mark", :last_name=>"Kaufmann", :phone_number=>"16049259544",                     |
|                                      | :email_address=>"xxxx@xxxx.com", :demo_user=>"billyjoe", :demo_password=>"xxxx", :notes=>""} |
| release_notes                        | {"default"=>"LingQ 4.6.4\nBugfixes and performance improvements\n", "it"=>"LingQ                |
|                                      | 4.6.4\nBugfixes and performance improvements\n"}                                                |
+--------------------------------------+-------------------------------------------------------------------------------------------------+

[17:59:02]: Login to App Store Connect (xxxx@xxxx.com)
[17:59:05]: Login successful

+--------------------------------------------------------------------+----------------------------------------------------+
|                                                 deliver 2.108.0 Summary                                                 |
+--------------------------------------------------------------------+----------------------------------------------------+
| submit_for_review                                                  | true                                               |
| skip_metadata                                                      | true                                               |
| skip_screenshots                                                   | true                                               |
| automatic_release                                                  | true                                               |
| username                                                           | xxxx@xxxx.com                             |
| app_identifier                                                     | com.lingq.iLingQ.de                                |
| platform                                                           | ios                                                |
| edit_live                                                          | false                                              |
| use_live_version                                                   | false                                              |
| metadata_path                                                      | ./fastlane/de/metadata/                            |
| screenshots_path                                                   | ./fastlane/de/screenshots/                         |
| skip_binary_upload                                                 | false                                              |
| skip_app_version_update                                            | false                                              |
| force                                                              | true                                               |
| overwrite_screenshots                                              | false                                              |
| reject_if_possible                                                 | false                                              |
| phased_release                                                     | false                                              |
| submission_information.add_id_info_tracks_install                  | true                                               |
| submission_information.add_id_info_tracks_action                   | true                                               |
| submission_information.add_id_info_uses_idfa                       | true                                               |
| submission_information.export_compliance_uses_encryption           | false                                              |
| submission_information.export_compliance_encryption_updated        | false                                              |
| submission_information.content_rights_contains_third_party_content | false                                              |
| submission_information.content_rights_has_rights                   | true                                               |
| dev_portal_team_id                                                 | FXD5S9TV5H                                         |
| run_precheck_before_submit                                         | true                                               |
| precheck_default_rule_level                                        | warn                                               |
| app_icon                                                           | ./fastlane/de/app_icon.png                         |
| primary_category                                                   | Education                                          |
| secondary_category                                                 | Travel                                             |
| app_review_information.first_name                                  | xxxx                                               |
| app_review_information.last_name                                   | xxxx                                           |
| app_review_information.phone_number                                | xxxx                                        |
| app_review_information.email_address                               | xxxx                                     |
| app_review_information.demo_user                                   | xxxx                                           |
| app_review_information.demo_password                               | ********                                           |
| release_notes.default                                              | LingQ 4.6.4 Bugfixes and performance improvements  |
| release_notes.it                                                   | LingQ 4.6.4 Bugfixes and performance improvements  |
| ignore_language_directory_validation                               | true                                               |
| precheck_include_in_app_purchases                                  | true                                               |
+--------------------------------------------------------------------+----------------------------------------------------+

[17:59:06]: Detected languages: ["default", "it", "de-DE", "en-AU", "en-CA", "en-GB", "en-US", "es-ES", "es-MX", "fr-CA", "fr-FR", "ja", "ko", "nl-NL", "pt-BR", "pt-PT", "ru", "tr", "zh-Hans", "zh-Hant"]
[17:59:10]: Uploading app icon...
[17:59:17]: Finished the upload to App Store Connect
[17:59:17]: Running precheck before submitting to review, if you'd like to disable this check you can set run_precheck_before_submit to false
[17:59:17]: Making sure we pass precheck 👮‍♀️ 👮 before we submit  🛫

+--------------------------+------------------------+
|           Summary for precheck 2.108.0            |
+--------------------------+------------------------+
| default_rule_level       | warn                   |
| include_in_app_purchases | true                   |
| app_identifier           | com.lingq.iLingQ.de    |
| username                 | xxx@xxx.com |
+--------------------------+------------------------+

[17:59:17]: Checking app for precheck rule violations
[17:59:33]: Reading in-app purchases. If you have a lot, this might take a while
[17:59:33]: You can disable IAP checking by setting the `include_in_app_purchases` flag to `false`
[17:59:59]: Done reading in-app purchases
[18:00:07]: ✅  Passed: No negative  sentiment
[18:00:07]: ✅  Passed: No placeholder text
[18:00:07]: ✅  Passed: No mentioning  competitors
[18:00:07]: ✅  Passed: No future functionality promises
[18:00:07]: ✅  Passed: No words indicating test content
[18:00:07]: ✅  Passed: No curse words
[18:00:07]: ✅  Passed: No words indicating your IAP is free
[18:00:07]: ✅  Passed: Incorrect, or missing copyright date
[18:00:47]: ✅  Passed: No broken urls
[18:00:47]: precheck 👮‍♀️ 👮  finished without detecting any potential problems 🛫
[18:01:02]: Selecting the latest build...
[18:01:35]: Selecting build 4.6.4 (2)...
[18:01:48]: Successfully selected build
[18:01:48]: Submitting the app for review...
[18:02:34]: Setting 'add_id_info_tracks_install' to 'true'...
[18:02:34]: Setting 'add_id_info_tracks_action' to 'true'...
[18:02:34]: Setting 'add_id_info_uses_idfa' to 'true'...
[18:02:34]: Setting 'export_compliance_uses_encryption' to 'false'...
[18:02:34]: Setting 'export_compliance_encryption_updated' to 'false'...
[18:02:34]: Setting 'content_rights_contains_third_party_content' to 'false'...
[18:02:34]: Setting 'content_rights_has_rights' to 'true'...
[18:03:03]: Successfully submitted the app for review!
[18:03:03]: upload finished

+------+----------------------------+-------------+
|                fastlane summary                 |
+------+----------------------------+-------------+
| Step | Action                     | Time (in s) |
+------+----------------------------+-------------+
| 1    | Verifying fastlane version | 0           |
| 2    | default_platform           | 0           |
| 3    | deliver                    | 240         |
+------+----------------------------+-------------+

[18:03:03]: fastlane.tools finished successfully 🎉

Environment

✅ fastlane environment ✅ ### Stack | Key | Value | | --------------------------- | ------------------------------------------- | | OS | 10.14.1 | | Ruby | 2.5.1 | | Bundler? | false | | Git | git version 2.17.0 | | Installation Source | /usr/local/bin/fastlane | | Host | Mac OS X 10.14.1 (18B75) | | Ruby Lib Dir | /usr/local/Cellar/ruby/2.5.1/lib | | OpenSSL Version | OpenSSL 1.0.2o 27 Mar 2018 | | Is contained | false | | Is homebrew | false | | Is installed via Fabric.app | false | | Xcode Path | /Applications/Xcode.app/Contents/Developer/ | | Xcode Version | 10.1 | ### System Locale | Variable | Value | | | -------- | ----------- | - | | LANG | en_US.UTF-8 | ✅ | | LC_ALL | en_US.UTF-8 | ✅ | | LANGUAGE | | | ### fastlane files:
`./fastlane/Fastfile` ```ruby # Customise this file, documentation can be found here: # https://github.com/fastlane/fastlane/tree/master/fastlane/docs # All available actions: https://docs.fastlane.tools/actions # can also be listed using the `fastlane actions` command # 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.20.0" all_languages = ["de","el","es","eo","en","fr","it","ja","ko","nl","pl","pt","ru","sv","zh",] all_localizations = ["de", "en-US", "es", "es-MX", "fr", "fr-CA", "it", "ja", "ko", "nl", "pt-BR", "pt-PT", "ru", "zh-Hans", "zh-Hant"] purchase_pairs = { "de-DE" => "de", "en-US" => "en", # "es-ES" => "es", "es-MX" => "es-MX", "fr-FR" => "fr", "fr-CA" => "fr", "it" => "it", "ja" => "ja", "ko" => "ko", "nl-NL" => "nl", "pt-BR" => "pt-BR", "pt-PT" => "pt-PT", "ru" => "ru", "zh-Hans" => "zh-Hans", "zh-Hant" => "zh-Hant", } screenshot_pairs = { "de" => ["de-DE"], "en" => ["en-US"], "es" => ["es-ES", "es-MX"], "fr" => ["fr-FR", "fr-CA"], #"it" => ["it"], "ja" => ["ja"], "ko" => ["ko"], "nl" => ["nl-NL"], "pt-BR" => ["pt-BR", "pt-PT"], "ru" => ["ru"], "zh-Hans" => ["zh-Hans"], "zh-Hant" => ["zh-Hant"], } default_platform :ios platform :ios do before_all do # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..." #cocoapods end 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") # more information: https://codesigning.guide gym # Build your app - more options available pilot # sh "your_script.sh" # You can also use other beta testing services here (run `fastlane actions`) end desc "Deploy a new version to the App Store" lane :release do # match(type: "appstore") # snapshot gym # Build your app - more options available deliver(force: true) # frameit end desc "Uses 'fetch_metadata.rb to update the metadata from google sheets" lane :fetch_metadata do |options| sh "/usr/local/bin/ruby fetch_metadata.rb #{ENV['LANG_CODE']}/metadata/ #{ENV['TAB_NAME']}" end desc "Upload build, metadata, etc..." lane :upload do |options| skip_metadata_fetch = options[:skip_metadata_fetch] ? true : false skip_metadata = options[:metadata] ? false : true skip_screenshots = options[:screenshots] ? false : true individual = options[:individual] || [] submit = options[:submit] ? true : false release = options[:release] ? true : false if !skip_metadata && !skip_metadata_fetch UI.message "Fetching metadata" fetch_metadata end if options[:binary] deliver(ipa: "./fastlane/#{ENV['LANG_CODE']}/bin/#{ENV['LANG_CODE']}.ipa", submit_for_review: submit, skip_metadata: skip_metadata, skip_screenshots: skip_screenshots, automatic_release: release) #, individual_metadata_items: individual) else deliver(submit_for_review: submit, skip_metadata: skip_metadata, skip_screenshots: skip_screenshots, automatic_release: release) #, individual_metadata_items: individual) end end desc "Setup provisioning, certificates, capabilities, etc..." lane :provision do |options| produce( app_identifier: ENV['APP_IDENTIFIER'], app_name: ENV['APP_NAME'], language: "English", app_version: "1.0", sku: ENV['APP_SKU'], ) produce( app_identifier: "#{ENV['APP_IDENTIFIER']}.Import-Lesson", app_name: "Import Lesson", skip_itc: true #Use this to avoid creating a new app and just register the app_identifier ) produce( app_identifier: "#{ENV['APP_IDENTIFIER']}.Widget", app_name: "LingQ", skip_itc: true #Use this to avoid creating a new app and just register the app_identifier ) group = "group.lingq.#{ENV['LANG_CODE']}" sh "fastlane produce enable_services --associated-domains --push-notification --in-app-purchase --app-group -a #{ENV['APP_IDENTIFIER']}" sh "fastlane produce enable_services --associated-domains --push-notification --in-app-purchase --app-group -a #{ENV['APP_IDENTIFIER']}.Import-Lesson" sh "fastlane produce enable_services --associated-domains --push-notification --in-app-purchase --app-group -a #{ENV['APP_IDENTIFIER']}.Widget" sh "fastlane produce group -g #{group} -n 'LingQ Group' --app-identifier #{ENV['APP_IDENTIFIER']}" sh "fastlane produce group -g #{group} -n 'LingQ Group' --app-identifier #{ENV['APP_IDENTIFIER']}.Import-Lesson" sh "fastlane produce group -g #{group} -n 'LingQ Group' --app-identifier #{ENV['APP_IDENTIFIER']}.Widget" sh "fastlane produce associate_group #{group} -a #{ENV['APP_IDENTIFIER']}" sh "fastlane produce associate_group #{group} -a #{ENV['APP_IDENTIFIER']}.Import-Lesson -i 1" sh "fastlane produce associate_group #{group} -a #{ENV['APP_IDENTIFIER']}.Widget -i 1" UI.important("Don't forget to run `fastlane bootstrap force:1` to regenerate profiles which include these services.") end lane :bootstrap do |options| force = options[:force] ? true : false read_only = options[:readonly] ? true : false match(type: "development", force: force, clone_branch_directly: 1, verbose:1, readonly: read_only, shallow_clone: 1) match(type: "appstore", force: force, clone_branch_directly: 1, verbose:1, readonly: read_only, shallow_clone: 1) match(type: "adhoc", force: force, clone_branch_directly: 1, verbose:1, readonly: read_only, shallow_clone: 1) end desc "A more efficient method of `bootstrap` for all apps because it avoids re-cloning the repository each time" lane :bootstrap_all do |options| force = options[:force] ? true : false base = "com.lingq.iLingQ" apps = [base, "#{base}.Import-Lesson", "#{base}.Widget"] all_languages.each do |lang| apps.push("#{base}.#{lang}") apps.push("#{base}.#{lang}.Import-Lesson") apps.push("#{base}.#{lang}.Widget") end match(type: "appstore", app_identifier:apps, force: force) match(type: "development", app_identifier:apps, force: force) match(type: "adhoc", app_identifier:apps, force: force) end lane :fix_signing do |options| lane provision lane certificates lane bootstrap force:1 end after_all do |lane| UI.message "#{lane} finished" next sh "osascript -e 'display notification \"Finished #{lane}\" with title \"fastlane --env #{ENV['LANG_CODE']}\" sound name \"default\"'" end error do |lane, exception| sh "osascript -e 'display notification \"#{lane} - #{exception.message}\" with title \"ERROR : fastlane --env #{ENV['LANG_CODE']}\" sound name \"default\"'" # slack( # message: exception.message, # success: false # ) end desc "Environment Settings" lane :check_env do puts "APP_IDENTIFIER: #{ENV['APP_IDENTIFIER']}" puts "APP_NAME: #{ENV['APP_NAME']}" puts "APP_SKU: #{ENV['APP_SKU']}" puts "LANG_CODE #{ENV['LANG_CODE']}" end desc "Building" lane :build do |options| check_env update_project(options) #provision(options) gym(export_method: "app-store") #, export_xcargs: "-allowProvisioningUpdates") end desc "Setting up xcconfig, plist, etc..." lane :update_project do fastlane_require 'xcodeproj' code = ENV['LANG_CODE'] path = "../LingQ.xcconfig" config = Xcodeproj::Config.new(path) config.attributes['LQ_APP_IDENTIFIER'] = ENV['APP_IDENTIFIER'] config.attributes['LQ_APP_LANGUAGE'] = code config.attributes['LQ_APP_ICON'] = (code == "LingQ" || code == "all") ? "AppIcon" : "AppIcon-#{code}" config.attributes['LQ_APP_NAME'] = ENV['APP_NAME'] config.attributes['LQ_PREMIUM_AUTO'] = ENV['PREMIUM_AUTO'] config.attributes['LQ_PREMIUM_AUTO_NO_TRIAL'] = ENV['PREMIUM_AUTO_NO_TRIAL'] config.attributes['LQ_PREMIUM_AUTO_6'] = ENV['PREMIUM_AUTO_6'] config.attributes['LQ_PREMIUM_AUTO_12'] = ENV['PREMIUM_AUTO_12'] config.attributes['LQ_KOCHAVA_TOKEN'] = ENV['KOCHAVA_TOKEN'] File.write(path, config.to_s) # A bug prevents config from writing itself next UI.message "Updating provisioning profile specifiers" path = "../iLingQ.xcodeproj" proj = Xcodeproj::Project.open(path) targets = ["LingQ", "Widget", "Import Lesson"] prefixes = { "Ad Hoc" => "AdHoc", "Release" => "AppStore", "Debug" => "Development" } suffixes = { "LingQ" => "", "Widget" => ".Widget", "Import Lesson" => ".Import-Lesson" } proj.targets.each do |target| next if !targets.include? target.name UI.message "#{target.name}" target.build_configuration_list.build_configurations.each do |config| profile = "match #{prefixes[config.name]} #{ENV['APP_IDENTIFIER']}#{suffixes[target.name]}" config.build_settings["PROVISIONING_PROFILE_SPECIFIER"] = profile config.build_settings["PRODUCT_BUNDLE_IDENTIFIER"] = "#{ENV['APP_IDENTIFIER']}#{suffixes[target.name]}" UI.message profile end end proj.save # Note that plist is relative to project file update_info_plist( plist_path: "iLingQ/Info.plist", block: lambda { |plist| plist['LQ_LANG_CODE'] = ENV['LANG_CODE'] } ) update_app_identifier( plist_path: "LingQ.plist", xcodeproj: "iLingQ.xcodeproj", app_identifier: ENV['APP_IDENTIFIER'] ) end desc "Create screenshots" lane :screenshots do check_env update_project snapshot copy_screenshots end lane :copy_screenshots do base = "#{ENV['LANG_CODE']}/screenshots" sh "cp iPad-01Splash.png #{base}/en-US/" screenshot_pairs.each do |code, array| array.each do |dir| next if dir == "en-US" UI.message "Copying into #{base}/#{dir}" FileUtils.mkdir_p("#{base}/#{dir}") sh "cp *01Splash.png #{base}/#{dir}/" begin # This may fail if there are no results # Do not move because we need these multiple times for some languages sh "cp #{base}/en-US/*-#{code}.png* #{base}/#{dir}/" rescue end end begin sh "rm #{base}/en-US/*-#{code}*" if code != "en" rescue UI.message "#{base}/en-US/*-#{code}* does not exist" end end end lane :fix_screenshots_dirs do base = "#{ENV['LANG_CODE']}/screenshots" screenshot_pairs.each do |code, array| array.each do |dir| FileUtils.rm("#{base}/#{dir}") FileUtils.cp_r("#{base}/#{code}", "#{base}/#{dir}") end FileUtils.rm("#{base}/#{code}") end end lane :frames do Dir.chdir ENV['fastlane'] do sh "./framer --screenshots_dir #{ENV['LANG_CODE']}" end end desc "Download metadata and screenshots from itunes connect" lane :download_itc do |options| check_env update_project sh "fastlane deliver --force download_metadata" sh "fastlane deliver --force download_screenshots" end desc "Create all the folders for each language" lane :create_folders do |options| fastlane_require 'fileutils' puts FileUtils.getwd all_languages.each do |lang| puts lang if options[:delete] && Dir.exist?(lang) puts "Deleting #{lang}" FileUtils.rm lang, :force => true end if !Dir.exist?(lang) FileUtils.mkdir lang end FileUtils.cp_r "all/.", lang, :remove_destination => false FileUtils.rm_rf "#{lang}/bin/" end end desc "Executes the given lane for all languages plus the main app" lane :for_all_apps do |options| lane = options[:lane] skip = options[:skip_main] ? true : false puts "Doing #{lane} for all languages. Skip main app: #{skip}" if !lane UI.error "No `lane` parameter passed to `for_all`." raise "No `lane` parameter passed to `for_all`." end if !skip sh "fastlane #{lane}" end all_languages.each do |lang| sh "fastlane --env #{lang} #{lane}" end end desc "Copies `files` from fastlane/LingQ/base_dir/ to fastlane/LANG_CODE/base_dir/. Default base_dir is `metadata`" lane :copy_files do |options| fastlane_require 'fileutils' files_string = options[:files] base_dir = options[:base_dir] ? options[:base_dir] : "metadata" if !files_string UI.error "`copy_files requires an argument `files` with a comma separated list, e.g. `fastlane copy_files files:1.txt,2.txt`" end files = files_string.split(",") quit = false files.each do |name| file = "LingQ/#{base_dir}/#{name}" if !File.exist?(file) UI.error "No file #{file} exists" quit = true end end if quit raise "copy_files called with invalid file names" end files.each do |name| file = "all/#{base_dir}/#{name}" all_languages.each do |lang| copy = "#{lang}/#{base_dir}/#{name}" FileUtils.cp file, copy end end sh "fastlane for_all_apps lane:overwrite_name skip_main:1" end lane :overwrite_name do |options| fastlane_require 'fileutils' fastlane_require 'pathname' lang = ENV['LANG_CODE'] root = "#{lang}/metadata" Dir.entries(root).each do |dir| name = "#{root}/#{dir}/name.txt" if File.exists?(name) File.write(name, ENV['APP_NAME']) end end end lane :certificates do |options| force = options[:force] ? "--force" : "" fastlane_require 'fileutils' certificates = "#{ENV['LANG_CODE']}/certificates" id = ENV['APP_IDENTIFIER'] if !Dir.exist?(certificates) FileUtils.mkdir certificates end Dir.chdir certificates do sh "fastlane pem #{force} -a #{id} -u timothycosta@lingq.com" #sh "fastlane pem --development -a #{id} -u timothycosta@lingq.com" # Export with password for pusher, keychain, etc... sh "openssl pkcs12 -in production_#{id}.p12 -out pusher_production_#{id}.pem -password pass: -passout pass:pusher" sh "openssl pkcs12 -export -in pusher_production_#{id}.pem -out pusher_#{id}.p12 -passin pass:pusher -passout pass:pusher" end end lane :create_purchases do |options| fastlane_require 'spaceship' Spaceship::Tunes.login app = Spaceship::Application.find(ENV['APP_IDENTIFIER']) family_name = "premiumAutoRenewable" notes = "Account can be upgraded after signing up a new user and tapping the crown button on the homescreen." screenshot = "purchase.png" pa = ENV['PREMIUM_AUTO'] pa6 = ENV['PREMIUM_AUTO_6'] pa12 = ENV['PREMIUM_AUTO_12'] UI.crash! "ENV['PREMIUM_AUTO'] may not be nil" if pa == nil || pa == "" UI.crash! "ENV['PREMIUM_AUTO_6'] may not be nil" if pa6 == nil || pa6 == "" UI.crash! "ENV['PREMIUM_AUTO_12'] may not be nil" if pa12 == nil || pa12 == "" versions = {} #{"es-ES" => "es"}.each do |loc, lang| purchase_pairs.each do |loc, lang| name = localized_string(lang, "app.purchase.name") description = localized_string(lang, "app.purchase.description") versions[loc] = { name: name, description: description } end family = app.in_app_purchases.families.all.find { |p| p.name == family_name } if family == nil UI.message "Creating in-app purchase family" app.in_app_purchases.families.create!(name: "premiumAutoRenewable", product_id: pa, reference_name: family_name, versions: versions) family = app.in_app_purchases.families.all.find { |p| p.name == family_name } end auto = app.in_app_purchases.all.find { |p| p.product_id == pa } auto6 = app.in_app_purchases.all.find { |p| p.product_id == pa6 } auto12 = app.in_app_purchases.all.find { |p| p.product_id == pa12 } if auto == nil UI.message "Creating #{pa}" app.in_app_purchases.create!(type: Spaceship::Tunes::IAPType::RECURRING, versions: versions, reference_name: "1 Month Auto Renewal", product_id: pa, cleared_for_sale: true, review_notes: notes, review_screenshot: screenshot, pricing_intervals: [ { country: "WW", begin_date: nil, end_date: nil, tier: 20, grandfathered: { value: "FUTURE_NONE" } } ], family_id: family.family_id ) auto = app.in_app_purchases.all.find { |p| p.product_id == pa } end if auto6 == nil UI.message "Creating #{pa6}" app.in_app_purchases.create!(type: Spaceship::Tunes::IAPType::RECURRING, versions: versions, reference_name: "6 Months Auto Renewal", product_id: pa6, cleared_for_sale: true, review_notes: notes, review_screenshot: screenshot, pricing_intervals: [ { country: "WW", begin_date: nil, end_date: nil, tier: 85, grandfathered: { value: "FUTURE_NONE" } } ], family_id: family.family_id ) auto6 = app.in_app_purchases.all.find { |p| p.product_id == pa6 } end if auto12 == nil UI.message "Creating #{pa12}" app.in_app_purchases.create!(type: Spaceship::Tunes::IAPType::RECURRING, versions: versions, reference_name: "12 Months Auto Renewal", product_id: pa12, cleared_for_sale: true, review_notes: notes, review_screenshot: screenshot, pricing_intervals: [ { country: "WW", begin_date: nil, end_date: nil, tier: 140, grandfathered: { value: "FUTURE_NONE" } } ], family_id: family.family_id ) auto12 = app.in_app_purchases.all.find { |p| p.product_id == pa12 } end UI.message "Updating subscription info" autoEd = auto.edit auto6Ed = auto6.edit auto12Ed = auto12.edit autoEd.pricing_intervals = [ { country: "WW", begin_date: nil, end_date: nil, tier: 20, grandfathered: { value: "FUTURE_NONE" } } ] auto6Ed.pricing_intervals = [ { country: "WW", begin_date: nil, end_date: nil, tier: 85, grandfathered: { value: "FUTURE_NONE" } } ] auto12Ed.pricing_intervals = [ { country: "WW", begin_date: nil, end_date: nil, tier: 140, grandfathered: { value: "FUTURE_NONE" } } ] autoEd.subscription_price_target = { currency: "USD", tier: 20 } auto6Ed.subscription_price_target = { currency: "USD", tier: 85 } auto12Ed.subscription_price_target = { currency: "USD", tier: 140 } autoEd.subscription_free_trial = "1w" auto6Ed.subscription_free_trial = "1w" auto12Ed.subscription_free_trial = "1w" autoEd.subscription_duration = "1m" auto6Ed.subscription_duration = "6m" auto12Ed.subscription_duration = "1y" [autoEd, auto6Ed, auto12Ed].each { |e| e.cleared_for_sale = true e.review_notes = notes e.review_screenshot = screenshot e.versions = versions UI.message "Saving update for #{e.product_id}" e.save! } end lane :update_descriptions do |options| code = ENV['LANG_CODE'] UI.crash! "Cannot run 'update_translations' on main app" if code == 'LingQ' dirs = get_directories("#{code}/metadata/") UI.message dirs for d in dirs do strings = get_localizations(d) language = strings["language.name.#{code}"] UI.error "language.name.#{code} does not exist" if language == nil description = strings["app.description"].gsub("%1$@", language) base = "#{code}/metadata/#{d}" File.write("#{base}/description.txt", description) end end def get_directories(path) dirs = Dir.entries(path).select { |f| File.directory? "#{path}/#{f}" } dirs = dirs.select { |f| f != "." && f != ".." } return dirs end def localized_string(language, key) localizations = get_localizations(language) value = localizations[key] UI.crash! "Invalid key: #{key} for language: #{language}" if value == nil return value end def get_localizations(directory_name) directory_name = "en" if directory_name == "default" directory_name = directory_name.split("-")[0] unless File.exists? "localizations/#{directory_name}.lproj" return parse_strings("localizations/#{directory_name}.lproj/LanguageSpecific.strings") end def parse_strings(path) UI.crash! "Couldn't find strings file at path '#{path}'" unless File.exist? path UI.crash! "Must be .strings file, only got '#{path}'" unless path.end_with? ".strings" result = {} content = File.read path content.split("\n").each_with_index do |line, index| begin # We don't care about comments and empty lines if line.start_with? '"' key = line.match(/"(.*)" \= /)[1] value = line.match(/ \= "(.*)"/)[1] value = value.gsub("\\n", "\n") value = value.gsub('\\"', '"') result[key] = value end rescue => ex UI.error "Error parsing #{path} line #{index + 1}: '#{line}'" UI.verbose "#{ex.message}\n#{ex.backtrace.join('\n')}" end end if result.empty? UI.error "Empty parsing result for #{path}. Please make sure the file is valid and UTF16 Big-endian encoded" end return result end end ```
`./fastlane/Appfile` ```ruby app_identifier ENV['APP_IDENTIFIER'] apple_id "timothycosta@lingq.com" # Your Apple email address team_id "FXD5S9TV5H" # Developer Portal Team ID # you can even provide different app identifiers, Apple IDs and team names per lane: # More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md ```
### fastlane gems | Gem | Version | Update-Status | | -------- | ------- | ------------- | | fastlane | 2.108.0 | ✅ Up-To-Date | ### Loaded fastlane plugins: **No plugins Loaded**
Loaded gems | Gem | Version | | ------------------------- | ------------ | | did_you_mean | 1.2.0 | | slack-notifier | 2.3.2 | | atomos | 0.1.3 | | CFPropertyList | 3.0.0 | | claide | 1.0.2 | | colored2 | 3.1.2 | | nanaimo | 0.2.6 | | xcodeproj | 1.6.0 | | rouge | 2.0.7 | | xcpretty | 0.3.0 | | terminal-notifier | 1.8.0 | | terminal-table | 1.8.0 | | plist | 3.4.0 | | public_suffix | 2.0.5 | | addressable | 2.5.2 | | multipart-post | 2.0.0 | | word_wrap | 1.0.0 | | tty-spinner | 0.8.0 | | babosa | 1.0.2 | | colored | 1.2 | | highline | 1.7.10 | | commander-fastlane | 4.4.6 | | excon | 0.62.0 | | http-cookie | 1.0.3 | | faraday-cookie_jar | 0.0.6 | | gh_inspector | 1.1.3 | | json | 2.1.0 | | mini_magick | 4.5.1 | | multi_json | 1.13.1 | | multi_xml | 0.6.0 | | rubyzip | 1.2.2 | | security | 0.1.3 | | xcpretty-travis-formatter | 1.0.0 | | bundler | 1.16.1 | | faraday_middleware | 0.12.2 | | emoji_regex | 0.1.1 | | unicode-display_width | 1.4.0 | | tty-screen | 0.6.5 | | tty-cursor | 0.6.0 | | faraday | 0.15.2 | | unf_ext | 0.0.7.5 | | unf | 0.1.4 | | domain_name | 0.5.20180417 | | fastimage | 2.1.4 | | dotenv | 2.5.0 | | naturally | 2.2.0 | | simctl | 1.6.5 | | httpclient | 2.8.3 | | jwt | 2.1.0 | | signet | 0.9.2 | | os | 1.0.0 | | memoist | 0.16.0 | | googleauth | 0.6.6 | | mime-types-data | 3.2018.0812 | | mime-types | 3.2.2 | | retriable | 3.1.2 | | declarative-option | 0.1.0 | | declarative | 0.0.10 | | uber | 0.1.0 | | representable | 3.0.4 | | google-api-client | 0.23.9 | | openssl | 2.1.0 | | date | 1.0.0 | | fileutils | 1.0.2 | | libxml-ruby | 3.1.0 | | ipaddr | 1.2.0 | | psych | 3.0.2 |
*generated on:* **2018-11-29**
fastlane-bot commented 5 years ago

It seems like this issue might be related to code signing :no_entry_sign:

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

Nov1kov commented 5 years ago

I never use this option, but my builds always release automatically. I think this parameter should be reverbed with default value

fastlane-bot commented 5 years ago

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 :+1:

fastlane-bot commented 5 years ago

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 :+1: