diff --git a/ios/script/build b/ios/script/build index 19a8bf84c0..c4dde85837 100755 --- a/ios/script/build +++ b/ios/script/build @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e @@ -9,11 +9,17 @@ rm -rf build xcodebuild -verbose -sdk iphoneos -configuration Release -if ! $nocodesign ; then - codesign -fs "$CODE_SIGN_IDENTITY" "$BUILD_PATH/RetroArch.app/modules/*.dylib" +if [ -z "$NOCODESIGN" ] ; then + echo "CODESIGNING DYNAMIC LIBRARIES AND BUILDING IPA" + + for file in $(find "$BUILD_PATH/RetroArch.app/modules/" -name "*.dylib") ; do + codesign -fs "$CODE_SIGN_IDENTITY" "$file" + done + xcrun -sdk iphoneos PackageApplication "$BUILD_PATH/RetroArch.app" -o "$BUILD_PATH/RetroArch.ipa" --sign "$CODE_SIGN_IDENTITY" --embed "$PROVISIONING" +else + echo "Building for Jailbroken system" fi - echo "######### RetroArch build Complete!! #########" echo "You can find the resulting app in the $BUILD_PATH directory.\n"