-
Notifications
You must be signed in to change notification settings - Fork 0
Install and run tvOS project on AppleTV using Xcode
- Xcode
- Apple Developer Account (should enable with "Certificates, Identifiers & Profiles")
- GBAuth
This requires you to log into https://developer.apple.com with your Apple Developer account, and provide/ensure following development/debug details are present.
Debug/install to device(AppleTV) requires the device UDID to be added in your Apple Developer Account.
To ensure you have your device UDID properly added, click on the "Devices" link from "Certificates, Identifiers & Profiles" category:
Devices is the list of the devices which you can use during your development/tests. With a standard subscription, one can add upto 13 devices at a time.
If you device is not already listed, you can add one by clicking on the +(plus-icon) button in the section with relevant details:
UDID unique device identifier of 40-digit hexa-decimal characters'. To get your AppleTV device UDID,
- Make sure your AppleTV is connected to your Mac using USB-C, and turned On
- Open Xcode
- Go to menu
Window > Devices and Simulators
If your device properly connected, Xcode should display it.
You can copy the Identifier
value from above window and create a new Device
at Apple Developer Account.
Identifiers
under "Certificates, Identifiers & Profiles" at Apple Developer Center is another area we need to ensure. This section holds all the app-identifiers (full or wild-card) that you can use during your development/debug tests, to a device.
You can add an app-identifier in wild-card way, i.e. com.mycompany.*
, or you can name it specifically, i.e. com.mycompany.myapp
.
SystemHealthAlerts-tvOS app uses net.prominic.SystemHealthAlerts
. You generally need not to adds this manually, but Xcode do it for you.
If you still see following error under Xcode project's "Signing & Capabilities" section, consider to check if you can add the identifier manually by going into Identifiers under "Certificates, Identifiers & Profiles" (a):
For now, let's move to the next section.
Open Finder and navigate to the SystemHealthAlerts-tvOS source directory.
Double-click on the SystemHealthAlerts.xcworkspace
file:
This should open you the project in Xcode.
Now we connect Xcode to your Apple Developer Account so Xcode can automatically retrieve necessary provisioning, identifiers from the website. To do that,
- Click on the menu
Xcode > Settings
- Go to
Accounts
tab - Click on
+
icon at bottom-left corner and choose "Apple ID" in opening popup
Follow the instruction and login to your Apple Developer Account to make Xcode connect and retrieve necessary details.
Once login complete, you should see the window updates with your login information, i.e.
Double-click on the Prominic.NET,Inc / Admin
entry, this should open you a new popup with available certificate details like this:
We're possibly good at this point. Close all the popup windows and go to the next section.
Make sure GBAuth is running and you have access to System Dashboard.
Back to Xcode, click on the root node of SystemHealthAlerts project in the sidebar. This shall open you the project's settings tab. Click on the "Signing & Capabilities" tab.
- Make sure
Automatically manage signing
option is selected - In the
Team
dropdown select your developer account that you connected earlier
If no error shown after the above steps, we're good to go. If you see an error like (a), you need to create an identifier as mentioned earlier.
At this point, we're ready to install/debug SystemHealthAlerts on the connected AppleTV device:
- Click on the area in Xcode's top-status-bar where the call-out creates, and choose your device under "tvOS Device" head
- You can also select any option under "tvOS Simulators" from the opening call-out, to run on your computer simulator
- Having your AppleTV device selected as output platform, go to menu
Product > Run
orCMD+R
If all's good, you'll eventually see the app installs and run/debug on your AppleTV.
To stop the build/run, click on the stop-icon or choose from menu Product > Stop
: