Harpy is a utility that checks a user's currently installed version of your iOS application against the version that is currently available in the AppStore. If a new version is available, an instance of UIAlertView is presented to the user informing them of the newer version, and giving them the option to update the application.
- The left picture forces the user to update the app.
- The right picture gives the user the option to update the app.
- This option is configurable in Harpy.h.
-
Copy the 'Harpy' folder into your Xcode project. The following files will be added:
- Harpy.h
- Harpy.m
-
Import Harpy.h into your AppDelegate or Pre-Compiler Header (.pch)
-
Configure the 5 static variables in HarpyConstants.h
- You can remove the #warning in Harpy.h after customizing those variables.
-
In your AppDelegate.m, add [Harpy checkVersion] after calling makeKeyAndVisible:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Customization on application launch … // Present Window [self.window makeKeyAndVisible] /* Check AppStore for your application's current version. If newer version exists, prompt user. Declare immediatley after you call makeKeyAndVisible on your UIWindow iVar */ [Harpy checkVersion] }
And you're all set!
- As of 2.0.0, no extra configuraiton needs be performed to avoid having the AppStore reviewer see the alert.
- Moved customizable strings to new file, HarpyConstants.h
- Aaron Brager in v1.5.0
- Claas Lange in v2.0.0
- Josh T. Brown in v2.0.0
- Pius Uzamere in v1.0.1
Created by Arthur Ariel Sabintsev