Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

deployGateのコマンドが使えないときは

More than 3 years have passed since last update.

DeployGateとは

作成したアプリをテスト配布するツールです。無料
https://deploygate.com/

コマンドが色々用意されている

面倒な作業(デプロイ、UDID追加など)が、dgコマンドで色々できます

  • デプロイ
$ dg deploy
  • UDID追加 以下のような感じで、自動でUDIDを追加してビルドまでして来れます UDIDは、deployGateの共有ページにアクセスした人のものを収集しているようで、自動的にUDID一覧リストに表示されています。 それを取得してきて、1つずつ追加するかどうか聞いてきます。 それらのUDIDを追加して、DeveloperCenterで新しいプロビジョニングを作成します
$ dg add-device

[11:42:14]: $ xcodebuild -list -workspace /path/to/MY_PROJ.xcodeproj/project.xcworkspace
Please input your app bundle identifier
Example: com.example.ios
Enter your app bundle identifier: XXX.XXX.XXX

Device [Name: xxxxxx - iPhone 7 Plus (Global), UDID: XXXXXXXXXXXXXXXXXXXXXXXX]
Do you want to add this device? (y/n) |y| y

Please enter your email and password for Apple Developer Center
to set up/download provisioning profile automatically so you can
export the app without any extra steps.

Note: Your password will be stored to your Keychain and never be sent to DeployGate.

Email: xxxx@xxxx.xxx
-------------------------------------------------------------------------------------
Please provide your Apple Developer Program account credentials
The login information you enter will be stored in your macOS Keychain
You can also pass the password using the `FASTLANE_PASSWORD` environment variable
More information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager
-------------------------------------------------------------------------------------
Password (for xxxx@xxxx.xxx): ***********
Device [Name: xxxxxx - iPhone 7 Plus (Global), UDID: XXXXXXXXXXXXXXXXXXXXXXXXX] successfully registered.

+-------------------------------------+-----------------------------+
|                      Summary for sigh 2.57.2                      |
+-------------------------------------+-----------------------------+
| adhoc                               | true                        |
| app_identifier                      | xxx.xxx.xxx                |
| username                            | xxxx@xxxx.xxx |
| team_id                             | XXXXXXXX                  |
| force                               | true                        |
| cert_id                             | XXXXXXXX                  |
| development                         | false                       |
| skip_install                        | false                       |
| ignore_profiles_with_different_name | false                       |
| skip_fetch_profiles                 | false                       |
| skip_certificate_verification       | false                       |
| platform                            | ios                         |
+-------------------------------------+-----------------------------+

[11:42:56]: Starting login with user ‘xxxx@xxxx.xxx’
[11:43:00]: Successfully logged in
[11:43:00]: Fetching profiles...
[11:43:00]: Verifying certificates...
[11:43:05]: Found 1 matching profile(s)
[11:43:05]: Recreating the profile
[11:43:12]: Creating new provisioning profile for ‘xxx.xxx.xxx’ with name ‘xxx.xxx.xxx AdHoc' for 'ios' platform
[11:43:15]: Downloading provisioning profile...
[11:43:16]: Successfully downloaded provisioning profile...
[11:43:16]: Installing provisioning profile...
/tmp/dg/provisioning_profile/AdHoc_xxx.xxx.xxx.mobileprovision
Cleaning local Provisioning Profiles...

Delete /path/to/Library/MobileDevice/Provisioning Profiles/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.mobileprovision

Finish cleaning local Provisionig Profiles
[11:43:26]: $ xcodebuild -list -workspace /path/to/PROJ.xcodeproj/project.xcworkspace
Please input your app bundle identifier
Example: com.example.ios
Enter your app bundle identifier: xxx.xxx.xxx
[11:43:56]: $ xcodebuild -list -workspace /path/to/PROJ.xcodeproj/project.xcworkspace -configuration Release

+------------------+---------------------------------------------------------------------------------------+
|                                          Summary for gym 2.57.2                                          |
+------------------+---------------------------------------------------------------------------------------+
| export_method    | ad-hoc                                                                                |
| workspace        | /path/to/PROJ.xcodeproj/project.xcworkspace                                                                    |
| configuration    | Release                                                                               |
| scheme           | xxxxx                                                                          |
| destination      | generic/platform=iOS                                                                  |
| output_name      | xxx                                                                                  |
| build_path       | /path/to/Xcode/Archives/2017-12-11                      |
| clean            | false                                                                                 |
| output_directory | .                                                                                     |
| silent           | false                                                                                 |
| skip_package_ipa | false                                                                                 |
| buildlog_path    | ~/Library/Logs/gym                                                                    |
| xcode_path       | /Applications/Xcode.app                                                           |
+------------------+---------------------------------------------------------------------------------------+

[11:44:00]: $ set -o pipefail && xcodebuild -workspace /path/to/PROJ.xcodeproj/project.xcworkspace -scheme xxxxx -configuration Release -destination 'generic/platform=iOS' -archivePath /path/to/Xcode/Archives/2017-12-11/xxxx\ 
[11:44:01]: ▸ Building xxxx/xxxx [Release]
[11:44:01]: ▸ Check Dependencies
[11:44:13]: ▸ Compiling 

エラーが起きる

sh: /Library/Developer/CommandLineTools//usr/bin/xcodebuild: No such file or directory

dgコマンドは、内部でXcodetoolを使っていますが、そこへのパスが通っていないと。

以下のコマンドを打ちます

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

Xcode.appまでのパスは、実際の自分のmac環境でXcodeの配置している場所に合わせて変えてください
自分の場合、複数のXcodeを常時インストールしており、ファイル名にバージョンを書き足して"Xcode.9.0.app"とかにしているため、パスが通らなくて死んでいました。

_natsu_no_yuki_
ゲームとバックエンドと
unity-game-dev-guild
趣味・仕事問わずUnityでゲームを作っている開発者のみで構成されるオンラインコミュニティです。Unityでゲームを開発・運用するにあたって必要なあらゆる知見を共有することを目的とします。
https://unity-game-dev-guild.github.io/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away