Possible to develop (not distribute) iPhone applications on Windows using C/C++?
I am very used to coding in C/C++ on Microsoft Visual Studio. However, I'm very interested in learning how to write iPhone apps. I do not have a Mac (other than my iPhone). Is there a legal way to develop on Windows and then when it comes time to test on the real device or distribute the app commercially, that I pay for the Apple iPhone developer fee ($99/yr) and compile/ship the code on an actual Mac?
I just want to know if I can continue to work with the technologies I already know in order to make iPhone apps? I came across a framework called Dragonfire SDK which looks exactly like what I'm looking for. However, I'm questioning the legality of all of this and what it will really take to get the code onto a real iPhone/app store. For now though, I mainly just want to be able to work with C/C++ and then test using an iPhone simulator of some sort. Is it possible to do this part of development on a PC?
Again, I'm willing to pay whatever development fees are required to distribute the app and when the time comes I'll find a real Mac to test/distribute on. Does anyone deploy apps in this manner? How do you do it? Again, I'm not seeking to do anything illegal like build a Hackintosh or virtualize the Mac environment on my PC. I just want to continue using C/C++ with Visual Studio if possible. Thanks!
I think it is perfectly "legal" to do this. If by "legal" you mean permissible by Apple.
However, I think the gains you will get from using a particular development environment will be fully negated by the loss of the native language on the platform (objective-c) and the native toolset (interface builder, etc).
Plus, every time you are stuck and need help or example code to refer to, it all be in objective-c/xcode. So you won't understand any of the information readily available on the WWW or even Apple sample code/projects.
If you are a C++ programmer you will have no problem at all with objective-C. And Xcode isn't all that unique. I know its intimidating and I went through the same exact thing and I will tell you that it is not worth the trouble. Just learn the native tools.
The language and IDE are not what makes this "hard." What makes it "hard" is the actual APIs/patterns themselves and you're not going be to able to get away from those nearly this easily.
I bought a cheap mac mini and got cracking. Eventually my app sales bought me a new MacBook Pro and an iMac and I couldn't be happier.
I think it is perfectly "legal" to do this. If by "legal" you mean permissible by Apple.
However, I think the gains you will get from using a particular development environment will be fully negated by the loss of the native language on the platform (objective-c) and the native toolset (interface builder, etc).
Plus, every time you are stuck and need help or example code to refer to, it all be in objective-c/xcode. So you won't understand any of the information readily available on the WWW or even Apple sample code/projects.
If you are a C++ programmer you will have no problem at all with objective-C. And Xcode isn't all that unique. I know its intimidating and I went through the same exact thing and I will tell you that it is not worth the trouble. Just learn the native tools.
The language and IDE are not what makes this "hard." What makes it "hard" is the actual APIs/patterns themselves and you're not going be to able to get away from those nearly this easily.
I bought a cheap mac mini and got cracking. Eventually my app sales bought me a new MacBook Pro and an iMac and I couldn't be happier.
What's the cheapest Mac I could get that will support the iPhone SDK? I read that it has to have an Intel chip. I would like an older one as long as it supported iPhone SDK development. I wanted to be 100% sure I wanted to get into iPhone development before purchasing a Mac but it really sounds like you have no choice.
What's the cheapest Mac I could get that will support the iPhone SDK? I read that it has to have an Intel chip. I would like an older one as long as it supported iPhone SDK development. I wanted to be 100% sure I wanted to get into iPhone development before purchasing a Mac but it really sounds like you have no choice.
Probably the better approach is to figure out your actual budget, and then ask "what's the best Mac I can get for this much?". Also would be good to know where you stand on desktop vs. portable, as a personal preference.
It is true that any Mac with an Intel processor can support iOS development, but really you shouldn't get one old enough that it only has a 32-bit CPU (Core Duo, Core Solo). Because if memory serves, only 64-bit CPUs (Core 2 Duo, and I think Xeon in the Mac Pro range?) are supported by Lion, and it would kind of suck to be limited to older tools as you get started.
__________________ Recall It!Tag your notes. Tag your photos. Tag your thoughts. Tag your life.
Probably the better approach is to figure out your actual budget, and then ask "what's the best Mac I can get for this much?". Also would be good to know where you stand on desktop vs. portable, as a personal preference.
It is true that any Mac with an Intel processor can support iOS development, but really you shouldn't get one old enough that it only has a 32-bit CPU (Core Duo, Core Solo). Because if memory serves, only 64-bit CPUs (Core 2 Duo, and I think Xeon in the Mac Pro range?) are supported by Lion, and it would kind of suck to be limited to older tools as you get started.
Well I have the money to shell out a nice new Mac if I wanted, but I really don't want to end up purchasing something and then end up never actually releasing an app to the app store. Then my investment was wasted completely. I'd rather start with a cheaper Mac that just gets the job done for now (I don't need anything fancy, just something that I can develop apps on and that's it). I already have a desktop and laptop PC for other stuff. I would probably want a laptop rather than a desktop but if the older desktops are much cheaper I'll probably go for those. So after saying all of that, what do you guys recommend?
Also ... so now that I'm convinced that I can't do what I want to do on my PC, can I at least still use C++ extensively in my app and not just Objective C? Could I theoretically throw in a bunch of C++ executable code inside an Objective C wrapper? I see that Apple says you can release apps that are written in C or C++ but how would you make those types of apps using those languages if the SDK framework is for Objective C? Just want to get as much info as possible before investing in equipment and time. Thanks!
Well, you will have to figure out for yourself what your pain threshold is on initial cash outlay. If it were me, I would keep an eye on the Apple refurb store. Reason being, you know the machine won't have issues like an eBay / Craigslist one might; it will come with a full 1 year warranty; and you have a 14-day return window with no restocking. 14 days isn't enough to figure out how far you will take the whole iOS dev thing, but if you're serious about it, it is long enough to get your feet wet and figure out if you have any desire to do so (by hitting the ground running; going through the official ADC samples and tutorials starting on day 1). Maybe you'll hate the SDK. Maybe you'll hate Xcode. Maybe you'll hate the host OS (OS X Lion). 14 days should give you enough time to start figuring that out, at least. Anyway, if this is really just your dedicated dev machine for iOS, you don't even need a lot of RAM or storage. So even a 2GB/64GB MBA should do (although personally I'd opt for at least 4GB, and definitely more storage as well).
You can absolutely use C++, or straight C, extensively in your apps. Your app could be 99% C++ and 1% Objective-C if you wish. You don't even need the C++ code to be in a wrapper. Your OS calls would naturally be in Objective-C, though (well, mostly; some will be in plain C). The C or C++ route would make a lot of sense if you have a lot of code lying around that you want to reuse. Or if you have code you want to write for your apps but then reuse on other platforms. But personally I'd just go with Obj-C otherwise. You'll definitely need to gain a good understanding of the language (and the Cocoa conventions) in order to interact with the OS, anyway.
__________________ Recall It!Tag your notes. Tag your photos. Tag your thoughts. Tag your life.
Well, you will have to figure out for yourself what your pain threshold is on initial cash outlay. If it were me, I would keep an eye on the Apple refurb store. Reason being, you know the machine won't have issues like an eBay / Craigslist one might; it will come with a full 1 year warranty; and you have a 14-day return window with no restocking. 14 days isn't enough to figure out how far you will take the whole iOS dev thing, but if you're serious about it, it is long enough to get your feet wet and figure out if you have any desire to do so (by hitting the ground running; going through the official ADC samples and tutorials starting on day 1). Maybe you'll hate the SDK. Maybe you'll hate Xcode. Maybe you'll hate the host OS (OS X Lion). 14 days should give you enough time to start figuring that out, at least. Anyway, if this is really just your dedicated dev machine for iOS, you don't even need a lot of RAM or storage. So even a 2GB/64GB MBA should do (although personally I'd opt for at least 4GB, and definitely more storage as well).
You can absolutely use C++, or straight C, extensively in your apps. Your app could be 99% C++ and 1% Objective-C if you wish. You don't even need the C++ code to be in a wrapper. Your OS calls would naturally be in Objective-C, though (well, mostly; some will be in plain C). The C or C++ route would make a lot of sense if you have a lot of code lying around that you want to reuse. Or if you have code you want to write for your apps but then reuse on other platforms. But personally I'd just go with Obj-C otherwise. You'll definitely need to gain a good understanding of the language (and the Cocoa conventions) in order to interact with the OS, anyway.
I was researching about writing C++ within iPhone apps. So let's say I had an app idea. I want to write a lot of the "business logic" for this app in C++ and bundle it all together in a C++ library. It would be like a library you compile in gcc (.a file). Obviously at some point I need to provide a GUI front-end for all of this and at some level some of it has to be in Objective C. That's fine ... but how would the Objective C code call the library functions? Essentially the library would provide an API for external clients (in this case ... the Objective C GUI front-end). Within an event handler in the GUI, I want to be able to call C++ code. How does this work? Does the mixing of languages like this make things a nightmare?
In general, you just need to let the compiler know to expect C++ code in your files. So they should either have a cpp extension, if pure C++, or a mm extension (not just m), if Objective-C++. Then in your mm file, you can write C++, whether just calling external code, or writing it directly in the mm file.
But beyond that, I can't help you out. While I have over 10 years professional experience writing C++ code, I've never tried mixing any with Objective-C. Also, I haven't touched C++ in 7 years... and I haven't missed it one bit.
__________________ Recall It!Tag your notes. Tag your photos. Tag your thoughts. Tag your life.
In general, you just need to let the compiler know to expect C++ code in your files. So they should either have a cpp extension, if pure C++, or a mm extension (not just m), if Objective-C++. Then in your mm file, you can write C++, whether just calling external code, or writing it directly in the mm file.
But beyond that, I can't help you out. While I have over 10 years professional experience writing C++ code, I've never tried mixing any with Objective-C. Also, I haven't touched C++ in 7 years... and I haven't missed it one bit.
I'm sure Objective C is nice but part of my situation is that I want to keep my day job as a C++ programmer and keep myself motivated with that language. At least until app sales exceed my monthly income (dream on right maybe? lol). I think I just need to crack the whip on myself and go to one of those iPhone boot camps.
If you're an active C++ programmer, then I could certainly see why you might want to write your model classes mainly in C++. Of course, you will still need to learn Objective-C for pretty much everything else.
Also, I'd be surprised if you found any training that actually includes Objective-C++. Probably at most there would just be a brief mention that you can write and interface with C++ code if you so desire. Which is not to say that formal training would be a bad thing to do; I just think you'd have to figure out how to effectively combine the two largely on your own. If you're a C++ programmer by trade, then you're obviously at least reasonably bright. I'll bet you could start picking up Objective-C relatively quickly, just through self-study.
__________________ Recall It!Tag your notes. Tag your photos. Tag your thoughts. Tag your life.