Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion EmbeddedSocialClient.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Pod::Spec.new do |s|
s.authors = 'Microsoft Embedded Social'
s.license = 'MIT'
s.source_files = 'EmbeddedSocialClient/Classes/Swaggers/**/*.swift'
s.dependency 'Alamofire', '~> 4.0'
s.dependency 'Alamofire', '~> 4.7.3'
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
8 changes: 4 additions & 4 deletions EmbeddedSocialClient/Classes/Swaggers/APIs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import Foundation

open class EmbeddedSocialClientAPI {
open static var basePath = "https://api.embeddedsocial.microsoft.com"
open static var credential: URLCredential?
open static var customHeaders: [String:String] = [:]
open static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
public static var basePath = "https://api.embeddedsocial.microsoft.com"
public static var credential: URLCredential?
public static var customHeaders: [String:String] = [:]
public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory()
}

open class APIBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
if stringResponse.result.isFailure {
completion(
nil,
ErrorResponse.HttpError(statusCode: stringResponse.response?.statusCode ?? 500, data: stringResponse.data, error: stringResponse.result.error as Error!)
ErrorResponse.HttpError(statusCode: stringResponse.response?.statusCode ?? 500, data: stringResponse.data, error: stringResponse.result.error!)
)
return
}
Expand Down
4 changes: 2 additions & 2 deletions EmbeddedSocialClient/Classes/Swaggers/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ open class Configuration {

// This value is used to configure the date formatter that is used to serialize dates into JSON format.
// You must set it prior to encoding any dates, and it will only be read once.
open static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"
public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"

}
}
4 changes: 1 addition & 3 deletions EmbeddedSocialClient/Classes/Swaggers/Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,8 @@ public final class ISOFullDate: CustomStringConvertible {
*/
public static func from(string: String) -> ISOFullDate? {
let components = string
.characters
.split(separator: "-")
.map(String.init)
.flatMap { Int($0) }
.compactMap { Int($0) }
guard components.count == 3 else { return nil }

return ISOFullDate(
Expand Down
14 changes: 5 additions & 9 deletions EmbeddedSocialClient/Classes/Swaggers/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public enum ErrorResponse : Error {
}

open class Response<T> {
open let statusCode: Int
open let header: [String: String]
open let body: T?
public let statusCode: Int
public let header: [String: String]
public let body: T?

public init(statusCode: Int, header: [String: String], body: T?) {
self.statusCode = statusCode
Expand Down Expand Up @@ -195,7 +195,7 @@ class Decoders {
}
}

static func decodeOptional<T: RawRepresentable, U: AnyObject where T.RawValue == U>(clazz: T, source: AnyObject) -> Decoded<T?> {
static func decodeOptional<T: RawRepresentable, U: AnyObject>(clazz: T, source: AnyObject) -> Decoded<T?> where T.RawValue == U {
if let value = source as? U {
if let enumValue = T.init(rawValue: value) {
return .success(enumValue)
Expand Down Expand Up @@ -758,11 +758,7 @@ class Decoders {
}
// Decoder for Object
Decoders.addDecoder(clazz: Object.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<Object> in
if let source = source as? Any {
return .success(source)
} else {
return .failure(.typeMismatch(expected: "Typealias Object", actual: "\(source)"))
}
return .success(source)
}
// Decoder for PostBlobResponse
Decoders.addDecoder(clazz: PostBlobResponse.self) { (source: AnyObject, instance: AnyObject?) -> Decoded<PostBlobResponse> in
Expand Down
57 changes: 19 additions & 38 deletions EmbeddedSocialClient/EmbeddedSocialClient.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@
6F5B443A1F21511200FE6092 /* Frameworks */,
6F5B443B1F21511200FE6092 /* Headers */,
6F5B443C1F21511200FE6092 /* Resources */,
D9FD94556B3F579E55A0C1F4 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -399,7 +398,6 @@
6F5B44441F21511200FE6092 /* Frameworks */,
6F5B44451F21511200FE6092 /* Resources */,
9E9BEEF1CDE103FC88A48639 /* [CP] Embed Pods Frameworks */,
BF17BD322AAA6A290F230F22 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -424,11 +422,13 @@
6F5B443D1F21511200FE6092 = {
CreatedOnToolsVersion = 8.3.3;
DevelopmentTeam = UBF8T346G9;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
};
6F5B44461F21511200FE6092 = {
CreatedOnToolsVersion = 8.3.3;
DevelopmentTeam = UBF8T346G9;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -475,13 +475,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-EmbeddedSocialClientTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9E9BEEF1CDE103FC88A48639 /* [CP] Embed Pods Frameworks */ = {
Expand All @@ -490,58 +493,36 @@
files = (
);
inputPaths = (
"${SRCROOT}/../Pods/Target Support Files/Pods-EmbeddedSocialClientTests/Pods-EmbeddedSocialClientTests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
"${BUILT_PRODUCTS_DIR}/EmbeddedSocialClient/EmbeddedSocialClient.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EmbeddedSocialClient.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-EmbeddedSocialClientTests/Pods-EmbeddedSocialClientTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
BF17BD322AAA6A290F230F22 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-EmbeddedSocialClientTests/Pods-EmbeddedSocialClientTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
D9FD94556B3F579E55A0C1F4 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/../Pods/Target Support Files/Pods-EmbeddedSocialClient/Pods-EmbeddedSocialClient-resources.sh\"\n";
showEnvVarsInLog = 0;
};
DDEB0F64DBCCBF408C0E7543 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-EmbeddedSocialClient-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -760,7 +741,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.embeddedsocial.EmbeddedSocialClient;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -780,7 +761,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.embeddedsocial.EmbeddedSocialClient;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -794,7 +775,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.embeddedsocial.EmbeddedSocialClientTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -808,7 +789,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.embeddedsocial.EmbeddedSocialClientTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project 'EmbeddedSocialClient/EmbeddedSocialClient.xcodeproj'

target 'EmbeddedSocialClient' do
use_frameworks!
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '4.0.0'
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '4.7.3'
pod 'EmbeddedSocialClient', :path => 'EmbeddedSocialClient.podspec'
end

Expand Down
18 changes: 9 additions & 9 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
PODS:
- Alamofire (4.0.0)
- Alamofire (4.7.3)
- EmbeddedSocialClient (0.7.0):
- Alamofire (~> 4.0)
- Alamofire (~> 4.7.3)

DEPENDENCIES:
- Alamofire (from `https://github.com/Alamofire/Alamofire.git`, tag `4.0.0`)
- Alamofire (from `https://github.com/Alamofire/Alamofire.git`, tag `4.7.3`)
- EmbeddedSocialClient (from `EmbeddedSocialClient.podspec`)

EXTERNAL SOURCES:
Alamofire:
:git: https://github.com/Alamofire/Alamofire.git
:tag: 4.0.0
:tag: 4.7.3
EmbeddedSocialClient:
:path: EmbeddedSocialClient.podspec

CHECKOUT OPTIONS:
Alamofire:
:git: https://github.com/Alamofire/Alamofire.git
:tag: 4.0.0
:tag: 4.7.3

SPEC CHECKSUMS:
Alamofire: fef59f00388f267e52d9b432aa5d93dc97190f14
EmbeddedSocialClient: 48697371a875a7fd45a4d4e01a753d283b07588a
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
EmbeddedSocialClient: 249e338f7d523103317085f23698b94eb2ac1315

PODFILE CHECKSUM: 90f5db337b70ae434928649291325c32b12c72b8
PODFILE CHECKSUM: 41a2c097556a0adc771e42432ecbbcea8ef81a8e

COCOAPODS: 1.2.1
COCOAPODS: 1.5.3