How can I automate the creation of the source distribution for the iPhone application using Xcode?

I want to distribute an open source iPhone application, and I have a few questions about creating a source distribution:

  • How can I automate the creation of the source archive (or diskimage) using Xcode? I want something along the lines of the build target, which archives the source (first clean up the targets, but it would be nice if it weren’t). I also have an external netbeans project with a ruby ​​script that is used to create the SQL database that the program needs (but can make a separate archive if necessary).

  • What is the best way to identify the files that make up the "source"? Is that just all that is left after clearing all the targets? Any caveats with this approach (I don't completely trust the IDE to clear everything that they seem to be doing), and this may include any code notices that it shouldn't)?

+3
source share
4 answers

You can add Run Script Build Phase for any purpose to post-process the assembly. The correct approach, as a rule, is to create an Aggregate Target, which first creates the target model of the assembly product, and then runs the Script on the output.

"" . $(SRCROOT), Root → (src) (projfiles), $(SRCROOT) , . , script , .

, , , , , , , . " " "" " " - . .

Xcode , Snapshots; , . Snapshots .

+4

SRCROOT , , cd

xcodebuild installsrc build -configuration <configname> -target <targetname>

"installsrc" ${SRCROOT}.

+3

, , , make . :

Qt Xcode

... "make" .

0
source

Try the aggregate goal suggested to invoke the following script:

#! / bin / bash -x

cd "$ BUILT_PRODUCTS_DIR"

APPFILE = "$ PROJECT_NAME.app"

IPAFILE = "$ PROJECT_NAME.ipa"

if ["$ BUILD_STYLE" = "Distribution"]; then

rm -f "$APPFILE.zip" && zip -ry "$APPFILE.zip" "$APPFILE" && open .

elif ["$ BUILD_STYLE" = "BetaTesting"]; then

rm -rf "$IPAFILE" iTunesArtwork Payload && \
cp ../../Apple/iTunesArtwork . && \
mkdir Payload && cp -Rp "$APPFILE" Payload && \
zip -r "$IPAFILE" iTunesArtwork Payload && open .

c

Err, perhaps this is the answer to another question, though ...

0
source

All Articles