Загрузка в TestFlight с использованием проблемы FastlaneIOS

Программируем под IOS
Ответить
Anonymous
 Загрузка в TestFlight с использованием проблемы Fastlane

Сообщение Anonymous »

В продолжение этого вопроса

При попытке загрузки в TestFlight я постоянно получаю следующую ошибку: (помните, что ключ действительно правильный)
[08:17:35]: Called from Fastfile at line 30
[08:17:35]: ```
[08:17:35]: 28:
[08:17:35]: 29: # Upload the build to TestFlight
[08:17:35]: => 30: pilot( api_key_path: "fastlane/api.json" )
[08:17:35]: 31: end
[08:17:35]: 32: end
[08:17:35]: ```
[08:17:35]: Authentication credentials are missing or invalid. - Provide a properly configured and signed bearer token, and make sure that it has not expired. Learn more about Generating Tokens for API Requests

мой формат json такой (не забывайте, что для каждой строки закрытого ключа используется несколько символов \n):
{
"key_id": "my_key_id",
"issuer_id": "my_issuer_id",
"key": "-----BEGIN PRIVATE KEY-----\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHknlhdlYdLu\nAgEGCCqGSM49AwEHBHknlhdlYdLu\nAgEGCCqGSM49AwEHBHknlhdlYdLu\n-----END PRIVATE KEY-----",
"duration": 1200,
"in_house": false
}

и я предоставляю приведенный выше api.json в fastfile:
pilot( api_key_path: "fastlane/api.json" )
Yml-файл рабочего процесса:
name: iOS Build and Upload to TestFlight

on:
workflow_dispatch:

jobs:
build-ios:
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'

# Install Bundler and CocoaPods
- name: Install Bundler and CocoaPods
run: |
gem install bundler
sudo gem install cocoapods

- name: Install Node.js dependencies
run: npm install

- name: Navigate to iOS directory, clean Pods, and remove Podfile.lock
run: |
cd ios
pod deintegrate
rm -rf Podfile.lock
npx pod-install

- name: Install Fastlane dependencies
run: |
cd ios
bundle install

- name: Decode and set up iOS certificate
run: |
echo "${{ secrets.IOS_DISTRIBUTION_CREDENTIALS }}" | base64 --decode > ios_distribution.p12
echo "${{ secrets.PROVISIONING_PROFILE }}" | base64 --decode > provisioning.mobileprovision
shell: bash

- name: Import certificate to keychain
run: |
security create-keychain -p "" build.keychain
security import ios_distribution.p12 -k build.keychain -P "${{ secrets.P12_PASSWORD }}" -T /usr/bin/codesign
security set-keychain-settings build.keychain
security unlock-keychain -p "" build.keychain
security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain
security list-keychains -d user -s build.keychain $(security list-keychains -d user | tr -d '"')
security list-keychains -s build.keychain
shell: bash

- name: Set provisioning profile
run: |
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp provisioning.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/
shell: bash

- name: Build and upload to TestFlight
run: |
cd ios
bundle exec fastlane beta

Быстрый файл:
default_platform(:ios)

platform :ios do
desc "Push a new beta build to TestFlight"
lane :beta do
# Increment build number automatically
increment_build_number(
xcodeproj: "someapp.xcodeproj"
)

# Build the app using your specific workspace and scheme
build_app(
workspace: "someapp.xcworkspace",
scheme: "someappQA",
export_method: "app-store",
export_options: {
provisioningProfiles: {
"com.someapp.app.qa" => "com.someapp.app.qa"
}
}
)

# Upload the build to TestFlight
upload_to_testflight( api_key_path: "fastlane/api.json" )
end
end


Подробнее здесь: https://stackoverflow.com/questions/791 ... lane-issue
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «IOS»