Swiftpack.co - Package - Azure/azure-sdk-for-ios

Azure SDK for iOS

This repository is for active development of the Azure SDK for iOS. For consumers of the SDK we recommend visiting our versioned developer docs.

Note: The Azure SDK for iOS replaces a previous offering, known as Azure.iOS. Source code and documentation for Azure.iOS is available in the legacy branch.

Getting started

For your convenience, each service has a separate set of libraries that you can choose to use instead of one, large Azure package. To get started with a specific library, see the README.md file located in the library's project folder. You can find service libraries in the /sdk directory.

Prerequisites

  • The client libraries are written in modern Swift 5. Due to this, Xcode 10.2 or higher is required to use these libraries.
  • You must have an Azure subscription to use these libraries.

Libraries available

The latest version of the SDK is 1.0.0-beta.2. Older releases are also available.

Currently, the client libraries are in beta. These libraries follow the Azure SDK Design Guidelines for iOS and share a number of core features such as HTTP retries, logging, transport protocols, authentication protocols, etc., so that once you learn how to use these features in one client library, you will know how to use them in other client libraries. You can learn about these shared features in AzureCore.

The following libraries are currently in beta:

Core

Azure Communication Services

Note: The SDK is currently in beta. The API surface and feature sets are subject to change at any time before they become generally available. We do not currently recommend them for production use.

Install the libraries

To install the Azure client libraries for iOS, we recommend you use Swift Package Manager.

Add a package dependency with Swift Package Manager

The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

Xcode comes with built-in support for Swift Package Manager and source control accounts and makes it easy to leverage available Swift packages. Use Xcode to manage the versions of package dependencies and make sure your project has the most up-to-date code changes.

Xcode

To add the Azure SDK for iOS to your application, follow the instructions in Adding Package Dependencies to Your App:

With your project open in Xcode 11 or later, select File > Swift Packages > Add Package Dependency... Enter the clone URL of this repository: https://github.com/Azure/azure-sdk-for-ios.git and click Next. For the version rule, specify the exact version or version range you wish to use with your application and click Next. Finally, place a checkmark next to each client library you wish to use with your application, ensure your application target is selected in the Add to target dropdown, and click Finish.

Swift CLI

To add the Azure SDK for iOS to your application, follow the example in Importing Dependencies:

Open your project's Package.swift file and add a new package dependency to your project's dependencies section, specifying the clone URL of this repository and the version specifier you wish to use:

    dependencies: [
        ...
        .package(url: "https://github.com/Azure/azure-sdk-for-ios.git", from: "1.0.0-beta.2")
    ],

Next, add each client library you wish to use in a target to the target's array of dependencies:

    targets: [
        ...
        .target(
            name: "MyTarget",
            dependencies: ["AzureCommunicationChat", ...])
    ]
)

Need help?

Reporting security issues and security bugs

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

Contributing

For details on contributing to this repository, see the contributing guide.

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Impressions

Github

link
Stars: 73

Dependencies

Used By

Total: 0

Releases

Azure SDK for iOS 1.0.0-beta.2 - 2020-10-05 22:23:45

Version 1.0.0-beta.2 adds the Azure Communication Services Chat to the SDK.

Added Libraries

Azure SDK libraries are distributed via Swift Package Manager. For installation instructions and a list of available libraries, see the project's README. Click on any library in the list to view getting started material and examples for that library.

Azure SDK for iOS 1.0.0-beta.1 - 2020-09-22 04:53:52

Version 1.0.0-beta.1 is a beta of our efforts in creating a client library that is developer-friendly, idiomatic to the iOS ecosystem, and as consistent across different languages and platforms as possible. The principles that guide our efforts can be found in the Azure SDK Design Guidelines for iOS.

Added Libraries

Azure SDK libraries are distributed via Swift Package Manager. For installation instructions and a list of available libraries, see the project's README. Click on any library in the list to view getting started material and examples for that library.

v0.5.0 - 2019-08-19 14:31:38

New Features

The AzureData SDK now uses CosmosDB REST API version 2018-12-31, which adds support for large partition keys.

Note: This update shouldn't break existing applications. If you do experience problems, revert to v0.4.4 and file an issue.

Bug Fixes

Fixes issue #132: Can't query with large partition key.

v0.4.4 - 2019-08-13 19:39:06

New Features

Adds new static constructor for Query that takes a raw SQL query string:

public static func createFrom(queryString: String) -> Query

Example usage

let query = Query.createFrom(queryString: #"SELECT c.id FROM c WHERE c.type = "round" AND ARRAY_LENGTH(c.holeScores) = 18 AND c.isDeleted = false"#)

AzureData.query(documentPropertiesIn: myCollection, with: query, andPartitionKey: "myKey") { response in
    let roundsCount = response.resource.count
}

v0.4.3 - 2019-07-18 12:42:48

New Features

  • Adds ability to query boolean properties (fixes #130)
  • Better handles queries with strings containing single quotes (fixes #129)

v0.4.2 - 2019-07-16 22:08:06

v0.4.1 - 2019-05-28 16:01:36

Bug fixes

v0.4.0 - 2019-05-21 17:49:03

New Features

  • Updated to use Swift 5.0
  • Added support for querying a subset of documents properties (see the updated documentation for the usage of the new API functions).
  • Added overloads of execute(storedProcedure...) with a new parameter for the partition key.

v0.3.1 - 2019-05-21 16:32:58

v0.3.0 - 2019-04-09 00:54:39

New Features

  • Custom documents are now defined by conforming to the Document protocol. The protocol requires a partition key and an ID.
protocol Document: Codable {
    typealias PartitionKey = KeyPath<Self, String>
    static var partitionKey: PartitionKey?
    var id: String { get }
}

Example of a custom document Person:

final class Person: Document {
    static let partitionKey: PartitionKey? = \.birthCity

    let id: String
    let firstName: String
    let lastName: String
    let birthCity: String

    init(id: String, firstName: String, lastName: String, birthCity: String) {
        self.id = id
        self.firstName = firstName
        self.lastName = lastName
        self.birthCity = birthCity
    }
}
  • Geometric types Point, LineString and Polygon are now available. They can be used as types of properties in user defined documents and in queries (ST_DISTANCE, ST_INTERSECTS and ST_WITHIN).
final class User: Document {
    static let partitionKey: PartitionKey? = nil

    let name: String
    let location: Point

    init(name: String, location: Point) {
        self.name = name
        self.location = location
    }
}
let point = Point(latitude: 12.01, longitude: 98.322)
let polygon = Polygon(...)
let line = LineString(...)
let query = Query
    .select()
    .from("User")
    .where(distanceFrom: "location", to: pointOfInterest, isLessThan: 3000)
    .and("location", isWithin: polygon)
    .and("location", intersects: line)
  • Query results are now available offline. If a query is performed when there is no internet connectivity, the most recent fetched results for that query will be returned.

  • Function in AzureData related to collections, documents and attachments now accept an optional parameter partitionKey.

v0.2.0 - 2018-10-03 20:48:24

Bug Fixes

  • Offline resources were sometimes saved in the wrong directory
  • Crash occurs when an offline resource is created as a child of another offline resource if the process creating the child resource is different from the process that created the parent resource
  • Pending offline writes were not always processed once the network becomes reachable
  • Broken dependencies causing carthage builds to fail

v0.1.7 - 2018-06-13 17:17:45

Bug Fixes

  • Issue #93: Create empty child directories for resources cached locally
  • Issue #92: Hide objective-c specific types from swift consumers
  • Issue #90: Unexpectedly found nil while unwrapping an Optional value

v0.1.6 - 2018-06-13 16:43:17

v0.1.5 - 2018-06-08 20:19:28

v0.1.4 - 2018-06-07 21:18:33

v0.1.3 - 2018-06-05 21:47:40

v0.1.3

v0.1.2 - 2018-06-05 20:36:55

Add SWIFT_VERSION

v0.1.1 - 2018-06-05 18:15:25

CocoaPods support for AzureCore & AzureData

v0.1.0 - 2018-06-04 16:22:18

This is the initial preview/alpha release of AzureData. AzureData is an SDK for interfacing with Azure Cosmos DB - A schema-less JSON database engine with rich SQL querying capabilities.

Highlights include:

  • Clean, expressive API
  • Full SQL (DocumentDB) API coverage
  • Offline read/write
  • Custom conflict resolution
  • Custom encryption
  • Carthage support (CocoaPods coming soon)
  • Swift & Objective-C
  • macOS, iOS, watchOS, tvOS

v0.0.2 - 2018-04-12 15:27:17

Release to test Carthage support

v0.0.1 - 2018-04-12 02:14:22

Initial release to test Carthage support