Simulator support

The Player SDK is built with simulator support to allow integrators to build and test against an Xcode simulator.

Upload to the AppStore will be blocked if your application's archive contains the SDK framework that contains unsupported simulator architectures. This means that they will need to be stripped out from any version destined for the App Store.

There may be other reasons why the upload is rejected.

The SDK can be tested during integration on the simulator allowing the behaviour and layout across a wide range of devices to be validated.

FPS encrypted playback is not supported in the simulator

iOS

iOS

tvOS

tvOS

Removing simulator support

To remove any unsupported simulator architectures:

  1. Open the Build Phases tab for your application's target.

  2. Add a Run Script build phase with the + icon.

    The Run Script step must be placed after Embed Frameworks.

  3. Copy and paste the following script, which strips the simulator support from the SDK framework, into the relevant section:

    #!/bin/sh
    APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
    find "$APP_PATH" -name 'OPYSDKFPS*.framework' -type d | while read -r FRAMEWORK
    do
     FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
     FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
     echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
     EXTRACTED_ARCHS=()
     DESIRED_ARCHS="arm64"
     lipo -info "$FRAMEWORK_EXECUTABLE_PATH"
     for ARCH in $DESIRED_ARCHS
     do
       echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
       lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
       EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
     done
     echo "Merging extracted architectures: ${DESIRED_ARCHS}"
     lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
     rm "${EXTRACTED_ARCHS[@]}"
     echo "Replacing original"
     rm "$FRAMEWORK_EXECUTABLE_PATH"
     mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
     lipo -info "$FRAMEWORK_EXECUTABLE_PATH"
    done
    

Example