I'm going to do something I never thought I'd do... learn how to program for Apple hardware . After working in C, C++, C#, .NET, and even in the golden days of DOS (a little DOS4G/W memory extender in Borland Turbo-C, anyone?) and even as a kid, playing around with Atari 8-Bit Turbo-BASIC, I feel a little traitorous on multiple levels :) Anyway, I'm going to grad school, studying music full-time - it'll be the first time in years I won't have a full-time programming gig - and I thought it would be fun to pick-up some Objective-C in my free-time - and maybe a little extra pocket change (one can always hope :)
So, to the point of the post. I'm very used to Visual Studio, the designer, the XAML editor, the code-behind, blah blah blah. A friend pulled up X-Code on his little MacBook to show off how cool it's supposed to be. Sure, it has the same sorts of things as VS overall, but it seemed a little more scattered then I'd like. I'm sure once I got used to it, it would be fine, but I was just wondering if there are other good, free (or almost free)/or open-source editors out there for the Intel-based Apples that could also handle iPhone development. Or any tips on getting into xCode? I've just decided to do this, so I feel like I'm starting from scratch. I'm not slamming X-Code... I haven't really used it yet. I was just wondering what coders' preferences are.
Thanks for any advice!
There really is no alternative IDE on OS X for writing native applications. Some dislike the Xcode built-in editor, however. One very popular alternative is TextMate (non-free, but well worth the ~$50). Xcode can be configured to use your editor of choice for editing text files. Free alternatives include Emacs and Vim ports for OS X.
You can, of course, use the gcc toolchain without Xcode (e.g. using one of the Unix-style build systems such as Make). You can also use xcodebuild at the terminal command line to build an Xcode project without using the Xcode GUI at all (you'd be hard-pressed to configure and manage the project without the GUI, however). Combining these two, one could cobble together an IDE from e.g Eclipse to build an OS X app. iPhone would be harder since Xcode handles certificate signing etc. for you, but still possible. You would loose all of the nice Objective-C completion and documentation integration you get from Xcode, of course.
So, in summary, Xcode is pretty much the only game in town. It will undoubtedly take a while to get used to coming from VS. In particular, code generation is almost unheard of in the Cocoa world. When you feel yourself searching for those kind of tools, train yourself to try a different approach. Objective-C's late-binding combined with the power of NIB/XIB (bundles produced in Interface Builder that describe the UI of an app; XIB is a newer, version-control-friendly XML-based format that is automatically compiled into a NIB, the old-style format from NextStep days) makes code generation unnecessary.
For non-Cocoa/iPhone development, the ecosystem is naturally larger. Nokia has their own IDE for the Qt toolkit which can be used to write OS X (but not iPhone) apps. Eclipse can be used to write Java apps using any of the Java toolkits (including SWT and the Qt-Java framework, QtJambi).
For pure Windows-developer familiarity, there's also Mono which runs on OS X. MonoDevelop may run on OS X, but I'm not sure.
I think XCode is the most popular choice amongst Cocoa developers. I think the best thing you could do is go straight into writing apps and exploring.
http://cocoadevcentral.com/ - Has some great tutorials, they're also usually very screenshot friendly.
For pure ease XCode will be the way to go since it integrates with the iPhone simulator and Interface Builder. Also, when you want to deploy your app to an actual device XCode does the certificate installation and management. I don't have experience with any other IDE's for OSX though so I can't 100% answer your question. But, these are things you'll want to be aware of during your investigation.
Let us know what you find!
Related
I have been learning objective C for about 3 weeks and I achived basic concepts but now I am trying to get hands on experience and since I dont own a mac Im trying realy hard with virtualization and have big problems (i succeeded only with snow leopard 10.5 which is version to old for xcode 3.2) nevermind, Im starting to wonder if other solution for iPhone development like phonegap, mobieOne are realy that bad? I know the native development is the best, but if you bulding application that use some menus and displays data from database is there sensible difference?
Consider trying RubyMotion. If you know Ruby of course. http://www.rubymotion.com/
Here's a macbook on eBay for 300$. Im sure its not the greatest computer in the world, but you should absolutely be using objective c for an iphone app.
http://www.ebay.ca/itm/Apple-Macbook-C2D-2-16-1-0-80-SnowLeopard-13-/160841255326?pt=Apple_Laptops&hash=item2572e2c99e#ht_1763wt_1163
Any time you lose in learning the language (which I agree was a bit of a long and frustrating process) you will gain back by using all of apple's documentation and the copious online tutorials. All the resources out there assume that you use Objective C.
I know its a slow process but invest in your future and do it the right way.
check these two:
Sencha Touch
Mono Touch
If you really wanna do serious iOS(could also be Mac OS X) development, you definitely wanna get a mac. You can use hackintosh on your pc, or download iso image of a modified Mac os x and run it on Virtual Machine (e.g: VMWare). However all you can find would be probably still limited. Last time when I looked on internet, I only found image file for snow leopard but soon Apple going to release mountain lion(which means the hacked Mac OS could be two generations behind).
You can use third party tools other than xcode to develop iOS apps. There are tons of them by using different languages such like C#, java, JavaScript,HTML5, but when they get complied and translated into a native iOS app, you will still need to have xcode running on a Mac.
Again, two things. First, I think you'd better have a mac, and if you don't, you need to find a way to get around it and you might not be able to catch the latest technologies(and that changes quite often in iOS!). Second, if you prefer to develop through a third party tool, it's depends on what languages you are most comfortable with. For C#, I recommend MonoTouch, and for JavaScript, I recommend SenchaTouch. You can find a lot of others.
I'm interested in making apps for the iphone. I was wondering if it were possible to make apps, WITHOUT Xcode. the only reason is because I'm dirt poor, and can't afford an Apple.
If it's games you're interested in developing, then another option might be to take a look at Unity (http://unity3d.com/). This would let you develop on the PC for free in a friendly environment for a beginner. If you then develop something that you decide you want to publish on iPhone, then at that point you could invest in a Mac and just rebuild the Unity app for iPhone on that.
Also, Unity lets you write scripts in both C# and Java so you wouldn't have to learn Obj-C.
The short answer is no. The long answer is "not exactly," but you can get started in some ways while you're working on getting access to a Mac you can do the work you'd like to do on.
"XCode" is more or less really two things:
(1) an IDE
(2) a toolchain with a C/ObjC/C++ compiler (really a version of gcc) and a big library of apps
You don't have to use #1 in order to build iPhone Apps, though it's genuinely helpful. You can get by with #2.
But without #2, you're going to have a hard time building an App you can sell in the App store.
So, it depends on what your goal is.
If it really is to build an app and get it out there, the easiest path is probably going to be to find some way to get access to a machine running OS (probably 10.5 and up) you can do development on. That might be talking a friend who has one into letting you spend some scheduled time on it, or it might be working and saving up for a used intel-based Mac mini (probably something you could get for $300), or it might be turning a PC you've got into a Hackintosh (or maybe setting up a Hackintosh VM on the PC if you're sharing it with others who might not want it transformed thusly :).
If your goal is to start learning how to do things while you work out how you're going to do the above, though, the good news is that it's not hard to get a hold of tools that will help you learn the technologies/languages involved in iPhone apps. Like I said earlier, Apple's compiler is really just a version of gcc. You can probably install gcc on your machine and write objective C programs with it. You could also look into GNUStep which could help you get familiar with a lot of the concepts and practices underlying how the Cocoa libraries work for the iPhone and OS X. And you could learn OpenGL ES, which would be great help if you ever end up working on an iPhone game.
Actually You can develop apps without a Mac. You can use a number of languages and tools that enable writing apps for iOS like:
- Python
- PhoneGap
- Appcelerator
- Mono
- Unity3D
- Unreal Engine
These all can export to iOS.
The only step that requires a Mac is publishing to the app store. But You can use any Mac for that, so You can publish from a friend's/neighbour's or actually anyone's Mac. That is the last step when You're sure everything is running perfectly. Perhaps Your application will earn You Your own Mac.
Also there are a number of publishing service providers in the internet (which don't cost nearly as much as a Mac). I don't remember any particular one at the moment, but I'm sure if You search You will find many. Good luck!
Unfortunately, although there are 'alternatives' (phonegap, mono touch, etc.) I believe you ultimately need Xcode and its tools to package/sign/publish your applications.
If you are really motivated though, you can look about ways of installing Mac OS X on a PC, though that is beyond the scope of this website.
In short, you need a mac. There a number of screwed up ways to do this without a mac, but for all intents and purposes you need a mac. A mac mini you can buy used for $300 on ebay will do the trick. You don't need a powerful machine.
Though Xcode itself is free it does require an Intel based Mac running Snow Leopard. You have 2 options:
Buy a refurbished Mac Pro or Mac mini from Apple website. They are not that expensive. You can use non-Apple peripherals with them to bring down the cost. And you will not be disappointed with quality.
Use Hackintosh to run the OS X on other Intel platform. Its hacky, difficult (carshes) and illegal.
Update:
For Objective C you can refer a pretty good documentation of Objective C language at iPhone developer portal. There are many other documents like memory management and human interface guidelines which should help you get started.
Once you have developed the familiarity with Objective C, you can then browse through various programming guides on iPhone development centre. If you want to follow a systematic approach, you may refer to "Beginning iPhone Development" book which I found pretty good.
Yes it's possible to develop applications for the mac/ipad/iphone without Xcode and without a mac/ipad/iphone.I own a imac,an ipad,and and a mac book pro.I tried to develop in xcode.
After some quick search on the internet I found this http://www.gnustep.org/. This is a framework you can use to develop in the objective C language,using GCC (the GNU compiler).There are other tools you can use,like GNU STEP Application project:this seems to be a sort of IDE (I didn't test it yet).
Yes and no. You can use alternative SDK's but they can be a pain to use and don't offer the publish/signing capabilities that Xcode does.
I have to do some XCode/iPhone SDK work tomorrow, and i would like to know how I can prepare on Windows. What is the closest I can get to XCode and/or Objective-C developer experience, ideally IOS or similar Objective-C GUI.
Can also be say an interface-builder that works in a similar way.
I know Hackintosh/Vmware solutions, I think it would take a bit to long, especially since i have an AMD laptop with not to much RAM (i do have an Intel netbook)
Remark 1
I might actually have access to an old Power-PC Mac (i saw in some other threads that this might be possible). Though the question still stands.
Xcode, iPhone and IB are substantially different development platforms to anything I have seen on Windows, in both large and small ways. You have practically zero chance of gaining any insight into Xcode/iPhone programming by tomorrow without using the real thing.
The little time you have would be best spent reading up as much as you can online.
I agree with Marcelo, your time would be best spent reading. The iPhone Dev Center is a good place to start. I suggest starting with the Objective-C primer and moving on to the iOS Application Programming Guide.
For an introduction to the tools (Xcode, simulator, etc) the iOS Development Guide is a pretty good overview.
The closest you can get is GNUstep and its associated tools. It's emphatically not the same as Apple's environment, but it's derived from the same lineage. Cocoa was derived from the OpenStep frameworks, as is GNUstep (and GNUstep tries to track Apple's additions, though they lag a lot). Xcode and Interface Builder evolved from the OpenStep Project Builder and Interface Builder, which were also the basis for GNUstep's ProjectCenter and Gorm. Gorm can even open Interface Builder's nibs.
I'd agree with Marcelo without a Mac OS running somewhere your chances will be very limited.
You can probably start trying out some ObjC with GNUStep for Windows. But i actually did not try it.
http://www.gnustep.org/experience/Windows.html
Is there any MacOS virtual machine that can run on PC?
Is there any source to get it?
What is the best way to develop apps for iphone?
Yes all the developer tools are OSX only.
There are lots of iPhone development books out there go check out amazon and find one with some good reviews and that will get you started.
You might not, in the strictest terms, have to get a Mac to develop for iPhone; but it will be extremely helpful. Apple is relatively talented at squashing efforts directed towards Hackintoshes and virtual machines running OS X.
The shortest answer that will give you the least hassle is: Yes you need a Mac.
But, as far as I know there are a few possibilites, that try to reimplement some Cocoa Frameworks (however they might be Mac OS X only and not iPhone): GNUStep is an example.
But I don't think you get something aquivalent to Xcode (the IDE for iPhone development) this way.
And I think there are some OSX86 Virtual Machines (however these seem to be against Apple's EULA and thus seem to be clearly illegal so I won't point you anywhere to get them).
So to conclude - if you want to develop for iPhone: getting a Mac is the easiest way, even though not cheap.
Hope this helps.
The short answer is - yes.
One possibility for learning some of what you need to know before getting a Mac is GNUstep.
However, GNUstep is mainly useful for learning Objective C, especially since it provides many of the classes that the Cocoa toolkit for iPhone does. This can be run on Windows.
It doesn't, however, support some of the key 2.0 language features that are used 'all the time' in any sample code.
What it will allow you to do is design a UI using their UI designer GORM, and use a near-identical message-based system for implementing a UI, and you could theoretically write Objective C classes in GNUstep and then use them on iPhone.
However, to compile an app for iPhone you basically need to have a Mac, because then you can get the key for signing an app, etc. Since you need to get a Mac at some point, there's really little point in going the much harder route of using GNUstep first and learning a more limited implementation, unless you really need to get started before funds are available.
Despite the new SDK terms that can other programming languages, if you're really wanting to start without a Mac, I'd probably be tempted to look at something like Unity, or perhaps even Appcelerator Titanium, and figuring out all the non-platform-specific logic first on whatever platform (Unity has a free version that can be run on Windows, for example).
I'm not that big a fan of xcode, but is is far and a way the best IDE for Objective C development simply because there's almost nothing else out there.
There are, as always, other options. If you do a web app type project, you can implement the website and test a lot of it in a browser. Furthermore, since Android and iPhone browsers are both WebKit based, you can use the free Android SDK to see what pages look like on a comparable mobile device. And since you can use C and C++ classes as well as Objective C (N.B. not for the GUI, since that needs the Objective C extensions for messaging between objects), another option for making a start without a Mac would be to use Eclipse, QT Creator or some other C/C++ IDE to implement non-GUI classes, so long as you make sure you don't use platform-specific libraries.
But the end of the long answer is still that whatever you do, to compile a proper iPhone app you'll be using xcode and associated tools to finally build it and sign it, and so you need a Mac in the end. If you want to create something targetting the iPhone and won't have access to a Mac, then perhaps you're best off looking at creating an iPhone-adapted website using iui or a similar toolkit to give the site a suitable look and feel.
As a .NET developer, I always dreamed for the possibility to develop with my existing skills (C#) applications for the iPhone.
Both programs require a Mac and the iPhone SDK installed.
Appcelerator Titanium was the first app I tried, and it is based on exposing some iPhone native api to javascript so that they can be called using that language.
Monotouch starts at $399 for being able to deploy on the iPhone and not on the iPhone simulator while Titanium is free.
Monotouch (Monodevelop) has an IDE that is currently missing in Titanium (but you can use any editor like Textmate, Aptana...)
I think both program generate at the end a native precompiled app (also if I am not sure about the size of the final app on the iPhone as I think the .NET framework calls are prelilnked at compilation time in Monotouch).
I am also not sure about the full coverage of all the iPhone API and features.
Titanium has also the advantage to enable Android app development but as a C# developer I still find Monotouch experience more like the Visual Studio one.
Which one would you choose and what are your experiences on Monotouch and Titanium?
Like any which-tool-or-platform-or-language-or-framework-or-whatever question, it should really come down to what you want.
Forget all the if-you-want-to-develop-for-this-platform-then-you-have-to-pay-your-dues advice. If you're interested in learning Objective-C, Xcode, and associated Apple bits, then go for it. I did. It's been fun, but my interest was in developing iPhone apps. Learning a new language, framework, and IDE was just a bonus (I like this stuff). It was also necessary when I started.
I've been working with MonoTouch since it was released, and I love it. I prefer C# to Objective-C, and I like having access to the subset of the .Net (Mono) framework that MonoTouch provides. There are certain things that are simply easier to do with .Net than Cocoa (string manipulation, date manipulation, anything XML, etc.).
I also like not having to deal with reference-counting anymore. I was spoiled by years of not having to keep track of resources at that level. I don't mind having to clean up after myself, but I don't want to have to manually do something that every other modern dev platform I've used does for me automatically. Plus, even for seasoned Objective-C devs, reference-counting isn't a no-brainer. Scroll through OS X's console output sometime to see how many apps crash due to memory-management issues (I know - this can happen with basically any app, but it's far easier to make the mistakes that lead to this situation when you get overworked devs involved whose attention spans have been destroyed by twelve hours of if this and if that and else this and else that and blah blah blah).
I still use Objective-C/Xcode - I've really learned to like Apple's tools. I honestly feel they're awkward and a bit arcane, but still fun.
But... then I also like this:
public string SomeString { get; set; }
To do the same thing with Objective-C (on the iPhone, anyway) requires that you declare a local variable to back the property, write the property declaration, and then use the "synthesize" directive to have the property generated for you (depending on what property attributes you specify, you might have a property that wraps getters and setters that take care of reference-counting for you - overall, this is a time-saver, but the C# Way is the clear winner here).
That's just one example of how MonoTouch can make your life easier, especially if you're used to .Net/Java/Python/other languages that don't require that you get your fingers dirty with memory-mangement (unless you want to).
As far as iPhone-ness is concerned, aside from brining part of .Net to the iPhone world, the MonoTouch namespace maps to CocoaTouch, so if you're confused about, say, the MonoTouch UIViewController, you can just hop over to Apple's docs on the UIViewController. MonoTouch .Net-izes CocoaTouch, but it's close enough that you're unlikely to hit a wall (that wouldn't have also hit if you were using Xcode/Objective-C). It's slick.
Titanium is different. Since they're trying (trying) to create an abstraction layer that lets you write the same app for multiple platforms, you're going to deal with the usual drawbacks: Totally different APIs, loss of flexibility (the same could be said of MonoTouch, but not remotely to the same degree), and basically having to learn a whole new platform (which is what you're trying to avoid by getting around Xcode/Objective-C/CocoaTouch, right?).
I also hate JavaScript, so I'm going to be biased against Titanium. But even if that weren't the case - even if I could use a language I do like - the APIs don't tickle my fancy. Or my anything.
Regardless of the dev tools you choose, you will end up having to learn something about CocoaTouch. Whether it's Xcode/Objective-C, MonoTouch, or Titanium, something is going to break or go all wonky on you, and you're eventually going to have to refer to CocoaTouch documentation.
If I were giving a talk on iPhone development (which I have, and which I will be doing again), and if I were to discuss alternatives to Apple's dev tools (which I will), I would still strongly encourage devs to at least work through a few basic iPhone apps using the native tools. It's going to make you a better developer for the platform - period. And you can use this beginning phase to determine if you even want to use anything other than the free Apple-supplied bits. You might not. I've been using MonoTouch because it pleases me - not because it's necessary.
So, to summarize a few basic criteria:
Preference (language/frameworks)
Devices (do you care about non-iPhone platforms or think you might someday?)
Comfort (if you like and know C# MUCH better than Objective-C, there's no reason not to go with MonoTouch)
And don't listen to the naysayers unless they've actually used the tech they're talking about. For example, I've read about Titanium, but I'm not experienced with it - I just know that I don't want anything to do with it on account of my preferences. That doesn't make it "bad" - just something I don't want in my life.
The Objective-C crowd can be impressively zealous. While there are plenty of open-minded devs in it, there are so, so, so many who think Objective-C and Cocoa and blah blah blah are THE last dev tools devkind will ever need.
Ignore them.
If you're worried about support, here's some stuff to consider:
Apple is likely to remain current, as they're the ones making this junk.
MonoTouch is likely to remain current - the Mono peeps have done an amazing job keep up with Microsoft, and I see no reason why they won't do the same with Apple. I'm blown away by what they do. And despite MonoTouch having been released, like, five minutes ago, they already have an update out for iPhone 3.1 stuff. They're serious about this, and I think they're magic. They're the Keebler Elves of the dev world. They sit in their secret layers and crank out stuff everybody (ok - not everybody) likes, but that nobody else would even attempt to do.
Titanium is either going to become an awkward unified API for writing apps for multiple platforms that is entirely its own thing, or it's going to become more and more splintered as the capabilities of different platforms diverge. Yeah, that's a bunch of typical armchair nerdly future-gazing... I should have prefaced this bullet item with "It's my opinion that..." If only there were a way to go back and change it.
Go with what you like. MonoTouch is a "safe" alternative to Apple's stuff. I'm afraid Titanium is going to go down the same old oops-this-super-high-level-platform-abstraction-layer-stuff-doesn't-really-work road that so many other technologies have. But if you're doing something simple, there's no harm in giving it a shot, especially considering that it's free during the beta period.
These are fun and interesting ways you can build iPhone apps. But, for truly rapid native iPhone development, your best bet is the free iPhone SDK and Xcode.
To be honest, the hardest things to learn are the capabilities of the frameworks themselves, NOT the language syntax. But that is an issue you have to tackle either way as these IDEs/Languages still require you to grasp some of the conventions of Cocoa (and Cocoa Touch).
I don't say this as a Cocoa / Objective-C snob, but if you know C (which as a C# dev you do) there really isn't any barrier to entry.
In addition, you will have access to tons of tutorials and sample code that just won't be available for these fledgling translators/IDEs/languages.
Learning another programming language is rarely a bad thing, and as an experienced programmer, your time investment won't be as large as you think.
I've created an open source project http://propertycross.com that helps developers select a cross-platform mobile framework by showing the same application implemented with Sencha, Titanium, Xamarin and more. This project allows you to easily compare a wide range of frameworks in terms of end-user experience, code, IDE, developer experience etc ...
I kinda like the idea of providing means to quickly get a grip on iPhone dev with techno people already know.
I personnaly, as a Java developer, use iSPectrum (http://www.flexycore.com). It also come with an IDE, debugger and stuff, which make it really convenient to develop with because it benefits of all the power of Eclipse Java plugin.
Being based on Java, this also allows to easily reuse already existing code from other java apps, which can be really handy providing that Java is present on almost all platforms (desktop & mobile alike) except iPhone.
Plus it's free for open source projects.
I'd rather consider these kind of solutions, because I don't like the idea of coming back to developing in emacs :) .
I know this is an old topic, but in the interest of staying current, it looks like MonoTouch and other cross-platform frameworks are going to be banned in SDK 4.0. Your only "safe" bet for writing iPhone apps is to use XCode and Objective-C, at least for the time being.
If you're C# programmer why you shouldn't invest some times to learn Objective C. Honestly speaking, it will not take much time from you. But you feels good to work in a new platform with new language. Learning new things all time fascinates me.
There are numerous ways to get on the device. Apple has stated in the SDK license that the only approved way to get on the device is via C, C++, ObjectiveC, and Javascript.
It appears at this point in time that apps built on MonoTouch and Appcelerator Titanium are being accepted into the App Store. Thanks to the license change, there is much fear, uncertainty and doubt on this subject. Apple has scared everyone not doing ObjectiveC.
I would suggest that you do whatever makes the most sense for you as a developer. If you know C# and .NET, you should go with MonoTouch. If you know ObjectiveC or the Mac platform, ObjectiveC is probably the way to go. If you know X and it's on the iPhone, well, X is where I would suggest looking first.