Skip to content

Swift package compatibility #1778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Changes in 0.27.6 (2024-02-07)

No significant changes.


## Changes in 0.27.5 (2024-01-09)

🐛 Bugfixes
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "MatrixSDK"
s.version = "0.27.5"
s.version = "0.27.6"
s.summary = "The iOS SDK to build apps compatible with Matrix (https://www.matrix.org)"

s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8346,7 +8346,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-D DEBUG";
OTHER_SWIFT_FLAGS = "-D DEBUG -D IS_TEST_RUN";
SDKROOT = "";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 5.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import Realm
@_implementationOnly import Realm

@objcMembers
public class MXBeaconInfoSummaryRealmStore: NSObject {
Expand Down Expand Up @@ -155,10 +155,11 @@ public class MXBeaconInfoSummaryRealmStore: NSObject {
private func beaconInfoSummaries(from realmBeaconInfoSummaryResults: RLMResults<MXRealmBeaconInfoSummary>) -> [MXBeaconInfoSummary] {

var summaries: [MXBeaconInfoSummary] = []

for realmSummary in realmBeaconInfoSummaryResults {

var iterator = NSFastEnumerationIterator(realmBeaconInfoSummaryResults)
while let realmSummary = iterator.next() as? MXRealmBeaconInfoSummary {

if let realmBeaconInfoSummary = realmSummary as? MXRealmBeaconInfoSummary, let summary = self.mapper.beaconInfoSummary(from: realmBeaconInfoSummary) {
if let summary = self.mapper.beaconInfoSummary(from: realmSummary) {
summaries.append(summary)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import Realm
@_implementationOnly import Realm

class MXRealmBeacon: RLMObject {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import Realm
@_implementationOnly import Realm

class MXRealmBeaconInfo: RLMObject {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import Realm
@_implementationOnly import Realm

class MXRealmBeaconInfoSummary: RLMObject {

Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Background/Crypto/MXBackgroundCryptoV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import Foundation

import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

/// An implementation of `MXBackgroundCrypto` which uses [matrix-rust-sdk](https://github.com/matrix-org/matrix-rust-sdk/tree/main/crates/matrix-sdk-crypto)
/// under the hood.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

/// Object responsible for decrypting room events and dealing with undecryptable events
protocol MXRoomEventDecrypting: Actor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

/// Object responsible for encrypting room events and ensuring that room keys are distributed to room members
protocol MXRoomEventEncrypting {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

/// Convenience wrapper around `MatrixSDKCrypto`'s `UserIdentity`
/// which can be used to create `MatrixSDK`s `MXCrossSigningInfo`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

extension EventEncryptionAlgorithm {
enum Error: Swift.Error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

extension MXDeviceVerification {
var localTrust: LocalTrust {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

extension MXEventDecryptionResult {
enum Error: Swift.Error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

extension MXRoomHistoryVisibility {
var visibility: HistoryVisibility {
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Crypto/CryptoMachine/MXCryptoMachine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

typealias GetRoomAction = (String) -> MXRoom?

Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Crypto/CryptoMachine/MXCryptoProtocols.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

/// A set of protocols defining the functionality in `MatrixSDKCrypto` and separating them into logical units

Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Crypto/CryptoMachine/MXCryptoRequests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

/// Convenience class to delegate network requests originating in Rust crypto module
/// to the native REST API client
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Crypto/CryptoMachine/MXCryptoSDKLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

/// Redirects logs originating in `MatrixSDKCrypto` into `MXLog`
class MXCryptoSDKLogger: Logger {
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Crypto/Dehydration/DehydrationService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

enum DehydrationServiceError: Error {
case failedDehydration(Error)
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Crypto/Devices/Data/MXCryptoDeviceWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

/// Convenience wrapper around `MatrixSDKCrypto`'s `Device`
/// which can be used to create `MatrixSDK`s `MXDeviceInfo`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

class MXCryptoKeyBackupEngine: NSObject, MXKeyBackupEngine {
// Batch size chosen arbitrarily, will be moved to CryptoSDK
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/Crypto/MXCryptoV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

/// An implementation of `MXCrypto` which uses [matrix-rust-sdk](https://github.com/matrix-org/matrix-rust-sdk/tree/main/crates/matrix-sdk-crypto)
/// under the hood.
Expand Down
4 changes: 2 additions & 2 deletions MatrixSDK/Crypto/Migration/Data/MXCryptoMigrationStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
//

import Foundation
import OLMKit
import MatrixSDKCrypto
@_implementationOnly import OLMKit
@_implementationOnly import MatrixSDKCrypto

struct MXCryptoMigrationStore {
struct GlobalSettings {
Expand Down
4 changes: 2 additions & 2 deletions MatrixSDK/Crypto/Migration/MXCryptoMigrationV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
//

import Foundation
import OLMKit
import MatrixSDKCrypto
@_implementationOnly import OLMKit
@_implementationOnly import MatrixSDKCrypto

class MXCryptoMigrationV2: NSObject {
enum Error: Swift.Error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

class MXKeyVerificationManagerV2: NSObject, MXKeyVerificationManager {
enum Error: Swift.Error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

/// Verification request originating from `MatrixSDKCrypto`
class MXKeyVerificationRequestV2: NSObject, MXKeyVerificationRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

/// QR transaction originating from `MatrixSDKCrypto`
class MXQRCodeTransactionV2: NSObject, MXQRCodeTransaction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//

import Foundation
import MatrixSDKCrypto
@_implementationOnly import MatrixSDKCrypto

/// SAS transaction originating from `MatrixSDKCrypto`
class MXSASTransactionV2: NSObject, MXSASTransaction {
Expand Down
2 changes: 1 addition & 1 deletion MatrixSDK/MatrixSDKVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

#import <Foundation/Foundation.h>

NSString *const MatrixSDKVersion = @"0.27.5";
NSString *const MatrixSDKVersion = @"0.27.6";
4 changes: 4 additions & 0 deletions MatrixSDK/Utils/Logs/MXAnalyticsDestination.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//

import Foundation
#if IS_TEST_RUN
import SwiftyBeaver
#else
@_implementationOnly import SwiftyBeaver
#endif

/// SwiftyBeaver log destination that sends errors to analytics tracker
class MXAnalyticsDestination: BaseDestination {
Expand Down
4 changes: 4 additions & 0 deletions MatrixSDK/Utils/Logs/MXLog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
//

import Foundation
#if IS_TEST_RUN
import SwiftyBeaver
#else
@_implementationOnly import SwiftyBeaver
#endif

/// Various MXLog configuration options. Used in conjunction with `MXLog.configure()`
@objc public class MXLogConfiguration: NSObject {
Expand Down
Loading