Skip to content

Commit

Permalink
Merge pull request #19 from cashapp/luis/add-spm-support
Browse files Browse the repository at this point in the history
Add support for Swift Package Manager
  • Loading branch information
luispadron authored Oct 10, 2024
2 parents e0e5618 + b436eb9 commit 6e759b8
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,16 @@ jobs:
run: bundle install --gemfile=Example/Gemfile
- name: Lint AardvarkCrashReport Podspec
run: bundle exec --gemfile=Example/Gemfile pod lib lint --verbose --fail-fast AardvarkCrashReport.podspec --allow-warnings
swift-build:
name: Swift Build
runs-on: macos-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Build
run: |
sudo xcode-select -s /Applications/Xcode_15.4.0.app
xcodebuild build \
-scheme AardvarkCrashReport \
-sdk iphonesimulator17.5 \
-destination "OS=17.5,name=iPhone 15 Pro"
24 changes: 24 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"originHash" : "549469f9f553a93950ff05d44df84d6f9fbc6bed57d3b703d1d2c0c5e81bad4d",
"pins" : [
{
"identity" : "aardvark",
"kind" : "remoteSourceControl",
"location" : "https://github.com/square/Aardvark",
"state" : {
"revision" : "2eb62ce13df23128dcc89b70cf200d369d47dbbd",
"version" : "5.2.0"
}
},
{
"identity" : "plcrashreporter",
"kind" : "remoteSourceControl",
"location" : "https://github.com/microsoft/plcrashreporter",
"state" : {
"revision" : "6752f71de206f6a53fa6a758c3660fd9a7fe7527",
"version" : "1.11.2"
}
}
],
"version" : 3
}
38 changes: 38 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// swift-tools-version:5.10

import PackageDescription

let package = Package(
name: "AardvarkCrashReport",
platforms: [
.iOS(.v14),
],
products: [
.library(
name: "AardvarkCrashReport",
targets: ["AardvarkCrashReport"]
),
],
dependencies: [
.package(
url: "https://github.com/microsoft/plcrashreporter",
.upToNextMajor(from: "1.10.0")
),
.package(
url: "https://github.com/square/Aardvark",
.upToNextMajor(from: "5.2.0")
),
],
targets: [
.target(
name: "AardvarkCrashReport",
dependencies: [
.product(name: "Aardvark", package: "Aardvark"),
.product(name: "CrashReporter", package: "plcrashreporter"),
],
cSettings: [
.define("SWIFT_PACKAGE"),
]
),
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
import Aardvark
import CrashReporter

#if SWIFT_PACKAGE
import AardvarkSwift
#endif

public final class CrashReportAttachmentGenerator {

// MARK: - Public Static Method
Expand Down

0 comments on commit 6e759b8

Please sign in to comment.