{"id":25874643,"url":"https://github.com/lyft/lyft-ios-sdk","last_synced_at":"2025-03-02T09:28:35.969Z","repository":{"id":56920113,"uuid":"71945625","full_name":"lyft/Lyft-iOS-sdk","owner":"lyft","description":"Public Lyft SDK for iOS","archived":false,"fork":false,"pushed_at":"2023-03-20T03:03:17.000Z","size":85,"stargazers_count":43,"open_issues_count":11,"forks_count":27,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-01-29T04:18:25.911Z","etag":null,"topics":["lyft"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lyft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-25T22:53:22.000Z","updated_at":"2024-11-28T02:08:42.000Z","dependencies_parsed_at":"2024-06-20T21:59:55.193Z","dependency_job_id":null,"html_url":"https://github.com/lyft/Lyft-iOS-sdk","commit_stats":{"total_commits":15,"total_committers":4,"mean_commits":3.75,"dds":0.4666666666666667,"last_synced_commit":"b0c5e3324cb3ac1aa585003c952d5b2d2f756359"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyft%2FLyft-iOS-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyft%2FLyft-iOS-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyft%2FLyft-iOS-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyft%2FLyft-iOS-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyft","download_url":"https://codeload.github.com/lyft/Lyft-iOS-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241485216,"owners_count":19970441,"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":["lyft"],"created_at":"2025-03-02T09:28:35.497Z","updated_at":"2025-03-02T09:28:35.958Z","avatar_url":"https://github.com/lyft.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lyft iOS SDK\n\nThe Official Lyft iOS SDK makes it easy to integrate Lyft into your app. More specifically, it provides:\n- An easily configurable Lyft button which can display cost, ETA, and ride type. Tapping the button deeplinks into the Lyft app with pre-filled pickup/destination/ridetype.\n- A swift interface for making async calls to Lyft's REST APIs\n- A sample iOS project that shows how to use the SDK components.\n\n## Registration\n- You must first create a Lyft Developer account [here](https://www.lyft.com/developers).\n- Once registered, you will be assigned a Client ID and will be able to generate Client Tokens.\n\n## Installation\n\n\u003e **Embedded frameworks require a minimum deployment target of iOS 8 or OS\n\u003e X Mavericks (10.9).**\n\n### CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects.\nYou can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\n\u003e CocoaPods 0.39.0+ is required to build LyftSDK.\n\nTo integrate LyftSDK into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nplatform :ios, '8.0'\nuse_frameworks!\n\npod 'LyftSDK'\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n#### Installing without iOS specific UI elements\n\n```ruby\npod 'LyftSDK/API'\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a simple, decentralized dependency manager for Cocoa. To import this SDK, add this to your Cartfile:\n\n```\ngithub \"lyft/Lyft-iOS-sdk\"\n```\n\n### Integrate without dependency manager\n\nDrag the LyftSDK.xcodeproj project into your project's Project Navigator. In your project's Build Target, click on the General tab and then under Embedded Binaries click the + button. Select the LyftSDK.framework under your project.\n\n## Usage\n\n### SDK Configuration\nIn your app, before using LyftSDK, be sure to configure your [developer information](https://www.lyft.com/developers) using `LyftConfiguration`. This is preferably done in your `UIApplicationDelegate`'s `application:didFinishLaunchingWithOptions`' as follows:\n```swift\nfunc application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -\u003e Bool {\n\tLyftConfiguration.developer = (token: \"...\", clientId: \"...\")\n\t// Complete other setup\n\treturn true\n}\n```\n\n### Lyft Button\nAdding the Lyft Button to a Storyboard or xib is as easy adding a new UIView to your superview and setting the class to `LyftButton` in the Identity Inspector tab. We recommend setting the width to 260p and the height to 50p. Please keep in mind that a smaller width/height may result in undesirable UI, such as cut off text.\n\n![ib-setup](https://cloud.githubusercontent.com/assets/687769/19176092/5ee5c112-8bf1-11e6-8aa1-ecd6a9ce7189.png)\n\nTo create the button programatically with its preferred size, simply call `let lyftButton = LyftButton()`\n\n#### Load ETA/cost\n```swift\nlet pickup = CLLocationCoordinate2D(latitude: 37.7833, longitude: -122.4167)\nlet destination = CLLocationCoordinate2D(latitude: 37.7794703, longitude: -122.4233223)\nlyftButton.configure(pickup: pickup, destination: destination)\n```\n\n#### Ride types\nLyft is growing very quickly and is currently available in [these cities](https://www.lyft.com/cities). Please keep in mind that some ride types (such as Lyft Line) are not yet available in all Lyft cities. If you set the ride type of the button  and it happens to be unavailable, the button will default to the Lyft Classic ride type. You can utilize the `LyftAPI.rideTypes(at:completion:)` wrapper to get a list of the available ride types in an area.\n\n#### Deep link behavior\nWhen a user taps on the Lyft Button, the default behavior is to deep link into the native Lyft app with the configuration information you have provided.\n\nHowever, if you would like to create a ride request on Lyft using Lyft's mobile web experience, you can specify the button's `deepLinkBehavior` as follows:\n```swift\nlyftButton.deepLinkBehavior = .web\n```\n\nThis is preferable if you do not want the user to leave your app when making a ride request. Also, it does not require the user has Lyft installed.\n\n#### Button styles\nTo specify the button style, use `enum LyftButtonStyle`\n```swift\nlyftButton.style = .MulberryDark\n```\n\nThere are 5 styles to pick from:\n\n![lyft-styles](https://cloud.githubusercontent.com/assets/13209348/17683300/88f86446-6306-11e6-81e6-bc42fc77650e.png)\n\n### Lyft API Wrapper\n\nThe SDK provides wrapper methods around Lyft's REST APIs - this can be helpful when you want to build a more custom integration with the Lyft platform vs making HTTP requests directly.\n```swift\nlet pickup = CLLocationCoordinate2D(latitude: 37.7833, longitude: -122.4167)\nLyftAPI.ETAs(to: pickup) { result in\n    result.value?.forEach { eta in\n        print(\"ETA for \\(eta.rideKind): \\(eta.minutes) min\")\n    }\n}\n```\n\n### Deeplinking\nThe SDK provides direct [deeplinking](https://developer.lyft.com/docs/deeplinking) to the Lyft app for those developers who prefer to handle their own custom deeplinking vs relying on the Lyft Button. \n```swift\nlet pickup = CLLocationCoordinate2D(latitude: 37.7833, longitude: -122.4167)\nlet destination = CLLocationCoordinate2D(latitude: 37.7794703, longitude: -122.4233223)\nLyftDeepLink.requestRide(kind: .Standard, from: pickup, to: destination)\n```\n\nNote that you can specify a LyftDeepLinkBehavior in this request, to decide between deep linking to the native lyft app or launching Lyft's mobile web experience within your own app.\n\n## Support\n\nIf you're looking for help configuring or using the SDK, or if you have general questions related to our APIs, the Lyft Developer Platform team provides support through Stack Overflow (using the `lyft-api` tag)\n\n## Reporting security vulnerabilities\n\nIf you've found a vulnerability or a potential vulnerability in the Lyft iOS SDK,\nplease let us know at security@lyft.com. We'll send a confirmation email to\nacknowledge your report, and we'll send an additional email when we've\nidentified the issue positively or negatively.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyft%2Flyft-ios-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyft%2Flyft-ios-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyft%2Flyft-ios-sdk/lists"}