Matter TV Casting iOS App Example can be built with the latest Xcode releases.
Open the TvCastingDarwin.xcworkspace
file located in examples/tv-casting-app/darwin
with Xcode.
Then select the TvCasting
scheme at the top.
Running the TvCasting
scheme in Xcode (select the scheme and then hit the “play button” to “run” the scheme) will attempt to compile the application and then install it to the connected iOS device selected in the scheme.
Because we do not share a developer group, directly running this scheme will fail with missing signing configuration errors.
You need to update the Project configuration for TvCasting app to use your Personal Developer account and a unique Bundle ID.
Before you can run the TvCasting
scheme, you need to amend the project.pbxproj
file for the TvCasting app project. The file is located here examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj
.
You can choose to amend this file via Xcode directly or manually with any text editor. This Readme will focus on doing it via Xcode.
With the TvCastingDarwin.xcworkspace
loaded, you should see 1 project on the left side pane in Xcode. TvCasting
Selecting TvCasting
should bring up the project configuration view in Xcode. Next, select the Signing & Capabilities
tab.
Perform the following steps to enable building TvCasting app:
Ensure “Automatically manage signing” is checked
Select your Personal Team in the “Team” dropdown.
Change the bundle identifier from com.matter.TvCasting
to something unique, like com.matter.TvCasting-username
. These bundle IDs get reserved for a short amount of time and so it‘s best to use something only you might think of to avoid conflicts (you’ll see that the default bundle ID does not work if you skip this step).
Confirm that the Signing Certificate now says “Apple Development: ”
Now you can install TvCasting app to your connected iOS device by clicking on the “Play”/Run icon.
The first time you install this application to your iOS device, Xcode will not be able to launch it. This is because iOS prevents arbitrary developer apps from running prior to user consent. To give this application consent, navigate to Settings->General->VPN & Device Management
and give TvCasting app permission to run.
Now you can launch the application from the Home screen or from Xcode by hitting the run button once more.