ArcGIS Runtime SDK for iOS: AGSArcGISRuntimeEnvironment Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSArcGISRuntimeEnvironment Class Reference

Description

Class representing the ArcGIS Runtime Environment.

A class representing the ArcGIS Runtime Environment.

Since
100
Inheritance diagram for AGSArcGISRuntimeEnvironment:

Class Methods

(AGSLicense *) + license
 
(nullable AGSLicenseResult *) + setLicenseInfo:error:
 
(nullable AGSLicenseResult *) + setLicenseKey:error:
 
(nullable AGSLicenseResult *) + setLicenseKey:extensions:error:
 

Properties

NSString * APIKey
 
void(^ arcadeConsoleMessageHandler )(AGSArcadeConsoleMessageContext *context, NSString *message)
 
AGSServiceCurveGeometryMode serviceCurveGeometryMode
 

Method Documentation

◆ license

+ (AGSLicense*) license

Returns the current license details about the application.

Since
100

◆ setLicenseInfo:error:

+ (nullable AGSLicenseResult*) setLicenseInfo: (AGSLicenseInfo *)  licenseInfo
error: (NSError **)  error 

License the application for deployment using a license info for named-user access. A license info instance can be obtained from a portal for the current logged in user. The license info instance is only valid for 30 days so the user will be required to log into the portal again when this expires.

ArcGIS Runtime must be licensed to be used in a production application. The application can be licensed at any one of the four levels; Lite, Basic, Standard, and Advanced; where each level enables additional capabilities fundamental to ArcGIS Runtime. Extension licenses are optional and provide access to supplementary capabilities, analysis tools, and data. By default, an ArcGIS Runtime application will run under a developer license (mode) where all licensed capabilities are available.

Parameters
licenseInfoto use
errorthat is popuplated if there was an error in using the license key
Returns
Result of the operation
Since
100

◆ setLicenseKey:error:

+ (nullable AGSLicenseResult*) setLicenseKey: (NSString *)  licenseKey
error: (NSError **)  error 

License the application for deployment using an ESRI license string.

ArcGIS Runtime must be licensed to be used in a production application. The application can be licensed at any one of the four levels; Lite, Basic, Standard, and Advanced; where each level enables additional capabilities fundamental to ArcGIS Runtime. Extension licenses are optional and provide access to supplementary capabilities, analysis tools, and data. By default, an ArcGIS Runtime application will run under a developer license (mode) where all licensed capabilities are available.

Parameters
licenseKeyThe lite, basic, standard, or advanced ESRI license string.
errorthat is popuplated if there was an error in using the license key
Returns
Result of the operation
Since
100

◆ setLicenseKey:extensions:error:

+ (nullable AGSLicenseResult*) setLicenseKey: (NSString *)  licenseKey
extensions: (NSArray< NSString * > *)  extensions
error: (NSError **)  error 

License the application for deployment using an ESRI license string and one or more extension license strings.

ArcGIS Runtime must be licensed to be used in a production application. The application can be licensed at any one of the four levels; Lite, Basic, Standard, and Advanced; where each level enables additional capabilities fundamental to ArcGIS Runtime. Extension licenses are optional and provide access to supplementary capabilities, analysis tools, and data. By default, an ArcGIS Runtime application will run under a developer license (mode) where all licensed capabilities are available.

Parameters
licenseKeyThe lite, basic, standard, or advanced ESRI license string.
extensionsAn array of extension license strings.
errorthat is popuplated if there was an error in using the license key
Returns
Result of the operation
Since
100

Property Documentation

◆ APIKey

- (NSString*) APIKey
readwritenonatomiccopy

The default API key to access API key enabled services and resources in ArcGIS Online.

An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services. An API key is created and managed in the ArcGIS developer dashboard and is tied to a specific ArcGIS account.

In addition to setting an API key at a global level for your application using the AGSArcGISRuntimeEnvironment::APIKey property, you can set an AGSAPIKeyResource::APIKey property on any ArcGIS Runtime class that implements AGSAPIKeyResource. When you set an individual AGSAPIKeyResource::APIKey property on an AGSAPIKeyResource it will override the default key at the global level (on the AGSArcGISRuntimeEnvironment::APIKey property, in other words), enabling more granular usage telemetry and management for ArcGIS Online resources used by your app. Classes that expose an API key property by implementing AGSAPIKeyResource include:

◆ arcadeConsoleMessageHandler

- (void(^ arcadeConsoleMessageHandler) (AGSArcadeConsoleMessageContext *context, NSString *message))
readwritenonatomiccopy

Block that is invoked whenever a console message is sent from any Arcade script. This callback allows you to retrieve messages from evaluating an Arcade script expression in an attribute rule, labeling, popup, dictionary renderer, geotrigger, and more.

Note
The block will be invoked on the same thread on which the event occurred, which could be any arbitrary thread. You need to dispatch any UI related work to the main thread.
Since
100.14

◆ serviceCurveGeometryMode

- (AGSServiceCurveGeometryMode) serviceCurveGeometryMode
readwritenonatomicassign

Determines if curve geometries are fetched from and sent to services that support them.

By default, curve geometries are not fetched from services that support curves, meaning that densified versions of any curve geometries are fetched from the service. To instead fetch original geometries with curve segments (those where AGSGeometry::hasCurves is YES), set this property to AGSServiceCurveGeometryModeFetchCurves. Ensure that you do this before any calls to the services are made as it cannot be changed after the first request has begun.

By default, Runtime indicates that is it not a curve capable client when sending updates to services that support curves. This means that curve geometries stored in services where AGSArcGISFeatureServiceInfo::onlyAllowTrueCurveUpdatesByTrueCurveClients is YES cannot be updated by default. To update such geometries, ensure your app correctly handles curve segments (where AGSSegment::curve is YES) in geometries throughout the workflow and set this property to AGSServiceCurveGeometryModeTrueCurveClient. You must do this before any calls to services are made as it cannot be changed after making the first request.

For details of curve support in services, see ArcGIS REST API documentation.

For services that don't support curves, this value has no effect. It also has no effect on local data sources that may contain curve geometries, such as mobile geodatabases or mobile map packages created using ArcGIS Pro.

Some geometry operations do not support curve geometries. See AGSGeometryEngine for details of curve support. AGSSketchEditor does not support curve geometries.

See also
AGSGeometry::hasCurves
Since
100.12