Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift Package Manager support #34

Merged
merged 21 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 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"),
]
)
3 changes: 2 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
platform :ios, '12.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mroloux @bverbeken looks like README.md is out of date, it says we support minimum version iOS 9.0 and newer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schaloner I have updated README.md


target 'seatsio-ios' do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Podfile is not needed anymore.

target 'Seatsio' do
use_frameworks!
pod 'seatsio', :path => 'seatsio.podspec'
end
15 changes: 14 additions & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
PODFILE CHECKSUM: 7e3d3d38e3c6c64c581bdfbe83e25e0034c3de26
PODS:
- seatsio (17.0.0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm far from an expert, but why does Prodfile.lock need a reference to v17 of its own project?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the future, it would be good to have separate targets for the app (example) and library (seatsio) and use the library in the app for testing.

I'm using the development pod here to see how the pod will be generated as we use the same target for the library and example app.
https://guides.cocoapods.org/making/development-cocoapods.html

I'll set up multiple targets as soon as I have a bit of free time!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mroloux , I've separated the example app and framework. Could you please review it once more? Also, could you set up the actions to skip running the pod install?

Copy link
Member

@mroloux mroloux Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better if you remove pod install in this branch? Then we see if the build succeeds.

It's in build.yml and release.yml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


DEPENDENCIES:
- seatsio (from `seatsio.podspec`)

EXTERNAL SOURCES:
seatsio:
:path: seatsio.podspec

SPEC CHECKSUMS:
seatsio: 7d058764f6e902acf9ac2cff57adc01d258d04cd

PODFILE CHECKSUM: 8788e1d003b00db38f11e4fb362978f48684c865

COCOAPODS: 1.15.2
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.
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 → Sources/Seatsio/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)
mroloux marked this conversation as resolved.
Show resolved Hide resolved
} 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.
141 changes: 100 additions & 41 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 = 'Sources/Seatsio/*'
s.swift_versions = ['5.0']
end
Loading