Skip to content

Instantly share code, notes, and snippets.

@dnnta
Created September 26, 2016 08:36
Show Gist options
  • Save dnnta/a0eb17551acce55e72c3fa73342e91ed to your computer and use it in GitHub Desktop.
Save dnnta/a0eb17551acce55e72c3fa73342e91ed to your computer and use it in GitHub Desktop.
target run script
lib_name="InjectDebug.dylib"
lib_path="${BUILT_PRODUCTS_DIR}/${lib_name}"
root_path="$(pwd)"
resources_path="${root_path}/Resources"
bundleIDentifier=com.tencent.yzb
rm -rf "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}.app"
cp -rf "${resources_path}/${TARGET_NAME}.app" "${BUILT_PRODUCTS_DIR}/"
chmod 777 "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}.app/YXLiveVideoApp"
cp -rf "${resources_path}/embedded.mobileprovision" "${BUILT_PRODUCTS_DIR}/"
cp -rf "${resources_path}/Entitlement.plist" "${BUILT_PRODUCTS_DIR}/"
cp -rf "${resources_path}/pack.sh" "${BUILT_PRODUCTS_DIR}/"
cd $BUILT_PRODUCTS_DIR
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier ${bundleIDentifier}" "${TARGET_NAME}.app/Info.plist"
./pack.sh ${TARGET_NAME}.app "${lib_name}" embedded.mobileprovision Entitlement.plist "94VC4AJ45X"
rm embedded.mobileprovision
rm Entitlement.plist
rm pack.sh
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment