{"id":13749766,"url":"https://github.com/futuretap/FTLocationSimulator","last_synced_at":"2025-05-09T13:30:38.145Z","repository":{"id":1097837,"uuid":"957422","full_name":"futuretap/FTLocationSimulator","owner":"futuretap","description":"Simulate Core Location in the iPhone Simulator","archived":false,"fork":false,"pushed_at":"2020-05-05T07:29:11.000Z","size":93,"stargazers_count":202,"open_issues_count":0,"forks_count":23,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-16T00:33:40.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.futuretap.com/blog/simulating-core-location/","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/futuretap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"futuretap"}},"created_at":"2010-10-02T22:45:49.000Z","updated_at":"2024-05-01T01:01:09.000Z","dependencies_parsed_at":"2022-08-16T12:00:44.266Z","dependency_job_id":null,"html_url":"https://github.com/futuretap/FTLocationSimulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuretap%2FFTLocationSimulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuretap%2FFTLocationSimulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuretap%2FFTLocationSimulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuretap%2FFTLocationSimulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/futuretap","download_url":"https://codeload.github.com/futuretap/FTLocationSimulator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253258109,"owners_count":21879590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T07:01:12.056Z","updated_at":"2025-05-09T13:30:37.804Z","avatar_url":"https://github.com/futuretap.png","language":"Objective-C","funding_links":["https://github.com/sponsors/futuretap"],"categories":["Objective-C"],"sub_categories":[],"readme":"\nFTLocationSimulator\n===================\n\nFTLocationSimulator allows simulating Core Location in the iPhone simulator on the desktop. It sends fake Core Location updates taken from a KML file that describes a predefined route.\n\nBesides the simulated Core Location updates, it also updates the blue userLocation view on MapKit views.\n\nThe sample project shows how to integrate FTLocationSimulator into an existing app, in this case Apple's \"Breadcrumb\" sample application.\n\n\nIntegration Steps\n-----------------\nIn a nutshell, these are the necessary steps:\n\n1. Add the FTLocationSimulator directory to your project\n\n2. Add `-licucore` to \"Other Linker flags\" in the project/target settings (this is needed for RegExKitLite)\n\n3. `#ifdef` all occurences of \"`CLLocationManager`\"  like the following:\n\n\t\t#ifdef FAKE_CORE_LOCATION\n\t\t    self.locationManager = [[[FTLocationSimulator alloc] init] autorelease];\n\t\t#else\n\t\t    self.locationManager = [[[CLLocationManager alloc] init] autorelease];\n\t\t#endif\n\n   Only the alloc/init call has to be ifdef'ed. All further occurences of your locationManager object don't need to be changed since `FTLocationSimulator` uses the same interface as `CLLocationManager`.\n\n4. `#include \"FTLocationSimulator.h\"` where necessary.\n\n5. If you're using MapKit, set the `mapView` property with your `MKMapView` and set it to nil if you're done with the map. Then, put the following into your `MKMapViewDelegate`:\n\n\t\t- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id \u003cMKAnnotation\u003e)annotation {\n\t\t\tif ([annotation isMemberOfClass:[MKUserLocation class]]) {\n\t\t#ifdef FAKE_CORE_LOCATION\n\t\t\t\treturn self.locationManager.fakeUserLocationView;\n\t\t#else\n\t\t\t\treturn nil;\n\t\t#endif\n\t\t\t}\n\t\t\t// Your code for regular annotation views\n\t\t}\n\t\t\n6. Adjust `FAKE_CORE_LOCATION_UPDATE_INTERVAL` in `FTLocationSimulator.h` if the location updates are too fast.\n\n7. Change the `fakeLocations.kml` if needed (currently, it includes a route from Cupertino to San Francisco). To create a new fakeLocations.kml, use Google Earth and create a route. Send the route via email and take the \"Route.kmz\" file out of the draft mail. The kmz format is zipped kml. So unzip that file using \"unzip Route.kml\" on the command line.\n\n    The parser is not a generic KML parser but is only able to parse these specific Google Earth KML files.\n\n\nImplemented methods and properties\n----------------------------------\n\nFrom `CLLocationManager`:\n\n- `delegate`\n- `location` (for polling updates)\n- `distanceFilter`\n- `-startUpdatingLocations`\n- `-stopUpdatingLocations`\n\n\n`CLLocationManagerDelegate`:\n\n- `-locationManager:didUpdateToLocation:fromLocation:` (is sent by FTLocationSimulator)\n\n\n`CLLocation` objects:\n\n- `coordinate`\n- `location`\n- `timestamp`\n\n\nKnown Issues\n------------\n- In Google's KML files the distance between waypoints varies. For straight roads it's larger than for curvy roads. FTLocationSimulator does not consider this difference, so the speed on the KML route varies.\n- The faked userLocation view does not incorporate the GPS halo animation.\n- heading, course, altitude, speed and accuracy are not implemented (some of them might be technically possible)\n\nCollaboration\n-------------\nWe're happy if someone wants to contribute to the project or work on some of the issues. Just fork the project and send us a pull request.\n\n\nHave fun!\n\n-Ortwin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuturetap%2FFTLocationSimulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuturetap%2FFTLocationSimulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuturetap%2FFTLocationSimulator/lists"}