0
0
0xC0CAC01A2011-06-15 15:49:18
iPhone
0xC0CAC01A, 2011-06-15 15:49:18

Xcode and iPhone SDK version number in the path - how to live with it right?

I inherited a project that is built with a script containing paths like /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk
If the script is moved to a machine with a different version of the iPhone SDK, everything breaks.
I would like to understand how to correctly write such paths using an environment variable, but I can’t find any environment variables, it’s set | grep iPhoneOSsilent like a fish on ice.
It is possible to cut the Gordian Knot by writing a script that looks for installed versions and determines the correct path, but these are crutches. How to do it right?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
ertaquo, 2011-06-15
@ertaquo

Why not use something like
ls -1d /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk
to define the path?
I just don't know how it is in OS X

M
MikhailEdoshin, 2011-06-15
@MikhailEdoshin

As far as I understand, in a normal way this is set by the key gcc -miphoneos-version-mineither IPHONEOS_DEPLOYMENT_TARGETSee. man gcc:)

C
corristo, 2012-10-10
@corristo

xcode-select --print-path, then add the rest of the path, profit.
Hardcoding is bad, of course.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question