ios - Why won't my build phase scripts be executed when creating an IPA from command line? -


question - short version:

why won't build phase scripts executed when creating ipa command line? when i'm running xcodebuild create ipa predefined build phase scripts not executed. why that?


question - lengthy version:

i have workspace scheme want create ipa out of command line.

this works fine except 1 thing; have 2 scripts in build phases of target used put correct app version (cfbundleshortversionstring) , correct svn revision number (cfbundleversion). these scripts works fine when archiving xcode reason not run when archiving command line. first of why that?

here scripts working (if archiving form xcode) enter image description here enter image description here

when archiving , creating ipa command line (the essentials)

# building xcodebuild archs="armv7 armv7s" only_active_arch=no -workspace myworkspace.xcworkspace/ -scheme myscheme configuration_build_dir=${project_build_dir} -configuration release clean build  # creating ipa /usr/bin/xcrun -sdk iphoneos packageapplication -v "${project_build_dir}/${application_name}.app" -o "${ipa_output_path}/${application_name}.ipa" 

it works , creates ipa none of build phase scripts gets executed leaving both revision number , version number untouched.

all suggestions appreciated!

update due bdash's answer

instead of making clean build make install as

xcodebuild install archs="armv7 armv7s" only_active_arch=no -workspace myworkspace.xcworkspace/ -scheme myscheme configuration_build_dir=${project_build_dir} -configuration release 

the predefined script in fact executed (can seen in project version number) no errors during install. created ipa have size of ~300 bytes (instead of ~10mb) , cannot installed on device.

building app before installing it, i.e.

# building xcodebuild clean build archs="armv7 armv7s" only_active_arch=no -workspace myworkspace.xcworkspace/ -scheme myscheme configuration_build_dir=${project_build_dir} -configuration release  # installing xcodebuild install archs="armv7 armv7s" only_active_arch=no -workspace myworkspace.xcworkspace/ -scheme myscheme configuration_build_dir=${project_build_dir} -configuration release 

and creating ipa result in ipa executed version script , of correct size but not possible installing on device. trying put on device give error message saying
"the program "myapp" not installed on iphone device "my device" because unknown error has occurred."

you have "run script when installing" checked @ least 1 of script phases. phase won't run when using build action xcodebuild, if using install action.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -