-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reorganizes the ios and macos projects to both depend on the same shared code, and implements the same replicated file provider extension with channeled sessions on both platforms, replacing the previous "embed dylib in the bundle" approach used in the past.
- Loading branch information
1 parent
5143c25
commit fd64f97
Showing
47 changed files
with
1,009 additions
and
973 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.DS_Store | ||
/.build | ||
/Packages | ||
xcuserdata/ | ||
DerivedData/ | ||
.swiftpm/configuration/registries.json | ||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata | ||
.netrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// swift-tools-version: 5.9 | ||
import PackageDescription | ||
|
||
|
||
/* This package hosts functionality that is shared by the ios and macos versions of the file | ||
provider extension. It is currently used for: | ||
* mapping rust data models to those expected by the platform | ||
* white-label implementation of the file provider(s): because code in extension targets is not | ||
currently importable by tests, our extensions import and rename the class(es) defined here | ||
|
||
Before committing code to this package, consider the following questions: | ||
1. is the code only useful to our extensions? otherwise it might belong to `OuisyncCommon` (at the | ||
very least as an IPC protocol that calls into the extension that then links with this package) | ||
2. is the code only useful to our app? otherwise it might belong to the `OuisyncLib` swift | ||
bindings or even into the rust core library */ | ||
let package = Package( | ||
name: "OuisyncBackend", | ||
platforms: [.iOS(.v16), .macOS(.v13)], | ||
products: [ | ||
.library(name: "OuisyncBackend", | ||
targets: ["OuisyncBackend"]), | ||
], | ||
dependencies: [ | ||
.package(path: "../OuisyncCommon"), | ||
.package(path: "../ouisync/bindings/swift/OuisyncLib") | ||
], | ||
targets: [ | ||
.target(name: "OuisyncBackend", | ||
dependencies: [.product(name: "OuisyncCommon", package: "OuisyncCommon"), | ||
.product(name: "OuisyncLib", package: "OuisyncLib")], | ||
path: "Sources"), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.DS_Store | ||
/.build | ||
/Packages | ||
xcuserdata/ | ||
DerivedData/ | ||
.swiftpm/configuration/registries.json | ||
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata | ||
.netrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// swift-tools-version: 5.9 | ||
import PackageDescription | ||
|
||
|
||
/* This package hosts functionality that is shared by the ios and macos versions of the client, | ||
regardless of entry point (app vs extension). It is best suited for: | ||
* common configuration options like well known ids and paths | ||
* IPC protocols, shared between providers and consumers | ||
* tools that work around or abstract over operating system behavior | ||
* backports of functionality that is not available on older operating systems | ||
|
||
Intentionally does not link with the rust core library, see `OuisyncBackend` if you need that. */ | ||
let package = Package( | ||
name: "OuisyncCommon", | ||
platforms: [.iOS(.v16), .macOS(.v13)], | ||
products: [ | ||
.library(name: "OuisyncCommon", | ||
targets: ["OuisyncCommon"]), | ||
], | ||
targets: [ | ||
.target(name: "OuisyncCommon", | ||
path: "Sources"), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
public class Constants { | ||
// TODO: merge the following: | ||
public static let flutterConfigChannel = "org.equalitie.ouisync/native" | ||
public static let flutterForwardingChannel = "org.equalitie.ouisync/backend" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.application-groups</key> | ||
<array> | ||
<string>group.org.equalitie</string> | ||
</array> | ||
<key>com.apple.security.network.client</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import OuisyncBackend | ||
|
||
|
||
final class OuisyncReplicated: Extension {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>NSExtension</key> | ||
<dict> | ||
<key>NSExtensionFileProviderDocumentGroup</key> | ||
<string>group.org.equalitie</string> | ||
<key>NSExtensionFileProviderSupportsEnumeration</key> | ||
<true/> | ||
<key>NSExtensionPointIdentifier</key> | ||
<string>com.apple.fileprovider-nonui</string> | ||
<key>NSExtensionPrincipalClass</key> | ||
<string>$(PRODUCT_MODULE_NAME).OuisyncReplicated</string> | ||
</dict> | ||
</dict> | ||
</plist> |
Oops, something went wrong.