Is Android development restrictive in any way like for the iPhone? - iphone

Is Android development restrictive in any way like the iPhone, or can you download whatever and from whoever you want?
I want to learn about development for either iPhone or Android, but from what I hear iPhone development is pretty restrictive!

There are a variety of areas to consider regarding the relative restrictiveness of the two platforms.
The Market
Android Market is undoubtedly less restrictive than the App Store when it comes to the submission process. The upside is that you can get pretty much anything you want into the Android Market. The downside is that you can get pretty much anything you want into the Android Market (a market flooded with spam "applications" is in some ways a restriction).
A big negative on the iPhone side is the fact that your options for installing applications that are not in the App Store are limited -- you can either distribute the application as a beta (limited to 100 users) or jailbreak your iPhone. Android, however, allows you to install apps from anywhere, including a web page.
The Applications
One of the core design philosophies of the Android platform is "All Applications are Created Equal", which is supposed to mean that you can freely replace applications on the phone with a third party version. In practice this is not really the case, as many of the Google applications either have special capabilities not available to most applications (see: Android Market) or use undocumented/native APIs (see: Calendar).
The iPhone on the other hand makes no such claims about equality, and the Apple stance in general is "There is only one way to do it, and that is the Apple way". Additionally third party iPhone applications may not run in the background while Android applications can. New for iPhone OS 4.0 is the ability for apps to run in the background. One thing iPhone applications can currently do that Android applications can not is receive push notifications. New for Android 2.2 is the ability for apps to receive push notifications via something called the Android Cloud.
The Source
Android is open source - mostly (some firmware components are closed source). Even so, there is some rocket science involved just in getting the Android codebase to compile. In addition Google has sent cease & desist orders for redistributing custom images that include the Android Market and Google Maps application.
The iPhone is completely closed source, and recent changes to the developer agreement have been controversial as they mandate that all apps submitted to the app store be originally written in "Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs"
The SDK
The Android SDK can be freely downloaded; the iPhone SDK requires free user registration to download. Android development can be done under Mac OS X, Windows or Linux, while iPhone development is only possible under Mac OS X. You'll also need to pay for the $99 iPhone developer account if you want to test your software on an actual device (rather than the simulator).
The Userbase
And last but certainly not least, the userbase. When this answer was originally written the iPhone had a much larger userbase and was growing much faster than Android. This is changing as Android begins to support multiple carriers and hardware platforms (see: the Open Handset Alliance). The list of devices running Android is now quite long although none yet match the popularity of the iPhone.
Some analysts are now reporting that Android is outselling the iPhone and are predicting that Android will soon overtake iPhone for market share. Other analysts think that Apple will make up ground when the iPhone 4g is released. The former seems more likely based on the parallel history of the PC industry -- Apple's design and user experience were copied by GoogleMicrosoft and opened up to run on commodity hardware.

Nope! That's the beauty of Android. Even though there is a AppStore equivalent, you can download an app from anywhere. Plus, it's programmed in Java, so you don't have to worry about all that mundane stuff like garbage collection (just at the cost of speed).
Don't mean to insult the iPhone. It is a great platform too.
EDIT: A lot of people have been noting that the iPhone APIs are not restrictive, but rather the approval process is. This is true, however the iPhone's APIs are still somewhat limited, in the way of low level hardware access, backgrounding (only notifications in 3.0), etc.
iPhone 3.0 is a step in the right direction, but there is some work left to do.
Also, have you considered making JB iPhone software? I'm not sure of it's market share, but I do know of a lot of people with Jailbroken devices.
EDIT: I have read in some more posts on similar questions that Android's Java can slow things down due to the Garbage Collector. Just something to watch out for.

If you say iPhone is restrictive, I would describe Android as immature.
There are still many bugs in Android that you will inevitably run into if you are doing some none-trivial programs. Some of those only exist on the emulator while others only on the actual phone.
Though in my experience, developing on Android with Eclipse feels just as good as developing on iPhone with Xcode, if not better. The tool set provided by Google is very complete and is cross-platform. Garbage collector does make huge difference while programming.
I'm assuming you already have a Mac otherwise the iPhone wouldn't be an option at all.

iPhone development isn't particularly restrictive. Getting the resulting app on Apple's App Store is the restrictive part.
If the app you're working on follows Apple's guidelines on what an iPhone app is allowed to do, picking that as your initial development platform seems a no-brainer. If it violates Apple's guidelines and can't be modified to follow them, your market will be restricted to jailbroken phones - a very small subset.

Well is Apple open at all? Uhm.. eh.. no. Closed hardware, closed software, closed everything. I think Alcatraz is more open then Apple, at lease you get to leave your cell there.
You can write an application for the iPhone. Will it get approved? Well not sure. They could deny it for any reason whatsoever. You may have used a blue background and Apple only likes white and gray, thus deny.
However with Android it is completely open. You can develop for it, or even develop Android itself. No fear of ever being denied.
But in all seriousness. Apple has a larger market share, millions of people use and love the iPhone and they will most likely not be leaving for quite a while. While on the other hand the Android was for T-Mobile. Does anyone even use T-Mobile?
IMO if you do not have a gPhone I would develop for the iPhone. However as much as I dislike the Apple philosophy of being such a closed nature, they are the better bet if you wish to make some money with your application.

There are some restrictions...
some functionality requires rooted phones (e.g. Wireless Tether for Root Users)
distribution via the Android marketplace is subject to the Developer Distribution Agreement. Google limited access to this tether app due to their carrier agreements.
some Android APIs are not finished (e.g. Bluetooth HID)

'Restriction' can mean two things:
The ability to install anything you want. Google is very good at that, Nokia somewhere in the middle and Apple is the worst
What you are able to do with you app. They all have arbitrary restrictions on what you can and can't do, but it seems to me Nokia is the least restrictive, Google inbetween and Apple the worst (again).
YMMV

No, you can sign the application yourself and distribute the resulting APK file via your own web server or by other means.

Yes, Android is indeed open and you can publish whatever you'd like to the Market Place
But:
you still need to learn how sign your application and mind the technical posting requirements to the market (like keeping proper version IDs etc.)
if you really want to get/send a package from/to anyone, then the receiver of the package (called an APK file will need to know how to use a command line tool called 'adb' to administer their phone to install & uninstall applications. It's pretty simple to do, but
you need to have Android drivers installed and the SDK tools.
To be fair to the iPhone development model, you can also distribute test versions of your application reasonably easily, though perhaps not as easily as with Android. Your testers need to provide you a special device ID which they get from iTunes while the device is connected, then you create a license file containing keys for all of your testers which you distribute with the release directory of your application. The users then install your application via iTunes.

In most cases no, but Google has allowed the carrier and the device manufacture the ability to restrict certain things. Carriers are allowed to block individual apps. Also carriers/manufactures can prevent certain features of the device.
One example is the Motorola Backflip, it wont let you install non Official market applications. Also some phones do not have access to the Official Market.

Related

how to develop apps for iPhone or iPad in Linux Environment? [duplicate]

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've heard that you need to get a Mac if you want to develop iPhone apps. Is this true?
Is it possible to develop iPhone apps using Linux? If yes, what do I need and where do I download the necessary tools?
To provide a differing response, I'm running OS X and Xcode on a virtualised (VMware) machine on Linux. CPU is a Core2Quad (Q8800), and it is perfectly fast. I found a prebuilt VM online (I'll leave it to you to find)
Xcode/iPhone development works perfectly, as does debugging via USB to the phone itself.
It actually surprised me a lot - but I've had no issues at all.
The answer to this really depends on whether or not you want to develop apps that are then distributed through the iPhone store. If you don't, and don't mind developing for the "jailbroken" iPhone crowd - then it's possible to develop from Linux.
Check this chap's page for a comprehensive (if a little complex) guide on what to do :
http://www.saurik.com/id/4
It seems to be true so far. The only SDK available from Apple only targets the macOS environment. I've been upset about that, but I'm looking into buying a mac now, just to do iPhone development. I really dislike what they are doing, and I hope a good SDK come out for other environments, such as Linux and Windows.
Obstacles regarding the SDK:
The iPhone SDK and free software: not a match
Apple's recently released a software development kit (SDK) for the iPhone, but if you were hoping to port or develop original open source software with it, the news isn't good. Code signing and nondisclosure conditions make free software a no-go.
The SDK itself is a free download, with which you can write programs and run them on a software simulator. But in order to actually release software you've written, you must enroll in the iPhone Developer Program -- a step separate from downloading the SDK, and one that requires Apple's approval.
I think it's rather elitist for them to think only macOS users are good enough to write programs for their phone, and the fact you need to buy a $100 license if you want to publish your stuff, really makes it more difficult for the hobbyist programmer. Though, if that's what you need to do, I'm planning on jumping through their hoops; I'd really like to get some stuff developed on my iPhone.
There used to be a project dedicated to solve this defect: iphone-dev
The goal of the iphone-dev project is to create a free, portable, high quality toolchain to enable development for the Apple iPhone and other embedded devices based on the ARM/Darwin platform.
Regarding the alternative tool chain, Saurik's site is useful but for latest firmware development he indicates building on the iPhone itself and stays clear of indicating that you may need to copy necessary iPhone firmware files to your Linux environment. It's not impossible, but just requires additional work, especially for signing the code (there are open alternative solutions out there as well).
Also, take a look at other guides (for the same tool chain) that approach it more methodically.
I'd suggest to still do the final build and code signing and packaging in XCode (which may mean borrowing someone's Mac) in case you run into problems when submitting the application to Apple. Using the alternative tool chain opens up (at least on the Mac) the possibility of using other IDEs other than XCode for developing the application and again resorting to XCode for the deployment and testing with the simulator.
Of course if you do get the code signing / certificate generation working from the command line outside of XCode then you can install a certificate on your actual iPhone and test there (installing the app via iTunes w/your certificate).
The only way I know of doing development in Linux for the iPhone would be to install Vmware and work on getting OS X running in a virtual machine. With that said there are some "legal" concerns in doing that. It is reported that OS X Server can be virtualized but as far as the development story on that I don't know.
If you are truly serious, that's the what I'd investigate.
Good luck.
You can use Tersus (open source), and it lets you export the app as an Xcode project.
You might be able to write code on a Linux box that will eventually find itself on an iPhone or iPad, but ultimately you would need a Mac to test or deploy the code to the iPhone or to submit it to the App store. So ultimately you need a Mac, so you might as well do the work on the Mac too, with all the tools that Apple provide. There are alternatives to Xcode & Objective-C, such as Monotouch - but these utilize the Apple tools too.
You can with some work run OS X in a VM on Linux. However I should point out that this will break the OSX license agreement, even if you buy the copy of OSX - as it is only licensed to run on Apple hardware.
Sorry to give you this news - the ecosystem around the iPhone/iPad is very tightly controlled.
EDIT: One major exception to this is writing a web app for the iPhone. There are some excellent web apps for the iPhone which are almost as good as user experience as a native app. However I did interpret your question to be about native app development. Web apps, although the user can create an icon for launching them - are still 'second class' citizens.
I've had success building iOS apps on linux using the iOS clang toolchain by cjacker. Basically it consists of the upstream clang and llvm tools from your linux distro, a linux port of apple's linker and some extra tools to help simplify the build process (such as converting xcode projects to Makefile format).
It does take a few steps to install, but you're a software developer so you'd be used to that. I posted an up to date howto for Debian 7 (Wheezy) online:
https://rogerkeays.com/how-to-build-an-ios-toolchain-for-linux-debian-7
Otherwise you want to go with the generic instructions which are a little older:
http://code.google.com/p/ios-toolchain-based-on-clang-for-linux/wiki/HowTo_en
Good luck.
There's a framework called Rhodes.
The concept is based on Ruby on Rails and you develop your mobile app in Ruby and HTML, and you can write your code in a Linux environment. You can then create an account at Rhohub, where you add the code (through GitHub), and it allows you to compile it for iPhone, Blackberry, Android, Windows Mobile and Symbian, all off the same code. You don't have to code in Objective-C for iPhone, nor Java for Android, etc. It does the conversions for you. All you need to do is stick to the Rules for creating an iPhone application (or the Phone's you want to develop for) so it can be accepted at iTunes (or the equivalent market).
This will allow you to add the app to iTunes as well.
I have not found any emulators, however, which means that to test your app you need to put it on an iPhone, which is a mission.
I am using this option as I want to create apps for all phones and I use Ruby on Rails already. If you just want to make an app for an iPhone, then invest in a Mac.
Hope this helps.
You're right non-jailbroken phones are limited to Apple's App store and Apple "has the right" to enforce whatever rule, it's totally nonfree territory.
However while developing, one won't have to deal with Apple at all. You can use e.g. rsync to upload the code to the device and test it.
To a certain extent, yes, it is possible. You can type Objective-C code and set up your projects. You can even test the C and C++ parts of your code with gcc.
What you cannot do:
Use Interface Builder to set up your interface, as it's Mac-only. (Not required, but recommended.)
Compile code that uses Apple's Cocoa classes - they don't exist on Linux.
Test code in the Simulator - there isn't one for Linux.
Compile code for real devices or for the App Store - all this requires tools that Apple only provides for OS X.
You need to get mac for it. There are several tool chains available (like win-chain) that actually lets you write and build i Phone applications on windows. There are several associated tutorials to build the Objective C code on Windows. But there is a problem, the apps hence developed will work on Jail broken i Phones only.
We’ve seen few hacks to get over that and make it to App Store, but as Apple keeps on updating SDKs, tool chains need regular updates. It’s a hassle to make it up all the time.If you want to get ready app you can also take help from arcapps its launches apps at a reasonable price.
iphone app development
I did an attempt to port cocos2d-iphone to GNUstep so that you can Develop game based on cocos2d. However for publishing you need a mac. cocos2d-GNUstep.
I would recommend getting a mac because the ios simulator is amazing for testing in the early stages of an app. But I do know of a small company we work with that develops using Unity so they don't need a load of macs. That way they only need one mac for the office and that's just to compile the final build. It also means it works on android but it really depends on what your building because it's a games engine. You may want to look into web apps using frameworks like Sencha Touch Mobile
Unity: http://unity3d.com/
Sencha Touch: http://www.sencha.com/products/touch/
If you value your time, buy a Mac! I don't know enough about Linux development options to offer a viable solution, but it seems the proposed methods involve some pretty roundabout work. If you plan on seriously writing and selling iPhone apps, I think you could easily recoup the cost of a Mac Mini or Macbook. :-)
You will never get your app approved by Apple if it is not developed using Xcode. Never. And if you do hack the SDK to develop on Linux and Apple finds out, don't be surprised when you are served. I am a member of the ADC and the iPhone developer program. Trust, Apple is VERY serious about this.
Don't take the risk, Buy a Macbook or Mac mini (yes a mini can run Xcode - though slowly - boost the RAM if you go with the mini). Also, while I've seen OS X hacked to run on VMware I've never seen anyone running Xcode on VM. So good luck. And I'd check the EULA before you go through the trouble.
PS: After reading the above, yes I agree If you do hack the SDK and develop on Linux at least do the final packaging on a Mac. And submit it via a Mac. Apple doesn't run through the code line by line so i doubt they'd catch that. But man, that's a lot of if's and work. Be fun to do though. :)

Mobile phone emulator for end users on mainstream mobile phone platforms

I'm trying to develop a pc application(mainly for microsoft windows) to provide mobile phone emulation(especially on game) experience for the end users. It's like if you are an end user, you can download some mobile apps on your pc and test them on your pc rather than uploading to you mobile device before you really wanna have it.
I'm not trying to make it a device simulator with the os img installed, as there is no os img publicly available for some os, and it might not be so user-freindly either. All I wanna do is to load and parse the app installation file and simulate the look & feel of it, and help our users to make their decisions if they wanna install it or not.
If feasibly, we'd like to support the following mobile app file formats:
1). jar for j2me application(midp 1.x, midp 2.0, cldc 1.x, opengl 3d, feature phone api like nokia, sansumg, simense, motorola, etc.)
2). sis/sisx for symbian os(s60 v3, s60 v5, s60 uiq, s^2, s^3 etc.)
3). apk for android os(1.6, 2.1, 2.2, 2.3, 3.0 etc.)
4). cab/exe for windows mobile(mobile 2003, mobile 5.x, mobile 6.x etc.)
5). ipa for iphone(iphone 3g, 3gs, iphone 4, ipad, ipod etc.)
For jar it would not be such a big problem, as there are some apps like kemulator, microemulator succeed in doing this. For symbian/android, they might be no problem as they are both opensourced. But for windows mobile/iphone, they are big problems as there are no source code to reference, especially for iphone such a proprietary os.
Any suggestions or clues are greatly aprreicated. Thanks.
I can speak for Symbian - You can't run SIS file contents on Windows unless you really go into assembler level and rewrite the full emulator.
For example Symbian emulator that comes with SDK uses separate libraries for emulator and for final build (GCCE or ARMV5) so you have to make a separate build for a program to run in emulator.
What you are trying to do is a lot of work and your duplicating the work done by the simulators / emulators for each of the platforms.
I think there would be two main ways to do this:
What your suggesting and either use simulators / emulators. (Maybe the ones supplied in the development SDK's for each platform?)
Use physical hardware and somehow get stream screen captures of each physical device.
Trying to write your own simulators and/or emulators, I think is a lot of work and will take a very long time and for some device types (like iphone) I don't think it will work very well. There may also be legal trouble in writing your own simulator / emulator.
If you go down the physical hardware route, It may cost a lot of money for the initial layout.
Maybe you can do both? Physical hardware for trouble devices like iphone and symbian and simulators/emulators for android, blackberry and windows mobile?
I've got a lot answers after I posted my question on forum.nokia and google android-platform group, and the following contents is trying to complement this answer to this question, hopefully it would contribute to clarify the question for others too.
from forum nokia
I don't want to discourage you, but you've set yourself a formidable goal.
If Symbian and Nokia with all their resources haven't managed to during the last 10-12 years to make a device binary emulator, do not expect it to be easy for a lone, independent developer (especially when the binaries may have OS/platform version and hardware specific dependenies to account for, too).
And the emulators for J2ME, Android and iPhone that are supplied in the respective SDKs, are also no easy one-man-projects, I suspect.
In other words, it is not enough to "parse the installation file" (which is easy), but you'd also have to create the whole device/platform specific runtime emulation environment so that you can execute the binaries (you can't "simulate the look & feel", if you can't run the code).
In any case, as Java (J2ME and Android/Dalvik Java) already are targeting a virtual machine, with those it is easier than native binaries that target actual hardware (Symbian, iPhone, Windows CE/Mobile). Windows Phone 7 and later, is also, to my understanding, running in a managed/virtualized environment, instead of targeting the hardware/CPU directly, so it is a bit like Java in this respect.
In any case, even for Java, it won't be exactly easy for you, as you'd need to create a compatible Java virtual machine and runtime environment.
With all the existing Nintendo, Commodore 64, Atari, etc.., emulators, the developers usually have created the hardware emulator that allows the original binaries to be executed (the apps doesn't know it is not running on the real hardware). With ancient devices with much, much simpler processors/hardware, and which no longer evolve, it is much easier - I imagine - than trying to target, e.g., all Symbian versions and Symbian based phones (hundreds of models, vs., e.g., one Commodore 64).
from google group
Sure - "all" you need to do is read the entirety of the api documentation at
devloper.android.com, and then re-implement everything yourself. On top of
that, you will need to come up with a way to execute the arm machine code in
jni libraries, and somehow hook it into your emulation of the rest.
When you are finished with the project, you will be in a position to write
them.

Adobe Flash CS5 and iPod Touch/iPhone

As you may all know (if not, click here), Apple has finally decided to allow apps created using Adobe Flash CS5's iPod Packager on the store. Owning a PC and not a Mac, this is great news for me as I longed to give a crack to iPod development.
I did try to use a fake certificate (yes I admit it) to publish an app and test it on my brother's iPod Touch (running on iOS 4.0), but the app wouldn't install. Is it because the iPod detected the certificate, or does he need to update his device?
My real question, however, is if it's worth paying 99$ for a developper certificate or not now? I was leaning towards the idea but the restriction has just been relieved (if you'll allow me the expression).
Thanks.
-Christopher
I've done quite a bit of AS3 Hacking along with Objective-C hacking, and on a surface level, the workflows are somewhat similar. There are plenty of differences, for instance the syntax has quite a learning curve, and creating UI elements is a breeze in Xcode, and has to be done by hand in flash (unless you like the way flex looks), whereas tapping into opengl and even using core animation can be daunting to a flash developer used to animating things around the screen.
This is important, because I really don't think it's worth the $99 unless you plan on developing in Xcode. A ton of the power of being an apple developer is in that amazing IDE, and missing out on that makes iOS development sound terrible.
There is however, 1 reason I would still buy it: if you already have an app you'd like to release, and all you want to do is get it on the app store. If you have a game you'd like to try releasing, it's absolutely worth the $99. Even if you were to develop it in Obj-C, there's still no guarantee it'll make it through the apple approval process, so you're not really risking much more than any other developer. What you wouldn't want to do is pick up the certificate, then sit on it and wait for it to expire while you're working in an IDE that has no relation to the program.
Buy the certificate if:
a) You already have a mostly-complete app you'd like to release on iPhone.
or
b) You also plan on setting up a Mac dev environment (and probably not until you have it set up).
Don't buy it if:
a) You don't plan on buying a Mac, using Xcode, or releasing an Obj-C app.
or
b) You are just toying with the idea of making an iPhone app, and haven't made any steps towards it yet.
I would definitely not base your decision on if apple will rescind it's decision or not - it's unlikely that they will not allow adobe packaged apps without good reason, and even if they do, it's the same risk any developer takes when making an app for release on the apple store. Apple can just deny it if they feel like it, and there's not much you can do about it.
Think of the $99 as the cost of the privilege to submit an app to apple for review. Even if you plan on developing on a Mac, Xcode is free, and there's no real reason to get a certificate unless you plan on testing on an iPhone or releasing your app. If you're still in a planning stage, skip it until you're ready to go.
I was wondering the same thing. Looking at the way the Android vs. Apple app thing is moving, I'd say yes -- it's worth paying $99/year to be a real mac app dev.
However -- I don't think that developing on anything other than a Mac with XCode is worthwhile.
Adobe Flash Builder (used to be called Flex) 4.5 also exports to iOS apps ( http://www.adobe.com/devnet/air/articles/packaging-air-apps-ios.html), which is great and all, but the fact of the matter is
A) it requires the Adobe AIR runtime to be installed on the phone
B) memory management is a totally different story between as3 and ios
The result of an auto-conversion is bloated file size and poor performance (see comments here: http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html). and related issue here: Size of the Flash Builder 4.5 application after packaging with iTunes
Not to mention there is no reliable emulator for iOS that you can legally get your hands on... I actually just got a mac mini and XCode -- mac mini ~$500... but XCode is a great SDK, and the emulators rock.
If you're serious about developing for the iPod I would get the developer license and at least a cheap Mac Mini. If you actually develop something you want to release you'll probably want it on the app store. It takes some time to get the license so you should just start the process.
If you like to tinker and don't plan to release anything (or don't want to have to use an app store) playing with Android might be more to your liking. There's no cost to get started or to put your apps on your own device other than actually having an Android device. (The same might be true for Windows Mobile, would have to double check).
I think, yes. It is still worth paying the amount...

iPhone: Software Development And Distribution

I have a few quick questions about the iPhone software development. I did some research about the topic, but there are a few specific things I would like to ask here, because I will have to estimate the cost of the required hardware and software, before I am allowed to buy anything. I never did any Mac development nor have I ever owned an iPhone, so needless to say this is quite hard for me.
I will buy an iMac mini with 2 GB RAM for iPhone development. I will have to use it at the same time as my regular PC, but the majority of the time I won't use the Mac at all. Do I have to buy an additional monitor, a mouse and a keyboard or is there a better solution?
I will have to port a C library to the iPhone platform and develop an iPhone application that uses the ported library. Do I need anything else than the iPhone SDK to do this?
If I use an external library (see above), can I test the application with the integrated emulator, or is it recommend to buy the device?
I will have to send data to a remote webservice. Aside from this I don't require any other features. Can I just buy the iPhone online from another country (the iPhones here are sim locked), or should I buy one with a contract?
When the application is ready, it will be installed on a few iPhones owned by our customer. Because of security reasons it is crucial that there is no third party involved in this process (i.e. the application should not be distributed on the app store). Is this possible?
If you don't use both computers at the same time it's perfectly possible to use the same monitor and keyboard / mouse for both computer
With the SDK you're set, also, you probably won't need to port the library since C is a subset of objective-C and your library will be available for use with the sdk right away.
The simulator can understand external library just fine
Countries like italy sell the iphone without a contract, you won't have any problem with those. Bear in mind that if all you need an iPhone with a camera then the 3g, 3gs and even the 2g will suit your needs, as all of those have cameras.
Yes, there's an option for distribution called "Ad hoc distribution". Using that you can install you app in your client phone without going thru the appstore

How do I compile for the device without a certificate?

I may just be looking in all the wrong places, but is there no way to compile a Cocoa Touch application for ARM without paying for a developer account and certificate?
EDIT: To clarify: I am trying to build for a jailbroken device. I simply want to test code on-device without paying for anything.
You're not going to like this answer, but I and everyone else on SO will tell you that developing for a jailbroken device is 10 times worse than developing legitimately with a developer account. It's not really that expensive, and if you don't have a mac, a low end Mac Mini isn't all that costly either. If you would just want to get some mobile handset practice in, might I suggest developing with Google's Android. The SDK is free and you can get a nifty plugin for Eclipse that has a device emulator as well as a GUI builder. The only downside is that the device support is minimal at the moment. But hey, you can be on the bleeding edge of a technological revolution.
Unless you have jailbroken your iPhone/iPod Touch an Apple iPhone Developer account is required.