OpenTV Player SDK for iOS and tvOS Simulator Support

Note only clear stream playback is possible within the simulator.

Simulator support

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

iOS

iOS

tvOS

tvOS

Removing simulator support

Upload to the AppStore will be blocked since your app's archive contains the SDK framework that contains unsupported simulator architectures.

There may be other reasons why the upload is rejected.

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

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

Note the Run Script step must be placed after Embed Frameworks.

  • 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