How hard is iPhone/iPad development - iphone

I've been developing for quite a while but while I consider myself competent (or better) with C++, Java, C# & AS3/Flex in areas from web-servers to desktop applications to 3D games, I'm aware all these languages are pretty similar; even on the libraries side I know what to look for based on using libraries that do similar things in another language.
But Objective C I understand to be a different kettle of fish, and developing for mobile devices has always struck me as likely to be hard work since you have to develop on your PC and test on the actual device itself - my experience developing for PS2 put me off such things due to poor debuggers and other tools.
What's the reality? Is it a paradigm shift to move from web-servers and desktop apps and rich web-clients to iPhone... or for an experienced developer is it just another language to learn and new libraries to play with? Is there anything to be scared about at all?
edit: My main question on Obj-C specifically was if it's a different way of programming, like it would be moving to Haskell from Java for instance. It sounds this is not the case.

For starters, ObjC is fairly easy to grasp so long as you focus on the fundamentals. Don't worry about the syntax, there's not much there above C which I will presume you already are familiar with. There are excellent books out there this book is the definitive guide I recommend to most new users, Erica Sadun also has a good book on iPhone development, I recommend both of these highly.
Secondly, the tools aren't hard to use, and you will be pleasantly surprised with the debugger and other tool integration. Instruments was a long time coming, but it's indispensable for catching things like memory leaks, cpu time usage, and now power consumption.
But really, nothing to be scared about, and as for another platform to learn; well, yes and no. There is always going to be another thing to learn, regardless of iPhone or something else. Don't resist. :)

There's definitely a "paradigm shift" (ugh, buzzwords):
You don't have all the memory in the world (and there's no swap either)
You don't have all the CPU time in the world
You probably don't want a binary bigger than about 20 MB (the size that can be downloaded over the cell network)
You can't just change the server backend to make things right.
Graphic design is important if you want to be successful (but you don't want to bloat your app)
Web requests take a while (a website with redirects feels really slow compared to the desktop beside it).
JavaScript animations are painfully slow (ever tried the Google Maps website on an iPhone?)
UI design is heavily constrained by the size of the user's finger (even though the iPhone 4 has a comparatively huge screen).
UI design is really tedious.
The user can do more things than clicking and typing.
I find that the biggest difference is in the UI, not in the language. Languages are easy. Libraries require a little reading/searching/asking around, but then they're easy. UI design and UI programming are very difficult to do well.

Objective C is different but not far removed from normal OO methods. The syntax was the larger barrier for me.
The problem I saw was/is you learn ObjC for iPhone, and you can't take the skill (ObjC knowledge) outside the Applesphere really. I haven't seen a use for it. I have a handful of books I went through to get my feet wet. Some of these, the Apress books, contained errors in the code walkthroughs causing me to Google the book errata countless times.. so be careful of that, if you learn that way.
Also, unless this has changed, you can only develop under OSX with the SDK tools because no Windows version exists to my knowledge.
With that, you also have to play by Apples development rules to get published into the AppStore, which has had its share of dev horror stories.
That said, a working app is fun and beautiful in the end.

On a scale of 1 to 10, it's about a 6.

Apple does use Objective C and it is different then normal C. So Iphone and IPad development can be hard if you've never used Objective-C before. If you are familiar at all with a language called SmallTalk, then Objective-C will be very easy for you to pick up.
Now other mobile devices, such as Android, uses Java. If you are competent in Java then Android development may be easier for you.
Some devices use Windows Mobile. If you are a .NET programmer, you can use .NET compact framework to develop Windows Mobile Apps.
Just so you know too, most mobile SDKs come with an emulator to test your app on. So if you don't have an iPhone, for example, you can still test your app with the emulator. I understand that the emulator is supposed to be 99% as accurate as an actual device

I don't think there's anything to be scared of.
The simulator's pretty alright, even if it can't handle some things - it's hard to simulate the accelerometer, for instance!
Once you're over the hurdle of figuring out what certs you need and setting up the iPhone development account and such, it's fine.
It's a bit of a pain writing something, loading it on the device, trying it out, etc., but the fact that you can actually debug the code running on the device makes it rather a lot nicer than it could be. (I had to maintain an application for the Nokia 9110, and there I had to edit, compile, load, run, crash blindly, stare at code, guess, edit, compile, etc.)

As a long time Windows C++ / .NET developer, I didn't find it very difficult to begin developing in Objective C.
There are some syntax differences that take some getting used to, but in general it similar enough to C/C++ to not feel like a completely new language.
Learning the library code and what you can and can't do easily seems like the larger challenge to me, which is going to be a challenge with any new platform.

I am writing a beginner book called Hello! iPhone, and I've made a mailing list of beginner tips to help people get started. After a week or so of tips, you'll be much more equipped to check out other books and understand the basics a bit better to judge.
http://loufranco.com/beginner-iphone-programming-tips/
It will take you through Hello, World and some other simple stuff (Outlets and Actions, basic memory management, etc).

Related

What is the best way to make apps portable across mobile platforms?

I am working on an app for Android, but would like to have it ported in the future to iPhone and (if it seems to gain significant market share in the future) WP7/8.
I know nothing about any mobile platform other than Android. Should I be using C++ (NDK), Java, or something else to get as much portability as possible? I assume I will have to rewrite (or have someone rewrite) at lest part of it, but I would like to make as much of the codebase as possible portable.
Edit: It is a simple app that "scans" a barcode (camera) or has the number typed in, sends some information to a server, gets back some more info (probably in XML, but could be whatever works best) and displays it in a few simple screens.
Edit 2: The 4 parts I have, and would like to ideally make them portable are:
Scan a barcode (probably the hardest to make portable)
Allow entering a barcode number manually
Send and receive some custom data
Display a few screens (This can be in HTML, if I have an option to make it look "native", not like the browser window displaying a webpage it is)
For a non-trivial app that isn't a game, there are currently no mature solutions to this problem.
Tools like Titanium Mobile and PhoneGap are meant to help you do exactly what you want, but impose limitations on what your app can do and are so far at the cutting edge of development that they often introduce bugs of their own that you won't be able to fix. Additionally, you're at their developer's mercy when it comes to support for alternative platforms like WP7 or Blackberry. In some cases, these might be worth the risk, or you may get lucky, but you need to be wary before rushing to use them.
Often, the best technique is still just to develop independent codesbases. You can model them after each other in architectural terms, and if you do so it isn't typically that hard to translate between different platforms.
Another technique to aid in portability for many apps is to use embedded web browsers where it makes sense. This allows you design some of your views in HTML/CSS/Javascript rather than with native UI tools, and then just load them into the aforementioned embedded web browsers on each platform.
Depends on how many platforms you are aiming for.
I have some experience doing iPhone + Android. Honestly, I wouldn't spend too much time trying to learn a portability tool on top. I have done couple of apps (simple communication stuff + a light weight game) and my experience is so far - assumed you are familiar with both - it is far faster + easier to just write your app and then port it.
Besides the normal coding work, the most difficult tasks are to develop the app structure including the main classes and data structures - this you can copy basically 1 to 1 in terms of structure of course - not code.
Also since you will keep getting updates on different platforms like iOS (Android + Eclipse are a little slower it seems to come up with updates/upgrades), which make life easier all the time, you would most probably have a big disadvantage when relying on someone elses portability development toolkit.
So far - certainly not to be taken as a general rule - while development on iPhone took 100%, porting it on Android took at most 30-40%
This question is way too broad, it depends on what kind of app you're doing.
Generally speaking, if you're just as good off doing a web app, do that. It'll work across different platforms.
MonoTouch / MonoDroid by Xamarin (previously owned by Novell) allow you to write C# (the language used by WP7) for iOS/Android, respectively. It is not free, however.
I don't believe the frameworks go so far as to include cross-platform UI, but I'd say that's probably a good thing. At least your application logic can remain the same across platforms.
I've not used the framework myself, so I cannot vouch for it.
We do use MonoTouch/MonoDroid and it helps us to simultaneously support WM/WP7/Android/iOS. The common denominator of all these platforms (after employing Xamarin products) is .Net.
The policy of our company is to maintain toolkits for all platforms that provide similar UI. Then the apps can be written in a nearly platform-agnostic way. This isn't, however, a general statement as the independency refers to the specific types of applications.
I don't advise using our toolkits for your case as it looks like an overkill. However, investing into C#/.Net might not be a bad idea.
U should definitely go with the easiest route: Java.
You will still have to rework a lot while porting, but if you were using NDK, the overhead for Android itself might be similar.
(In an average app. As you havent provided too much information about the project, the answer couldnt be more specific. If you are developing a performance-critical app, like a 3D game, you should consider NDK for the high porfile program parts).
Edit: for this scanning solution, I would go with Java on android and wont bother with portability. For a project with such a clean application logic it wont worth the effort to make it portable (except if the aim of the project is to experiment with application portability, but as far as I got it, it isnt).

Beginner path to Game Development for OS X and iPhone

Another question. I have been researching everything this wonderful community has offered me in terms of my journey to pursue game development.
I have come to the conclusion that I would prefer to develop on my native machine, OS X - eventually leading to the iPhone.
I already own both Big Nerd Ranch guide's, Iphone Programming - the Big Nerd Ranch Guide and Learn to Program on Mac OS X - the big Nerd Ranch Guide.
My goal that I am trying to shoot for is a game similar to Blizzard's Diablo II.
When going through these books, everything seemed a bit over my head due to lack of Objective-C experience (so I suspect).
What it the best beginner friendly way for me to reach my goals? I have been looking at Objective-C books for beginners from Apress and the like, or straight C books.
How would experienced developers such as yourself guide a newbie through this path?
Regards
edit -
To answer why I have picked the apple route, it just looks to be the most comfortable (environment is native to the machine). I may be very wrong though. I was looking at Unity, it supports C#, JavaScript and Boo. Others like Panda3D use Python. I am just not sure, it seems like the decision process has become rather challenging.
It depends on the kind of game you're making - but many of the top games on iPhone were created with an open-source framework called cocos2d. It is fabulous, simplifies everything, has great tutorials and is available specifically for the iPhone.
Check it out at:
http://www.cocos2d-iphone.org/
I would recommend you
a) learn the basics of C (especially memory management)
b) learn the basics of Objective-C
c) learn the iPhone SDK from a book (I liked "Beginning iPhone Development" and its 2nd volume)
d) pick any project you find interesting and that is not too challenging and just code. You will find that by the time you are done, you probably think the things you did first are horrible, but you will learn a lot in the process
e) visit Stackoverflow.com as often at possible, it has most of the answers to the questions you will have :)
If you're working on a Mac, then things get interesting.
The largest game markets by several orders of magnitude are consoles and Windows. If you're just targeting the iPhone and OSX, the Mac is ideal for development. However, this is a limited (Mac OS), VERY competitive (iPhone) market. If you want to make something that will become a real product with real sales, limiting yourself to OSX from the starting gate is probably a mistake.
If you're just starting out and want to learn what makes all this game crap tick, stick with the language and OS that you're most comfortable with. Introducing too many variables into a learning expedition is a significant ingredient in failure. One of the nice things about this sort of app is that the algorithms and techniques you'll pick up are inherently cross-platform. Matrices are matrices, whether you're working on a TI-89 or an Alienware desktop.
However, if this is the case, try and remain aware of what platform-specific widgets you're using in your code. Plan to throw this one away. Write a bunch of test apps. And, when you feel confident that you're ready to build something real, you'll be ready to break out a VM or a new desktop with Windows (I LOVE XNA), C++ with DirectX or OpenGL, or whatever, and the variables, the new material you have to learn, won't be about graphics or math or gameplay, but about the platform itself.
Writing "Hello, World!" is a lot easier if you're not figuring out what you're trying to say, but only how to say it.
Also, rather than aiming for a Blizzard clone, start with something dirt simple, like Pong. Then make 3D Pong. Then add gravity. Then collision detection. And so on.
Also check out gamedev.stackexchange.com when you have game dev-specific questions. It's a LOT lower-traffic than SO, and a lot of the participants are teenage fanboys, but there is good knowledge there ready to be tapped.
You can develop a small game for the iPhone quite quickly once you've mastered Objective C and the iOS APIs. It took me about 4 weeks to develop a small iPhone-only game with limited game logic. Here's a writeup of my experiences:
http://corrino-software.com/how_long_does_it_take_to_make_an_iphone_game
However, something like a Diablo-style game would be a massive project. As David says, you're better off starting with something smaller and more managable to begin with, then you can move up to larger projects once you're comfortable with the development process and familiar with the tools and libraries you'll need.
If I were you, I'd start out with C, learn the fundamentals of programming, algorithms, and memory allocation (incredibly important concept in C). Then, you can move up to reading some books on Objective-C and get an idea for object-oriented programming and higher-level concepts like dynamic typing, garbage collection, etc.
As for software, if you're on OS X you want to get XCode, which is an integrated development environment developed by Apple for developing for iOS and OS X. Apparently, it's a free download (though that's just what Apple says on their website, dunno, I don't have a Mac).
As for books, etc. I'd just get some straight C books and look at some tutorials. Read them from cover to cover, and pay special attention to the important (and frustrating) concepts of memory allocation and management and pointers.
I find that a good way to learn a new language is to start with replicating common command-line tools like wc, grep, ls, etc. This will teach you the basics of I/O (both file and stdin/stdout) and some basic string parsing, as well as other goodies here and there. Additionally, you have a deterministic method of determining whether your program does it right or not, since you can easily compare to the standard command's output or behavior.
K&R, as well as Programming in Objective-C 2.0, are good places to learn the basics of C and Objective-C.
Once you have the basics of the language down, start with basic GUI programs (the ones in Hillegass's book are a good start). Once you can hook a basic GUI on the front of some underlying logic, it's time to start thinking more seriously about your game. Hillegass's book has a basic intro to using NSOpenGLView, which you can use to manually draw in 2D and 3D. It's important to note that when going through the examples in any book, you'll want to thoroughly understand what they're doing and how they're doing it, enough so that you can make some modifications yourself to enhance/change the behavior of the sample program you're working with.
Once you understand the basics of how your underlying game logic can hook to something the user can see, it's time to go find a game/drawing library that will get you where you're going. You definitely don't want to write all of the graphics routines yourself for a game similar to Diablo.

Time to learn Objective-C/Cocoa for an Apple agnostic [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
This question is inevitably subjective, but I will ask anyway.
I'm a PC. I've always been a PC. I have very little Apple expertise, although I'm completely happy in *nix. I've plenty of experience with development, and consider that I am able to pick up new languages and concepts faster than most of my colleagues (although ML/F# still hurts me on a regular basis). I'm reasonably familiar with C++, although haven't touched it since the nineties, work on a daily basis, and 100% confident with C#, would consider myself advanced to expert with Java and have developed a reasonable amount of stuff in Lisp and Prolog back in the day.
We've had a recent request to develop an iPhone app, which sounds like quite an interesting proposition that we'd be quite interested in taking on. We have very little in-house experience with Apple platforms. Given our ignorance of most things Apple, little to no familiarity with OSX and the Apple UI paradigms and assuming we acquire the necessary hardware for development:
What one would need to learn?
How long would a good developer need to get up to speed?
Are there any non-obvious expenses that might arise from pursuing this route?
Once again, apologies for the subjective nature of this question. Many thanks.
It took me a couple months to feel comfortable with it; but that was only evenings/weekends. I came from a PC/VC background and had never owned a Mac.
Objective-C is OK, if a little unusual. There are the usual gotchas that you learn once and then don't do again. IMHO its easier to shoot yourself in the foot than C++, but it's not a big deal to switch. I think the bigger learning curve is XCode; it's certainly not a patch on Visual Studio, and can take a bit of getting your head around. That said, it is getting better with each release. One of the things that bugs me the most is the Mac keyboard vs the PC keyboard - particularly in the IDE - I keep jumping to the end of the file instead of the end of the line, etc. And then going back to PC you find save, etc. isn't the same key combination. It can get quite confusing.
The Mac & OS X is a breath of fresh air - wish I'd got one sooner. I bought an iMac 24 to get plenty of screen space. It's a lovely machine.
For Cocoa, I took the slightly unusual approach of starting with a Mac app before doing a phone app. I used the book 'Cocoa Programming for Max OS X' which gave me a good grounding. I then moved onto 'Beginning iPhone Development'. I think this approach worked well for me because the Mac OS is the bigger picture, and the iphone is a subset - it helped me get context on how things had been put together. I also bought several books on linux, mac internals, etc...whatever I needed to fill the gaps in my knowledge. I found I needed to get pretty comfortable with the Terminal, and read a book on the bash shell, and polished up my 'vim' usage. I also discovered 'git' along the way and haven't looked back.
For the phone itself, you really need a device, not just simulator; I've found several problems where the simulator didn't match the device (particularly if you intend to use OpenGL ES) - for that reason I'm going to test on iphone 3G/3GS & touch. Credit where it is due; all the differences I've found were problems in my code which needed repairing to make it look the same on simulator vs device. If you've done any device programming, it's probably the best device programming platform you've ever used - easy and stable, with good debugging.
I'd say the cost is one Mac + 2 iphones + ipod touch, and $200 worth of books... Haven't found any hidden costs...
There are a lot of questions here about getting started with Cocoa on the iPhone and Mac, listing many great resources:
"Getting Started With iPhone Development"
"Starting iPhone Development"
"Howto articles for iPhone development, Objective C"
"Are you doing iPhone development? How do you learn?"
"Best Cocoa/Mac OS X programming blogs?"
"Cocoa and Objective-C resources?"
"Good ways to Learn Cocoa?"
"Can anyone recommend a complete ObjC/Cocoa or Cocoa-Touch tutorial?"
"What are some of the best online resources for learning Objective-C?"
"Are there any Open-source iPhone applications around?"
From my own personal experience, it took me six months before I felt comfortable with Cocoa, but that was years ago when I was only tinkering with it part-time. Since then, we've moved all of our robotic control software to Cocoa and the Mac, so it's what I now do full-time. Adjusting to the iPhone was a pretty quick process, taking me three weeks of nights and weekends to produce my first application, which has been on the App Store since launch.
In addition to all the resources in the questions listed above, I highly recommend reading Apple's iPhone Human Interface Guidelines cover-to-cover. They don't provide hard-and-fast rules, but they do explain the overall UI design of the platform and the reasons behind why things are done the way they are. Also, make sure that you use the device yourself on a regular basis, so that you understand what does and does not work when interacting with the platform.
As a final resource, I also recommend paying the $299 for the WWDC 2009 iPhone Session Videos. They are well worth the money, particularly if you are just getting started on the platform.
Beyond the cost of an entry-level Mac (the Mini is a good choice, but the 13" MacBook Pros are a great value and can run Windows well), the $99 / year membership in the developer program (which you don't even need to pay until you want to install the application on a device or distribute it), and the cost of the books or videos listed above, the only hidden cost to worry about is time. I've spent a lot more time tinkering with the iPhone platform than I imagined I would when I started over a year ago.
The Cocoa-Touch framework is a cut down version of the full cocoa framework, so fortunately, this makes things a lot simpler to learn as there are fewer ways to do things, so not so many choices and design decisions.
You require an Intel Mac to develop on, and would also need an ADC membership to publish the application. Other than this and test devices (iPhone and iPod Touch). This should be all of the require expenses. You could use only the Simulator to develop, but I would recommend on device development as well.
There are some good online videos in iTunes. I found the Stanford University iPhone Developer Course particularly useful.
A good developer could probably be up to speed in under a month. Especially if you have C/C++ skills, along with your other skills I would expect you to be productive in under a month.
The Apple docs are not the most forthcoming, but are quite complete. You could learn everything just from these.
Good Luck
I came from a heavy Java background, with lighter amounts of C++ and also some Lisp/Scheme as you have - I've been doing iPhone application development full time since the SDK release. Here are some thoughts I have on the questions you raised.
What one would need to learn?
You need to learn Objective-C, the language - a helpful guide showing you comparatively how things are done in C++ (and some Java) compared to Objective-C is:
http://ktd.club.fr/programmation/fichiers/cpp-objc-en.pdf
I found that very handy in quickly understanding the Objective-C syntax, since it's not a large divergence from C syntactically but is more so conceptually.
Beyond that, just like Java Apple's Objective-C has a very large set of foundation classes you can work with - just as rich in terms on string handling, internationalization, complex time/date support, etc. Just like Java, that will take some time to get used to - but knowing the Java libraries, a number of things are conceptually similar. The GUI classes are also extensive and pretty powerful, as are some of the other frameworks like CoreData and CoreAnimation. Happily I find the documentation very good, it's well integrated with XCode and even has sample code links in the docs.
Also, the GUI development tool Interface Builder is very good to work with. I never found GUI builder tools of much use in the Java world (or really in any other world) but the model that Objective-C uses where you basically are creating objects that get wired up at runtime to your code, works really well and does enhance productivity. It's good to know how to do some things manually to understand what is build built by the components you are adding, but I'd start learning how to use Interface Builder when possible, early on.
I also highly recommend the O'Reilly safari online book service, because you can hunt down a few books that are of use and search for extended examples on something you are having trouble with for a marginal monthly fee. You can get the widely read Hillegass book there, among others.
How long would a good developer need to get up to speed?
That's tricky to say, because it depends on just what kind of app you are trying to build. Some areas of the frameworks and GUI components are easier to understand than others. But, I would say probably a month or two of full-time working with it would yield a pretty decent level of familiarity, and you would be productive before then. Someone with a good background in a variety of languages will have an easier time I think. Also it pays to really learn the ins and outs of XCode, because it's a very powerful tool but at first may not seem that way depending on what IDE's you are used to.
One thought is that you may way to go to a training session somewhere. There's actually an in-depth iPhone conference in Denver just a week from this post date, 360iDev:
http://www.360idev.com/
(Disclaimer, I am a speaker at a few of the session there)
Although if you do not yet even have a Mac, It may be a little too soon for that to be of full use. You could check around for other such conferences, or other places that offer training.
Are there any non-obvious expenses that might arise from pursuing this route?
Financially? Not really. You can use pretty much any modern Intel Mac to develop with and it will work great, with the caveat you should have 2GB of RAM.
You'll need a device, but if you are not using features found on the phone a Touch is fine to develop against for all platforms so you could avoid a recurring fee if you do not need one.
Time-wise, as noted there are a large set of foundation classes and so that takes some getting used to. But one good thing about the mac as a platform is that while it differs from windows, it has a good Terminal app so you can be productive in a standard UNIX shell with all the UNIX tools you are used to having. You can even do command line builds although realistically you end up working pretty much all the time in XCode (though I admit to breaking out to Emacs on occasion when I need to do some tricky bit of editing better suited to Emacs' abilities).

Quickest way to get started with OS X app development?

I need to build an application which will run on OS X, polling for data, and displaying that data full-screen in a purty, graphical way - generally "identifier: value" text in some sort of tabular format, but possibly with spark-lines to display historical changes, and "animations" (nothing fancy, just fading text and similar) to show updates.
However, I've no idea where to get started. I've no experience with desktop application development or development on a mac.
Where/at what should I be looking for OS X development information which will get me quickly up-to-speed (coming from a web-dev background)?
For OS X development, and a really nice overview that will get you writing actual applications quickly, I'm not sure anything can match Aaron Hillegass' book, Cocoa Programming for Mac OS X.
It's considered by many to be the Bible of Cocoa programming, and it is example driven. You are writing applications that you can actually run throughout.
It is useful, although not as much so, for iPhone development, which you don't mention in your question, but you do in your tags.
If you really want to go native with OS X that will mostly mean learning Objective-C and Cocoa. You get started by becoming an Apple Developer Connection (ADC) member and downloading XCode. Inside the ADC site there is a lot of information that will help you get started, Objective C reference, sample code, etc. .
Depending on your background you might want to consider using Adobe Air for your application, if you know Flex or Flash that might be easier for you to learn.
There are also a couple of question already up on stackoverflow on this subject https://stackoverflow.com/search?q=learn+cocoa
Take a look at http://www.realsoftware.com. It's a cross platform development environment. Easy to learn, established user community, lot's of sample, shared code to get you started.

Will Web Development Frameworks replace Native IPhone Programming?

I need help clearing up some questions regarding these several third party dev-support frameworks (e.g. ViXML, Titanium Mobile) which promise iPhone app development at lightning speed using only Javascript and XML, without knowledge of Objective-C.
Questions
Are there any features possible on a regular Xcode development platform that are NOT possible for someone creating an app using these frameworks?
Is there any real savings in money and time when working with these platforms?
The approach to simplify development like this has been tried time and again, on many different platforms.
You always have the problem that the development framework will lack some features the "real" system has, and while sometimes a passthrough mechanism is offered it is invariably clunky.
Sometimes they do offer speed gains, but the degree to which they benefit you depends on the domain you are in - Unity is a great example of a framework that obviously saves people a ton of time developing games.
I personally think, that outside of gaming I don't think the benefit of using a third party framework to be really worthwhile. All of the best apps are ones that leverage the system to the fullest in terms of animation or UI abilities, meaning that someone spending some time crafting will be able to make a nicer looking app than someone who has to rely on the abilities of a framework.
The other problem you can run into is that no matter how popular a third party framework is, you are always going to have lots more support for the official platform - like the number of books around today on Objective-C and iPhone development, or even the very active Objective-C support on this very site.
The only exception would be if you had to have a cross-platform app and the app supported development for all the platforms you need. But even then I would argue for making the iPhone app distinct and take fullest advantage of the platform, or your app will languish and other competitors will overcome you.
Q1) Yea, performance. Javascript is slow on the iPhone, because the processor is slow. It's just a cold hard truth. Heck, loading NIBs vs using hand coded views is slow, because of the processing and loading involved, and that's simple compared to Javascript. Javascript is wonderful, but partly because we have really fast processors today. The iPhone (nor the Pre for that matter) have particularly fast processors, and Javascript's performance suffers because of it.
I have not used the frameworks, so can not comment on their productivity claims.
For question 1: non-native apps may not be able to access GPS information or other hardware on the phone.