Skip to content

Commit 29ec56d

Browse files
committed
Initial commit.
1 parent 0c68928 commit 29ec56d

File tree

9 files changed

+858
-3
lines changed

9 files changed

+858
-3
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/
6+
DerivedData/
7+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

MatrixSDKFFIWrapper/dummy.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Swift Package Manager needs at least one source file.

MatrixSDKFFIWrapper/include/dummy.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Swift Package Manager needs at least one header to prevent a warning. See
2+
// https://github.com/mozilla/application-services/issues/4422.
3+
4+
#import "sdkFFI.h"

Package.swift

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// swift-tools-version:5.5
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let checksum = "051aa92b9fff0b18e54c6a82ea12231edf4cfa98b49889223870b3c63bf2829b"
7+
let version = "v1.0.0-alpha"
8+
let url = "https://github.com/matrix-org/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip"
9+
10+
let package = Package(
11+
name: "MatrixRustComponentsSwift",
12+
products: [
13+
.library(
14+
name: "MatrixRustComponentsSwift",
15+
targets: ["MatrixRustComponentsSwift"]),
16+
],
17+
targets: [
18+
.binaryTarget(
19+
name: "MatrixSDKFFI",
20+
url: url,
21+
checksum: checksum),
22+
/*
23+
* A placeholder wrapper for our binaryTarget so that Xcode will ensure this is
24+
* downloaded/built before trying to use it in the build process
25+
* A bit hacky but necessary for now https://github.com/mozilla/application-services/issues/4422
26+
*/
27+
.target(
28+
name: "MatrixSDKFFIWrapper",
29+
dependencies: [
30+
.target(name: "MatrixSDKFFI")
31+
],
32+
path: "MatrixSDKFFIWrapper"
33+
),
34+
.target(
35+
name: "MatrixRustComponentsSwift",
36+
dependencies: ["MatrixSDKFFIWrapper"]),
37+
.testTarget(
38+
name: "MatrixRustComponentsSwiftTests",
39+
dependencies: ["MatrixRustComponentsSwift"]),
40+
]
41+
)

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# .github
2-
Default metadata files for repos in this org.
1+
# MatrixRustComponentsSwift
32

4-
If you're seeing this readme in your project, your project is configured wrong.
3+
A description of this package.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//
2+
// ClientError+Error.swift
3+
// MatrixRustSDK
4+
//
5+
// Created by Stefan Ceriu on 09.02.2022.
6+
//
7+
8+
import Foundation
9+
10+
// Fixes code generation problem from uniffi
11+
extension ClientError: Error { }

0 commit comments

Comments
 (0)