Skip to content

Commit

Permalink
Swift Package Manager support (#34)
Browse files Browse the repository at this point in the history
* Create package file

* Separate example app from sources

* Update to swift version 5

* Update package name
Make EventManagerConfig public init

* Rename package

* Rename package

* Change target name to Seatsio

* Fix build

* Fix warnings"

* Add pod as development

* Update README.md

* Separate example app from framework

* Fix package path

* Format package swift

* Remove unused header file

* Remove podfile.lock

* Remove pod build scripts

* ...

* Update build.yml

* Update release.yml
  • Loading branch information
Ericarman authored Oct 15, 2024
1 parent b3ecc1e commit 8a24f08
Show file tree
Hide file tree
Showing 45 changed files with 278 additions and 220 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ jobs:

steps:
- uses: actions/checkout@v2
- run: pod install
- run: pod lib lint
- run: pod lib lint
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
env:
VERSION_TO_BUMP: ${{ inputs.versionToBump }}
GH_TOKEN: ${{ github.token }}
- run: pod install
- run: pod lib lint
- run: pod trunk push
env:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import UIKit
import WebKit
import Seatsio

class SeatingChartSample: UIViewController {

Expand Down
21 changes: 21 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// 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: "seatsio-ios",
platforms: [.iOS(.v12)],
products: [
.library(
name: "Seatsio",
targets: ["Seatsio"]
),
],
targets: [
.target(
name: "Seatsio",
path: "Seatsio/Sources"
),
]
)
5 changes: 0 additions & 5 deletions Podfile

This file was deleted.

3 changes: 0 additions & 3 deletions Podfile.lock

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Introduction

seatsio-ios allows rendering seats.io seating charts inside an iOS application. It supports iOS 9.0 and newer.
seatsio-ios allows rendering seats.io seating charts inside an iOS application. It supports iOS 12.0 and newer.

## Installation

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public final class EventManagerConfig: SeatsioConfig {

public var toolName: String { "EventManager" }

public init() {}

public func secretKey(_ secretKey: String) -> Self {
params.secretKey = secretKey
return self
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 1 addition & 5 deletions seatsio-ios/Pricing.swift → Seatsio/Sources/Pricing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ public struct Pricing: Codable {
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
if let value = try? container.decodeIfPresent(Int.self, forKey: .category) {
if (value == nil) {
category = nil
} else {
category = String(value!)
}
category = String(value)
} else {
category = try container.decodeIfPresent(String.self, forKey: .category)
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
449 changes: 249 additions & 200 deletions seatsio-ios.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions seatsio.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/seatsio/seatsio-ios.git', :tag => s.version.to_s }
s.authors = { 'The Seats.io team' => 'dev@seats.io' }
s.ios.deployment_target = '12.0'
s.source_files = 'seatsio-ios/*'
s.exclude_files = "seatsio-ios/**/*.plist"
s.swift_versions = ['4.0']
s.source_files = 'Seatsio/Sources/*'
s.swift_version = '5.0'
end

0 comments on commit 8a24f08

Please sign in to comment.