forked from loafle/openapi-generator-original
[swift] remove urlsession kvo usage (#6211)
This commit is contained in:
@@ -24,8 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
let progress = Progress()
|
||||
|
||||
private var observation: NSKeyValueObservation?
|
||||
|
||||
deinit {
|
||||
@@ -161,12 +159,7 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
}
|
||||
|
||||
if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) {
|
||||
observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in
|
||||
self.progress.totalUnitCount = newProgress.totalUnitCount
|
||||
self.progress.completedUnitCount = newProgress.completedUnitCount
|
||||
}
|
||||
|
||||
onProgressReady?(progress)
|
||||
onProgressReady?(dataTask.progress)
|
||||
}
|
||||
|
||||
dataTask.resume()
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.3.1-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -305,13 +305,14 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
};
|
||||
};
|
||||
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
Base,
|
||||
en,
|
||||
);
|
||||
mainGroup = 5FBA6AE5F64CD737F88B4565;
|
||||
@@ -567,7 +568,7 @@
|
||||
3B2C02AFB91CB5C82766ED5C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
location = "self:PetstoreClient.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<CodeCoverageTargets>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -67,8 +63,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.3.1-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -265,13 +265,14 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
};
|
||||
};
|
||||
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
Base,
|
||||
en,
|
||||
);
|
||||
mainGroup = 5FBA6AE5F64CD737F88B4565;
|
||||
@@ -519,7 +520,7 @@
|
||||
3B2C02AFB91CB5C82766ED5C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
location = "self:PetstoreClient.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<CodeCoverageTargets>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -67,8 +63,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -24,8 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
let progress = Progress()
|
||||
|
||||
private var observation: NSKeyValueObservation?
|
||||
|
||||
deinit {
|
||||
@@ -161,12 +159,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) {
|
||||
observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in
|
||||
self.progress.totalUnitCount = newProgress.totalUnitCount
|
||||
self.progress.completedUnitCount = newProgress.completedUnitCount
|
||||
}
|
||||
|
||||
onProgressReady?(progress)
|
||||
onProgressReady?(dataTask.progress)
|
||||
}
|
||||
|
||||
dataTask.resume()
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.3.1-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -265,13 +265,14 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
};
|
||||
};
|
||||
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
Base,
|
||||
en,
|
||||
);
|
||||
mainGroup = 5FBA6AE5F64CD737F88B4565;
|
||||
@@ -519,7 +520,7 @@
|
||||
3B2C02AFB91CB5C82766ED5C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
location = "self:PetstoreClient.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<CodeCoverageTargets>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -67,8 +63,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -24,8 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
let progress = Progress()
|
||||
|
||||
private var observation: NSKeyValueObservation?
|
||||
|
||||
deinit {
|
||||
@@ -161,12 +159,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) {
|
||||
observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in
|
||||
self.progress.totalUnitCount = newProgress.totalUnitCount
|
||||
self.progress.completedUnitCount = newProgress.completedUnitCount
|
||||
}
|
||||
|
||||
onProgressReady?(progress)
|
||||
onProgressReady?(dataTask.progress)
|
||||
}
|
||||
|
||||
dataTask.resume()
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.3.1-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -265,13 +265,14 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
};
|
||||
};
|
||||
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
Base,
|
||||
en,
|
||||
);
|
||||
mainGroup = 5FBA6AE5F64CD737F88B4565;
|
||||
@@ -519,7 +520,7 @@
|
||||
3B2C02AFB91CB5C82766ED5C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
location = "self:PetstoreClient.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<CodeCoverageTargets>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -67,8 +63,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -24,8 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
let progress = Progress()
|
||||
|
||||
private var observation: NSKeyValueObservation?
|
||||
|
||||
deinit {
|
||||
@@ -161,12 +159,7 @@ internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) {
|
||||
observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in
|
||||
self.progress.totalUnitCount = newProgress.totalUnitCount
|
||||
self.progress.completedUnitCount = newProgress.completedUnitCount
|
||||
}
|
||||
|
||||
onProgressReady?(progress)
|
||||
onProgressReady?(dataTask.progress)
|
||||
}
|
||||
|
||||
dataTask.resume()
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.3.1-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -265,13 +265,14 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
};
|
||||
};
|
||||
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
Base,
|
||||
en,
|
||||
);
|
||||
mainGroup = 5FBA6AE5F64CD737F88B4565;
|
||||
@@ -519,7 +520,7 @@
|
||||
3B2C02AFB91CB5C82766ED5C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
location = "self:PetstoreClient.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<CodeCoverageTargets>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -67,8 +63,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -24,8 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
let progress = Progress()
|
||||
|
||||
private var observation: NSKeyValueObservation?
|
||||
|
||||
deinit {
|
||||
@@ -161,12 +159,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) {
|
||||
observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in
|
||||
self.progress.totalUnitCount = newProgress.totalUnitCount
|
||||
self.progress.completedUnitCount = newProgress.completedUnitCount
|
||||
}
|
||||
|
||||
onProgressReady?(progress)
|
||||
onProgressReady?(dataTask.progress)
|
||||
}
|
||||
|
||||
dataTask.resume()
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.3.1-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -305,13 +305,14 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
};
|
||||
};
|
||||
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
Base,
|
||||
en,
|
||||
);
|
||||
mainGroup = 5FBA6AE5F64CD737F88B4565;
|
||||
@@ -567,7 +568,7 @@
|
||||
3B2C02AFB91CB5C82766ED5C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
location = "self:PetstoreClient.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<CodeCoverageTargets>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -67,8 +63,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -24,8 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
let progress = Progress()
|
||||
|
||||
private var observation: NSKeyValueObservation?
|
||||
|
||||
deinit {
|
||||
@@ -161,12 +159,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) {
|
||||
observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in
|
||||
self.progress.totalUnitCount = newProgress.totalUnitCount
|
||||
self.progress.completedUnitCount = newProgress.completedUnitCount
|
||||
}
|
||||
|
||||
onProgressReady?(progress)
|
||||
onProgressReady?(dataTask.progress)
|
||||
}
|
||||
|
||||
dataTask.resume()
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.3.1-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -265,13 +265,14 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
};
|
||||
};
|
||||
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
Base,
|
||||
en,
|
||||
);
|
||||
mainGroup = 5FBA6AE5F64CD737F88B4565;
|
||||
@@ -519,7 +520,7 @@
|
||||
3B2C02AFB91CB5C82766ED5C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
location = "self:PetstoreClient.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<CodeCoverageTargets>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -67,8 +63,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -24,8 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
let progress = Progress()
|
||||
|
||||
private var observation: NSKeyValueObservation?
|
||||
|
||||
deinit {
|
||||
@@ -161,12 +159,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) {
|
||||
observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in
|
||||
self.progress.totalUnitCount = newProgress.totalUnitCount
|
||||
self.progress.completedUnitCount = newProgress.completedUnitCount
|
||||
}
|
||||
|
||||
onProgressReady?(progress)
|
||||
onProgressReady?(dataTask.progress)
|
||||
}
|
||||
|
||||
dataTask.resume()
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.3.1-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -265,13 +265,14 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
};
|
||||
};
|
||||
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
Base,
|
||||
en,
|
||||
);
|
||||
mainGroup = 5FBA6AE5F64CD737F88B4565;
|
||||
@@ -519,7 +520,7 @@
|
||||
3B2C02AFB91CB5C82766ED5C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
location = "self:PetstoreClient.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<CodeCoverageTargets>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -67,8 +63,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -24,8 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
let progress = Progress()
|
||||
|
||||
private var observation: NSKeyValueObservation?
|
||||
|
||||
deinit {
|
||||
@@ -161,12 +159,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) {
|
||||
observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in
|
||||
self.progress.totalUnitCount = newProgress.totalUnitCount
|
||||
self.progress.completedUnitCount = newProgress.completedUnitCount
|
||||
}
|
||||
|
||||
onProgressReady?(progress)
|
||||
onProgressReady?(dataTask.progress)
|
||||
}
|
||||
|
||||
dataTask.resume()
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.3.1-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -305,13 +305,14 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
};
|
||||
};
|
||||
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
Base,
|
||||
en,
|
||||
);
|
||||
mainGroup = 5FBA6AE5F64CD737F88B4565;
|
||||
@@ -567,7 +568,7 @@
|
||||
3B2C02AFB91CB5C82766ED5C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
location = "self:PetstoreClient.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<CodeCoverageTargets>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -67,8 +63,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -24,8 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
let progress = Progress()
|
||||
|
||||
private var observation: NSKeyValueObservation?
|
||||
|
||||
deinit {
|
||||
@@ -161,12 +159,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) {
|
||||
observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in
|
||||
self.progress.totalUnitCount = newProgress.totalUnitCount
|
||||
self.progress.completedUnitCount = newProgress.completedUnitCount
|
||||
}
|
||||
|
||||
onProgressReady?(progress)
|
||||
onProgressReady?(dataTask.progress)
|
||||
}
|
||||
|
||||
dataTask.resume()
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.3.1-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -265,13 +265,14 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
};
|
||||
};
|
||||
buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */;
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
Base,
|
||||
en,
|
||||
);
|
||||
mainGroup = 5FBA6AE5F64CD737F88B4565;
|
||||
@@ -519,7 +520,7 @@
|
||||
3B2C02AFB91CB5C82766ED5C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = "";
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
|
||||
isa = XCConfigurationList;
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
location = "self:PetstoreClient.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
||||
@@ -41,10 +41,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<CodeCoverageTargets>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -67,8 +63,6 @@
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -24,8 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
let progress = Progress()
|
||||
|
||||
private var observation: NSKeyValueObservation?
|
||||
|
||||
deinit {
|
||||
@@ -161,12 +159,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) {
|
||||
observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in
|
||||
self.progress.totalUnitCount = newProgress.totalUnitCount
|
||||
self.progress.completedUnitCount = newProgress.completedUnitCount
|
||||
}
|
||||
|
||||
onProgressReady?(progress)
|
||||
onProgressReady?(dataTask.progress)
|
||||
}
|
||||
|
||||
dataTask.resume()
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.3.1-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
||||
@@ -24,8 +24,6 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
|
||||
open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
|
||||
let progress = Progress()
|
||||
|
||||
private var observation: NSKeyValueObservation?
|
||||
|
||||
deinit {
|
||||
@@ -161,12 +159,7 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
}
|
||||
|
||||
if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) {
|
||||
observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in
|
||||
self.progress.totalUnitCount = newProgress.totalUnitCount
|
||||
self.progress.completedUnitCount = newProgress.completedUnitCount
|
||||
}
|
||||
|
||||
onProgressReady?(progress)
|
||||
onProgressReady?(dataTask.progress)
|
||||
}
|
||||
|
||||
dataTask.resume()
|
||||
|
||||
Reference in New Issue
Block a user