In-app Updates

In-app update is a separate library from Apptics and is used to show new version available alerts in Apple apps as per the configuration done in the Apptics web console. Refer to the user guide to do the configuration in the web console.

There are three different types of update alerts that you can configure, i.e. Ignorable, Remind me, and Force update. There is also an option for the non-supported OS.

Installation

Copiedsource 'https://github.com/CocoaPods/Specs.git'

target '[TARGET NAME]' do
  pod 'AppticsInAppUpdate'
end

Add the SDK

Configure the in-app updates in the Apptics UI, refer to the user guide.

Import

Copied#import <AppticsInAppUpdate/AppticsInAppUpdate.h>
Copiedimport AppticsInAppUpdate

Show the pop-up

  • Call ApAppUpdateManager.checkforUpdateAvailability method to check for the available update.
  • If you implement the completion block completionHandler, this will disable the Apptics UI. You can show the custom UI inside the completion handler.
  • Set the completionHandler to nil to trigger the Apptics UI.
Copied[APAppUpdateManager checkForUpdateAvailability:<#^(NSDictionary * _Nullable updateInfo)completionHandler#> with:<#(nonnull UIViewController *)#>]
Copied APAppUpdateManager.check(forUpdateAvailability: <#T##(([AnyHashable : Any]?) -> Void)?##(([AnyHashable : Any]?) -> Void)?##([AnyHashable : Any]?) -> Void#>, with: <#T##UIViewController#>)