Skip to content
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

Missing in_app_purchases interface when using ConnectAPI #20517

Open
4 tasks done
gibertoni opened this issue Jul 29, 2022 · 5 comments
Open
4 tasks done

Missing in_app_purchases interface when using ConnectAPI #20517

gibertoni opened this issue Jul 29, 2022 · 5 comments

Comments

@gibertoni
Copy link

gibertoni commented Jul 29, 2022

New Issue Checklist

Issue Description

I have been using Spaceship::Tunes to create in-app-purchases in an AppStore account. This #12946 (comment) well what my script does.

Recently, the company I work for changed the authentication mechanism on AppStoreConnect and added a new layer for SSO and this broke the usage of fastlane since we now have to go through an external provider for 2FA. Then I turned to using API key to connect to app store in my integration pipeline.

This works well and dandy to deal with metadata information, client versions, etc.
It does not however support in-app-purchases as it did before. The in_app_purchases structure does not exist within ConnectAPI's App model. Nor have the team migrated the create_iap API to the Connect API backward Tunes support

Is this intentional? Is there any other way to deal with IAPs using ConnectAPI?

Command executed

Custom action to create IAPs on AppStore

Complete output when running fastlane, including the stack trace and command used
    Traceback (most recent call last):
	30: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/bin/ruby_executable_hooks:22:in `'
	29: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/bin/ruby_executable_hooks:22:in `eval'
	28: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/bin/fastlane:23:in `'
	27: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/bin/fastlane:23:in `load'
	26: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/bin/fastlane:23:in `'
	25: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
	24: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
	23: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
	22: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
	21: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
	20: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
	19: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
	18: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
	17: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
	16: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
	15: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
	14: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:45:in `execute'
	13: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	12: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	11: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/lane.rb:33:in `call'
	10: from Fastfile:22:in `block in parsing_binding'
	 9: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
	 8: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
	 7: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
	 6: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:229:in `chdir'
	 5: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
	 4: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
	 3: from /Users/guilherme.gibertoni/.rvm/gems/ruby-2.7.4/gems/fastlane-2.206.2/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
	 2: from /Users/guilherme.gibertoni/Documents/Repo/Games/tennis-metadata/fastlane/actions/create_iap_app_store.rb:34:in `run'
	 1: from /Users/guilherme.gibertoni/Documents/Repo/Games/tennis-metadata/fastlane/actions/create_iap_app_store.rb:34:in `each'
/Users/guilherme.gibertoni/Documents/Repo/fastlane/actions/create_iap_app_store.rb:35:in `block in run': \e[31m[!] undefined method `in_app_purchases' for #\e[0m (NoMethodError)
 

Environment

 
     
🚫 fastlane environment 🚫

Stack

Key Value
OS 11.6.3
Ruby 2.7.4
Bundler? true
Git git version 2.32.0 (Apple Git-132)
Installation Source ~/.rvm/gems/ruby-2.7.4/bin/fastlane
Host macOS 11.6.3 (20G415)
Ruby Lib Dir ~/.rvm/rubies/ruby-2.7.4/lib
OpenSSL Version OpenSSL 1.1.1k 25 Mar 2021
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 13.2.1
Swift Version 5.5.2

System Locale

Error
No Locale with UTF8 found 🚫

fastlane files:

`./Fastfile`
lane :itc_meta do
  api_key = app_store_connect_api_key(
    key_id: ENV["FASTLANE_KEY_ID"],
    issuer_id: ENV["FASTLANE_ISSUER_ID"],
    key_filepath: ENV["FASTLANE_KEY_FILEPATH"],
    duration: 1200, # optional (maximum 1200)
    in_house: false # optional but may be required if using match/sigh
  )

  deliver
end

lane :itc_create_iap do
  api_key = app_store_connect_api_key(
    key_id: ENV["FASTLANE_KEY_ID"],
    issuer_id: ENV["FASTLANE_ISSUER_ID"],
    key_filepath: ENV["FASTLANE_KEY_FILEPATH"],
    duration: 1200, # optional (maximum 1200)
    in_house: false # optional but may be required if using match/sigh
  )

  create_iap_app_store(
    api_key: api_key
  )
end

lane :itc_download_iap do
  sh("ruby",  "./download_iaps_itc.rb")
end

lane :release_notes_download do |options|
  sh("ruby",  "./release_notes_download.rb", options[:key])
end

lane :gplay_meta do
    supply
end
`./Appfile`
itc_team_id("120157872")
package_name("redacted")

fastlane gems

Gem Version Update-Status
fastlane 2.206.2 🚫 Update available

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.4.0
executable-hooks 1.6.1
bundler-unload 1.0.2
rubygems-bundler 1.4.5
bundler 2.2.22
rake 13.0.6
rexml 3.2.5
CFPropertyList 3.0.5
public_suffix 4.0.7
addressable 2.8.0
artifactory 3.0.15
atomos 0.1.3
aws-eventstream 1.2.0
aws-partitions 1.595.0
aws-sigv4 1.5.0
jmespath 1.6.1
aws-sdk-core 3.131.1
aws-sdk-kms 1.57.0
aws-sdk-s3 1.114.0
babosa 1.0.4
claide 1.1.0
colored 1.2
colored2 3.1.2
highline 2.0.3
commander 4.6.0
csv 3.2.3
declarative 0.0.20
digest-crc 0.6.4
unf_ext 0.0.8.2
unf 0.1.4
domain_name 0.5.20190701
dotenv 2.7.6
down 5.3.1
emoji_regex 3.2.3
excon 0.92.3
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.0.0
faraday-multipart 1.0.3
faraday-net_http 1.0.1
faraday-net_http_persistent 1.2.0
faraday-patron 1.0.0
faraday-rack 1.0.0
faraday-retry 1.0.3
ruby2_keywords 0.0.5
faraday 1.10.0
http-cookie 1.0.5
faraday-cookie_jar 0.0.7
faraday_middleware 1.2.0
fastimage 2.2.6
gh_inspector 1.1.3
jwt 2.3.0
memoist 0.16.2
multi_json 1.15.0
os 1.1.4
signet 0.16.1
googleauth 1.1.3
httpclient 2.8.3
mini_mime 1.1.2
trailblazer-option 0.1.2
uber 0.1.0
representable 3.2.0
retriable 3.1.2
webrick 1.7.0
google-apis-core 0.5.0
google-apis-androidpublisher_v3 0.21.0
google-apis-playcustomapp_v1 0.7.0
google-apis-iamcredentials_v1 0.10.0
google-apis-storage_v1 0.14.0
google-cloud-env 1.6.0
google-cloud-errors 1.2.0
google-cloud-core 1.6.0
google-cloud-storage 1.36.2
json 2.6.2
mini_magick 4.11.0
naturally 2.2.1
optparse 0.1.1
plist 3.6.0
rubyzip 2.3.2
security 0.1.3
simctl 1.6.8
terminal-notifier 2.0.0
unicode-display_width 1.8.0
terminal-table 1.8.0
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
word_wrap 1.0.0
nanaimo 0.3.0
xcodeproj 1.21.0
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.1
fileutils 1.6.0
logger 1.5.1
racc 1.6.0
nokogiri 1.13.6
yaml 0.2.0

generated on: 2022-07-29

@gibertoni
Copy link
Author

I had previously open this as a question on the Discussion section but it had no attention unfortunately: #20358

@fastlane-bot
Copy link

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 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@gibertoni
Copy link
Author

Bump because it is still a requirement

@fastlane-bot
Copy link

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 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@TCROC
Copy link

TCROC commented Jun 24, 2023

What is the status on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants