amplitude / amplitude/Amplitude-Swift

Add Support for Swift Concurrency

Đang mở
#201 5 bình luận 1 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Swift
Star
82
Fork
45
Merge trung bình
8 giờ 54 phút
Pull request đã merge (30 ngày)
7

Mô tả

## Summary

Currently, if using the SDK in a project that enables strict concurrency checking, Xcode will complain that the `Amplitude` object is not marked as `Sendable` and is not concurrency safe.

To circumvent these warnings (which may become errors in Swift 6), we can mark the library as `@preconcurrency`

```swift
@preconcurrency import AmplitudeSwift
```

## Motivations

Swift Concurrency is becoming a large part of the Swift language, and moving into 6.0 will be important to add support. This might mean exposing a different kind of object, or migrating the `Amplitude` class itself to an actor.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.