Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

UI Testing Issues

Hi everyone,

I've been working on an iOS app for about a year and a half. That application comes with unit and UI automated testings. Recently I started the development of the tvOS application so I added a new target and used the same bundle id as I want to eventually share purchases.

What I need

I'm working on an application that uses VLC (Need to play media more exotic than MP4) through these two pods

  • pod 'MobileVLCKit', '3.6.0' (Only for iOS)
  • pod 'TVVLCKit', '3.6.0' (Only for tvOS)

What works

  1. Compilation works fine for both targets
  2. Unit tests work fine for both targets
  3. UI tests work fine ONLY for the original iOS target

What doesn't work and how it fails

When I launch the UI tests for the tvOS target, the compilation succeeds, but I get an error when calling app.launch() from my XCTestCase.

Failed to get launch progress for <XCUIApplicationImpl: 0x600000c61e90 abergia.com.iptv at ...AppPath...>: App installation failed: Unable to Install “...AppName...”. This app is not made for this device. This app was not built to support this device family; app is compatible with ( 1, 2 ) but this device supports ( 3 ). (Underlying Error: Unable to Install “...AppName...”. This app is not made for this device. This app was not built to support this device family; app is compatible with ( 1, 2 ) but this device supports ( 3 ).

What I tried

Single target - Both Pods

It looks like I can 'cheat' a little the system and make the Xcode target compatible with both iOS and tvO, but when declaring both pods inside the same CocoaPod target, the installation fails as one of the library is not compatible.

Use a newer version of VLC (4.0.0)

Works BUT that version is way too unstable, I will eventually use it again once they fix all the issues.

Different Bundle ID

Changing the bundle id of the tvOS application resolves the issue BUT I really want to use the same bundle id to share the purchases.

Not UI testing the tvOS version

It's an option I'm starting to contemplate out of frustration but I'm sure that we have people here who can help me!

Shoot, I forgot to mention that I currently have two targets, and they share 99% of the code. The places that reference VLC conditionally use the libraries depending on the platform.

#if os(iOS)
import MobileVLCKit
#elseif os(tvOS)
import TVVLCKit
#endif
UI Testing Issues
 
 
Q