Requirements

Apple Environment

In order to develop or debug your app, you’ll need a Mac.

You need to install:

PlatformSettings

For that, you can create a ticket in this section

The app runtime is written in Swift and the renderer engine is based on UIKit.

All the info related to Xcode environment can be found here.

Support versions.

Developer mode

In order to develop or publish debug application on your Apple TV or iPhone, you’ll need to set the device in developer mode.

Fresh new device

If the dev mode has never been activated on your device, you must follow this guide.

You can pair with Apple TV through the following steps:

  • Go to window on Xcode menu bar
  • Click devices and simulators
  • Go to Remote App and Devices on Apple TV & select it
  • In the discovered tap area click my Apple TV
  • Select Pair
  • Enter code being displayed on Apple TV
  • Wait for device to be available for development

An Apple account is needed, IT Team can provide you one

Setup your configuration of aws for tvos

In your .bashrc (or .zshrc)

export CODEARTIFACT_INTERNAL_PROFILE=name_of_aws_profile_with_access_on_internal_repositories

The first time you want to launch on AppleTV:

mkdir -p "${HOME}/Library/org.swift.swiftpm/configuration"
mkdir -p "${HOME}/.swiftpm"
if [ ! -L "${HOME}/.swiftpm/configuration" ]
then
  ln -s "${HOME}/Library/org.swift.swiftpm/configuration" "${HOME}/.swiftpm/"
fi

When your token has expired (every 12 hours):

PROFILE={YOUR-ACCOUNT-NAME}
DOMAIN=dana
DOMAIN_OWNER=733912940672
REPOSITORY={YOUR_REPOSITORY}
aws sso login --profile "SSO_${PROFILE}"
CODEARTIFACT_AUTH_TOKEN=$(aws codeartifact get-authorization-token --domain "${DOMAIN}" --domain-owner "${DOMAIN_OWNER}" --region eu-central-1 --query authorizationToken --output text --profile "${PROFILE}")
SWIFTPM_CONFIGURATION_REGISTRIES_JSON="{\"authentication\": {\"${DOMAIN}-${DOMAIN_OWNER}.d.codeartifact.eu-central-1.amazonaws.com\": {\"loginAPIPath\": \"/swift/${REPOSITORY}/login\", \"type\": \"token\"}}, \"registries\": {\"${DOMAIN}\": {\"supportsAvailability\": false, \"url\": \"https://${DOMAIN}-${DOMAIN_OWNER}.d.codeartifact.eu-central-1.amazonaws.com/swift/${REPOSITORY}/\"}}, \"version\": 1}"
security add-internet-password -a token -l "${DOMAIN}-${DOMAIN_OWNER}.d.codeartifact.eu-central-1.amazonaws.com" -r htps -s "${DOMAIN}-${DOMAIN_OWNER}.d.codeartifact.eu-central-1.amazonaws.com" -U -A -w "${CODEARTIFACT_AUTH_TOKEN}"
echo "${SWIFTPM_CONFIGURATION_REGISTRIES_JSON}" | jq > ~/.swiftpm/configuration/registries.json

Caution

You need to replace with appropriate values

  • {YOUR-ACCOUNT-NAME}
  • {YOUR_REPOSITORY}