facebook twitter hatena line email

「Fastlane/セットアップ/ios」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(fastlane用設定追加)
(appleでfastlane用アプリパスを生成)
行67: 行67:
  
 
==appleでfastlane用アプリパスを生成==
 
==appleでfastlane用アプリパスを生成==
https://appleid.apple.com/account/manage
+
# https://appleid.apple.com/account/manage
 +
# アプリ用パスワード
 +
# アプリ名は、fastlaneとし、パスワードを生成する
 
  axxx-xxxx-xxxx-xxxx
 
  axxx-xxxx-xxxx-xxxx
  

2023年8月31日 (木) 11:58時点における版

iosでのセットアップ

Unity-iPhone.xcworkspaceがある場所に移動してから

$ fastlane init
 What would you like to use fastlane for?
1. 📸  Automate screenshots
2. 👩‍✈️  Automate beta distribution to TestFlight
3. 🚀  Automate App Store distribution
4. 🛠  Manual setup - manually setup your project to automate your tasks

とりあえずTestFlightの自動化で、2を選択

Apple ID Username:
Password: ********
Please enter the 6 digit code:

Apple IDや6codeなどを入れる

Multiple App Store Connect teams
1) "hoge inc" (122xxxxxx)
2) "hogetaro" (118xxxxxx)
Multiple teams found on the Developer Portal, please enter the number of the team you want to use:
1) Nxxxxxxxxx "hoge inc" (Company/Organization)
2) 8xxxxxxxxx "hogetaro" (Individual)

teamsが複数あるときは、設定したいteamを選択

TestFlightへのベータ版配布を自動化

$ fastlane init
 What would you like to use fastlane for?
1. 📸  Automate screenshots
2. 👩‍✈️  Automate beta distribution to TestFlight
3. 🚀  Automate App Store distribution
4. 🛠  Manual setup - manually setup your project to automate your tasks

2を選択

出力ファイル

fastlane/Appfile

app_identifier("com.example.xxxxx) # The bundle identifier of your app
apple_id("hogexxxx@example.com") # Your Apple Developer Portal username

itc_team_id("118xxxxxxxx") # App Store Connect Team ID
team_id("8xxxxxxxxxxxx") # Developer Portal Team ID

↑データはフィルタリングしてある

fastlane/Fastfile

default_platform(:ios)

platform :ios do
  desc "Push a new beta build to TestFlight"
  lane :beta do
    increment_build_number(xcodeproj: "Unity-iPhone.xcodeproj")
    build_app(workspace: "Unity-iPhone.xcworkspace", scheme: "Unity-iPhone")
    upload_to_testflight
  end
end

appleでfastlane用アプリパスを生成

  1. https://appleid.apple.com/account/manage
  2. アプリ用パスワード
  3. アプリ名は、fastlaneとし、パスワードを生成する
axxx-xxxx-xxxx-xxxx

fastlane用設定追加

.env.default

FASTLANE_USER=hogehoge@exampl.com(appleのid)
FASTLANE_PASSWORD=(appleのパス)
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD=axxx-xxxx-xxxx-xxxx