Re: Can iPhone use AppKit? SYNC Killer?
Re: Can iPhone use AppKit? SYNC Killer?
- Subject: Re: Can iPhone use AppKit? SYNC Killer?
- From: Luke the Hiesterman <email@hidden>
- Date: Tue, 10 Mar 2009 10:37:42 -0700
Sorry to say, but the answer is, quite simply, no. AppKit provides the
UI elements for OS X on the desktop, and simply does not exist on the
iPhone. If you want to port your application to iPhone, you need to
find design a UI in UIKit, and remove AppKit.framework from the project
Luke
On Mar 10, 2009, at 9:14 AM, Dee Ayy wrote:
Please don't just say, "No" before you read my post.
I haven't touched Objective-C in over a year (when I had first touched
it for about a week). I got NSSpeechSynthesizer and Vicki on my Mac
Book Pro to work with an audible "Hello World". Then I tried to get
that compiled for the iPhone Simulator. I was unsuccessful to even
build, so at this point I thought iPhone was limited to UIKit and I
went back to my non-Objective-C project which the iPhone keynote had
compellingly interrupted.
Now that my cell phone contract has expired, I'm reconsidering getting
an iPhone and actually got code with NSSpeechSynthesizer to
compile/build after watching some Getting Started Videos and reading
http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ApplicationEnvironment/chapter_3_section_4.html
and in my iPhone project "MyApp" in Xcode, setting:
Project | Edit Active Target "MyApp"
Select the General tab
Under Linked Libraries, click +
AppKit.framework is not listed, but click the "Add Other..." button.
Navigate to /System/Library/Frameworks/AppKit.frameowork and click
Add.
A dialog opens with various options to Copy items into destination
group's folders, and select a Reference Type, etc.
Every combination I tried caused the iPhone Simulator to crash MyApp
but not crash the simulator. Is there some combination that will
allow MyApp to run on the simulator, and of course on an
iPhone/iPod-Touch? It seems that something just needs to be copied
over to the iPhone(Simulator), which this iNewbie does not know how to
do.
In MyApp's Delegate.m, below
#import "RootViewController.h", I added
#import <AppKit/NSSpeechSynthesizer.h>
In applicationDidFinishLaunching, below
[window makeKeyAndVisible];, I added
NSSpeechSynthesizer * mySS = [[NSSpeechSynthesizer alloc] init];
[mySS startSpeakingString:@"Hello World"];
[mySS release];
And to my surprise, it Builds!
However, if I Build and Go, I get:
The application MyApp quit unexpectedly
...
Ignore Report... Relaunch
Google seems to report that other OS's actually can develop for the
iPhone, but would seem to violate the Apple iPhone Developer
Agreement. When I first read the agreement, I thought AppKit may
qualify as a forbidden "external framework", since it is not UIKit.
But the "Linked Libraries" list and the "Add Other..." button just
makes me think I'm missing the correct Apple sanctioned way to do
this.
Just this one framework seems like a Microsoft SYNC killer to me (with
a mere 2 classes NSSpeechRecognizer and NSSpeechSynthesizer).
Please advise.
Regards.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@apple.com
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