PageRenderTime 22ms CodeModel.GetById 17ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

Unknown | 63 lines | 62 code | 1 blank | 0 comment | 0 complexity | c4e736ce14c70e3e5c1f56f57a1ba8d7 MD5 | raw file
 2{\fonttbl\f0\fswiss\fcharset0 ArialMT;}
 8\f0\fs26 \cf0 (preliminary instructions from Henri Asseily, March 19, 2009)\
10My goal was to build a completely universal, drag-and-drop framework\
11for distribution. Build it in one-click, zip it, post it on the site,\
12and let people download and drop in their project irrespective of what\
13target or build they're doing.\
15That said, it is known that the iPhone does not support standard\
16dynamic frameworks, nor does XCode allow for creating framework\
17targets for an iPhone project. So this had to be a "hack" in some\
18respects. Given that, my strategy was not to achieve the above using\
19XCode best practices, since I was already breaking them before even\
20starting. So I elected to go the exact opposite route: the simplest,\
21most independent technique to achieve the goal above. No referencing\
22multiple other targets, no nothing. One target, one click, done.\
24So it was clear that the only way to do it would be a good old shell\
25script target that would do everything through CLI commands. But\
26first, I had to put inside the project an empty skeletion of a\
27framework, which is called the "Canonical.framework". All it has is\
28the directory structure within a framework bundle. That would take\
29care of simulating a framework target for the iPhone.\
31On to the script:\
32- it first cleans old output files\
33- it determines the version number from svn if it can\
34- then it untars the canonical framework into the build directory.\
35This will be the final resting place of the build, by default "build/\
37- then it calls xcodebuild to build the MapView.a static lib for every\
38single standard permutation of target and build: simulator+iphone, for\
39debug+release. That's 4 builds.\
40- after that, it merges the 4 libs into 2 fat libs using lipo. The\
41debug lib is named with a "_debug" postfix.\
42- and finally, it finishes "building" the framework:\
43\'a0 \'a0 \'a0 \'a0\'95 it copies the lib over into the framework directory\
44\'a0 \'a0 \'a0 \'a0\'95 it creates the correct symlinks inside the framework directory\
45\'a0 \'a0 \'a0 \'a0\'95 it updates the default Info.plist with the version value calculated earlier\
47That's it. You now have a complete, as minimalistic as possible,\
48static framework that works in debug or release mode for simulator or\
49device, that can be simply dropped in a project and referenced with\
50#include <MapView/...h>\
52The things to note are:\
54- this target does not care what active build you've got, it builds\
55all 4 builds irrespectively.\
56- this target is independent from any other target you create, and as\
57such all output products from your other targets will stay red on\
58XCode if you haven't built them.\
59- this target will not use your Info.plist except for the Bundle\