How to block users from using a version of your iOS app?

There is no way of blocking certain versions of your app once they have been released. Apple does not provide any mechanisms that allow publishers to notify the users who have their apps installed.

Since this functionality doesn't come out of the box, developers have to implement this on their own. That means creating a separate server, integrating the SDK, and building a user interface that allows the app version management.

Luckily, there's a simple solution, with Semaphr, and this can be achieved easily, in 3 easy steps. If you have already integrated Semaphr, jump to step 3.

1. Register for semaphr

new app

The first step is creating an account and adding a new project.

Semaphr, allows you to bundle all your apps in a single account, so if you have multiple apps, you can add them all.

A project has an iOS and Android application, so if you support both platforms with your digital product, you can add them both.

2. Integrate the SDK

configure

Integrate the SDK, go to Settings -> Integrations, fill in the details of your app, and follow the instructions.

Copy the bundle ID from XCode by selecting your target and clicking the General tab. Bundle Identifier is found under Identity.

Integrate using SPM

If you're using SPM, copy the SPM project link and past it into Xcode's SPM module finder, more details on how to integrate an SPM package can be found here.

Integrate using Cocoapods

If you're using Cocoapods, copy the pod name and add it to the Podfile, and install the new pods, more details can be found here.

Initialization code

code

Add the initialization code, and copy the initialization code (it will automatically be copied with your API key if you press the "Copy to Clipboard" button), and add it to your app.

Usually, this is added to the AppDelegate, or if you prefer add it to your Scene delegate.

Save your integration and run the app.

3. Block an app version

block

To block a certain version of your mobile app you need to go to messages and add a new one with the message type "BLOCK".

Press "Add a new message", and fill in all the details. Next to the form you can see a preview of the message as it will be displayed on your users' phones.

Title & description

You need to fill in a message title and a message description.

In the details sections, you can add links, that are going to be clickable and will take users to their default web browsers to the link you've specified.

Message type

As a message type, select Block, this will ensure your users won't be able to access the app, in the specified schedule.

Versions

Here you need to select a range (= or <) and an app version.

If you select Exact (=) that means only that specific version will be affected by the message. If you select (< Lower than), all the versions lower than the selected one will be affected.

To illustrate this let's say your app has the following versions: 1.0.0, 1.0.1, 1.2.0, 1.3.0.

  • If you add an Exact rule (=) for version 1.2.0, your message will only be displayed to the users of the app which are on version 1.2.0. Other versions will remain unaffected.

  • If you add a rule for Lower than (<) for version 1.2.0, your message will apply to all the versions lower than 1.2.0 -- in this example 1.0.0, 1.0.1. Other versions will remain unaffected.

If you just implemented the SDK and you don't see your app version, that means, you have NOT started the app with the SDK integrated, or there are issues with the integration. In this case, check if the SDK is integrated properly -- if something is wrong, you'll see error messages in the console log.

Schedule

You need to pick a start date and time for your rule, and optionally and end date. Your message will only be displayed to your users in the selected timeframe, if you want to add a message for an indefinite amount of time, select your desired start date and leave the end date empty.

Publish

Once you click Publish the new message is added and your users will start seeing it when bringing the app to the foreground.

Should you wish to disable the message, simply go to Messages, click on your desired message, and remove it, once a message is removed, it will have no effect on the users.


For more details about the integrations, and the iOS SDK check the documentation, or if you have any questions write us an email at [email protected].