Developing for iPhone on a PC? [duplicate] - objective-c

This question already exists:
Closed 11 years ago.
Possible Duplicate:
iPhone development on Windows
Is it possible to create iPhone apps using a PC? I'm running windows vista and I want to learn objective-c, what better way can you be motivated then the potential to create something that someone, somewhere might use.
Are there any hacks that allow would allow me to make the apps?

Unfortunately this is not supported. Developing for the iPhone requires Xcode and Apple's gcc tool chain, and it is only supported on Intel Mac OS X (although some have gotten it to work on PPC Mac OS X).

NilObject is right that you can only develop for the iPhone officially on a recent (last few years) Mac with OS X.
That said, Objective-C isn't tied to the iPhone. You can write programs for your PC in Objective-C, which would give you experience without needing the iPhone and Mac. Objective-C is a standard part of the GNU Compiler Collection (GCC). It's rather easy to install with Cygwin.
If you really want to make iPhone applications, you should consider a Mac. You'll get all sorts of experience and can also program for OS X then. Since laptops were just released, many people are selling their previous models because they have upgraded. If you can find an old Intel chip based Mac Mini, it won't cost you much at all (a few hundred), but it won't be fast. The recent Minis haven't been updated in a very long time and are not a very good value anymore for their new price (in my opinion), but they may be available cheap too.

actually, there's an unofficial toolchain that works in windows and linux. you'll need cygwin installed on your pc to be able to work with it in windows.
here's a link to the basic setup: link
though this will not allow you to publish to the AppStore, it's just a good way to mess around with the SDK. Also, whenever Apple updates the iPhone firmware, you'll need to find/wait for the updated toolchain or do some hacking of your own to get the updates headers, etc...

Don't bother. I had a hackintosh and while it worked, Apple can (and does) regularly update the SDK's minimum platform requirement, which means your hackintosh won't be able to keep pace with the new cool features in the SDK, since Kalyway and whoever else need time to reverse engineer kexts or whatever to figure out the new OS.
If you're serious about iPhone, get a Mac. You could probably find a first gen Mac mini (intel) for a couple hundred bucks. Or spring for a macbook and be psyched. The new ones are awfully nice.

Lucas Aardvark wrote:
I am going to get a mac. Just gotta save up a little money ;-)
Although I thoroughly agree with the consensus: get a Mac, I just wanted to add a little based on this comment you left:
If you are planning to enter the iPhone arena to do one of those Cinderella ten-million downloads at a buck a pop stories you hear about, you'll need a killer app, something new and exciting. Good luck with that; I'm not gonna share my ideas with you, 'cause I'm trying to do the same. :)
That said, I'm in the same boat as you -- I don't have the extra green to buy a Mac -- so I will share some general advice that might help.
Rather than enter the iPhone arena, I've been looking into leveraging my Java skills on the Android phone first. Once I make a few bucks doing that, I'll buy a Mac and learn Objective-C and port my program(s) over. Since Android uses Java and is free/open source, I'm only out the twenty-five bucks to create a publisher account; I can do the rest with Eclipse on any platform I have.
I don't know if it will help you much, but it might be a more cost-effective way to write your Cinderella story. :)

Related

Rapid application development for Nokia E5 (Symbian S60 v3)

I often need simple personal apps on my phone and I'd like to make them. I know some programming (C++, Delphi, some Java, MATLAB, Visual Basic). I don't have any idea about where to start, what can I do, how the issue of "app signing" can impact on this.
One app should help to manage links between book pages, basically it has to handle a small database in which I can add books (title, ID) and linked pages (couples of numbers). The database must be obviously persistent.
The other app should let me program a number of time counters. I don't need persistence between app startups.
I tried Qt Creator, but let alone some problems about installation, it looks like it's made for S60 v5. I don't know where to start. I used to make small utilities for my computer in Delphi, which saved me much time; now that I have a small portable PC like the E5, it could be very useful to have, for example, a portable random number generator, or similar simple apps for personal use.
Someone please give me a kick-start!
Update: I've managed to make the timers application in J2ME, it took a week of investigation (1-2 hours a day)
I did software development for Symbian C++ for more then 6 years. I stopped it something like a year ago when Nokia declared that it is going to kill it. Symbian did not became never popular between application developers because it is EXTREMLY complicated to start developing on it. It will take long-long weeks, maybe months to get running something own for the first time. And that time maybe there will be no new Symbian devices sold... you better invest your time in something that has more future.
Qt is good, qt is MUCH easier to start with and the knowledge you gain you can use also for software development for desktop (Windows, OS-X, linux crossplatform) and other embedded (linux) devices. In one word it has some future.
Qt applications run also on 3.2 devices, just you will have to install the Qt runtime on your phone. You also don't have to use the latest SDK but 1.1.2, this has support for older platforms.
If you want to develop only for your own, you can create a "developer certificate" for free that you can use to sign your applications - they will install only on your phones (you have to specify the IMEI of the phone). You can find more info about signing at http://www.symbiansigned.com.
Take a look here: http://www.developer.nokia.com/Community/Wiki/Category:Symbian
There's a lot of information regarding development options available for S60.
I suggest you take a closer look at J2ME, reasons being:
J2ME is a mature & thriving language with a lot of documentation and examples available.
The midlets (apps) you produce can also be installed on S40 devices. S40 is currently the world's most widely used mobile phone platform.

How to access device settings on a Sony Ericsson mobile phone?

Edited on April 29th, content changed
Hello everyone,
I recently bought a Sony Ericsson mobile phone and I would like to add a missing feature myself. In fact I cannot actually disable Internet connection in an easy way when roaming, which cost me a lot of money last time I moved away ... So I would like to develop a little application that would just replace the actual Internet configuration with a fake configuration to avoid auto-connections.
So what I would like to know is how can I access programmatically to my phone settings? I know that Sony Ericsson provides a SDK to run Java applications on its customised JVM. So what I am actually looking for is to know if they extended the J2ME functionality to fit their devices requirements.
This is not well documented so I am asking this question with the hope that someone here already had experience with development targeted for Sony Ericsson devices.
Thanks.
NB: This is a Sony Ericsson Elm which is based on the Sony Ericsson OS with SE Java Platform 8.5.
Edit: I accepted QuickRecipesOnSymbianOS answer as it gave me a clue on the only feature that could have helped me, but which is unfornatunately missing. The Sony Ericsson Java Platform is the only API I could use to develop real programs on my phone. But the JP-8.5 does not implement the JSR-307 package which could help me in managing APN. Thanks everyone for your help.
Well, I hope you got the great Vivaz phone, not the Satio.
In order to learn about Symbian OS C++, first go to the Foundation website.
Relevant plug: the latest introduction to Symbian OS C++ in book form is Quick Recipes on Symbian OS
For now, you won't find a better way than Symbian OS C++ to manipulate your handset access points.
JavaME simply doesn't have the correct APIs for this, at least not until JSR-307 is implemented.
I believe Qt isn't integrated quite tightly enough just yet either but that should change soon enough. Keep an eye on it.
Extending the Symbian Python runtime to do what you want would require some Symbian OS C++ anyway.
Yes you will need to use Symbian C++ to modify the CommDB, which holds the list of connections. It is quite painful to work with it directly, but there are some utility classes that can help you out. Take a look at CApSelect, CApDataHandler and CApAccessPointItem, all in the developer library.
And yes, these will work on all modern Symbian handsets, independent of brand.
Note: My answer below assumed it was about a symbian device. Since it was actually a J2me device none of the below applies
The easiest way to achieve what you want to do is probably to just remove all the "destinations" when you want to prevent auto connections. Otherwise the device will test each destination in turn until it finds one that works.
You can also set up your destinations so that they are not allowed to be used automatically. This setting must be done individually for each destination.
You can also group your destinations and set one of the groups to the default. If you set the default to an empty group you should not get any automatic connections.
Note that I have not tested any of these methods myself. When I roam I turn off automatic updates in the apps that use them. Some apps can even detect when you are roaming and avoid auto connects.
There are S60 apps available that improves the connection management of vanilla S60, but I do not know if any of them can help you with your problem.
If you are dead set on doing the programming yourself you have to use the C++ SDK for Symbian S60 available from Forum Nokia. Java ME does not allow you to manipulate the destinations of the device.
The Elm device should have (I haven't verified this) the access point API originally designed by Nokia. Not sure whether you can use it for the purpose you want though. The J2me developer guidelines available from developer.sonyericsson.com should have all the information you need.

What challenges are there in making an iPhone IDE for Windows/Linux?

First of all, is this possible?
If so:
What challenges would I encounter in making an XCode imitation for iPhone/iPod development for Windows or Linux?
I was thinking about using gcc as the actual compiler for the objective-c and (VB).NET for the IDE. Will that work?
It doesn't need to compile to iPhone OS until it is to be tested on the device or submitted to the app store. Perhaps it will be easier to compile to the local OS format (Windows or Linux) until "prime-time".
Is this concept possible? Comments? Ideas of how to implement?
If you wanted to support all of UIKit and Cocoa Touch, the problems would be insurmountable. You'd spend 2 years trying to get off the ground and then give up, while everyone else had fun developing apps for the iPhone and iPad and other devices. You would regret even trying it.
But if you wanted to create your own framework for making iPhone apps, built immediately on top of OpenGL, it might be possible. You would create a simulator that renders to an OpenGL view, and the final app would also render everything in an OpenGL view, touching none of UIKit. You would use pure C, or some robust cross-platform language like Lua, compiled or even interpreted. Incidentally, that's more or less how the Corona framework does it: built on top of OpenGL, touches little of the iPhone SDK, uses compiled Lua. They developed their own simulator, which only runs on OSX, but could probably relatively easily be ported to Linux.
You could even use Objective-C as the language, and make available a carefully chosen subset of the Cocoa API's by using (the iPhone compatible parts of) GNUstep Base. Then users could use standard classes like NSString.
Still, all of this is mostly interesting as a thought experiment, unless you got a team together to work on this as an Open Source project. It's harder than you think. Your simulator wouldn't be able to emulate the way that memory warnings are generated on the iPhone, for example.
If someone wants to develop iPhone apps on Linux, it makes more sense to just write the whole app in C/C++ using OpenGL, and then basically just smack that code onto a vanilla iPhone OpenGL project. That's the fastest path. The next possibility would be to use another language, which is also not too hard. But an "iPhone IDE" on top of that would be little more than putting an iPhone-like frame around the OpenGL view in Linux.
Actually, Felixyz touched on something your should take a look at. See: http://www.gnustep.org/ . They have binaries for just about every variant of *nix, OS X, and windows. The site claims "GNUstep seeks to be source code compatible with Cocoa and OpenStep, it can thus be used to develop and build cross-platform applications between Macintosh (Cocoa), Unix and Windows." It would be a good jumping off point for such a project,
I doubt all OSX's functionality is covered by GNUStep, but it's a start.
I'd imagine to develop iPhone/iPod apps on an alternate platform, you'd need to get Apple's includes (Legality is likely to be an issue), and apply all their toolchain patches, plus a million other things I'm probably overlooking.
What would be a better project is implementing the missing functions in GNUStep to support OSX apps seamlessly under the host platform. Maybe then you could run xcode native on your desired OS.

Building Cross Platform app - recommendation

I need to build a fairly simple app but it needs to work on both PC and Mac.
It also needs to be redistributable on a disc or usb drive as a standalone desktop app.
Initially I thought AIR would be perfect for this (it ticks all the API requirements), but the difficulty is making it distributable, as the app would require the AIR runtime to be installed to run.
I came across Shu Player as an option as it seems to be able to package the AIR runtime with the app and do a (silent?) install.
However this seems to break the T&C from Adobe (as outlined here) so I'm not sure about the legality.
Another option could be Zinc but I haven't tested it so I'm not sure how well it'll fit the bill.
What would you recommend or suggest I check out?
Any suggestion much appreciated
EDIT:
There's a few more discussions on mono usage (though no real conclusion):
Here and Here
EDIT2:
Titanium could also fit the bill maybe, will check it out.
Any more comments from anyone?
EDIT3 (one year on): It's actually been almost a year since I posted that question but it seems some people still come across it every now and then, and even contribute an answer, even a year later.
Thought I'd update the question a bit. I did not get around to try the tcl/tk option at the end, time constraint and the uncertainty of the compatibility to different os versions led me to discard that as an option.
I did try Titanium for a bit but though the first impressions were ok, they really are pushing the mobile platform more than anything, and imho, the desktop implementation suffers a bit from that lack of attention. There are also some report of problems with some visual studio runtime on some OSs (can't remember the details now though).. So discarded that too.
I ended up going with XULRunner. The two major appeals were:
Firefox seems to work out of the box on most OS version, so I took it as good faith that a XULRunner app would likely be compatible with most system. Saved me a lot of testing and it turned out that it did run really well on all platforms, there hasn't been a single report of not being able to start the app
It's Javascript baby! Language learning curve was minimal. The main thing to work out is what the additional xpcom interfaces are and how to query them.
On the down side:
I thought troubleshooting errors was a sometimes difficult task, the venkman debugger is kinda clunky, ended up using the console more than anything.
The sqlite interface is a great asset for a desktop app but I often struggled to find relevant error infos when something didn't work - maybe i was doing it wrong.
It took a little while to work out how to package the app as a standalone app for both PC and Mac. The final approach was to have a "shell" mac app and a shell pc app and a couple of "compile" script that would copy the shells and add the custom source code onto it in the correct location.
One last potential issue for some, due to the nature of xulrunner apps, your source code will be deployed with the app, you can use obfuscation if you want but that's something to keep in mind if you want to protect your intellectual property
All in all, great platform for a cross-platform app. I'd highly recommend it.
Tcl/Tk has one of the best packaging solutions out there. You can easily wrap a cross-platform application (implemented in a fully working virtual filesystem) with a platform-specific binary to get a single file executable for just about any modern desktop system. Search google for the terms starkit, starpack and tclkit. Such wrapped binaries are tiny in comparison to many executables these days.
Many deride Tk as being "old" or "immature" but it's one of the oldest, most stable toolkits out there. It uses native widgets when such widgets exist.
One significant drawback of Tcl/Tk, however, is that it lacks any sort of printing support. If your application needs to print you'll have to be a bit creative. There are platform-specific solutions, and the ability to generate postscript documents, and libraries to create pdfs, but it takes a little extra effort.
Java is probably your best bet, although not all Windows PCs will necessarily have Java (most should). JavaFX is new enough you can't count on it - you'll probably find a lot of machines running Java 1.5 or (shudder) 1.4. I believe recent Mac OS still ships with 1.5 (latest version may have changed to 1.6).
Consider JavaFX
It would run everywhere with a modern JRE ..!
AIR could be an option, but only if you don't mind distributing two different files (the offline runtime installer and your app), and expecting the user to run one and then the other. You do have to submit an online form at Adobe's site saying you agree to distribute the offline installer as-is, rather than digging out individual DLLs or whatever, before they give you the installer.
Unfortunately there's currently no way to get both an AIR app and the runtime to install from one file though. I'm not sure what the deal with Shu is, or whether it's doing anything that isn't kosher.
i would recommended zink. it has all the functionalities you require for desktop. however, the las time i used it it was a bit glitchy.
i was hung up by trying to write a 6M file to the disk. thought it trough and changed the code to write 512K chunks at a time (3min work, fast).
probably it still has some little annoying glitches like making you think on root lvl but the ease of use and the features are just way too sweet to ignore.

Porting to which gaming platforms? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm developing a pretty portable indie game engine and also a "demo" game to go with that. In the future I would however like to make a more comprehensive game to deploy on some different platforms. The details on the future game is less important, I'm more into the "how" than the "what" -- genre and content is irrelevant to me.
So what target platform would you recommend? And what cheap features (which rocked immensely) have you successfully developed for that platform? Please keep cost-effectiveness in mind, since my budget won't allow for purchasing SDKs with price tag of 10k U$.
Edit: I am really interested in what cheap features you have successfully developed for a certain platform. E.g. "I made this awesome two-finger-touch-input-control-method-for-a-retro-type-this-and-that-game for iPod in no time and it rocked -- I can really recommend that platform/approach!"
Since your budget doesn't allow purchasing mult-thousand dollar dev kits, your options are a bit limited - Playstation, Wii, and native XBox development are out.
I'd recommend Windows PC and XBox 360 using XNA Game Studio. XNA is free and runs on both of those platforms. It also has a good dev following, and there are lots of blogs and websites with info, tips and tricks, and samples. You can get started athttp://creators.xna.com.
PC - Free SDKs :)
PC, Linux, Mac, Iphone, XNA for Xbox 360, and Nintendo DS and Sony PSP homebrew are all very interesting targets. It's a fun challenge writing an engine that can work for all of those targets, but it's achievable.
If you abstract things well enough that you can hit all of those targets, extending it to something commercial like say... WiiWare in the future wouldn't be too big of a deal.
This doesn't help you but is worth mentioning: World of Goo made a big splash and was released for Mac, Windows, Linux and even Wii. Allegedly they used something called the Experimental Gameplay Project but it appears not to have been released yet.
you could also make your game engine cross platform that way you are able to develop for linux and windows at the same time. and if you are using your demo engine for a future position at a game company is a great achievement under your belt.
If you're wanting to consider development on the Wii/PS/etc. consoles that Michael notes are probably out of your price range, consider the homebrew development kits. They aren't supported or endorsed, but as far as getting to work with the technologies, they might help you decide whether you want to use those SDKs in future.
I hope that whatever project you are starting on works out well!
I think the question of "what" is VERY relevant in choosing a platform, since the platform has a major impact on who will be exposed to your game, and how it will be played.
Are you developing a game intended for multiple people sitting around the screen, ex. a trivia game, fighting game, sports game, etc? Then you probably want to be looking at a console like the 360. Are you looking for something a bit deeper? Dwarf Fortress, or the next great hex-based wargame? You probably want to go PC. A shooter? Something with a mouse. PC again. A flight sim that requires a thousand different buttons? Something with a keyboard, like the PC again. Are you building a simple Popcap-style puzzle game? you might look at an SDK for some kind of handheld device.
Tell us what you want to build and we can recommend a platform
edit: if it was me, PC would be my default platform no matter what
If you want to develop for PCs, may I suggest the Simple DirectMedia Layer (SDL)?
It is a cross-platform (Linux, Windows, Mac (we need more games, please!), BSD, and others that no one cares about) library for developing graphics that is well-tailored for games.
The best game of all time (at least, in my opinion) is written with it.
It is free and open-source, but released under a permissive license, so you can do whatever you want with code you write on top of it. You can even dig into its internals and see how you might go about porting it to a platform SDL doesn't support, should you choose to do so.