While the answer "No" is strictly correct, you may find the following workaround helpful until Unity3.0 unifies the iPhone and non-iPhone versions.
In your .js file, instead of writing "#if(UNITY_IPHONE)" and "#endif" you can hide it in a multi-line comment like by writing this: "/*#if(UNITY_IPHONE)" and "#endif*/" your code will be hidden while working in your non-iphone version of the project.
After you do a fresh checkout of your project and are ready to try it in the iphone version of unity, run this python script:
It seems like like python or bash is the right tool here; a C# editor script wouldn't be able to run until after all your unity stuff could compile, which is what this script is supposed to make happen!
answered Apr 23 '10 at 06:22 PM
No. Sorry. We'll note this down as a feature request
answered Oct 20 '09 at 10:27 PM
Lucas Meijer 1 ♦♦