Instrumenting tvOS apps

Use CocoaPods to instrument an Apple TV application in a few easy steps. At this point you should have a working Apple TV device in your Suitest account.


Instrumenting Apple TV apps written in Swift

  1. Include the Suitest instrumentation library for Apple TV by adding a dependency to your Podfile:

    target 'Target' do
        pod 'Suitest'
    end
    

    Check the official Podfile guide for more information about using the Podfile.

  2. Add SuitestLauncher.instance.start() to your AppDelegate file. The final result should look like the following:

    import Suitest
    func applicationDidBecomeActive(_ application: UIApplication) {
        SuitestLauncher.instance.start()
    }
    

Instrumenting Apple TV apps written in Objective-C

  1. Include the Suitest instrumentation library for Apple TV by adding a dependency to your Podfile:

    target 'DevelopmentTarget' do
        pod 'Suitest'
    end
    
    # Suitest instrumentation library is written in *Swift*, so the Objective-C
    # compiler may complain about not knowing the Swift version.
    # The below makes the compiler happy.
    
    post_install do |installer|
        installer.pods_project.targets.each do |target|
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '4.0'
            end
        end
    end
    

    Check the official Podfile guide for more information about using the Podfile.

  2. Add [[SuitestLauncher instance] start] to your AppDelegate file. The final result should look approximately like so:

    #import <Suitest/Suitest-Swift.h>
    - (void)applicationDidBecomeActive:(UIApplication *)application {
    [[SuitestLauncher instance] start];
    }
    

Uploading package to Suitest

After you have instrumented the code create a development build of your app and upload it at the Suitest configuration (Settings tab) page. Suitest will automatically install or update the package on the device as necessary when you try running the app.

If you use Suitest Network API you can also send the package with an API request. Suitest will automatically install or update the package on the device as necessary when you try running the app on this device.

App package signing

According to Apple code signing guidelines the app package must be signed with a certificate allowing it to run on a particular device. You should make sure that this has been followed before you attempt to run the app through Suitest on your device. Suitest does not attempt to sign the app.

Important: Make sure you are correctly logged into Xcode with your developer account, to avoid code signing issues. Check how to login into Xcode.

Before uploading to the App Store

Suitest is intended for testing environment, however, it can be uploaded to the Apple App Store if you decide to do so at your own risk. The instrumentation library is in an inactive state until it is opened or ran through Suitest.

If you decide to upload your application to the App Store and wish to test your live application, make sure that the package uploaded to the App Store is also the package uploaded to your Suitest configuration. If Suitest finds that the current running app on the device (from the App Store) is a different version to what is in the configuration, it will automatically install and run the application package from the configuration you have currently selected.