Swiftpack.co - Esri/arcgis-runtime-ios-async-await as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Esri.
Esri/arcgis-runtime-ios-async-await v100.12.0
Async/Await wrappers around the ArcGIS Runtime SDK for iOS for methods that Xcode does not automatically bridge.
⭐️ 1
🕓 1 week ago
.package(url: "https://github.com/Esri/arcgis-runtime-ios-async-await.git", from: "v100.12.0")

Async/await wrappers for ArcGIS Runtime SDK for iOS

This repository provides async/await wrappers for ArcGIS Runtime SDK for iOS asynchronous methods using the Swift Concurrency capabilities introduced in Xcode 13 and Swift 5.5.

Xcode will automatically generate async/await wrappers for most asynchronous methods, but if the original method returns a value, then it must be wrapped explicitly to handle that return value. Many asynchronous methods in the ArcGIS Runtime SDK for iOS return an AGSCancelable, and so are not automatically wrapped by Xcode. This repository provides those missing wrappers.


  • A comprehensive set of async wrappers for ArcGIS Runtime SDK for iOS version 100.12 to complement those generated automatically by Xcode.
  • Helper actors to support these wrappers.
  • An example app showing Swift Concurrency patterns in use with the ArcGIS Runtime SDK for iOS, including canceling asynchronous operations. Just bring your own API Key and set it in the AppDelegate.

If you find any methods that are missing an async wrapper, please open an issue (or better yet, submit a PR adding the method).



  1. Reference the source. Either use Swift Package Manager, or include the AsyncWrappers.swift and AsyncWrapperActors.swift source files in your project (see below).
  2. If you're using the Swift Package Manager, add an import ArcGISAsyncAwait statement to your Swift source files.
  3. Optional: If you are executing AGSJobs, manually copy the AsyncCancelableJobWrapper.swift file into your project. See Known Issues for more details.

Swift Package Manager

  1. Open your project in Xcode.
  2. Go to File > Add Packages….
  3. Enter https://github.com/Esri/arcgis-runtime-ios-async-await as the Package URL.
  4. Set the Dependency Rule to Up to Next Major Version and set the minimum version to 100.12.0. Click Add Package.

Note: The ArcGIS Runtime Async Await Swift Package adds the ArcGIS Runtime SDK package as a dependency.

New to Swift Package Manager? Visit swift.org/package-manager/.


  1. Clone or download this repo.
  2. Drag and drop the AsyncWrappers.swift and AsyncWrapperActors.swift files into your project through the Xcode Project Navigator pane.

Known Issues

  • To use the cancelable AGSJob subclass extensions, you must manually copy the AsyncCancelableJobWrappers.swift file into your project. If the file were included as part of the Swift package, Xcode would generate conflicting non-canceling async wrappers.
  • This release has only been tested with Xcode 13 and iOS 15. Xcode 13.2 will open up Swift Concurrency backwards compatibility for iOS 13 and iOS 14. This hasn't been tested yet.

Additional Resources

  • Want to start a new Runtime project? Setup your dev environment.
  • New to the API? Explore the documentation : Guide | API Reference.
  • Got a question? Ask the community on our forum.


Find a bug or want to request a new feature? Please let us know by submitting an issue.

Please do not contact Esri Support with bugs in this repo's code.


Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.


Copyright 2021 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file.


Stars: 1
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

v100.12.0 Release
1 week ago

Initial release, covering:

  • ArcGIS Runtime SDK for iOS version 100.12
  • Cancelable async wrappers that Xcode cannot automatically create.
  • Overriding async wrappers for AGSJob.start() to add cancelation to Xcode's automatically created wrappers.
  • Example app.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics