Version Compatibility of Application - iphone

After uploading the iPhone App to the Appstore, how will the appstore handle the version compatibility of the devices ?
For example "Twitter" app, when clicking on "Install" it pop ups up with message saying "App is compatible in ios5"
How can this be done in my iPhone Application which I'm going to upload in AppStore ?
Will this be done by APPLE or do we need to code from our end.

It will get set automatically by the value you chose for your deployment target for your app. Check the build settings for your target.

Whenever you are using classes from a new SDK version and you are targeting an older versie of the OS you should check at runtime if a class is available.
For example:
if (NSClassFromString(#"TWTweetComposeViewController") != nil) {"
TWTweetComposeViewController *twViewcontroller = ....
} else {
// Some other twitter library
}
This is the save way to check support for a specific class.

Related

Is there a way to password protect the download of mac app from appstore?

In one of our project we have 2 binaries, one for iPhone and other for mac. These two application communicate each other to achieve the functionality. We want the user to download and install the iOS app first and then let him download the Mac application.
Is there a way to restrict the user, if the user try to download the mac app before downloading the iPhone app?
Short answer: If you're referring to the Mac App Store, then no.
Long answer: Both, the App Store and the Mac App Store give you no way to control who downloads your app and you are not able to get information about what a user already downloaded.
You could of course ask for an e-mail address in your iOS app and make sure your users register to a server before you e-mail them a link to a private download page (not the Mac App Store).
General advice: I think there is something wrong with the design of your app. It's not clear to me what you're trying to achieve and I bet your users won't either. If you want to make sure they pay for the iOS app before using the Mac app then just alert them in case they downloaded the Mac app first. You need to write some custom service to check for this of course. If there is some functional problem that requires the iOS app to be launched first then you should solve this yourself and not put that burden on the shoulders of your users.
You could allow anyone to download, but simply block any operation until the iOS app has sent some kind of approval token to a server or iCloud for example.
You have to download mac application first, and after downloading you can check if user downloaded iOS app or not, but before downloading you can't check the downloading state of iOS app, because application will upload on appStore not on your personal store.
After downloading iOS app set some flag value on server, and check this flag value on mac app downloading, it it is 1 then download else show alert.
After iOS app downloading -> Set flag value (ios Download=1) to your server.(make web service for this).
After downloading mac app -> Call you web service to check that flag value. if it is 0 then show alert to download iOS app first.

Re-Installing IPhone App From Inside The App

I want to find a way if it's possible to re-install an IPhone app from inside it?
Let's say my users have the app already installed in their phones and now new version is released, can I make my app such that it will check over internet if new version is available and if it is, download it and ask the user to install it. If user says yes, it will first un-install the current version and will install downloaded version.
Is it possible anyhow?
Apple wont allow this.
For one reason, un-installing the app removes all the user documents (if applicable), so theres no way to preserve user data.
Apple already has a medium for updating (iTunes App Store).
If you want to be able to check if there is a newer version of your app, you can do that simply by checking a text file (for example) on your server, and notifying (by UIAlertView possibly) the user that there is a newer version of your app. But again, Apple already has a standard system in place. (Badges on the App Store icon)
probably not because to uninstall an app it requires the app to be closed
You don't have to do that. If you upload a new version to the app store, a notification badge will appear on the app store icon on your users' phones. You aren't allowed to install apps any other way than through the app store, anyway.
It depends on your app and what you want to update. It's not possible to reinstall the native app, but you can download data and update your app using that data. For example, we have an app in the store which is mainly a webview inside the native app. The first time it launches, it uses the internal data, but checks our server if there is an update. If there is an update, it downloads remote data and replaces the internal. It's what most magazines do for updating their libraries.

How to prepare iPhone app to be able for upgrading to the latest version available on AppStore

How to prepare app to be able for upgrading to the latest version available on AppStore
While setting the CFBundleVersion is something I always do, the displayed app version and and upgrading is handled in iTunes Connect and not something you actually "prepare" from a code perspective.
a) Logon to iTunes Connect.
b) Choose "Manage Your Applications"
c) Click the app you want to upgrade
d) Click "Add Version" - this is where you will supply the version number
e) Fill out the information as you would with any app.
Once approved the upgrade availability is handled by the end user's iTunes and alerts them that an upgrade is available. I have yet to use it, but I believe Apple has added the ability to choose when an approved app is released.

Build iPhone app for 2.2.1 but use 3.0 features (copy & paste)

I want to add copy and paste to my application but make it available to 2.2.1 devices. How should I proceed?
I saw SDKs and Deployment Targets.
If I understand correctly, I set the base SDK to 3.0 in order to be able to compile with 3.0 API (copy & paste), but I set the target for 2.2.1 to make the application available on 2.2.1 devices. In my code, I have to check every time I need to use a 3.0 API, right? Is there an example of code for testing if an object respond to a specific message? If a specific kind of class exists?
See related question which includes a pointer to Apple's MailComposer example...

Is it possible to programmatically change the name of an iPhone app once it's installed on a device?

I'm curious - is it possible to programmatically change the name of an iPhone app that is used on the iPhone OS home screen? I know it's just an entry in the Info.plist file, but I haven't seen any apps doing it.
I'd like to distribute a "Lite" version of an existing app and allow users to upgrade to the full version via in-app purchase. However, once they purchase the app, I'd like to change the app's icon and name to read "Layers Pro" instead of "Layers Lite." I feel like this is important to maintain consistency and a good upgrade experience.
No, it's not possible. The Info.plist and everything in the app bundle is read-only once it's installed on an iPhone.
No, you can't. The only way to change the name of an iPhone app is when you update the app through iTunesConnect.