Skip to content

Commit

Permalink
Update package to use a binary url and checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsaidi committed Feb 22, 2022
1 parent a9b4e38 commit 130a35f
Show file tree
Hide file tree
Showing 32 changed files with 83 additions and 9,868 deletions.
2 changes: 1 addition & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
disabled_rules:
- cyclomatic_complexity
- file_length
- function_body_length
- function_parameter_count
- identifier_name
Expand All @@ -14,7 +15,6 @@ disabled_rules:
included:
- Sources
- Tests
- KeyboardKitDemo

identifier_name:
excluded:
Expand Down
8 changes: 6 additions & 2 deletions KeyboardKitPro.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Pod::Spec.new do |s|
s.name = 'KeyboardKitPro'
s.version = '5.9.0'
s.swift_versions = ['5.3']
s.swift_versions = ['5.5']
s.summary = 'KeyboardKit Pro adds additional functionality to KeyboardKit.'

s.description = <<-DESC
Expand All @@ -16,6 +16,10 @@ KeyboardKit Pro adds additional functionality to KeyboardKit.
s.source = { :git => 'https://github.com/danielsaidi/KeyboardKit.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/danielsaidi'

s.swift_version = '5.3'
s.swift_version = '5.5'

s.ios.deployment_target = '13.0'
s.macos.deployment_target = '11.0'
s.tvos.deployment_target = '13.0'
s.watchos.deployment_target = '6.0'
end
10 changes: 7 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
// swift-tools-version:5.3
// swift-tools-version:5.5

import PackageDescription

let package = Package(
name: "KeyboardKitPro",
platforms: [
.iOS(.v13)
.iOS(.v13),
.macOS(.v11),
.tvOS(.v13),
.watchOS(.v6)
],
products: [
.library(
Expand All @@ -15,6 +18,7 @@ let package = Package(
targets: [
.binaryTarget(
name: "KeyboardKitPro",
path: "Sources/KeyboardKitPro.xcframework")
url: "https://github.com/KeyboardKit/KeyboardKit/releases/download/6.0.0/KeyboardKitPro.zip",
checksum: "54f168678cbd0f626b95390b8ec21eaba5ae47bafdcee0175a77ec3a05d31593")
]
)
41 changes: 18 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,58 @@
<p align="center">
<img src="https://img.shields.io/github/v/release/KeyboardKit/KeyboardKit?color=%2300550&sort=semver" alt="Version" />
<img src="https://img.shields.io/cocoapods/p/KeyboardKit.svg?style=flat" alt="Platform" />
<img src="https://img.shields.io/badge/Swift-5.3-orange.svg" alt="Swift 5.3" />
<img src="https://img.shields.io/github/license/KeyboardKit/KeyboardKit" alt="MIT License" />
<a href="https://twitter.com/danielsaidi">
<img src="https://img.shields.io/badge/contact-@danielsaidi-blue.svg?style=flat" alt="Twitter: @danielsaidi" />
<img src="https://img.shields.io/badge/Swift-5.5-orange.svg" alt="Swift 5.5" />
<img src="https://img.shields.io/github/license/KeyboardKit/KeyboardKit" alt="Closed-Source License" />
<a href="https://twitter.com/getkeyboardkit">
<img src="https://img.shields.io/badge/contact-@getkeyboardkit-blue.svg?style=flat" alt="Twitter: @getkeyboardkit" />
</a>
</p>


## About KeyboardKit Pro

[KeyboardKit][KeyboardKit] helps you build custom keyboard extensions for `iOS` and `iPadOS`, using `SwiftUI`. It extends the native APIs to provide you with more functionality and has views and utils to let you mimic native keyboards.
[KeyboardKit][KeyboardKit] helps you build custom keyboard extensions with Swift and SwiftUI. It extends the native keyboard APIs and provides you with a lot more functionality than is otherwise available.

The end result can look something like this...or entirely different:

<p align="center">
<img src ="https://github.com/KeyboardKit/KeyboardKit/blob/master/Resources/Demo.gif?raw=true" width="300" />
</p>

KeyboardKit Pro is a license-based plug-in that extends KeyboardKit with pro features, such as fully localized system keyboards and services, local and remote autocomplete services, additional views etc.
KeyboardKit Pro extends KeyboardKit with pro features, such as localized services, autocomplete services and more views. It requires a [commercial license][Licenses] to be used.



## Platform Support

KeyboardKit supports the following platforms:
KeyboardKit Pro supports the following platforms:

* iOS 13.0
* macOS 11.0
* tvOS 13.0
* watchOS 6.0

macOS support is coming in KeyboardKit 6.0.

Note that not all features are available on all platforms.
Although KeyboardKit builds on all platform, some features are unavailable on some platforms.



## Installation

KeyboardKit Pro can be installed with the Swift Package Manager:
The best way to install KeyboardKit Pro is to use the Swift Package Manager.

```
https://github.com/KeyboardKit/KeyboardKitPro.git
```

KeyboardKit Pro only needs to be added to the main app target.

`IMPORTANT` From KeyboardKit 6.0, KeyboardKit Pro is standalone. This means that it's no longer a plugin that requires KeyboardKit, but rather a standalone library that contains both the core library as well as Pro features.



## Getting started

Once KeyboardKit is added to your project, you need to obtain a license before you can start using it in your application.
Once KeyboardKit Pro is added to your project, you need to obtain a license before you can start using it in your application and keyboard extension.

[Read more here][Getting-Started]

Expand All @@ -67,7 +68,7 @@ Once KeyboardKit is added to your project, you need to obtain a license before y

The KeyboardKit Pro documentation contains extensive information, code examples etc. and makes it easy to overview the various parts of the library.

You can either [download][Documentation] the documentation or build it directly in Xcode, using `Product/Build Documentation`.
You can [download][Documentation] the documentation and open it directly in Xcode.



Expand All @@ -81,22 +82,18 @@ KeyboardKit is localized in 50 keyboard-specific locales:
🇱🇻 🇱🇹 🇲🇰 🇲🇹 🇲🇳 🇳🇴 🇮🇷 🇵🇱 🇵🇹 🇧🇷 <br />
🇷🇴 🇷🇺 🇷🇸 🇷🇸 🇸🇰 🇸🇮 🇪🇸 🇸🇪 🇹🇷 🇺🇦

KeyboardKit Pro provides completely localized keyboards for all locales, including locale-specific input sets, keyboard layouts and callout actions.

The number of localized keyboards is based on your license. License tiers can be found on the [KeyboardKit website][Licenses].

[Read more in the main repo][KeyboardKit]



## Features

KeyboardKit and KeyboardKit Pro comes packed with features. Checkout the [main repo][KeyboardKit] for core features and the list below for Pro features.

### 💡 Autocomplete

KeyboardKit Pro adds an autocomplete engine that supports all locales above. It also has a web-based autocomplete engine that fetches suggestions from a remote web service or api.
### 💡 Autocomplete

[Read more here][Autocomplete]
KeyboardKit Pro adds an autocomplete engine that supports all locales above. It also has an external autocomplete engine that fetches suggestions from a remote web service or api.


### 🔤 Input Sets
Expand All @@ -113,13 +110,11 @@ KeyboardKit Pro adds locale-specific secondary callout actions for all locales a

KeyboardKit Pro adds additonal views that simplifies building greater keyboard apps.

[Read more here][Views]



## Contact

Feel free to reach out if you have questions or feedback:
Feel free to reach out if you have questions or if you want to contribute in any way:

* E-mail: [info@getkeyboardkit.com][Email]
* Twitter: [@getkeyboardkit][Twitter]
Expand Down
32 changes: 0 additions & 32 deletions Readmes/Autocomplete.md

This file was deleted.

73 changes: 51 additions & 22 deletions Readmes/Getting-Started.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,82 @@
# Getting started

Once KeyboardKit is added to your project, you need to obtain a license before you can start using it in your application.
Once KeyboardKit is added to your project, you need to obtain a license before you can start using it in your application and extension.



## How to obtain a license

You can purchase a commercial license from the [KeyboardKit website][Licenses]. The website contains all information about price, tiers, features etc.
KeyboardKit Pro requires a commercial license. The [KeyboardKit website][Licenses] website has information about license price, tiers, features etc.



## How to use KeyboardKit Pro
## How to use KeyboardKit

You can use KeyboardKit Pro in both your main application and your keyboard extension:
You can use KeyboardKit in different ways in various app targets:

* The main app can use KeyboardKit Pro's views to show if a keyboard is enabled, if full access is granted etc.
* The keyboard extension can use KeyboardKit Pro to unlock more functionality than is available in KeyboardKit.
* Keyboard extensions can use KeyboardKit to create more powerful keyboards.
* Main apps can use KeyboardKit to check if a keyboard is enabled, has full access etc.
* Main apps can create KeyboardKit-based input controllers and use them for its text fields.
* Other targets can use KeyboardKit to build upon its functionality.

Other platforms, such as macOS, watchOS and tvOS can use KeyboardKit as well, even though creating custom keyboards on those platforms may not be the most common use-case.

For instance, KeyboardKit Pro unlocks localized services that make the `SystemKeyboard` support all keyboard locales, complete with the correct keyboard layouts, autocomplete, callout actions etc.


## How to setup KeyboardKit Pro

After setting up KeyboardKit and obtaining a license, you are ready to extend KeyboardKit with KeyboardKit Pro:
In your extension, let `KeyboardViewController` inherit `KeyboardInputViewController` instead of `UIInputViewController`. This gives it access to additional functionality like new lifecycle functions, properties like `keyboardContext`, services like `keyboardActionHandler` etc.

The controller will call `viewWillSetupKeyboard()` when the keyboard should be created or re-created. Instead of `setup(with:)`, use `setup(withLicenseKey:view:)` to setup KeyboardKit Pro with any `SwiftUI` view:

```swift
func viewWillSetupKeyboard() {
super.viewWillSetupKeyboard()
setupPro(withLicenseKey: "your-key", view: MyKeyboardView())
}
```

This will make the provided view the main view of the keyboard extension, and cause the extension to resize to fit the view content. It will also inject all observable controller properties as environment objects into the view hierarchy.

If you want to setup pro without setting up a view, you can just use `setupPro(withLicenseKey:)` instead:

```swift
func viewWillSetupKeyboard() {
super.viewWillSetupKeyboard()
setupPro(withLicenseKey: "your-key")
// Then setup your view whenever and however you want
}
```

It's important that the view you use observes the global `keyboardContext`, either by using the injected environment object or by setting it up as an observed object, otherwise it will be unresponsive to context changes. If your view doesn't react when you tap the shift or numeric key, that is most probably the cause.



## More on licenses

Registering a valid license will setup the Pro features that the license includes, e.g. locales, autocomplete etc. You can then use all features that the license includes. Failure to register a license before accessing Pro features will cause features to throw a `LicenseError`.


First make sure that you have installed both KeyboardKit and KeyboardKit Pro and that you import the libraries in all files where you need them.
### How to register a license without a controller

KeyboardKit Pro can now be setup with a single line of code:
App targets that don't use an input controller and don't have the `setupPro` functions, can use `License.register(licenseKey:)` instead.

* For keyboard extensions, call `setupPro(withLicenseKey:view:)` instead of `setup(with:)`.
* For keyboard extensions, you can also use `setupPro(withLicenseKey:)` if you don't want to provide a view.
* For applications, where `setupPro` is not available, use `KeyboardKitLicense.register(licenseKey:)` instead.
* All these functions are throwing and must be called with `try` or `try?`. When they fail, they throw a `LicenseError`.

Registering a valid license will setup Pro features that the license includes, e.g. supported locales, autocomplete engines etc. You can then use any features that your license includes in any way you like.
### How to access your license

Failure to register the license before accessing Pro features will result in initializers or functions throwing a `LicenseError`.
After registering a valid license as described above, you can use the static `License.current` property to inspect your license information.


## How to inspect your license
### How to reconfigure your license

After registering a valid license as described above, you can inspect it with `KeyboardKitLicense.current`.
Registering a valid license will cause KeyboardKit to configure your application and extension according to the license configuration. If you want to use a different setup, you can reconfigure KeyboardKit after registering a valid license. Have a look at the demo app for examples.


## Configuration

Registering a valid license will cause KeyboardKit Pro to configure your application and extension according to the license configuration.
## Going further

If you want to use a different configuration, you can wait with configuring KeyboardKit until after registering a valid license.
Have a look in the documentation for more articles on how to configure KeyboardKit, create your own service implementations etc. You can also have a look at the demo apps, which replace many services with demo-specific implementations.

Have a look at the demo app for more information.


[Licenses]: https://getkeyboardkit.com/pro
39 changes: 0 additions & 39 deletions Readmes/Views.md

This file was deleted.

Loading

0 comments on commit 130a35f

Please sign in to comment.