[#11477593] Implemented background request policies and Specs. This provides functionality for continuing a request in the background using an iOS background task.

Introduces four modes for handling background requests:
* RKRequestBackgroundPolicyNone - The default behavior replicating pre-background behavior. No special action is taken with regards to backgrounding.
* RKRequestBackgroundPolicyCancel - On transition to the background, requests with this policy set will be cancelled automatically and the delegate informed.
* RKRequestBackgroundPolicyContinue - Requests with this policy will be continued in the background after the app has been transitioned.
* RKRequestBackgroundPolicyRequeue - Requests with this policy will be cancelled and then immediately placed onto the queue for processing the next time the app is returned to the foreground.
This commit is contained in:
Blake Watters
2011-03-29 13:23:17 -04:00
parent 334db23e9d
commit a648d26460
16 changed files with 364 additions and 93 deletions

View File

@@ -61,7 +61,7 @@
<EnvironmentVariables>
<EnvironmentVariable
key = "UISPEC_SPEC"
value = "RKObjectMapperSpec"
value = "RKRequestSpec"
isEnabled = "NO">
</EnvironmentVariable>
<EnvironmentVariable
@@ -71,7 +71,7 @@
</EnvironmentVariable>
<EnvironmentVariable
key = "UISPEC_EXAMPLE"
value = "itShouldNotCrashWhenAttemptingToMapWithAMissingElement"
value = "itShouldSendTheRequestWhenBackgroundPolicyIsRKRequestBackgroundPolicyNone"
isEnabled = "NO">
</EnvironmentVariable>
</EnvironmentVariables>