Skip to content

Commit

Permalink
Merge pull request #17 from jeanetienne/migrate-to-swift-package
Browse files Browse the repository at this point in the history
Migrate to swift package
  • Loading branch information
jeanetienne authored Nov 27, 2022
2 parents 417de15 + 67813a5 commit a67390d
Show file tree
Hide file tree
Showing 31 changed files with 65 additions and 1,884 deletions.
72 changes: 8 additions & 64 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,65 +1,9 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/

## Other
*.moved-aside
*.xcuserstate

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

28 changes: 0 additions & 28 deletions Configs/Speller.plist

This file was deleted.

24 changes: 0 additions & 24 deletions Configs/SpellerTests.plist

This file was deleted.

Binary file removed Documentation/Latin-simplified.numbers
Binary file not shown.
Binary file removed Documentation/Latin.numbers
Binary file not shown.
Binary file removed Documentation/LatinSpellingAlphabets.numbers
Binary file not shown.
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Jean-Étienne
Copyright © 2022 Jean-Étienne

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

32 changes: 31 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
// swift-tools-version: 5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Speller"
name: "Speller",
platforms: [
.macOS(.v10_13), .iOS(.v11)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Speller",
targets: ["Speller"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "Speller",
dependencies: [],
resources: [
.copy("Resources/CharacterDescription/emoji-data.plist"),
.copy("Resources/CharacterDescription/latin-data.plist")
]),
.testTarget(
name: "SpellerTests",
dependencies: ["Speller"]),
]
)
53 changes: 0 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# Speller

[![Build Status](https://travis-ci.org/jeanetienne/Speller.svg?branch=master)](https://travis-ci.org/jeanetienne/Speller)
[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/jeanetienne/Speller/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/jeanetienne/Speller.svg)](https://github.com/jeanetienne/Speller/releases)
[![codecov.io](https://codecov.io/github/jeanetienne/Speller/coverage.svg?branch=master&style=flat)](https://codecov.io/github/jeanetienne/Speller/?branch=master)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Speller.svg?style=flat)](https://cocoapods.org/pods/Speller)
[![Platform](https://img.shields.io/cocoapods/p/Speller.svg?style=flat)](http://cocoadocs.org/docsets/Speller)

## Spelling out words using known spelling alphabets
Speller helps you spell out words using know spelling alphabets.
When you're on the phone trying to spell a difficult word, or when you want to sound like you're a pilot.
Expand Down Expand Up @@ -58,48 +50,3 @@ The returned value is an array of spelled characters with their corresponding co
print(spelling)
// [B: Bravo, a: Alfa, g: Golf, p: Papa, i: India, p: Papa, e: Echo]
```

## Installation

### CocoaPods

[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:

```bash
$ gem install cocoapods
```

To integrate Speller into your Xcode project using CocoaPods, specify it in your `Podfile`:

```ruby
pod 'Speller'
```

Then, run the following command:

```bash
$ pod install
```

### Carthage

[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with [Homebrew](http://brew.sh/) using the following command:

```bash
$ brew update
$ brew install carthage
```

To integrate Speller into your Xcode project using Carthage, specify it in your `Cartfile`:

```ogdl
github "jeanetienne/Speller"
```

Run `carthage update` to build the framework and drag the built `Speller.framework` into your Xcode project.

### Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate Speller into your project manually.
17 changes: 0 additions & 17 deletions Sources/Bundle.swift

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//
// CharacterDescriptor.swift
// Speller
//
// Created by Jean-Étienne on 20/12/16.
// Copyright © 2016 Speller. All rights reserved.
// Copyright © Speller. All rights reserved.
//

import Foundation
Expand Down Expand Up @@ -65,7 +62,7 @@ private extension CharacterDescriptor {
static func propertyListPath(forCharacterSet characterSet: CharacterSet,
andType type: PropertyListType) -> URL? {
let name = characterSet.rawValue.lowercased() + "-" + type.nameForFilename()
return Bundle.framework.url(forResource: name, withExtension: "plist")
return Bundle.module.url(forResource: name, withExtension: "plist")
}

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//
// CodeWordCollection.swift
// Speller
//
// Created by Jean-Étienne on 13/11/16.
// Copyright © 2016 Jean-Étienne. All rights reserved.
// Copyright © Jean-Étienne. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//
// SpelledCharacter.swift
// Speller
//
// Created by Jean-Étienne on 7/11/16.
// Copyright © 2016 Jean-Étienne. All rights reserved.
// Copyright © Jean-Étienne. All rights reserved.
//

import Foundation
Expand Down
5 changes: 1 addition & 4 deletions Sources/Speller.swift → Sources/Speller/Speller.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//
// Speller.swift
// Speller
//
// Created by Jean-Étienne on 7/11/16.
// Copyright © 2016 Jean-Étienne. All rights reserved.
// Copyright © Jean-Étienne. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//
// SpellingAlphabet.swift
// Speller
//
// Created by Jean-Étienne on 7/11/16.
// Copyright © 2016 Jean-Étienne. All rights reserved.
// Copyright © Jean-Étienne. All rights reserved.
//

import Foundation
Expand Down
32 changes: 0 additions & 32 deletions Speller.podspec

This file was deleted.

Loading

0 comments on commit a67390d

Please sign in to comment.