Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from fattmerchantorg/version-and-jwt-fix
Browse files Browse the repository at this point in the history
Get package to work on iOS 11+ and fix logic around JWT optional
  • Loading branch information
HassanNazari authored Aug 12, 2021
2 parents a510b83 + da6be78 commit 80f0ca7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "SwiftyJSON",
"repositoryURL": "https://github.com/SwiftyJSON/SwiftyJSON.git",
"state": {
"branch": null,
"revision": "2b6054efa051565954e1d2b9da831680026cd768",
"version": "4.3.0"
}
}
]
},
"version": 1
}
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PackageDescription

let package = Package(
name: "SaaSquatch",
platforms: [ .iOS(.v13) ],
platforms: [ .iOS(.v11) ],
products: [
.library(name: "SaaSquatch", targets: ["SaaSquatch"]),
.library(name: "SaaSquatchWebView", targets: ["SaaSquatchWebView"])
Expand Down
4 changes: 3 additions & 1 deletion Sources/SaaSquatch/WidgetUpsertInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public struct WidgetUpsertInput {
public let userInput: JSON
public let accountId: String
public let userId: String
public let userJwt: String
public let userJwt: String?
public let widgetType: WidgetType?
public let engagementMedium: String?

Expand Down Expand Up @@ -137,7 +137,9 @@ public struct WidgetUpsertInput {
}

guard let userJwt = userJwt else {
if (userInput == nil || userId == nil || accountId == nil) {
throw BuilderError.incompleteBuilder(builder: "WidgetUpsertInput", reason: "must call setUserJwt or setUserInputWithUserJwt")
}
}

return WidgetUpsertInput(userInput: userInput, accountId: accountId, userId: userId, userJwt: userJwt, widgetType: widgetType, engagementMedium: engagementMedium)
Expand Down

0 comments on commit 80f0ca7

Please sign in to comment.