Commit Graph

4 Commits

Author SHA1 Message Date
Jordan Rose
9e13263581 Switch to swift-format for formatting instead of swiftformat
swift-format is owned by the Swift project and is generally less
opinionated than swiftformat (but better at formatting to a limited
line length).
2025-06-25 11:24:57 -07:00
Jordan Rose
e2b453fb18 swift: Initial audit for Sendable
- All public Swift-defined structs except CdsiLookupResponse,
  which wraps LookupResponseEntryList, which can *probably* be made
  Sendable but I didn't spend time on it.

- All public Swift-defined enums except those being used purely as
  namespaces.

- All zkgroup types, since they are immutable and can be serialized
  and deserialized to send them anyway

- ServiceId and its subclasses, an immutable class hierarchy

- ProtocolAddress, PinHash, SenderCertificate and ServerCertificate,
  and all public and private Key types, immutable wrappers around
  immutable Rust objects

More of our wrapper types could be made Sendable as well if there's a
need to. See CODING_GUIDELINES for more info.
2024-10-23 13:10:16 -07:00
Jordan Rose
4e22da3293 Add BackupCredentialType to BackupAuthCredential
Rename BackupLevel::{Messages, Media} to {Free, Paid}, then add 
BackupCredentialType::{Messages, Media}.

This is a breaking change for apps and the server, both because of the
new names, and because the credential attributes have changed (both
what's in a serialized credential, and what's included in the
signature).
2024-10-23 13:03:53 -07:00
ravi-signal
9204831745 Use an enum for BackupAuthCredential's level 2024-04-19 11:46:49 -07:00