From 1a1fcd4a1f71dd88d2dcffdd6c910262a3780b65 Mon Sep 17 00:00:00 2001 From: Asaf Korem Date: Thu, 28 Sep 2023 15:59:15 +0300 Subject: [PATCH 1/3] homebrew-brew: update submodule. --- homebrew-brew | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homebrew-brew b/homebrew-brew index c15fea8..de6e0b2 160000 --- a/homebrew-brew +++ b/homebrew-brew @@ -1 +1 @@ -Subproject commit c15fea89538d4028203108fa92f6e4e68ed0dae8 +Subproject commit de6e0b21ad0b326e159c2361cf7854d2b902cbb2 From aa1186464c9d74099e08bc848d887c8d6dccaaa1 Mon Sep 17 00:00:00 2001 From: Asaf Korem <55082339+asafkorem@users.noreply.github.com> Date: Mon, 15 Jan 2024 10:55:15 +0200 Subject: [PATCH 2/3] docs: add deprecation notice. (#121) --- DEPRECATIONS.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ README.md | 9 +++++++++ 2 files changed, 55 insertions(+) create mode 100644 DEPRECATIONS.md diff --git a/DEPRECATIONS.md b/DEPRECATIONS.md new file mode 100644 index 0000000..e56d416 --- /dev/null +++ b/DEPRECATIONS.md @@ -0,0 +1,46 @@ +# Deprecations in AppleSimulatorUtils + +As of January 2024, we've identified overlapping functionalities between **AppleSimulatorUtils** and **`xcrun simctl`** command in the latest **Command Line Tools for Xcode**. +This has led to the deprecation of several commands in **AppleSimulatorUtils**. + +For detailed usage of the **`xcrun simctl`** command, run `xcrun simctl --help`. + +## Deprecated Commands + +The commands listed below are now deprecated in **AppleSimulatorUtils**, and can be replaced with corresponding **`xcrun simctl`** commands: + +### `--setPermissions` Options + +The following `--setPermissions` options in **AppleSimulatorUtils** are deprecated and can be replaced with corresponding `xcrun simctl privacy` commands: + +- `calendar` +- `contacts` +- `location` +- `photos` +- `medialibrary` _(Use `media-library` in `xcrun simctl privacy`)_ +- `microphone` +- `motion` +- `reminders` +- `siri` + +For detailed usage of the simctl privacy commands, run `xcrun simctl privacy --help`. + +### `--setLocation` Command + +The `--setLocation` command is deprecated. Use `xcrun simctl location` instead. + +For detailed usage of the location command, run `xcrun simctl location --help`. + +## Additional Notes + +While most of the deprecated commands are still available and function in **AppleSimulatorUtils**, +some may show regressions (especially in newer versions of iOS and Xcode). + +If you encounter any issues, +the recommended solution is to use **`xcrun simctl`** instead, +as it is more up-to-date and maintained by Apple. + +--- + +**We will continue to maintain AppleSimulatorUtils for non-overlapping functionalities only.** + diff --git a/README.md b/README.md index 5bc79ae..2d25838 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ # AppleSimulatorUtils A collection of utils for Apple simulators. +## Deprecation Notice + +**AppleSimulatorUtils** remains an actively maintained project. +However, we have deprecated certain functionalities that overlap with features provided by the **`xcrun simctl`** command in the latest **Command Line Tools for Xcode**. +In addition to avoid redundancy, it is better to use the **official** tool provided by Apple. + +For a comprehensive list of deprecated commands and their `xcrun simctl` alternatives, please refer to our [Deprecations Document](./DEPRECATIONS.md). + + ## Installing Install [brew](https://brew.sh), then: From 53bc4dd5fdfb7c09ef1cf98105f741fe7bf54e8b Mon Sep 17 00:00:00 2001 From: bryansoftdev Date: Tue, 12 Nov 2024 06:24:23 -0500 Subject: [PATCH 3/3] Fix healthkit support for iOS > 16.1 (#125) Co-authored-by: Bryan Soriano --- .../applesimutils/SetHealthKitPermission.m | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/applesimutils/applesimutils/SetHealthKitPermission.m b/applesimutils/applesimutils/SetHealthKitPermission.m index d9588b3..9c29339 100644 --- a/applesimutils/applesimutils/SetHealthKitPermission.m +++ b/applesimutils/applesimutils/SetHealthKitPermission.m @@ -191,9 +191,25 @@ + (BOOL)setHealthKitPermission:(HealthKitPermissionStatus)permission forBundleId } else { + NSMutableString* query; + NSMutableString* values; + NSMutableDictionary* baseParams; + if (osVersion.majorVersion > 16 || (osVersion.majorVersion == 16 && osVersion.minorVersion > 1)) + { + query = @"source_id, object_type, status, request, mode, date_modified, modification_epoch, provenance, deleted_object_anchor, object_limit_anchor, object_limit_modified, sync_identity".mutableCopy; + values = @":source_id, :object_type, :status, :request, :mode, :date_modified, :modification_epoch, :provenance, :deleted_object_anchor, :object_limit_anchor, :object_limit_modified, :sync_identity".mutableCopy; + baseParams = [@{@"source_id": rowID, @"status": permission == HealthKitPermissionStatusAllow ? @101 : @104, @"request": @203, @"mode": @0, @"date_modified": @(NSDate.date.timeIntervalSinceReferenceDate), @"modification_epoch": @1, @"provenance": @0, @"deleted_object_anchor": @0, @"object_limit_anchor": @0, @"object_limit_modified": NSNull.null, @"sync_identity": @1} mutableCopy]; + } + else + { + query = @"source_id, object_type, status, request, mode, date_modified, modification_epoch, provenance, deleted_object_anchor, object_limit_anchor, object_limit_modified".mutableCopy; + values = @":source_id, :object_type, :status, :request, :mode, :date_modified, :modification_epoch, :provenance, :deleted_object_anchor, :object_limit_anchor, :object_limit_modified".mutableCopy; + baseParams = [@{@"source_id": rowID, @"status": permission == HealthKitPermissionStatusAllow ? @101 : @104, @"request": @203, @"mode": @0, @"date_modified": @(NSDate.date.timeIntervalSinceReferenceDate), @"modification_epoch": @1, @"provenance": @0, @"deleted_object_anchor": @0, @"object_limit_anchor": @0, @"object_limit_modified": NSNull.null} mutableCopy]; + } for(int i = 0; i < 200; i++) { - if([db executeUpdate:@"insert into authorization (source_id, object_type, status, request, mode, date_modified, modification_epoch, provenance, deleted_object_anchor, object_limit_anchor, object_limit_modified) VALUES (:source_id, :object_type, :status, :request, :mode, :date_modified, :modification_epoch, :provenance, :deleted_object_anchor, :object_limit_anchor, :object_limit_modified)" withParameterDictionary:@{@"source_id": rowID, @"object_type": @(i), @"status": permission == HealthKitPermissionStatusAllow ? @101 : @104, @"request": @203, @"mode": @0, @"date_modified": @(NSDate.date.timeIntervalSinceReferenceDate), @"modification_epoch": @1, @"provenance": @0, @"deleted_object_anchor": @0, @"object_limit_anchor": @0, @"object_limit_modified": NSNull.null}] == NO) + baseParams[@"object_type"] = @(i); + if ([db executeUpdate:[NSString stringWithFormat:@"insert into authorization (%@) VALUES (%@)", query, values] withParameterDictionary:baseParams] == NO) { logcontinue_query_error(db); }