Suppose I have written a little program by Xcode 4, how can I test this program in iPhone instead of the iOS Simulator?
Should I export the program to a file like .apk(in Android) and installing in iPhone?
Or I must sign it and upload to App Store, then install it by App Store?
Two options:
Pay Apple $99 to become a developer.
Get a jailbroken iPhone.
If you want it on the App Store, then you must take option 1.