Xcode : Post build script suggestion about the info.plist


#1

- I want to place my Info.plist in a different position.

- To do that, I have to modify INFOPLIST_FILE in the build settings.

- In the post build script, info.plist is tweaked. But the script is failed because $INFOPLIST_FILE is now different path.

- I'd like to define 'infoplist_name'.

 

before

  cp -r "$original" "$VST"

  sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST/Contents/PkgInfo"

  sed -i "" -e 's/TDMw/BNDL/g' "$VST/Contents/$INFOPLIST_FILE"

after

  infoPlist_name=`basename "$INFOPLIST_FILE"`
  cp -r "$original" "$VST"

  sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST/Contents/PkgInfo"

  sed -i "" -e 's/TDMw/BNDL/g' "$VST/Contents/$infoPlist_name"