Skip to content

Commit

Permalink
Merge pull request #47 from 3sidedcube/release/v2.2.2
Browse files Browse the repository at this point in the history
Release/v2.2.2
  • Loading branch information
BenShutt authored Jul 3, 2020
2 parents 4d518eb + ee90731 commit e2bdf9a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ThunderRequest.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@
INFOPLIST_FILE = ThunderRequestTV/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.2.1;
MARKETING_VERSION = 2.2.2;
PRODUCT_BUNDLE_IDENTIFIER = com.3sidedcube.ThunderRequestTV;
PRODUCT_NAME = ThunderRequest;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1137,7 +1137,7 @@
INFOPLIST_FILE = ThunderRequestTV/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.2.1;
MARKETING_VERSION = 2.2.2;
PRODUCT_BUNDLE_IDENTIFIER = com.3sidedcube.ThunderRequestTV;
PRODUCT_NAME = ThunderRequest;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1173,7 +1173,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 2.2.1;
MARKETING_VERSION = 2.2.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.threesidedcube.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = ThunderRequest;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1205,7 +1205,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 2.2.1;
MARKETING_VERSION = 2.2.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.threesidedcube.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = ThunderRequest;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1289,7 +1289,7 @@
INFOPLIST_FILE = ThunderRequestWatch/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.2.1;
MARKETING_VERSION = 2.2.2;
PRODUCT_BUNDLE_IDENTIFIER = com.3sidedcube.ThunderRequestWatch;
PRODUCT_NAME = ThunderRequest;
SDKROOT = watchos;
Expand Down Expand Up @@ -1327,7 +1327,7 @@
INFOPLIST_FILE = ThunderRequestWatch/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.2.1;
MARKETING_VERSION = 2.2.2;
PRODUCT_BUNDLE_IDENTIFIER = com.3sidedcube.ThunderRequestWatch;
PRODUCT_NAME = ThunderRequest;
SDKROOT = watchos;
Expand Down Expand Up @@ -1517,7 +1517,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.2.1;
MARKETING_VERSION = 2.2.2;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.threesidedcube.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = ThunderRequest;
Expand Down Expand Up @@ -1547,7 +1547,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2.2.1;
MARKETING_VERSION = 2.2.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.threesidedcube.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = ThunderRequest;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
11 changes: 11 additions & 0 deletions ThunderRequest/RequestController+Callbacks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ import os.log
public struct RequestNotificationKey {
public static let request = "TSCRequestNotificationRequestKey"
public static let response = "TSCRequestNotificationResponseKey"
public static let error = "TSCRequestNotificationErrorKey"
}

extension RequestController {

public static let ErrorDomain = "com.threesidedcube.ThunderRequest"

/// Name of `Notification` posted when the `Error` from a URL task is a `URLError`
public static let RequestDidURLErrorNotificationName =
Notification.Name(rawValue: "TSCRequestDidURLError")

public static let DidReceiveResponseNotificationName = Notification.Name(rawValue: "TSCRequestDidReceiveResponse")

public static let DidErrorNotificationName = Notification.Name("TSCRequestServerError")
Expand Down Expand Up @@ -74,6 +79,12 @@ extension RequestController {

NotificationCenter.default.post(name: RequestController.DidReceiveResponseNotificationName, object: nil, userInfo: requestInfo)

if let urlError = error as? URLError {
var userInfo = requestInfo
userInfo[RequestNotificationKey.error] = urlError
NotificationCenter.default.post(name: RequestController.RequestDidURLErrorNotificationName, object: nil, userInfo: userInfo)
}

if response?.status.isConsideredError == true {
NotificationCenter.default.post(name: RequestController.DidErrorNotificationName, object: nil, userInfo: requestInfo)
}
Expand Down

0 comments on commit e2bdf9a

Please sign in to comment.