Re: Which SDK is recommended when doing both Mac and iPhone development?
Re: Which SDK is recommended when doing both Mac and iPhone development?
- Subject: Re: Which SDK is recommended when doing both Mac and iPhone development?
- From: Jean-Daniel Dupas <email@hidden>
- Date: Thu, 11 Dec 2008 09:32:37 +0100
Le 11 déc. 08 à 00:16, Jeff Laing a écrit :
I said:
This is most annoying when its common things like [NSString
isEqualTo:]
It strikes me that Xcode, compiling for the simulator, really
should be
limiting itself to whats available on the actual operating system
that
it knows its targetting...
Chris Espinosa [mailto:email@hidden] replied:
The problem is that when building for the Simulator, the actual
operating
system it's targeting is the Simulator, which is a hybrid of iPhone
frameworks
layered on top of Mac OS X base frameworks. You really truly are
executing
Mac OS X's Foundation, CFNetwork, kernel, etc. when running in the
Simulator, and Xcode is behaving exactly correctly.
The point is that the simulator is not the iPhone OS
I'd agree with that if XCode didn't ask me, question 1, whether I
was building
an iPhoneOS project or a MacOS project. But that's the very first
choice it
requires you to make.
The fact that the Simulator SDK contains methods that are not
present on iPhoneOS
looks like a poor design choice to me. Its not a bug because it was
designed
that way. That doesn't mean that the design is sensible.
Note, I'm just annoyed by this because I had knocked together a
quick app, to
prove to myself that I could do it, multi-hundreds of lines of code,
got it
working just fine in the Simulator, went to do a Device build and
discovered
that about half the things I was depending on just weren't there,
from the
simple [NSString isEqualTo:] to the complex [NSTask ...].
isEqualTo: is a method introduced by foundation to support
scriptability. You should never use it to compare objects.
And as AppleScript is not present on the iPhone, there is absolutely
no reason to find it.
NSString implements both isEqual: (which is the proper way to compare
NSObject)
and isEqualToString: which is a specialized compare function that you
can use if you know that you have two strings.
I understand *why* those things aren't present on the device, no
problem. And
I understand why they are *available* in the simulator
*environment*. But I
don't think its sensible for them to be present in the simulator SDK.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden