LoginSignup
7

More than 5 years have passed since last update.

fastlane/produce でコマンドだけで iTunesConnect にアプリを作成する

Last updated at Posted at 2017-02-11

produce\.png \(2635×679\)

fastlane/produce

fastlane シリーズの 1 つで、 Apple Developer Portal と iTunes Connect に新しいアプリケーションを作成してくれるものです。
新規にアプリを作ると上記2つにアプリケーションの登録が必要でめっちゃ面倒ですが、それを代わりにやってくれます :relaxed:

この機能は 今まで煩雑だと思っていたことが楽になる 機能なので、一度も手作業でアプリの登録まで行ったことがない人は使わないほうが良いです。

使ってみよう

前提として、Apple Developer Portal と iTunes Connect を開設済みである状態です。

1. まず Xcode Project 作る

こんな感じで適当に作っちゃいます。

7fbf1c46-a715-41b5-ac8a-3790310583c0.png

2. fastlane produce する

早速コマンドを打つ。

$ cd Sample
$ gem install fastlane
$ fastlane produce

+----------------+------------+
| Summary for produce 2.14.2  |
+----------------+------------+
| sku            | 1111111111 |
| platform       | ios        |
| language       | English    |
| skip_itc       | false      |
| skip_devcenter | false      |
+----------------+------------+


[15:11:39]: To not be asked about this value, you can specify it using 'username'
Your Apple ID Username: hoge@mail.com # Apple Developer Portal のログイン ID

# 初めての場合はここでパスワードも聞かれる

[15:12:40]: To not be asked about this value, you can specify it using 'app_identifier'
App Identifier (Bundle ID, e.g. com.krausefx.app): com.starhoshi.Sample # さっき作ったやつ

[15:13:41]: To not be asked about this value, you can specify it using 'app_name'
App Name: ProduceSample # アプリ名、すでに他の人がつけているのと同じにはできない

[15:13:48]: Creating new app 'Sample' on the Apple Dev Center
[15:13:50]: Created app 11AA1AA11A
[15:13:51]: Finished creating new app 'Sample' on the Dev Center

# 初めての場合は iTunes Connect のアカウントも聞かれる![unspecified.png (199.6 kB)](https://files.esa.io/uploads/production/attachments/2716/2017/02/11/15515/e2e4cfae-5d17-4618-905c-7cbdd9d752d2.png)


[15:13:55]: Creating new app 'Sample' on iTunes Connect
[15:18:52]: Successfully created new app 'ProduceSample' on iTunes Connect with ID 1111111111

3. 結果を確認する

Apple Developer Portal

できてる :tada::tada::tada:
(けど Push Notifications が ON になってる :neutral_face: )

32169441-8f51-43c0-a4b1-61b4a92739f6.png

iTunes Connect

できてる :tada::tada::tada:

267c85ea-8020-439f-8728-9248f788614e.png

オプション

homekit とか ON/OFF にするのとかもコマンドでできる。
さっきの Push Notifications を OFF にしてみる。

$fastlane produce disable_services --push-notification
[15:25:39]: To not be asked about this value, you can specify it using 'username'
Your Apple ID Username: hoge@mail.com
[15:25:42]: Starting login with user 'hoge@mail.com'
[15:25:45]: Successfully logged in
[15:25:45]: To not be asked about this value, you can specify it using 'app_identifier'
App Identifier (Bundle ID, e.g. com.krausefx.app): com.starhoshi.sample
[15:25:56]: [DevCenter] App found 'ProduceSample'
[15:25:56]: Disabling services
[15:25:56]:     Push Notifications
[15:25:59]: Done! Disabled 1 services.

これで Apple Developer Portal 見ると... OFF になってる :laughing:

79710b6f-ae94-4cfb-b99b-15bafce5a6a0.png

感想

コマンド打つだけで初期設定が完了した、めっちゃ良い。
今後新規アプリを作るときはこれ使って苦労を減らしていくぞ :muscle:

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7