ArcGIS Runtime SDK for iOS: AGSServiceFeatureTable Class Reference
ArcGIS Runtime SDK for iOS  100.5
AGSServiceFeatureTable Class Reference

Description

Instances of this class represent datasets in an individual layer or table of an ArcGIS Map or Feature service. The service may be hosted in the cloud on ArcGIS Online, or on-premises on an ArcGIS Server. The data is retrieved from the service as needed and stored in a temporary geodatabase on disk. How data is retrieved depends upon the featureRequestMode.

When using a Feature service, you can potentially create, delete, and update the data depending upon whether the service allows those operations, who owns the data, and what ownership-based access control policies are in place. Refer to the #editCapabilities, canUpdateFeature: (AGSFeatureTable), canDeleteFeature: (AGSFeatureTable), for information on what's permitted.

Edits can be performed through #addFeature:completion,addFeatures:completion: (AGSFeatureTable), deleteFeature:completion: (AGSFeatureTable), deleteFeatures:completion: (AGSFeatureTable), updateFeature:completion: (AGSFeatureTable), updateFeatures:completion: (AGSFeatureTable). However, these edits only affect the temporary geodatabase and must be committed to the service through applyEditsWithCompletion: (AGSServiceFeatureTable)

If the service supports attachments (hasAttachments), you can also view and potentially edit the attachments.

You can also query the data based on SQL expressions and/or spatial relationships.

This class is typically used in conjunction with AGSFeatureLayer to display feature data on a map. It can handle temporary network outages while still allowing you to work with the data that has already been retrieved from the service. Your edits are immediately peristed to the local geodatabase and can be applied to the service later when network connectivity is restored.

Service feature table adopts the loadable pattern; many of its properties are initialized asynchronously after connecting to the service. See AGSLoadable for more information.

See also
AGSFeatureLayer to visualize features from this dataset on a map.
Since
100
Inheritance diagram for AGSServiceFeatureTable:
AGSArcGISFeatureTable <AGSRemoteResource> AGSFeatureTable AGSLoadableBase <AGSPopupSource> AGSObject <AGSLoadable>

Instance Methods

(id< AGSCancelable >) - addedFeaturesCountWithCompletion:
 
(id< AGSCancelable >) - addedFeaturesWithCompletion:
 
(id< AGSCancelable >) - addFeature:completion:
 
(id< AGSCancelable >) - addFeatures:completion:
 
(id< AGSCancelable >) - applyEditsWithCompletion:
 
(void) - cancelLoad
 
(BOOL) - canDeleteFeature:
 
(BOOL) - canUpdateFeature:
 
(void) - clearCacheWithKeepLocalEdits:
 
(AGSFeature *) - createFeature
 
(AGSFeature *) - createFeatureWithAttributes:geometry:
 
(nullable AGSArcGISFeature *) - createFeatureWithSubtype:
 
(nullable AGSArcGISFeature *) - createFeatureWithSubtype:geometry:
 
(nullable AGSArcGISFeature *) - createFeatureWithTemplate:
 
(nullable AGSArcGISFeature *) - createFeatureWithTemplate:geometry:
 
(nullable AGSArcGISFeature *) - createFeatureWithType:
 
(nullable AGSArcGISFeature *) - createFeatureWithType:geometry:
 
(id< AGSCancelable >) - deletedFeaturesCountWithCompletion:
 
(id< AGSCancelable >) - deletedFeaturesWithCompletion:
 
(id< AGSCancelable >) - deleteFeature:completion:
 
(id< AGSCancelable >) - deleteFeatures:completion:
 
(nullable AGSFeatureTemplate *) - featureTemplateForName:
 
(nullable AGSFeatureType *) - featureTypeForName:
 
(nullable AGSField *) - fieldForName:
 
(instancetype) - initWithItem:layerID:
 
(instancetype) - initWithTable:relationshipInfo:
 
(instancetype) - initWithURL:
 
(id< AGSCancelable >) - loadOrRefreshFeatures:completion:
 
(void) - loadWithCompletion:
 
(id< AGSCancelable >) - populateFromServiceWithParameters:clearCache:outFields:completion:
 
(id< AGSCancelable >) - queryExtentWithParameters:completion:
 
(id< AGSCancelable >) - queryFeatureCountWithParameters:completion:
 
(id< AGSCancelable >) - queryFeaturesWithParameters:completion:
 
(id< AGSCancelable >) - queryFeaturesWithParameters:queryFeatureFields:completion:
 
(id< AGSCancelable >) - queryRelatedFeatureCountForFeature:completion:
 
(id< AGSCancelable >) - queryRelatedFeatureCountForFeature:parameters:completion:
 
(id< AGSCancelable >) - queryRelatedFeaturesForFeature:completion:
 
(id< AGSCancelable >) - queryRelatedFeaturesForFeature:parameters:completion:
 
(id< AGSCancelable >) - queryRelatedFeaturesForFeature:parameters:queryFeatureFields:completion:
 
(id< AGSCancelable >) - queryStatisticsWithParameters:completion:
 
(nullable NSArray< AGSArcGISFeatureTable * > *) - relatedTables
 
(nullable NSArray< AGSArcGISFeatureTable * > *) - relatedTablesWithRelationshipInfo:
 
(void) - retryLoadWithCompletion:
 
(id< AGSCancelable >) - undoLocalEditsWithCompletion:
 
(id< AGSCancelable >) - updatedFeaturesCountWithCompletion:
 
(id< AGSCancelable >) - updatedFeaturesWithCompletion:
 
(id< AGSCancelable >) - updateFeature:completion:
 
(id< AGSCancelable >) - updateFeatures:completion:
 
(id< AGSCancelable >) - validateRelationshipConstraintsForFeature:completion:
 

Class Methods

(instancetype) + serviceFeatureTableWithItem:layerID:
 
(instancetype) + serviceFeatureTableWithTable:relationshipInfo:
 
(instancetype) + serviceFeatureTableWithURL:
 

Properties

double bufferFactor
 
BOOL canAddFeature
 
BOOL canEditGeometry
 
AGSCredentialcredential
 
id defaultSubtypeCode
 
NSString * definitionExpression
 
NSString * displayName
 
BOOL editable
 
NSArray< AGSField * > * editableAttributeFields
 
AGSEnvelopeextent
 
AGSFeatureLayerfeatureLayer
 
AGSFeatureRequestMode featureRequestMode
 
NSArray< AGSFeatureSubtype * > * featureSubtypes
 
NSArray< AGSFeatureTemplate * > * featureTemplates
 
NSArray< AGSFeatureType * > * featureTypes
 
NSArray< AGSField * > * fields
 
NSString * geodatabaseVersion
 
AGSGeometryType geometryType
 
NSString * globalIDField
 
BOOL hasAttachments
 
BOOL hasGeometry
 
BOOL hasM
 
BOOL hasZ
 
AGSItemitem
 
AGSArcGISFeatureLayerInfolayerInfo
 
NSError * loadError
 
AGSLoadStatus loadStatus
 
NSInteger numberOfFeatures
 
NSString * objectIDField
 
AGSPopupDefinitionpopupDefinition
 
BOOL popupEnabled
 
AGSRequestConfigurationrequestConfiguration
 
NSInteger serviceLayerID
 
AGSSpatialReferencespatialReference
 
NSString * subtypeField
 
NSString * tableName
 
NSString * typeIDField
 
NSURL * URL
 
BOOL useAdvancedSymbology
 

Method Documentation

§ addedFeaturesCountWithCompletion:()

- (id<AGSCancelable>) addedFeaturesCountWithCompletion: (void(^)(NSInteger count, NSError *__nullable error))  completion

Number of features that have been locally added to the dataset, but not yet to the originating source.

Parameters
completionblock that is invoked when the operation finishes. The count parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100

§ addedFeaturesWithCompletion:()

- (id<AGSCancelable>) addedFeaturesWithCompletion: (void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error))  completion

Set of features that have been locally added to the dataset, but not yet to the originating source.

Parameters
completionblock that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100

§ cancelLoad()

- (void) cancelLoad
requiredinherited

Cancels loading if it is in progress, otherwise it does nothing. This should be called carefully because other objects could be waiting for loadWithCompletion: or retryLoadWithCompletion: to complete and this will call them all back with the error of NSUserCancelledError

Since
100

§ canDeleteFeature:()

- (BOOL) canDeleteFeature: (AGSFeature *)  feature

Indicates whether the source allows this particular feature to be deleted. The method first checks to verify if the source is capable of deleting any features in general. It also checks specific ownership-based access control policies of the source to see if the user attempting to perform the operation has persmissions to delete this particular feature.

Parameters
featureCan be nil, in which case, this method only checks if the source is capable of deleting any features in general
Returns
A boolean value
Since
100

§ canUpdateFeature:()

- (BOOL) canUpdateFeature: (AGSFeature *)  feature

Indicates whether the source allows updating this particular feature. The method first checks to verify if the source is capable of updating any features in general. It also checks specific ownership-based access control policies of the source to see if the user attempting to perform the operation has persmissions to edit this patricular feature.

Parameters
featureCan be nil, in which case, this method only checks if the source is capable of updating any features in general
Returns
A boolean value
Since
100

§ clearCacheWithKeepLocalEdits:()

- (void) clearCacheWithKeepLocalEdits: (BOOL)  keepLocalEdits

Clear all the data in the table, including any temporary edits.

Since
100

§ createFeature()

- (AGSFeature *) createFeature

Create a new, empty feature. Note, the new feature is only available in memory at this point, it is not commited to the dataset.

Returns
emtpy feature
Since
100
Note
The feature will need to be explicitly added to the dataset. See addFeature:completion:

§ createFeatureWithAttributes:geometry:()

- (AGSFeature *) createFeatureWithAttributes: (NSDictionary< NSString *, id > *)  attributes
geometry: (nullable AGSGeometry *)  geometry 

Create a new feature with the provided attribute values and, optionally, geometry. Note, the new feature is only available in memory at this point, it is not commited to the dataset.

Parameters
attributesfor the feature
geometryfor the feature
Returns
feature
Since
100
Note
The feature will need to be explicitly added to the dataset. See addFeature:completion:

§ createFeatureWithSubtype:()

- (nullable AGSArcGISFeature *) createFeatureWithSubtype: (AGSFeatureSubtype *)  featureSubtype

Creates a new feature based on the specified feature subtype. Note, the new feature is only available in memory at this point, it is not commited to the dataset.

Parameters
featureSubtypeThe subtype of feature to create.
Returns
The new feature.
Note
The feature will need to be explicitly added to the dataset. See addFeature:completion: (AGSFeatureTable)
Since
100.3

§ createFeatureWithSubtype:geometry:()

- (nullable AGSArcGISFeature *) createFeatureWithSubtype: (AGSFeatureSubtype *)  featureSubtype
geometry: (AGSGeometry *)  geometry 

Creates a new feature based on the specified feature subtype and geoemtry. Note, the new feature is only available in memory at this point, it is not commited to the dataset.

Parameters
featureSubtypeThe type of feature to create.
geometryfor the feature
Returns
The new feature.
Note
The feature will need to be explicitly added to the dataset. See addFeature:completion: (AGSFeatureTable)
Since
100.3

§ createFeatureWithTemplate:()

- (nullable AGSArcGISFeature *) createFeatureWithTemplate: (AGSFeatureTemplate *)  featureTemplate

Creates a new feature based on the specified feature template. Note, the new feature is only available in memory at this point, it is not commited to the dataset.

Parameters
featureTemplateThe feature template to use while creating the feature.
Returns
The new feature.
Note
The feature will need to be explicitly added to the dataset. See addFeature:completion: (AGSFeatureTable)
Since
100

§ createFeatureWithTemplate:geometry:()

- (nullable AGSArcGISFeature *) createFeatureWithTemplate: (AGSFeatureTemplate *)  featureTemplate
geometry: (AGSGeometry *)  geometry 

Creates a new feature based on the specified feature template and geometry. Note, the new feature is only available in memory at this point, it is not commited to the dataset.

Parameters
featureTemplateThe feature template to use while creating the feature.
geometryfor the feature
Returns
The new feature.
Note
The feature will need to be explicitly added to the dataset. See addFeature:completion: (AGSFeatureTable)
Since
100

§ createFeatureWithType:()

- (nullable AGSArcGISFeature *) createFeatureWithType: (AGSFeatureType *)  featureType

Creates a new feature based on the specified feature type. Note, the new feature is only available in memory at this point, it is not commited to the dataset.

Parameters
featureTypeThe type of feature to create.
Returns
The new feature.
Note
The feature will need to be explicitly added to the dataset. See addFeature:completion: (AGSFeatureTable)
Since
100

§ createFeatureWithType:geometry:()

- (nullable AGSArcGISFeature *) createFeatureWithType: (AGSFeatureType *)  featureType
geometry: (AGSGeometry *)  geometry 

Creates a new feature based on the specified feature type and geoemtry. Note, the new feature is only available in memory at this point, it is not commited to the dataset.

Parameters
featureTypeThe type of feature to create.
geometryfor the feature
Returns
The new feature.
Note
The feature will need to be explicitly added to the dataset. See addFeature:completion: (AGSFeatureTable)
Since
100

§ deletedFeaturesCountWithCompletion:()

- (id<AGSCancelable>) deletedFeaturesCountWithCompletion: (void(^)(NSInteger count, NSError *__nullable error))  completion

Number of features that have been locally deleted from the dataset, but not yet from the originating source.

Parameters
completionblock that is invoked when the operation finishes. The count parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100

§ deletedFeaturesWithCompletion:()

- (id<AGSCancelable>) deletedFeaturesWithCompletion: (void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error))  completion

Set of features that have been locally deleted from the dataset, but not yet from the originating source.

Parameters
completionblock that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100

§ featureTemplateForName:()

- (nullable AGSFeatureTemplate *) featureTemplateForName: (NSString *)  name

Convenience method to retrieve a feature template given its name

Parameters
nameof feature template
Returns
feature template
Since
100

§ featureTypeForName:()

- (nullable AGSFeatureType *) featureTypeForName: (NSString *)  name

Convenience method to retrieve a feature type given its name

Parameters
nameof feature type
Returns
feature type
Since
100

§ fieldForName:()

- (nullable AGSField *) fieldForName: (NSString *)  fieldName

Convenience method to getting a field object given its name

Parameters
fieldNameThe name of the field.
Returns
field
Since
100

§ initWithItem:layerID:()

- (instancetype) initWithItem: (AGSItem *)  item
layerID: (NSInteger)  layerID 

Initialize the layer with the provided information

Parameters
itemrepresenting an ArcGIS Feature Serivce. The item's type must be AGSPortalItemTypeFeatureService.
layerIDID of an individual layer in the ArcGIS Feature service represented by the item
Returns
Initialized layer
Since
100

§ initWithTable:relationshipInfo:()

- (instancetype) initWithTable: (AGSServiceFeatureTable *)  table
relationshipInfo: (AGSRelationshipInfo *)  relationshipInfo 

Convenience method to initialize this table to be the one that participates in the specified relationship with the provided table

Parameters
tablethat this table is related to through the specified relationship
relationshipInfospecifying the relationship that this table participates in with the provided table
Since
100.1

§ initWithURL:()

- (instancetype) initWithURL: (NSURL *)  url

Initialize the table with the given URL

Parameters
urlThe URL of an individual layer or table in ArcGIS Map or Feature service whose data needs to be accessed or edited
Since
100

§ loadOrRefreshFeatures:completion:()

- (id<AGSCancelable>) loadOrRefreshFeatures: (NSArray< AGSArcGISFeature * > *)  features
completion: (nullable void(^)(NSError *__nullable error))  completion 

Loads attributes and geometry for features if they have not been loaded or refreshes information for loaded features and updates attributes and geometry with the latest values from the server. Note, feature attachments are not loaded or updated. Any feature requested, but not returned by the server, will have its Object ID cleared (set to an invalid negative value) to indicate it is no longer associated with the service feature table. After calling this method, any local edits (i.e not applied to the server) to the provided features will be lost.

Parameters
featuresthat need to be loaded or refreshed. When the operation completes, the attributes and geometry of these features is updated.
completionblock that is invoked when the operation finishes. The error parameter is populated if the operation encounters an error.
Since
100.3

§ loadWithCompletion:()

- (void) loadWithCompletion: (nullable void(^)(NSError *__nullable error))  completion
requiredinherited

Loads data for the object asynchronously. The completion block is invoked upon completion.

You can call this method any number of times, however only one attempt is made to load the data. If it is already loading, it will just continue to load (i.e. not force a reload). If it has already loaded successfully, the completion block will be invoked right away. If it has already failed to load, the completion block will be invoked right away with error previously encountered. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.

Parameters
completionblock that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load.
Note
The completion block is always invoked on the main thread.
Since
100
See also
- cancelLoad to cancel loading
- retryLoadWithCompletion: to force reload

§ populateFromServiceWithParameters:clearCache:outFields:completion:()

- (id<AGSCancelable>) populateFromServiceWithParameters: (AGSQueryParameters *)  parameters
clearCache: (BOOL)  clearCache
outFields: (NSArray< NSString * > *)  outFields
completion: (nullable void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error))  completion 

Request data from the service based on the specified query parameters and add it to the table. Especially important for non-geographic data or when featureRequestMode is AGSFeatureRequestModeManualCache because the data is not requested automatically based on the map's extent.

Parameters
parametersdefining which data should be requsted from the service and added to the table
clearCacheIf true, existing data will cleared before adding the new data
outFieldsA list of field names specifying which attribute values (columns) should be included in the table.
completionblock that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100

§ queryExtentWithParameters:completion:()

- (id<AGSCancelable>) queryExtentWithParameters: (AGSQueryParameters *)  parameters
completion: (void(^)(AGSEnvelope *__nullable extent, NSError *__nullable error))  completion 

Query the dataset to find the geographic extent covering matched features or records.

Parameters
parametersrepresenting the query criteria
completionThe block that is called when the query is complete
Returns
operation which can be canceled
Since
100.2

§ queryFeatureCountWithParameters:completion:()

- (id<AGSCancelable>) queryFeatureCountWithParameters: (AGSQueryParameters *)  parameters
completion: (void(^)(NSInteger count, NSError *__nullable error))  completion 

Query the dataset to find the number of matched features or records.

Parameters
parametersrepresenting the query criteria
completionThe block that is called when the query is complete
Returns
operation which can be canceled
Since
100.2

§ queryFeaturesWithParameters:completion:()

- (id<AGSCancelable>) queryFeaturesWithParameters: (AGSQueryParameters *)  parameters
completion: (nullable void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error))  completion 

Query the dataset to find specific features or records.

Parameters
parametersrepresenting the query criteria
completionThe block that is called when the query is complete
Returns
operation which can be canceled
Since
100

§ queryFeaturesWithParameters:queryFeatureFields:completion:()

- (id<AGSCancelable>) queryFeaturesWithParameters: (AGSQueryParameters *)  parameters
queryFeatureFields: (AGSQueryFeatureFields queryFeatureFields
completion: (nullable void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error))  completion 

Query the dataset to find specific features or records.

Parameters
parametersrepresenting the query criteria
queryFeatureFieldsspecifying which attribute fields should be included in the result
completionblock that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100.1

§ queryRelatedFeatureCountForFeature:completion:()

- (id<AGSCancelable>) queryRelatedFeatureCountForFeature: (AGSArcGISFeature *)  feature
completion: (void(^)(NSInteger count, NSError *__nullable error))  completion 

§ queryRelatedFeatureCountForFeature:parameters:completion:()

- (id<AGSCancelable>) queryRelatedFeatureCountForFeature: (AGSArcGISFeature *)  feature
parameters: (AGSRelatedQueryParameters *)  parameters
completion: (void(^)(NSInteger count, NSError *__nullable error))  completion 

§ queryRelatedFeaturesForFeature:completion:()

- (id<AGSCancelable>) queryRelatedFeaturesForFeature: (AGSArcGISFeature *)  feature
completion: (void(^)(NSArray< AGSRelatedFeatureQueryResult * > *__nullable results, NSError *__nullable error))  completion 

Returns all features (spatial or non-spatial) that are related to the specified feature. The related features must belong to a feature table that is related to this feature table. Also, the related tables must be part of either the map's operational layers collection (AGSMap::operationalLayers) through a feature layer if they are spatial, or the map's tables collection (AGSMap::tables) directly if they are non-spatial.

Parameters
featurefor which to find related features (spatial and non-spatial)
completionblock that is invoked when the operation finishes. The results parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100.1

§ queryRelatedFeaturesForFeature:parameters:completion:()

- (id<AGSCancelable>) queryRelatedFeaturesForFeature: (AGSArcGISFeature *)  feature
parameters: (AGSRelatedQueryParameters *)  parameters
completion: (void(^)(NSArray< AGSRelatedFeatureQueryResult * > *__nullable results, NSError *__nullable error))  completion 

Returns features (spatial or non-spatial) that are related to the specified feature based on the provided parameters. The related features must belong to a feature table that is related to this feature table. Also, the related tables must be part of either the map's operational layers collection (AGSMap::operationalLayers) through a feature layer if they are spatial, or the map's tables collection (AGSMap::tables) directly if they are non-spatial.

Parameters
featurefor which to find related features (spatial and non-spatial)
parametersspecifying which related features to query
completionblock that is invoked when the operation finishes. The results parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100.1

§ queryRelatedFeaturesForFeature:parameters:queryFeatureFields:completion:()

- (id<AGSCancelable>) queryRelatedFeaturesForFeature: (AGSArcGISFeature *)  feature
parameters: (AGSRelatedQueryParameters *)  parameters
queryFeatureFields: (AGSQueryFeatureFields queryFeatureFields
completion: (void(^)(NSArray< AGSRelatedFeatureQueryResult * > *__nullable result, NSError *__nullable error))  completion 

Returns features (spatial or non-spatial) that are related to the specified feature based on the provided parameters. The related features must belong to a feature table that is related to this feature table. Also, the related tables must be part of either the map's operational layers collection (AGSMap::operationalLayers) through a feature layer if they are spatial, or the map's tables collection (AGSMap::tables) directly if they are non-spatial.

Parameters
featurefor which to find related features (spatial and non-spatial)
parametersspecifying which related features to query
queryFeatureFieldsspecifying which attribute fields should be included in the result
completionblock that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100.1

§ queryStatisticsWithParameters:completion:()

- (id<AGSCancelable>) queryStatisticsWithParameters: (AGSStatisticsQueryParameters *)  parameters
completion: (void(^)(AGSStatisticsQueryResult *__nullable result, NSError *__nullable error))  completion 

Query the dataset to compute statistics on matched features or records.

Parameters
parametersrepresenting the query criteria
completionThe block that is called when the query is complete
Returns
operation which can be canceled
Since
100.2

§ relatedTables()

- (nullable NSArray<AGSArcGISFeatureTable*> *) relatedTables

All feature tables (spatial or non-spatial) that are related to this feature table. The related tables must be part of either the map's operational layers collection (AGSMap::operationalLayers) through a feature layer if they are spatial, or the map's tables collection (AGSMap::tables) directly if they are non-spatial.

Since
100.1

§ relatedTablesWithRelationshipInfo:()

- (nullable NSArray<AGSArcGISFeatureTable*> *) relatedTablesWithRelationshipInfo: (AGSRelationshipInfo *)  relationshipInfo

The feature tables (spatial or non-spatial) that are related to this feature table through the specified relationship. The related feature tables must be a part of either the map's operational layers collection (AGSMap::operationalLayers) through a feature layer if they are spatial, or the map's tables collection (AGSMap::tables) directly if they are non-spatial.

Parameters
relationshipInfospecifying the relationship based on which results should be returned
Returns
feature tables that are related to this table through the specified relationship
Since
100.1

§ retryLoadWithCompletion:()

- (void) retryLoadWithCompletion: (nullable void(^)(NSError *__nullable error))  completion
requiredinherited

Tries to reload when an object has failed to load. This method should be called judiciously. It should be called when:

  1. you didn't have network connectivity earlier when it failed and you want to retry now that you have connectivity
  2. the server was down earlier when it failed and you want to retry
  3. the request is taking too long and you want to cancel it and retry, in which case you will first call cancelLoad and then this method

If the data hasn't started loading, it will start loading. If it is already loading, it will just continue to load. If it has already loaded successfully, calls back right away. If it has already failed to load, tries again. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.

Parameters
completionblock that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load.
Note
The completion block is always invoked on the main thread.
Since
100

§ serviceFeatureTableWithItem:layerID:()

+ (instancetype) serviceFeatureTableWithItem: (AGSItem *)  item
layerID: (NSInteger)  layerID 

Initialize the layer with the provided information

Parameters
itemrepresenting an ArcGIS Feature Serivce. The item's type must be AGSPortalItemTypeFeatureService.
layerIDID of an individual layer in the ArcGIS Feature service represented by the item
Returns
Initialized layer
Since
100

§ serviceFeatureTableWithTable:relationshipInfo:()

+ (instancetype) serviceFeatureTableWithTable: (AGSServiceFeatureTable *)  table
relationshipInfo: (AGSRelationshipInfo *)  relationshipInfo 

Convenience method to initialize this table to be the one that participates in the specified relationship with the provided table

Parameters
tablethat this table is related to through the specified relationship
relationshipInfospecifying the relationship that this table participates in with the provided table
Since
100.1

§ serviceFeatureTableWithURL:()

+ (instancetype) serviceFeatureTableWithURL: (NSURL *)  URL

Initialize the table with the given URL

Parameters
URLThe URL of an individual layer or table in ArcGIS Map or Feature service whose data needs to be accessed or edited
Since
100

§ undoLocalEditsWithCompletion:()

- (id<AGSCancelable>) undoLocalEditsWithCompletion: (nullable void(^)(NSError *__nullable error))  completion

Undoes any local edits to features and attachments since the last time edits were succesfully applied to the server. You can use addedFeaturesWithCompletion: (AGSArcGISFeatureTable), deletedFeaturesWithCompletion: (AGSArcGISFeatureTable), and updatedFeaturesWithCompletion: (AGSArcGISFeatureTable) to find out which features have local edits that will be reverted. If you are holding on to an instance of a feature whose local edit is reverted, you will need to discard that instance and retrieve a new instance by querying the table.

Parameters
completionblock that is invoked when the operation finishes. The error parameter is populated if the operation encounters an error.
Since
100.3

§ updatedFeaturesCountWithCompletion:()

- (id<AGSCancelable>) updatedFeaturesCountWithCompletion: (void(^)(NSInteger count, NSError *__nullable error))  completion

Number of features that have been locally updated in the dataset, but not yet in the originating source.

Parameters
completionblock that is invoked when the operation finishes. The count parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100

§ updatedFeaturesWithCompletion:()

- (id<AGSCancelable>) updatedFeaturesWithCompletion: (void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error))  completion

Set of features that have been locally updated in the dataset, but not yet in the originating source.

Parameters
completionblock that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100

§ validateRelationshipConstraintsForFeature:completion:()

- (id<AGSCancelable>) validateRelationshipConstraintsForFeature: (AGSArcGISFeature *)  feature
completion: (void(^)(AGSRelationshipConstraintViolationType relationshipConstraintViolationType, NSError *__nullable error))  completion 

Checks to see if performing edit operations (addFeature:completion: (AGSFeatureTable) or updateFeature:completion: (AGSFeatureTable)) with the provided feature could lead to a relationship constraint violation. This method makes network calls to query for the related features if they are not present locally

Note
Edit operations such as addFeature:completion: (AGSFeatureTable), updateFeature:completion: (AGSFeatureTable) do not error due to relationship constraint violations. Rather, it is the responsibility of the developer to use this method to explicitly check for violations after the edit is performed. Alternatively, you can recover from violations in a back office operation after applying edits or syncing with the service, if you choose to do so. See ArcGIS Desktop Validate Features process.

The following are types of violations that may be reported: AGSRelationshipConstraintViolationTypeOrphaned : In a composite relationship, adding an orphan feature to the destination table without relating it to an origin feature. To recover from this violation, relate the feature to a valid origin feature. AGSRelationshipConstraintViolationTypeCardinality - cardinality violations: In 1:1 relationships, if an origin feature is already related to a destination feature, it is a violation to relate another feature to either of them. To recover from this violation, unrelate the feature from the origin feature. In 1:n relationships, it is a violation to relate a destination feature to more than one origin feature. To recover from this violation, unrelate the feature from the origin feature.

Parameters
featurefor which relationship constraints need to be validated.
completionblock that is invoked when the operation finishes. The relationshipConstraintViolationType parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100.1
See also
- relateToFeature: (AGSArcGISFeature) to relate two features
- unrelateToFeature: (AGSArcGISFeature) to unrelate two features

Property Documentation

§ bufferFactor

- (double) bufferFactor
readwritenonatomicassign

This factor determines the size of the buffer around the map's current extent for which data is retrieved from the service. Data is not retrieved again until either it expires or the map extent changes and is no longer in the buffered extent. Buffer factor can be up to 10. If it is set to 0 or 1, every time the map extent is changed data for that extent will be requested from the service. Default value is 2

Since
100
Note
Only applies to AGSFeatureRequestModeOnInteractionCache

§ canAddFeature

- (BOOL) canAddFeature
readnonatomicassigninherited

Indicates whether the source supports adding new features.

Since
100

§ canEditGeometry

- (BOOL) canEditGeometry
readnonatomicassigninherited

Indicates whether the source supports updating geometry of existing features.

Since
100

§ credential

- (AGSCredential*) credential
readwritenonatomicstronginherited

Security credentials to access the remote resource. Only applicable if the resource is secured.

Since
100

§ defaultSubtypeCode

- (id) defaultSubtypeCode
readnonatomiccopyinherited

The code for the default feature subtype. This value is for the field specified in subtypeField

See also
#featureSubTypes for the list of feature subtypes available
Since
100.3

§ definitionExpression

- (NSString*) definitionExpression
readwritenonatomiccopy

The definition expression in the syntax of a SQL where clause used for filtering features queried in this table.

Since
100.2

§ displayName

- (NSString*) displayName
readwritenonatomiccopyinherited

User-friendly name that can be displayed in the UI (for example in a Table of Contents)

Since
100.3

§ editable

- (BOOL) editable
readnonatomicassigninherited

Indicates whether the dataset can be edited. For details on which fine-grained editing capabilites are supported, refer to canUpdateFeature: and canDeleteFeature:

Since
100

§ editableAttributeFields

- (NSArray<AGSField*>*) editableAttributeFields
readnonatomiccopyinherited

Array of AGSField objects representing the subset of fields (columns) in the dataset that are editable.

Since
100

§ extent

- (AGSEnvelope*) extent
readnonatomicstronginherited

The extent of the dataset.

Since
100

§ featureLayer

- (AGSFeatureLayer*) featureLayer
readnonatomicweakinherited

The feature layer created with this table, if any.

Since
100

§ featureRequestMode

- (AGSFeatureRequestMode) featureRequestMode
readwritenonatomicassign

Specifies how data should be retrieved from the service. Default is AGSFeatureRequestModeOnInteractionCache.

Since
100

§ featureSubtypes

- (NSArray<AGSFeatureSubtype*>*) featureSubtypes
readnonatomiccopyinherited

A collection of AGSFeatureSubtype objects representing feature sub-types in the layer. For example, a roads layer may contain 2 feature sub-types : highways and streets.

Since
100.3

§ featureTemplates

- (NSArray<AGSFeatureTemplate*>*) featureTemplates
readnonatomiccopyinherited

A collection of AGSFeatureTemplate objects representing feature templates for the layer. Usually only present if the layer does not contain feature sub-types. Only applicable if this dataset is based on an ArcGIS Feature Service.

Since
100

§ featureTypes

- (NSArray<AGSFeatureType*>*) featureTypes
readnonatomiccopyinherited

A collection of AGSFeatureType objects representing feature sub-types in the layer. For example, a roads layer may contain 2 feature sub-types : highways and streets.

Availability:
This feature is only available with services from ArcGIS Server 10.0 or above

Since
100

§ fields

- (NSArray<AGSField*>*) fields
readnonatomiccopyinherited

Array of AGSField objects representing the fields (columns) in the dataset.

Since
100

§ geodatabaseVersion

- (NSString*) geodatabaseVersion
readwritenonatomiccopy

The geodatabase version.

Since
100

§ geometryType

- (AGSGeometryType) geometryType
readnonatomicassigninherited

The type of geometry used by geographic feautres. Only applicable if hasGeometry is true.

Since
100

§ globalIDField

- (NSString*) globalIDField
readnonatomiccopyinherited

The name of field which contains the GLOBALID for each feature

Since
100

§ hasAttachments

- (BOOL) hasAttachments
readnonatomicassigninherited

Indicates whether features may have attachments.

Since
100

§ hasGeometry

- (BOOL) hasGeometry
readnonatomicassigninherited

Indicates whether the dataset contains a geometry field (column). If YES, the dataset contains geographic features. If NO, the dataset contains non-spatial records, similar to a database table.

Since
100

§ hasM

- (BOOL) hasM
readnonatomicassigninherited

Indicates whether features may contain M values

Since
100.2

§ hasZ

- (BOOL) hasZ
readnonatomicassigninherited

Indicates whether features may contain Z values

Since
100.2

§ item

- (AGSItem*) item
readnonatomicstrong

Item representing an ArcGIS Feature Serivce. Only available if the table was instantiated with an item to begin with.

Since
100

§ layerInfo

- (AGSArcGISFeatureLayerInfo*) layerInfo
readnonatomicstronginherited

Information about the source this dataset originates from.

Since
100

§ loadError

- (NSError*) loadError
readnonatomicstronginherited

The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.

Since
100

§ loadStatus

- (AGSLoadStatus) loadStatus
readrequirednonatomicassigninherited

Status of the load operation.

Since
100

§ numberOfFeatures

- (NSInteger) numberOfFeatures
readnonatomicassigninherited

The total number of features or records in the dataset.

Since
100

§ objectIDField

- (NSString*) objectIDField
readnonatomiccopyinherited

The name of field which contains the OBJECTID for each feature

Since
100

§ popupDefinition

- (AGSPopupDefinition*) popupDefinition
readwritenonatomicstronginherited

Information on how popups are defined for this source.

Since
100

§ popupEnabled

- (BOOL) popupEnabled
readwriterequirednonatomicassigninherited

Indicates whether popups are enabled on this source.

Since
100

§ requestConfiguration

- (AGSRequestConfiguration*) requestConfiguration
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.

Since
100

§ serviceLayerID

- (NSInteger) serviceLayerID
readnonatomicassigninherited

The ID of the layer this table corresponds to in the service.

Since
100

§ spatialReference

- (AGSSpatialReference*) spatialReference
readnonatomicstronginherited

The spatial reference of the dataset.

Since
100

§ subtypeField

- (NSString*) subtypeField
readnonatomiccopyinherited

The name of the field which contains the sub-type information for each feature.

Since
100.3

§ tableName

- (NSString*) tableName
readnonatomiccopyinherited

Name of the dataset.

Since
100

§ typeIDField

- (NSString*) typeIDField
readnonatomiccopyinherited

The name of the field which contains the sub-type information for each feature.

Availability:
This feature is only available with services from ArcGIS Server 10.0 or above

Since
100

§ URL

- (NSURL*) URL
readrequirednonatomicstronginherited

The URL of the remote resource.

Since
100

§ useAdvancedSymbology

- (BOOL) useAdvancedSymbology
readwritenonatomicassigninherited

Indicates whether the dataset should be visualized using advanced CIM symbols. The default is NO. Servers which don't support this simply ignore the parameter and return regular symbols instead.

Since
100
Note
You cannot change this after the table is successfully loaded.