From bc306a9af499c96f30988cedcbf14b48a41bf8d4 Mon Sep 17 00:00:00 2001 From: Osman Kutlucan <101183252+wheeOs@users.noreply.github.com> Date: Fri, 27 Jun 2025 11:58:45 +0200 Subject: [PATCH 1/2] iOS: bundleId or appleId feat: allows to explicitly define if a bundleId or appleId is used for iOS --- lib/new_version_plus.dart | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/new_version_plus.dart b/lib/new_version_plus.dart index a65af03..d591403 100644 --- a/lib/new_version_plus.dart +++ b/lib/new_version_plus.dart @@ -89,7 +89,18 @@ class NewVersionPlus { //Html original body request final bool androidHtmlReleaseNotes; - NewVersionPlus({this.androidId, this.iOSId, this.iOSAppStoreCountry, this.forceAppVersion, this.androidPlayStoreCountry, this.androidHtmlReleaseNotes = false}); + /// An optional flag to indicate whether the determined iOS ID is a bundle ID or an Apple ID. + final bool? iOSIdIsBundleId; + + NewVersionPlus({ + this.androidId, + this.iOSId, + this.iOSAppStoreCountry, + this.forceAppVersion, + this.androidPlayStoreCountry, + this.androidHtmlReleaseNotes = false, + this.iOSIdIsBundleId + }); /// This checks the version status, then displays a platform-specific alert /// with buttons to dismiss the update alert, or go to the app store. @@ -132,11 +143,9 @@ class NewVersionPlus { Map parameters = {}; /// programmermager:fix/issue-35-ios-failed-host-lookup - if (id.contains('.')) { - parameters['bundleId'] = id; - } else { - parameters['id'] = id; - } + final idParam = ((iOSIdIsBundleId == null && id.contains('.')) || iOSIdIsBundleId) + ? 'bundleId' : 'id'; + parameters[idParam] = id; parameters['timestamp'] = DateTime.now().millisecondsSinceEpoch.toString(); From 2656b01ff563592c7cbc9dcc7c22db1db296cff8 Mon Sep 17 00:00:00 2001 From: Osman Kutlucan <101183252+wheeOs@users.noreply.github.com> Date: Fri, 27 Jun 2025 14:45:15 +0200 Subject: [PATCH 2/2] Update new_version_plus.dart --- lib/new_version_plus.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/new_version_plus.dart b/lib/new_version_plus.dart index d591403..4acf207 100644 --- a/lib/new_version_plus.dart +++ b/lib/new_version_plus.dart @@ -143,7 +143,7 @@ class NewVersionPlus { Map parameters = {}; /// programmermager:fix/issue-35-ios-failed-host-lookup - final idParam = ((iOSIdIsBundleId == null && id.contains('.')) || iOSIdIsBundleId) + final idParam = ((iOSIdIsBundleId == null && id.contains('.')) || iOSIdIsBundleId == true) ? 'bundleId' : 'id'; parameters[idParam] = id;