Is there a quick-reference guide to the iPhone SDK that's as fast and easy to use as one of those little O'Reilly books, or JavaDoc?
I'm new to iPhone SDK programming. I need reference material. Let's say I want to know if the string class has a "reverse" function. For Java I go to http://java.sun.com/javase/6/docs/api/ and browse down to find "String". Then I can see everything about String, with hyperlinks to Serializable and Character. I don't see a "reverse" method, but look, there's a hyperlink to StringBuilder -- aha, there's StringBuilder.reverse(). Total elapsed time 30 seconds.
For the iPhone I go to http://developer.apple.com/iphone and log in. Everything seems to be slower here. There are fewer cross-links than in the Java documentation, and each link seems to pull in a big page that takes a long time to load. Just the page for NSString takes 30 seconds to load fully. Maybe I just don't know my way around the documentation yet, but it seems to be much harder to browse for what you want. There's no equivalent of flipping through a book, or if there is it takes 30 seconds to turn the page.
The iPhone platform is immense -- for almost anything you'd want to do, there's got to be a class somewhere that does it. The built-in help in XCode is good but I'm still lost with it.
How do YOU go about finding that class you need? Is there a better way?
I just use XCode's built-in help system. Right-click a class or symbol name, and choose "Find Selected Text in API Reference". You can also do "Jump to Definition", which will open the header file where that symbol is defined.
More info on this stuff here.
When I started with iPhone dev I used the iPhone Developers Cookbook, it has examples of how to do specific things. It's easy to pick out one piece of functionality to try out.
I'd highly recommend checking it out.
Use the XCode hot keys to jump to documentation on anything - in XCode for Leopard, you can double-click on something like "NSString" while holding down "Option" and it will take you to the documentation for that class. You can do the same thing for method names.
In Snow Leopard that key combo opens up a little help box with a summary of what you clicked on, "Cmd-Option double-click" brings up the docs as with Leopard.
The built in docs are very good and even provide links to sample code (if any exists for the subject in question).
There's also a way to generate your own XCode compatible documentation with Doxygen, just like you could with Javadoc:
http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
If the speed of browsing documentation is the issue, I recommend downloading the related doc sets and browse them locally in Xcode. In Xcode's preferences, select the last "tab" (Documentation) and click the "GET" button next to the documentation test you want. (I'm on Snow Leopard and Xcode 3.2, but it should be similar on Xcode 3.1.x as well.)
If finding what you need is the issue, I second #paulsnotes's answer — the "cookbook" approach is very helpful form a task-based exploration standpoint. Also, when you find something you were looking for, and it took much longer than usual, provide feedback on Apple's documentation. Each page has links at the bottom. You can suggest what classes, sample code, etc. would be useful to cross-link to make it easier to find what you need.
If we are recommeding books, this is excellent for a beginner, it gets you up to speed very quickly while leading you through creating highly functional apps you can use as a jumping point for your own:
Beginning Iphone Development
Related
OK, so this is a bit out there, but a little as 5 years ago a minified js file was an oddity. Today it is common and expected.
So when you look at how we compile js files into one large one, in the correct order, wiring up dependencies and all of that, how come we don't have anything like this for MS Word?
My vision is this:
40 chapter book, each chapter in its own file. Pictures in their own file, and a Table of Contents that is automatically generated on "build". A glossary that is automatically generated on "build". Templates are used to enforce conformity even though multiple authors contribute. Clickable references resolved (think Chapter 1 Heading X as being resolved).
Anyone? How would I even search for that in Google?
EDIT:
I have solved this problem in the past using home made software and RTF. Even in the early 2000's using XML and XSLTs. Pretty neat, but really hard to maintain. With large documents never going away, how do the big boys handle this? I can't imagine everyone has self written software to do this, or worse, letting MS Word handle this entirely.
Using the information about TeX I found a compelling project that seems to be exactly what I'm looking for:
Pandoc-Seed-Project
It uses Gulp, Pandoc, and a very similar interface for us web developers.
The topic says it all. I've got a .app file here, but the Xcode project is no longer available to me. Is there any way to take the .app file and reverse engineer an Xcode project from it so I can view the code used to make it?
First, the source code is signed and encrypted.
Second, you're likely legally not allowed to decrypt this source if you are in the United States, Cuba, North Korea and many other countries. I fear it even applies to your own code, since it was encrypted by Apple tools, with an Apple key. Check this with a lawyer, guy in black with scary words and a nice Porsche.
Third, Objective-C being a compiled language, and LLVM allowing you to do some optimization, you would have a real hard time going back to anything slightly readable. This is no Java/C#.
Four, you'd better be really, really sure that "the app file is no longer available to me" means you have a legal right to the source in some way. Stealing source code carries some hefty penalties, with fines you can buy yourself a Porsche with. Ask a lawyer :p
By design this cannot be done. The best you can do is run the app and try to reverse engineer it based on functionality. Stealing the source code is a no-no (and not just because Apple says so).
It would be very very difficult. There's no one click solution. However, you could look at class-dump and otool. Just be aware that it's a very manual effort, you'll still be piecing everything together yourself.
When you say "the Xcode project is no longer available to me" then I would assume you have written the code or at least have seen it.
It will be definitely much faster to rewrite it than to try to decompile it.
Is there a good place to get starter apps for iPhone, where you choose from any of a large set of permutations?...for instance with a nav bar and a flip screen and a 3 deep table view, with Core Data support etc. I guess what I was hoping for is some kind of wizard where you can check a few boxes and have a working app as a starting point....but more than just the 3 or 4 choices that come with xCode. If not a wizard, just a nice set of a couple dozen permutations.
Also....is there any good sample apps out there that show the difference between identical apps, one which uses Interface Builder and one not?
Aside from being handy for myself, I'd think these would be great as a teaching tool. I've googled a bit and come up with nothing.
http://www.appsamuck.com/ may not be all you want but is a good place for you to start.
http://developer.apple.com : each part of the SDK has numerous examples, although the focus is on the parts of the SKD they represent, you will find pretty good overall coverage.
love this site and all helpful people! I'm newbie to Xcode and iPhone programming but I've pretty much got the hang of using the SDK to make programs in Obj-C (simple programs right now but make me happy). My experience is web programming (such as PHP and Perl) and I'm not really used to a lot of the new Xcode/desktopy-app stuff like static libraries and linking and such. I be honest, I am not total awesome programmer yet!
I have a problem right now, my (card game) program I am writing needs to use this C library. I don't really understand how I get the proper C files and integrate them into my project so I can start using the commands in that tutorial to evaluate hand values.
I hope I have been clear, please let me know if there is anything I am leaving out. Unfortunately, my newbieness may prevent from me making everything so clear and sometimes I can't english perfectly what I am thinking!
Happy thanks in advance, looking forward to any help!
Couple things:
The library you linked to is quite large. Pokersource appears to be a large C project containing all sorts of things like language bindings and some GUI tools as well. A project that large certainly has an IRC channel. I would recommend going there.
The library you linked to appears to be (I may be wrong about this), licensed under the GPLv3. This means that any program that you distribute to others that uses a GPLv3 library or piece of code must also be licensed under the GPLv3. The upshot is that if you use that library, you'll have to release the source for your game.
The site you linked to does seem to have a long list of other poker hand evaluators, so its possible one of them is suitable for your needs.
Good luck!
it's totally possible to use third party static libraries with your iPhone and using Xcode. This webpage illustrates the process of doing it.
I'm evaluating the possibility of developing an Eclipse plugin to modify the source code of some Java files.
The Eclipse plugin should:
add one menu option or context menu option to launch the modification process.
add a key binding
only alter the UI in that way when an editor has been open on a Java file.
the modification process would not open a dialog, or maybe, a very simple one.
the modification process would traverse the AST of the Java file and would modify it.
Considering that we have no experience with Eclipse plugins and we need spend time in reading docs, how much time do you estimate in developing that plugin?
Thanks in advance.
It's really not that difficult at all... I had students in my design patterns class doing it for an assignment (adding/removing javabean getters and setters)
See http://help.eclipse.org/ganymede/topic/org.eclipse.jdt.doc.isv/guide/jdt_api_manip.htm
[EDIT: added the following article reference]
And a great article on it at http://www.eclipse.org/articles/article.php?file=Article-JavaCodeManipulation_AST/index.html (from 2006 -- there may be a few API changes since)
Yes, writing plugins takes a little getting used to, but so does any API.
And you can modify the AST -- see the page I reference above.
(I should note that the above link is from the eclipse help, which can also be accessed via Help->Help Contents inside Eclipse -- there's a lot of good info in there, but it's just a starting point)
You'll probably spend quite some time cursing the complexity of the eclipse plugin system. There are some example plugin development projects that can be very helpful if they cover the area you're working in.
I'd say you're looking at 2-4 days of work, spent mainly getting familiar with the platform - someone with a lot of experience writing eclipse plugins would probably take no more than an hour.
However, your step 5 could be tricky. I don't know how easy it is to access and change the Java AST; my experience is based on developing an editor plugin for an exotic file format rather than Java code.
Well, the four first points are easy to achieve, even by monkey coders that look at the eclipse PDE documentation shipped with Eclipse. These can be achieve in 1 day of work, maybe 2.
The hardest point is really the fifth one and the kind of modification you expect to do. Acting directly on the editor content is simple, accessing the editor internal AST and modifying it is really a bigger challenge and I doubt that it could be achieve in less than a week by unexperimented people (it can take longer, depending of what kind of modification you want to apply).