File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,19 @@ extension SamplesApp {
3737 /// a watermark on the map view).
3838 func license( ) {
3939 if let licenseStringLiteral = String . licenseKey,
40- let licenseKey = LicenseKey ( licenseStringLiteral) ,
41- let extensionLicenseStringLiteral = String . extensionLicenseKey,
42- let extensionLicenseKey = LicenseKey ( extensionLicenseStringLiteral) {
43- // Set both keys to access all samples, including utility network
44- // capability.
45- _ = try ? ArcGISEnvironment . setLicense ( with: licenseKey, extensions: [ extensionLicenseKey] )
40+ let licenseKey = LicenseKey ( licenseStringLiteral) {
41+ // Sets the license with an extension if one is included. An
42+ // advanced editing extension is required to access all the samples,
43+ // such as ones with utility network capabilities.
44+ if let extensionLicenseStringLiteral = String . extensionLicenseKey,
45+ let extensionLicenseKey = LicenseKey ( extensionLicenseStringLiteral) {
46+ _ = try ? ArcGISEnvironment . setLicense (
47+ with: licenseKey,
48+ extensions: [ extensionLicenseKey]
49+ )
50+ } else {
51+ _ = try ? ArcGISEnvironment . setLicense ( with: licenseKey)
52+ }
4653 }
4754 // Authentication with an API key or named user is required to access
4855 // basemaps and other location services.
You can’t perform that action at this time.
0 commit comments