Swiftpack.co -  Package - what3words/w3w-swift-components
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
what3words/w3w-swift-components
A swift library to use What3words autosuggest
.package(url: "https://github.com/what3words/w3w-swift-components.git", from: "v2.1.0")

what3words w3w-swift-components

Overview

A Swift library for what3words UI components. These depend on the what3words swift wrapper.

For information on using this package with Objective-C read this

AutoSuggest Text Field

Full documentation can be found at [Documentation/autosuggest.md](https://github.com/what3words/w3w-swift-components/blob/master/Documentation/autosuggest.md).

An iOS UIKit example project can be found at Examples/TextField/TextField.xcodeproj

W3WAutoSuggestTextField is a UITextField that will suggest three word addresses as the user types.

This conforms to our W3WAutoSuggestTextFieldProtocol for returning any addresses the user choses, as well as to set options.

AutoSuggest Search Controller

Full documentation can be found at [Documentation/autosuggest.md](https://github.com/what3words/w3w-swift-components/blob/master/Documentation/autosuggest.md).

An iOS UIKit example project can be found at Examples/TextField/TextField.xcodeproj

W3WAutoSuggestSearchController is a UISearchController that will suggest three word addresses as the user types. This allows embedding this functionality in things such asUINavigationController and MKMap

This also conforms to our W3WAutoSuggestTextFieldProtocol for returning any addresses the user choses, as well as to set options.

Installation

Authentication

To use this library you’ll need a what3words API key, which can be signed up for here. If you wish to use the Voice API calls then you must add a Voice API plan to your account.

Swift Package Manager

You can install with Swift Package Manager by adding the URL below to Swift Packages under your project settings:

https://github.com/what3words/w3w-swift-components.git

Import the libraries:

import W3WSwiftApi
import W3WSwiftComponents
import CoreLocation

Note:

If you are using the Voice API on device, you should include Microphone permissions in your Info.plist:

GitHub

link
Stars: 0
Last commit: 4 days ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco