Fork me on GitHub

Alex Rupérez

Language: Objective-C
Published: 26 Jan 02:32
Last push: 07 Apr 19:34
Description: Notify users that a new version of your iOS app is available, and prompt them with the AppStore link
View on GitHub



Notify users that a new version of your app is available in the AppStore


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.
  • You can configure this option in Harpy.h.

Forced Update Optional Update

Installation Instructions:

  1. Copy the 'Harpy' folder into your Xcode project. The following files will be added:

    1. Harpy.h
    2. Harpy.m
  2. Import Harpy.h into your AppDelegate or Pre-Compiler Header (.pch) file

  3. Configure the 4 static variables in Harpy.h

    • appID
    • kCurrentLocale
    • kDaysToWaitBeforeAlertingUser
    • forceUpdate
    • You can remove the #warning in Harpy.h after customizing those variables.
  4. 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!

Important Note on AppStore Submissions

The Problem

A lot of users, including myself, use the Semantic Versioning system. This makes it hard for Harpy to compare versions as floats. Therefore, versions are compared as strings.

Another problem arises with the the JSON results that Apple returns. It only contains the current publicly available version of your app. For example, if version 1.2.5 is the newest version, only that version will be returned inside the JSON results

Submitting a new version of your App to the store causes Harpy to pop the UIAlertView to the App reviewier. No one wants this, especially the revieiwer.

The Solution (Updated in v1.5.0)

  • Set the value of kDaysToWaitBeforeAlertingUser in Harpy.h to a value greater than the number of days that you think your app will be in review. A few days after the date stated at ShinyDevelopment's ReviewTimes site is usually a safe bet.
  • By default, this value is set to 14 in the application.
  • Setting this value to 0 pops the the alertView on each launch of your application

Release Notes (v1.5.1):

  • Added canOpenURL verification
  • Added NSLocalizedStringFromTable method for make translations easier
  • Added spanish translation

Previous Release Notes:


  • Smarter submission system for bypassing Apple's reviewers during the review process



  • Initial Release



Created by Arthur Ariel Sabintsev