Building the production version
When code development is complete, create the production version for final testing and submission to the Apple Store.
Unzip the opy-sdk-ios-fps-5.1.x-production.zip or opy-sdk-tvos-fps-5.1.x-production.zip file and extract the OPYSDKFPS.framework or OPYSDKFPSTv.framework file.
In Xcode, replace the existing (integration) framework file with the production version above.
Build and run the application as before.
Removing simulator support
FPS encrypted playback is not supported in the simulator
The Player SDK is built with simulator support to enable you 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.
To remove any unsupported simulator architectures:
Open the Build Phases tab for your application’s target.
Add a Run Script build phase with the + icon.
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.
BASH#!/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