Jun 22 2010

My First Look at Objective-C

Category: iPhoneJoel Ivory Johnson @ 03:14

I registered for iPhone development almost a year ago and haven't done a danged thing with my registration since this. This weekend I finally decided to take the time to look at it and willful decided that I would neglect most of my weekend demands in favor of learning something new. I've heard a lot about Objective-C (primarily from people that don't use it on a regular basis) and primarily wanted to experience it for myself.  I keep hearing the phrase "It's C trying to be like C++." That's usually said while some one is declaring that Objective-C is not a good programming language. 

My thoughts? I see where the phrase "It's C trying to be like C++" came from. But I'm not going to agree (or disagree) with the statement. When developing in C++ the VTable and other information about the class is pretty much abstracted away or not  accessible to other pieces of code. C# by contrast shares much of this information through the Type class and other metadata objects that one can probe. In Objective-C the class data is actually stored in a struct. An object of type X will have a reference to the structure that defines  members of X. One can walk through this structure, examine the child members of a class, and so on.  

There were some other things that looked notationally cryptic at first but quickly started to make sense, such as one syntax available for calling methods. In the C languages one might see a call like X.DoY(); but in Objective-C one may see it written as [X DoY].

As per usual if I do a lot of reading on something I'm going to end up writing something down. In this case you can see the collection of my notes as an article on Code Project in a getting started article ( http://www.codeproject.com/KB/iPhone/iOSGetStarted00.aspx ). If you see places where it can be improved then be gentle with what you say; this was my first time looking at iOS programming. So I'm sure there are a few things I've missed.  I might come back and read more about Objective-C and eventually write something else. But for now I'm going to return to my concentration and finish up some Windows Phone 7 projects I'm working on.

Tags: ,

Apr 8 2010

iPhone 4.0 Changes

Category: Joel Ivory Johnson @ 15:51

Earlier today Apple announced the 4.0 Firmware update for the iPhone. Only the 3GS and iPad will be getting the 4.0 firmware. The 3G will be left behind. One of the biggest changes in the new firmware is support for multitasking. Now days when some one uses the term its semantics some what varry. So there's the question of what does Apple mean when they say that the iPhone supports Multitasking. I've not yet read the updated documentation yet but SlyGamer in the MSDN forums has read it and found multitasking on iPhone 4 and on Windows Phone 7 Series to be similar.

From his post:

Reading the SDK notes for the multitasking feature, it is even more apparent that it is very similar to the app deactivation that Windows Phone 7 supports. An iPhone app must

- not make any OpenGL calls while in the background.  If it is does, it will be terminated immediately.

- release all unnecessary memory and resources when moving to the background.

- cancel any network-related services when moving to the background.

- save application state when moving to the background.

- avoid using shared system resources while in the background.  Background apps found holding onto shared system resources will be terminated.

iPhone apps are given a tiny amount of processing time while in the background, but they encourage you to not do any processing while in the background.

Also, background apps may be terminated at any time without notice if memory is required by the system.  That is exactly the same as what may happen to Windows Phone 7 applications.

Tags: ,

Feb 15 2010

Update On DragonFireSDK : iPhone Development without a Mac

Category: MobileJoel Ivory Johnson @ 11:18

I just posted an update on the DragonFire SDK entry (for iPhone development without a mac).

Update 2009 15 Feb: More information on Dragonfire
I received a bit more information on the limitations of the SDK. From some one on the DragonFireSDK Team:
I wanted to let you know that the disadvantage you described in your article is strictly for our beta testers. Version 1.0 purchasers will have access to our Build Server where they can actually build their .app on one our our Mac servers. This will remove the "middle man".
More information on this can be found a http://dragonfiresdk.com/buildserver.htm
From looking at the page you can see that if you were to upload your program source an application deployment would be created and sent back to you.

Tags:

Jan 17 2010

Marketplace Comparison article on Code Project

Category: MobileJoel Ivory Johnson @ 15:04

If you've ever been curious about the differences in the online application stores for the iPhone, Windows Mobile, and Android there's a rather lengthy comparison available over at CodeProject.com. Among other things the article covers the registration costs for each of the stores, what it takes to get started with development, and a breif comparison of the platforms.

http://www.codeproject.com/KB/mobile/wm_iphone_android_market.aspx

Tags: , ,

Jan 3 2010

Just Registered for iPhone Development

Category: MobileJoel Ivory Johnson @ 11:22

I've finally decided to pay the 99 USD fee to join Apple's iPhone Developer Program. My day to day development at my job is based on Microsoft technologies. So I have to say that it's influenced a few of my expectations for a development environment. In looking at Windows Mobile development, Android development, and iPhone development I have to say that each is unlike the other.

For Android development if you hae one of the major operating systems (Windows, OS X, Linux) there's an Android development environment available for you for free. You can run your programs on an emulator if you don't have Android hardware or you can run your programs on your hardware at no cost.

For Windows Mobile development you are bound to using a Windows based machine for your development. Since Windows is my primary operating system this restriction is no restriction for me; given that Windows is my choice I can do Windows Mobile development on the operating system of my choice. A common complaint is that the development tools are expensive. But I've got an MSDN subscription (which includes the softwre needed for Windows Mobile development among other things) so I am already using these tools for my day to day occuption and the expense is invisible for me. When developing one can run their programs on an emulator or copy them to the Windows Mobile hardware that they own.

For those that can't afford to get Visual Studio one can still use the free .Net Compact Framework SDK to do Windows Mobile development without using Visual Studio.

The iPhone development cost didn't fit either one of these. As one may expect for iPhone development you are bound to using OS X. Ipicked up a Mac Mini on clearance for 399 USD so that was not a big expense. After hearing the iPhone SDK was free I remember being a little surprised when I found out you could only target the emulator without paying. After paying the 99 USD I was expecting to be able to immediatly begin copying my programs to my iPhone but it appears that I have to wait for my application (as in request, not program) to the iPhone Developer Program to be approved before I can start copying my programs to my phone. That's a bit more restrictive than I am used to seeing. Any one have any idea how long it takes for the application to be processed?

Tags:

Nov 25 2009

DargonFire SDK: iPhone Development without Windows

Category: MobileJoel Ivory Johnson @ 06:35
Update 2010 April 21 :Change in Apple Developer EULA
I see a lot of traffic coming to this page (especially from forums.macrumors.com) so I decided to make one more update. Apple announced in their EULA for the 4.0 firmware that your iPhone executable must be written in objective-C and compiled with their compilers. The impact of this rule is some what ambiguous but it may mean that you cannot use any non-apple solution for development. This includes the Adobe Flash tools, Mono-Touch, and many others. From reading other pages that link to this page there seems to be an expectation that Apple should make a Windows Version of the iPhone SDK. I don't understand where such an expectation came from. Apple's always kept a pretty tight ecosystem and I can't see them making a change that would remove the requirement that any one wanting to make money off of their cash cow (the iPhone) not have to purchase Apple hardware.
Update 2009 Feb 15: More information on Dragonfire
I received a bit more information on the limitations of the SDK. From some one on the DragonFireSDK Team:
I wanted to let you know that the disadvantage you described in your article is strictly for our beta testers. Version 1.0 purchasers will have access to our Build Server where they can actually build their .app on one our our Mac servers. This will remove the "middle man".
More information on this can be found a http://dragonfiresdk.com/buildserver.htm
From looking at the page you can see that if you were to upload your program source an application deployment would be created and sent back to you.

A few days ago I made mention to the Dragon Fire SDK; an SDK said to allow one to develop for iPhone on their Windows Machine. I sent an e-mail requesting access to the SDK and promptly received a 571 Kb zip file said to contain the SDK. I thought it was unusually small. But I went through with following the instructions for compiling the sample application. After following all the instructions I ended up with a program running within an iPhone skin with a moving ball. I took a look at the output from Visual Studio and saw that it was an x86 formatted EXE. It made no sense to me, so I contacted DragonFire to ask how one was to get their application onto an iPhone.

The output was in fact a Windows executable. To produce an iPhone executable one would send their code to DragonFire and DragonFire would recompile it for the iPhone and send back the resulting file. If your iPhone is jail broken then you can install the application on your phone and run it. When you are ready to publish to the iPhone app store you would pay DragonFire a fee (I don't want to state the fee here other than saying it's lower than the cost to register for the iPhone app store) and DragonFire will compile the application and submit it on your behalf. The system is not as much a workaround as much as it is a workflow for those that don't have access to a Mac to do their own iPhone development.

Such a system has its merits and disadvantages. The obvious advantages are that one doesn't have to invest in a Macintosh if one doesn't already own one, the fees to be paid are lesser, and the registration process into the App store is taken care of. The disadvantage is now there is a middle-man that has access to your intelectual property and some one you must go through to for updates. Not to mention from Apple's perspective it is DragonFire and not you that is the publisher of the software. (updated. see text at top of page for explanation). A potential advantage or disadvantage is that instead of targetting the iPhone APIs directly you would be targeting a simplified API made by DragonFire. For those wanting to quickly put a program together this is good. But it also insulates you from many of the APIs available.

Tags: ,

Nov 18 2009

iPhone Development Without a Mac

Category: MobileJoel Ivory Johnson @ 01:25

There's now a gaming engine for making iPhone games available without using a mac available for download in beta form.  The DragonFire SDK (available from http://www.dragonfiresdk.com) is said to allow developers to begin producing games for the iPhone using their Windows PC using C/C++ instead of the dreaded objective-C.  I've not tried it out yet but this certain sounds like something worth looking into.

Tags:

May 15 2009

Web Server for your Windows Mobile Phone

Category: MobileJoel Ivory Johnson @ 22:09

http://serversman.com/support_en.jsp

A japanese company has released a web server for Windows Mobile phones (and iPhone, but the iPhone version can't run in the background).  What sets it apart from other Windows Mobile web servers is that you can actually get to your phone through the internet regardless of the NAT layer that they have in place.  Best of all it's free.

Found vis wmpoweruser.com

 

Tags: , ,