checkForUpdatesFromAppStore static method
Checks App Store for application updates.
Uses application Bundle ID, to check for updates.
trackPhasedRelease
- Indicates whether it should notify about a new version after 7 days when app is fully rolled out or immediately. Defaults to true.
notifyOnce
- Determines if the app should be notified for a new update only once. Defaults to false.
Throws if invoked from a platform other than iOS.
Throws if it does not manage to check for updates.
Implementation
static Future<UpdateData> checkForUpdatesFromAppStore({
bool trackPhasedRelease = true,
bool notifyOnce = false,
}) async {
if (!Platform.isIOS) {
throw UnsupportedError('This method is only supported on iOS.');
}
final data = await _channel.invokeMethod(
Constants.checkForUpdatesFromAppStoreMethodName,
[
trackPhasedRelease,
notifyOnce,
],
) as Map<dynamic, dynamic>;
return UpdateData._fromMap(data);
}