Cardinal Mobile SDK comes with both device and simulator architectures in it, so merchants can develop, test their application in both simulator and device. Unfortunately, AppStore does not allow publishing applications with simulator architectures in it. To publish the app into AppStore developer must remove unused(simulator) architectures from binary, to achieve this add below run script at the end in your build phases.
Note: This is only applicable if when using CardinalMobile.framework (universal binary) Code Block |
---|
language | applescript |
---|
title | Remove Simulator Architectures |
---|
| FRAMEWORK_NAME="CardinalMobile"
find "$PROJECT_DIR" -name '*.framework' -type d | while read -r FRAMEWORK
do
PATH_COUNT=$(echo "$FRAMEWORK/" | grep -o '/' | wc -l)
FILE_NAME=$(echo $FRAMEWORK | cut -d '/' -f $PATH_COUNT | cut -d '.' -f 1)
EXECUTE_FILE="$FRAMEWORK/$FILE_NAME"
if [[ "$EXECUTE_FILE" == *"$FRAMEWORK_NAME"* ]]; then
echo "Executable framework $EXECUTE_FILE"
if $(lipo "$FRAMEWORK/$FILE_NAME" -verify_arch x86_64); then
lipo -remove x86_64 $EXECUTE_FILE -o $EXECUTE_FILE
lipo -info $EXECUTE_FILE
fi
if $(lipo "$FRAMEWORK/$FILE_NAME" -verify_arch i386); then
lipo -remove i386 $EXECUTE_FILE -o $EXECUTE_FILE
lipo -info $EXECUTE_FILE
fi
fi
done |
|