Swiftpack.co - Package - sygic-travel/apple-sdk

Sygic Travel Apple SDK

Sygic Travel Apple SDK (stylised for Apple platforms as TravelKit) is a framework suitable for embedding a rich set of Sygic Travel data within your application. It gives you access to millions of Places covering the entire world.

We build it as a generic platform project available on all Apple platforms.

For further details see Full SDK documentation.

Getting the SDK

Installing via CocoaPods

Simply add a TravelKit pod to your Podfile. Then run pod update to fetch the SDK automatically.

Getting the framework from GitHub

You can grab a released compiled SDK package or its source code on GitHub. Check out the repository or grab it from the Releases section.

Development Requirements

All development requirements are actually recommendations as it reflects the environment we use to develop and distribute the code.

  • Xcode 8.0+ (recommended)
  • macOS 10.12+ SDK (recommended)
  • iOS 10.0+ SDK (recommended)
  • tvOS 10.0+ SDK (recommended)
  • Objective-C or Swift project
  • API key for your business or project

Production Deployment

Deployment requirements determine the minimal environments compatible with the SDK when you distribute it with your project.

  • OS X/macOS 10.10+ target (macOS framework)
  • iOS 8.2+ target (iOS framework)
  • tvOS 9.0+ target (tvOS framework)

Installation

  • get the framework package
  • unpack and add to your project
  • link it as a dynamic framework (embedded binary) in your project settings

Configuration

Actually the only step needed is obtaining an API key you use to set up the framework before you start using it. Contact us to get one.

Quick Usage Introduction

This quick example shows how to use the SDK to fetch a representative set of data.

Let's define a set of Places we want:

  • placed in London
  • marked as Points of interest
  • included in the Sightseeing category
  • only the Top 10 of them
// Hold an instance
TravelKit *kit = [TravelKit sharedKit];
	
// Set your API key
kit.APIKey = @"<YOUR_API_KEY_GOES_HERE>";
	
// Create query to get Top 10 Sightseeing Places in London
TKPlacesQuery *query = [TKPlacesQuery new];
query.parentIDs = @[ @"city:1" ];
query.levels = TKPlaceLevelPOI;
query.categories = TKPlaceCategorySightseeing;
query.limit = 10;
	
// Perform query and print a message containing the first item
[kit placesForQuery:query completion:^(NSArray< TKPlace *> *places, NSError *error){
	if (places.firstObject) NSLog(@"Let's visit %@!", places.firstObject.name);
	else NSLog(@"Something went wrong :/");
}];
// Set your API key
TravelKit.shared().apiKey = "<YOUR_API_KEY_GOES_HERE>"
	
// Create query to get Top 10 Sightseeing Places in London
let query = TKPlacesQuery()
query.parentIDs = ["city:1"]
query.levels = .POI
query.categories = [.sightseeing]
query.limit = 10
	
// Perform query and print a message containing the first item
TravelKit.shared().places(for: query) { (places, error) in
	if let place = places?.first { print("Let's visit \(place.name)!") }
	else { print("Something went wrong :/") }
}

The API key must be provided, otherwise using any methods listed below will result in an error being returned by the completion block.

TravelKit is very easily testable using Swift Playgrounds – a sample playground is provided together with the workspace attached.

Basic Classes

Class | Description :-------------------|:--------------------- TravelKit | Singleton instance for fetching data TKPlace | Basic Place entity TKPlacesQuery | Entity used when querying for Places TKTrip | Primary Trip entity with detailed properties TKTour | Basic Tour entity TKToursViatorQuery | Entity used when querying for Tours from Viator TKToursGYGQuery | Entity used when querying for Tours from GetYourGuide TKMedium | Basic Medium entity TKReference | External Reference link

Documentation

Available on Docs portal.

License

This project is licensed under the terms of the MIT license. See the LICENSE file for details.

Github

link
Stars: 4

Dependencies

Used By

Total: 0

Releases

Three-dot-oh is here! 🎈 - 2020-09-13 21:06:37

3.0 alpha 5 – Release candidate no.2 πŸ₯ - 2020-09-10 08:44:57

3.0 alpha 4 – Release candidate πŸ•Ή - 2020-09-09 20:51:04

3.0 alpha 3 – Environmental updates + another bug hunt 😎 - 2020-03-30 19:27:54

3.0 alpha 2 – Fixing bugs πŸ› - 2020-01-28 11:06:39

3.0 alpha 1 – Slowly arriving! πŸš„ - 2020-01-22 13:44:18

Session checking deadlock fix πŸ’€ - 2019-02-11 11:14:52

Minor Authorization fix πŸ”‘ - 2019-02-07 13:15:55

First batch of bug fixes πŸ› - 2019-01-18 08:28:17

2.0's out, tada! πŸŽ‰ - 2019-01-02 12:21:41

2.0 alpha 4 – Almost there! πŸ‘€ - 2018-11-08 12:22:06

2.0 alpha 3 – Straight towards the release! 🀯 - 2018-10-24 12:36:17

2.0 alpha 2 – Session fixes πŸ‘» - 2018-06-25 12:26:48

An important set of pre-release changes, mainly the possibility to set a client-specific ID to allow User session & data access.

2.0 alpha 1 – Straight towards the next milestone! πŸƒβ€β™‚οΈ - 2018-06-20 11:23:17

Many new features introduced, including a User session and Trips support.

1.0.3 – Language fixes πŸ‡ΊπŸ‡ΈπŸ‡¬πŸ‡§πŸ‡¨πŸ‡Ώ - 2017-08-03 11:20:08

Fixed language issues in data responses when using API language option other than en.

1.0.2 – More descriptive Place Description πŸ“‹ - 2017-08-01 09:19:42

The description property of a TKPlace object has been refactored to include all information needed for a proper attribution.

1.0.1 – Project fixes πŸ”§ - 2017-07-27 14:43:07

β€’ FMDB submodule moved from SSH to HTTPS for easier fetching with default environments β€’ Dropped some unnecessary imports from the main header

1.0 – Local Favorites ❀️ - 2017-07-17 13:54:04

β€’ Added a persistent storage for Favorite IDs β€’ Minor API changes – mainly Place categories refactored as enums

0.3.1 – Framework fixes πŸ”§ - 2017-06-23 08:30:16

β€’ Fixed Build process to omit normalisation of header imports β†’ prevents recompilation of projects when integrated as a source submodule β€’ Updated minimal macOS deployment target to 10.10 due to the used APIs

0.3 – Tours querying support 🚩 - 2017-06-19 11:34:11

0.2 – Initial public release πŸŽ‰ - 2017-05-30 12:11:10