{"id":19840733,"url":"https://github.com/graphhopper/graphhopper-ios","last_synced_at":"2025-05-01T19:30:52.016Z","repository":{"id":22924893,"uuid":"26273909","full_name":"graphhopper/graphhopper-ios","owner":"graphhopper","description":"iOS Port of the GraphHopper road routing engine","archived":false,"fork":false,"pushed_at":"2021-10-01T06:36:49.000Z","size":16815,"stargazers_count":71,"open_issues_count":16,"forks_count":28,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-06T17:06:40.799Z","etag":null,"topics":["graphhopper","ios","navigation"],"latest_commit_sha":null,"homepage":"https://www.graphhopper.com/open-source/","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphhopper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-06T14:37:25.000Z","updated_at":"2025-01-25T00:00:36.000Z","dependencies_parsed_at":"2022-08-21T16:50:14.575Z","dependency_job_id":null,"html_url":"https://github.com/graphhopper/graphhopper-ios","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphhopper%2Fgraphhopper-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphhopper%2Fgraphhopper-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphhopper%2Fgraphhopper-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphhopper%2Fgraphhopper-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphhopper","download_url":"https://codeload.github.com/graphhopper/graphhopper-ios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251932585,"owners_count":21667174,"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":["graphhopper","ios","navigation"],"created_at":"2024-11-12T12:27:59.570Z","updated_at":"2025-05-01T19:30:47.008Z","avatar_url":"https://github.com/graphhopper.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"graphhopper-ios\n===============\n\ngraphhopper-ios wraps [graphhopper](https://github.com/graphhopper/graphhopper/) \nand creates the `libgraphhopper.a` library to be used on iOS. \nTheoretically it should be possible to include other architectures, but for example MacOS currently doesn't work. \n\nIt uses [j2objc](https://github.com/google/j2objc) to translate the .java sources \ninto Objective-C.\n\n\u003e **Disclaimer:** This is experimental so treat it accordingly. [Feel free to help](CONTRIBUTING.md) in any way.\n\n\n## Prerequistes\nJDK 8 (Yes, jts source needs JDK 8), recommended is AdoptOpenJDK8\nMaven \nXCode 11.4+ (works with XCode 13)\n\n## Getting Started\n\nTo get started run the following commands in Terminal:\n\n```sh\ngit clone https://github.com/graphhopper/graphhopper-ios.git\ncd graphhopper-ios\ngit submodule init\ngit submodule update\nmake cleanall\nmake class.list\nmake translate\nmake\n./graphhopper-ios-sample/import-sample.sh\nopen graphhopper-ios-sample/graphhopper-ios-sample.xcodeproj\n```\n\nSwitch scheme to graphhoppper-ios-sample and run against Simulator or the real device\n(requires Apple Developer account and signing setup in place).\n\nTo integrate GraphHopper in your project see Usage section below.\n \n## Community\n\nFeel free to raise problems or questions in [our forum](https://discuss.graphhopper.com/c/graphhopper/graphhopper-ios-and-android).\n\n## Usage\n\n- You can add *graphhopper.xcodeproj* as subproject to your project (see details in Xcode section).\n- Or you can compile it as fat library (libgraphhopper.a) using `make` and add it and necessary interface files to your project.\nCurrent setup includes Simulator (x86_64) and iPhone 5s and higher (arm64) architectures. \nNot checked on Apple Silicon, although arm64 should cover it (see other details in Terminal section). \n\n### Xcode\n\nTo configure your project to use *graphhopper.xcodeproj* follow the steps below:\n\n- Drag\u0026drop *graphhopper.xcodeproj* into your project (or use the menu File -\u003e Add Files to...)\n- Expand graphhopper.xcodeproj and drag\u0026drop the **Translations** and **Libraries** \ngroups into your project (make sure you check \"Create folder references\" and have \nyour target selected in \"Add to targets:\")\n- In the Build Settings of your project:\n    - add `-ObjC` to your target's Other Linker Flags\n    - add `{path-to-graphhopper-ios}/j2objc/include` and `{path-to-graphhopper-ios}/src` \n    to your target's User Header Search Paths\n- In the Build Phases of your project:\n    - in Target Dependencies add the **graphhopper** target\n    - in Link Binary With Libraries add **Security.framework** (to support secure hash generation), \n**libz.dylib** (needed to support java.util.zip) and **libicucore.dylib** (to support java.text, \nwhich is a dependency introduced by [j2objc 0.9.5](https://github.com/google/j2objc/releases/tag/0.9.5))\n\nYou're now ready to use GraphHopper on iOS and OS X.\n\n\u003e You are responsible for importing graph data. For an example check out \n[graphhopper-ios-sample](graphhopper-ios-sample).\n\n### Terminal\n\nAlternatively, you can translate and compile the library by invoking `make`  in the Terminal.\nYou can modify `common.mk` and `library.mk` to include all necessary arhitectures. This article provides\ngood overview of options: https://docs.elementscompiler.com/Platforms/Cocoa/CpuArchitectures/ \nThen link the library `graphhopper-ios/build/libgraphhopper.a` and it's header files at `graphhopper-ios/src` \nmanually into your project. For all the other configurations see the Xcode section above.\n\n\u003e By default this method compiles the library for the following architectures: simulator, iphoneos.\n\n## Example\n\n![iPhone-offline-routing](screenshots/iPhone-offline-routing.gif)\n\n## Requirements\n\n* iOS 11.0+ or OS X 10.10 (it might work on older versions but haven't tested)\n* JDK 1.8 or higher\n* Xcode 11.0 or higher\n\n## Troubleshooting\n\nIf you run into problems, you can try one of the following:\n\n* if using Xcode, try cleaning up the project (Product -\u003e Clean)\n* if using the Terminal, you can use one of these 2 cleanup commands:\n  * `make clean` - will delete the /graphhopper-ios/build directory\n  * `make cleanall` - if the first one didn't do it, this will delete everything \nrelated to the build process (you then need to run `make class.list`)\n\n## Refresh Code\n\nThe dependencies j2objc, hppc and jts should be downloaded automatically if not present. You can force to reload by removing them: \n\n```rm -rf dependencies/hppc dependencies/jts j2objc\nmake dependencies/hppc dependencies/jts j2objc\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphhopper%2Fgraphhopper-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphhopper%2Fgraphhopper-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphhopper%2Fgraphhopper-ios/lists"}