ArcGIS Runtime SDK for iOS
100.15
|
A job to synchronize changes between a geodatabase and an ArcGIS Feature service.
Instances of this class represent a long running job on a remote server that can synchronize changes between a geodatabase and an ArcGIS Feature service.
A job is initiated when it is submitted to the server. See startWithStatusHandler:completion: (AGSSyncGeodatabaseJob)
.
When the server accepts the job, it assigns a unique ID to the job which is avialable in serverJobID
. The client then periodically polls for the status of the job on the server and provides this information in the status handler. If the job completes successfully, the result of the job is provided in the completion handler, otherwise an error is provided when the job fails.
Bidirectional
or Upload
with public feature services or when using a private feature service with any sync direction. "Public" feature services means services hosted on the Internet and available anonymously (not secured). "Private" includes all other scenarios such as feature services hosted on a local network within an enterprise or feature services hosted on the Internet but secured . No license required in Developer mode for testing. Instance Methods | |
(BOOL) | - cancel |
(id< AGSCancelable >) | - cancelWithCompletion: |
(id< AGSCancelable >) | - checkStatusWithCompletion: |
(BOOL) | - pause |
(void) | - startWithStatusHandler:completion: |
(void) | - startWithStatusHandler:completion: |
(nullable id) | - toJSON: |
Class Methods | |
(nullable id< AGSJSONSerializable >) | + fromJSON:error: |
Properties | |
AGSCredential * | credential |
NSError * | error |
AGSGeodatabaseDeltaInfo * | geodatabaseDeltaInfo |
AGSJobType | jobType |
NSArray< AGSJobMessage * > * | messages |
NSProgress * | progress |
AGSRequestConfiguration * | requestConfiguration |
NSArray< AGSSyncLayerResult * > * | result |
NSString * | serverJobID |
AGSJobStatus | status |
NSDictionary< NSString *, id > * | unknownJSON |
NSDictionary< NSString *, id > * | unsupportedJSON |
NSURL * | URL |
- (BOOL) cancel |
Cancels the job. Returns a value indicating whether the job was successfully canceled.
cancelWithCompletion:
. Provided by category AGSJob(AGSDeprecated).
- (id<AGSCancelable>) cancelWithCompletion: | (void(^)(NSError *_Nullable error)) | completion |
Cancels this AGSJob
and waits for any asynchronous, server-side operations to be canceled.
The job is canceled and will result in an AGSJobStatusFailed
status after all cancellation tasks have completed. For jobs running on a server, a cancel request is sent for the associated AGSJob::serverJobID
. You should always cancel unneeded jobs (for example when exiting your app) to avoid placing unnecessary load on the server. Examples of server-side jobs include:
In addition, the AGSGenerateOfflineMapJob
is composed of several server-side jobs, depending on the types of layers in your AGSMap
. Canceling this high-level job will also send a cancel request to the underlying server jobs.
Upon calling this method, the AGSJob::status
is immediately set to AGSJobStatusCanceling
.
completion | A block that is invoked when the operation completes successfully or encounters an error. |
- (id<AGSCancelable>) checkStatusWithCompletion: | (void(^)(NSError *__nullable error)) | completion |
Force status check. This method can be called from UIApplication::application:performFetchWithCompletionHandler:
.
|
staticrequiredinherited |
Initializes and returns an object from its JSON representation.
JSONObject | NSDictionary or NSArray containing the JSON. |
error | encountered during the operation, if any. |
- (BOOL) pause |
Pauses the job. Returns a value indicating whether the job was successfully paused.
pause
method through the NSProgress API (exposed via NSProgressReporting
through the progress
property). Provided by category AGSJob(AGSDeprecated).
- (void) startWithStatusHandler: | (nullable void(^)(AGSJobStatus status)) | statusHandler | |
completion: | (void(^)(id __nullable result, NSError *__nullable error)) | completion | |
- (void) startWithStatusHandler: | (nullable void(^)(AGSJobStatus status)) | statusHandler | |
completion: | (void(^)(NSArray< AGSSyncLayerResult * > *__nullable result, NSError *__nullable error)) | completion | |
Start the job by submitting it to the server
statusHandler | is invoked periodically whenever the job's status changes |
completion | block that is invoked with the result when the job succeeds, or an error if it fails |
result
array only contains entries for layers or tables that encountered edit errors during the sync process. If all edits of a layer or table could be synchronized without errors, it is not included in the result array. Also, if the entire sync operation failed, for example due to network interruption, the result array is nil, and the error
argument is populated instead. Bidirectional
or Upload
with public feature services or when using a private feature service with any sync direction. "Public" feature services means services hosted on the Internet and available anonymously (not secured). "Private" includes all other scenarios such as feature services hosted on a local network within an enterprise or feature services hosted on the Internet but secured . No license required in Developer mode for testing.
|
requiredinherited |
Returns JSON representation for this object.
error | encountered during the operation, if any. |
NSDictionary
or NSArray
containing the JSON. Reimplemented in AGSPortalItem.
|
readwritenonatomicstronginherited |
Security credentials to access the remote resource. Only applicable if the resource is secured.
|
readnonatomicstronginherited |
Error encountered during job execution, if any.
|
readnonatomicstrong |
Returns information on geodatabase upload and download delta files.
When AGSSyncGeodatabaseParameters::keepGeodatabaseDeltas
is set to YES
, this property provides information about the synced geodatabase along with the paths to its uploaded and downloaded deltas.
Delta geodatabases allow you to troubleshoot sync problems - for example by inspecting the changes they contain or sending the file to the system administrator for the feature service.
This property will be set even if the job fails. If AGSSyncGeodatabaseParameters::keepGeodatabaseDeltas
is NO
, this property will be nil
.
|
readnonatomicassigninherited |
The type of job
|
readnonatomiccopyinherited |
Informational messages produced during execution of the job.
The messages can be monitored using Key-Value Observing (KVO).
|
readnonatomicstronginherited |
The progress for this job. As a consumer of this progress property, you can observe it's property changes and pause, cancel, resume. Do not, however, set the readwrite properties of this progress object. Those are reserved for internal use. Setting them externally will corrupt the state and lead to undefined behavior.
|
readwritenonatomicstronginherited |
The AGSRequestConfiguration object which defines the behavior and policies to use when accessing the remote resource. The default will be nil. If it is nil the [AGSRequestConfiguration globalConfiguration] will be used.
|
readnonatomicstrong |
For a successfully completed job, an array of AGSSyncLayerResult
is returned. If all edits to the geodatabase's tables and layers are synced successfully, an empty array is returned.
If the job did not succeed, a nil
result array is returned.
If the job succeeded, but individual edits failed to sync, the result array provides an array of each failed edit operation (AGSFeatureEditResult
) grouped by the geodatabase table name. Only errors are reported.
If the array is empty, it should be assumed all edits were synchronized properly and no edit errors were encountered during the sync process.
|
readnonatomiccopyinherited |
Unique ID of the job on the server on which it is executing.
|
readnonatomicassigninherited |
Current status of the job.
The status can be monitored using Key-Value Observing (KVO).
|
readrequirednonatomiccopyinherited |
A dictionary of values that was in the source JSON but was unparsed by API.
NSDictionary
containing the unknown JSON.
|
readnonatomiccopyinherited |
A dictionary of values that are supported by the REST API, but not exposed through the SDK API.
NSDictionary
containing the unsupported JSON.
|
readrequirednonatomicstronginherited |
The URL of the remote resource.