transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
655 stars 277 forks source link

location.mock attribute seems to be technically possible on iOS 15+ - can we have it in the library? #1365

Closed leobudima closed 1 year ago

leobudima commented 1 year ago

Your Environment

Expected Behavior

Currently, location.mock attribute is available only for Android, for obvious and understandable reasons that Apple has previously not provided a direct way to determine it.

Since iOS 15, the isSimulatedBySoftware instance property has been provided as a member of CLLocationSourceInformation class ( https://developer.apple.com/documentation/corelocation/cllocationsourceinformation/3861807-issimulatedbysoftware ) .

Could the library be extended to support mock for iOS based on this information as well, please?

Context

Our use-case involves crowdsourced drivers / couriers, and use of mock providers in order to game the system / customers is significant enough to affect the level of provided service, so we've developed defense mechanisms to prevent it, but can only cover a portion of the user base on Android. Supporting mock on iOS would help cover the rest. Thank you!

christocracy commented 1 year ago

Plugin version: any / latest

This does not mean anything to me. It's particularly meaningless in the future for others visiting this issue. What is the EXACT version you're using?

leobudima commented 1 year ago

Hi Chris, 4.8.1 seems to be the latest version of the plugin, so I believe this is relevant for it.

christocracy commented 1 year ago

This has been implemented in the private, customers-only version.

While you are a customer, so have access to the private version, you have posted this in the public repo.

Are you not using installing the plugin from the private repo?

christocracy commented 1 year ago

Oops, wrong CHANGELOG entry:

christocracy commented 1 year ago

Actually, there it is: released here in the public version in 4.8.0, this past June 21.

christocracy commented 1 year ago

And here it is in the TSLocationManager.xcframework source code:

Screen Shot 2022-09-08 at 11 34 17 AM
leobudima commented 1 year ago

I've realized too late that I've posted to the public repo, and wanted to avoid notification chatter etc to you from closing and reopening there - apologies!

Amazing about the feature - just once again speaks towards your dedication and quality of the products.

As a side note, before posting this, I checked the documentation (https://transistorsoft.github.io/cordova-background-geolocation/interfaces/location.html#mock) and saw that it still says [Android only], as well as searched the Github organization for isSimulatedBySoftware which returned no results, from which I concluded that it's not here. Apologies for taking up your time and thanks for great and prompt support, @christocracy .