Can C++ and C# be used for applications for iPhone - c#

Can I write applications for iPhone in C++ or C#?
Where can I find simulators for iPhone for testing my apps.
How to write them?

You need at least a small Objective C stub to hook into the system and deal with provided services (including getting input), but your program can be primarily in C++ if you would like. Apple seems to disallow C#; tools such as MonoTouch appear to be banned by the current developer agreement.
With a Macintosh, you go to Apple's developer website and download the tools and SDKs for free. They only run on the Mac.

You will want to start here for iPhone development:
http://gemma.apple.com/iphone/index.action
This is where you will get the iPhone SDK, simulator, and other essential tools.

You can use C, Obj-C, and C# (via MonoTouch).
C++ is a partial via Objective-C++. If you're serious about iPhone development though, I would suggest learning Objective-C.
Apple seems to reserve the right to kill the ability to run any application that wasn't writting in either C or Objective-C.

As far as I know, you can use C# for the iPhone using MonoTouch.
Another tool is unity, which is geared towards games and is based on the same codebase.
Both of these are proprietary and cost $$$.

Related

How does Xamarin for Android (Mono for Android) compare to native Android development?

I've recently chosen to learn C# and develop mobile apps using C# on Xamarin. Particularly for Windows Phone and Android development. I know that Windows Phone app development is mostly C#, and that Xamarin can compile native code for Android, but how does it compare to native development in Java? Will I be able to use EVERY or at least most (like 90%+) of the Android SDK and extensions using Xamarin?
The main thing which I think there is to consider is your preferred programming language - which in your case is C# - and using that. The only thing that is of concern to me when building an app in C# as oppose to Java is their is not as many 3rd party references to use as there is with Java. You will find yourself downloading example files and reverse engineering them in order to learn how to do new features, you will have to search intellisence far more to find what something is using if you can only find a Java based example of something. One thing which you will find though is that it usually can just be the same method as what is in Java but the first letter being capitalized. LINQ is a major benefit I find in data manipulation which is not available in Java.
Good luck with whatever you choose, James
I did not do any stats or study of Xamarin C# coverage of Android Java API, but in my work, everything that I needed when porting code from Java to C# was there. Also, Xamarin says that for new Android SDK releases they usually have C# counterparts released within 24 hours. And, as #dotToString remarked, you can add Java jar libraries to Xamarin C# project and make calls to them if necessary.
Performance is another matter - I don't believe it runs natively on Android. Rather, Mono runtime is somehow interpreting the byte code. I did some comparison of Java vs. Xamarin C# code performance on real life code, see more at:
Does anyone have benchmarks (code & results) comparing performance of Android apps written in Xamarin C# and Java?
Greg
you can use all of the android functionality and java library interop. also, you get the advantage of non windows specific .net including linq.

iOS games development

I have just finished studying C with some website, and I covered most of the basic-intermediate things.
Now I want to develop iPod\iPad apps, using Objective-C as I understood it's the best option.
But from reading many guides, I still haven't came across one sure answer - Can you develop iOS applications using Objective-C on a PC, Windows? I know you have to pay these 99$ to be allowed to develop and to be given access Apple classes, but it's okay with me.
If you can not do it on windows, what will be the next best option? I know you can create iOS games using Unity and C#, I have it installed but I still didn't find out how to create an iOS project. And I couldn't find a simple guide for iPod apps with unity, that would be nice, too.
If the best option is not unity, what will it be? I have intermediate-high knowledge in .NET (Thats the way it seems in the forums I'm usually at... here I am a simple beginner) and I know C# syntax the best, but I know VB too. And C, and a bit C++.
Thanks :)
the short answer is no. but there are ways around it if you don't want to put the app in the marketplace
You can code Objective-C in Windows, however you will not be able to compile. http://kdevelop.org/, http://code.google.com/p/objectiveclipse/ and http://www.bloodshed.net/devcpp.html Dev-C++ are compatible with Objective-C, for example. I haven't had any experience with them, however.
XCode is still the best for this task, and I'm not sure if you would call this being able to "develop iOS applications on Windows", but I tend to code quite a bit in Notepad / GEdit anyway, so the answer is "kind of". You'll need a Mac to go anywhere further than coding though, like being able to debug.
The Unity iOS development does not come with the free version of Unity. Instead, you would have to purchase a separate license (in addition to the $99 that Apple will charge you to become a developer, I believe.) I myself have never used Unity to develop iOS games, so I don't know how well the process works.
Ideally, however, iOS development really is meant to be done on a Mac. XCode is the primary IDE used for iOS development and it is Mac-only.
Another option is to generate iOS game with Flex 4.5, which allows you to write and test code on windows and you can package it for iOS. But you have to learn ActionScript and MXML for it.
From Adobe's Website
Flash Builder 4.5 includes full support for building ActionScript® applications for Apple iOS. Flex support is planned to be available later in 2011
You can check out
Corono -- http://www.anscamobile.com/corona/
Unity -- http://unity3d.com/
Cocoa2d -- http://www.cocos2d-iphone.org/
Depending on what you are looking, all of them has nice docs that you can go through about their capabilities.

Reflexion on language to develop cross mobile app (android, iphone, wp7, other)

I'am a c# developper and I seek the best language to choose to be able to reuse some code in a perspective of port some future apps into mobile devices for free (open source perspective).
Should I use Java (and so learn it), or can uses C#.
Monodroid and monotouch are not free and monotouch requires a mac hardware (I only have norml pc with Linux and Windows and may run mono on both)!
So it will be difficult to use c# for android or iPhone, am i wrong ?
Well, we (Resco) bet on C# and .Net/Mono. This covers nearly all platforms. (We currently have products on WP7/Android/iOS/WM.)
But taking into account recent developments Mono seems to have very uncertain future. Nobody will tell you right now what's going to happen.

Is Mono for OSX viable for learning C#?

I need to learn C#. All of my computers are Macs running the latest version of OS X. I do not want to use Windows, but I will if I must.
That being said, as a new programmer, can I learn C# efficiently with this Mono platform on OS X?
Edit I'm looking to learn C# to gain programming knowledge and start indie game development. After a reasonable understanding is achieved I will then look at some gaming frameworks/platforms and or a more OS specific language.
In a word: Yes.
First of all, thanks Jonathan Pobst for updating What Is Mono page. With that said, Mono supports all versions of C# at present, that is 1.0 to 4.0.
Since your plan is to learn the language first before looking into other things, such as frameworks and tools, you should be fine with Mono. Once you start getting into platform-specific development (i.e., Windows GUI), then you might want to consider switching over to a Windows machine.
http://mono-project.com/What_is_Mono
http://en.wikipedia.org/wiki/C_Sharp_(programming_language)#Versions
If you are going to be developing for Windows, then using a Windows machine is your best bet. If you are simply trying to learn the language, Mono should be fine.
You should be able to, but just keep in mind that while most of the example code will work, some may not on the Mono framework as the implementation is not 100% compatible with .NET Framework. Also, of course some things like WPF aren't be supported by Mono.
I have used Monodevelop on Linux and it mostly works but because I also develop on Windows with VS2010, I am put off by using the inferior Monodevelop but as a newbie it shouldn't matter to you much.
Yes that should be fine seeing as MonoMac has come out. http://www.mono-project.com/MonoMac
If your wanting to use it for games with OpenGL, download this repo and look at the openGL stuff to get started. Then go to places like NeHe to learn more about GL ect..
You will need to download & install git to pull the repo:: http://git-scm.com/download
MonoMac Samples:: https://github.com/mono/monomac/tree/master/samples/
NeHe:: http://nehe.gamedev.net/
Code Sampler:: http://www.codesampler.com/
Depends.
To just learn the C# language and CLR core libraries which are not graphics related, C# / MonoDevelop is okay.
To learn graphics programming, game programming for OS X, I suggest you first learn Objective-C, Cocoa and then MonoDevelop/MonoMac. The reason is that the Cocoa API's are designed around the Objective-C language which has fundamental differences to C#. Using Cocoa via C# is easy to begin with, but quickly makes little sense unless you understand Cocoa patterns & Objective-C.

Can Adobe Air be the best solution for a Mac and iPhone application?

We are at a crossroad as what development tool to use for our application. We do not know if
we will go for Adobe Air or use the traditional road which is Objective-C and Cocoa. The software is similar to www.riffmasterpro in functionality. Is Air the best solution here?
Well, firstly, Flash isn't supported on iPhone so there is no Air platform for iPhone (at least, none that I know of - correct me if I'm wrong).
Secondly, native Objective-C applications on Mac will always surpass Air applications with regards to how well they tie into the OS. An example of this is TweetDeck. It's an amazing application but it just doesn't feel like a Mac app (no meaningful menus, no growl integration, etc...). Mac users are typically very specific with regards to how their apps behave.
I would advise that if you want to write Mac applications (and iPhone applications) to rather stick with Objective-C.
If your primary concern is cross-platform (with the exception of iPhone) then Air is an option worth considering.
If you're looking to build an app solely for the Mac/iPhone platform, I would suggest using Objective-C instead. Adobe AIR's strength is that it can be installed and used cross-platform with little problem.
One of the downsides of that, though, is that performance will never be as good as something that ties directly into the operation system.
problem of using middle frameworks is that you will never have the potential of the hardware, in other worlds you will not be able to use any feature that Mac/Windows can give to you by the hardware, you wll always be attached to what the framework will give to you and hope that you can do everything that you need...
specially in your music application.
regarding the Adobe Air framework, it is a good idea to cover both Linux, Mac and Windows computers but you will not be able to run it under the iPhone because there is no Adobe Flash supported... Adobe is making a flash player for the iPhone, but I do believe that will ot support Air, at least by the near future.
For the iPhone you can build a Web Application or a SDK Application, the last on, and if you will use SDK 3.0, you will find plenty of good things to use it to, but you need to develop a full application from sctrath.

Categories