@@ -21,30 +21,55 @@ let package = Package(
21
21
//.package(name: "SwiftKeychainWrapper", url: "https://github.com/jrendel/SwiftKeychainWrapper", from: "4.0.1")
22
22
] ,
23
23
targets: [
24
+ /*
25
+ * A placeholder wrapper for our binaryTarget so that XCode will ensure this is
26
+ * downloaded/built before trying to use it in the build process
27
+ * A bit hacky but necessary for now https://github.com/mozilla/application-services/issues/4422
28
+ */
29
+ . target(
30
+ name: " MozillaRustComponentsWrapper " ,
31
+ dependencies: [
32
+ . target( name: " MozillaRustComponents " , condition: . when( platforms: [ . iOS] ) )
33
+ ] ,
34
+ path: " MozillaRustComponentsWrapper "
35
+ ) ,
36
+ . binaryTarget(
37
+ name: " MozillaRustComponents " ,
38
+ //
39
+ // For release artifacts, reference the MozillaRustComponents as a URL with checksum.
40
+ //
41
+ url: " https://112912-129966583-gh.circle-artifacts.com/0/dist/MozillaRustComponents.xcframework.zip " ,
42
+ checksum: " a67cfdab5e9a52eeb93435b20a4fc2813fe0486113c6eab5d7fa77fcbcb4fa07 "
43
+ //
44
+ // For local testing, you can point at an (unzipped) XCFramework that's part of the repo.
45
+ // Note that you have to actually check it in and make a tag for it to work correctly.
46
+ //
47
+ //path: "./MozillaRustComponents.xcframework"
48
+ ) ,
24
49
. target(
25
50
name: " Sync15 " ,
26
51
path: " external/application-services/components/sync15/ios "
27
52
) ,
28
53
. target(
29
54
name: " RustLog " ,
30
- dependencies: [ " MozillaRustComponents " ] ,
55
+ dependencies: [ " MozillaRustComponentsWrapper " ] ,
31
56
path: " external/application-services/components/rc_log/ios "
32
57
) ,
33
58
. target(
34
59
name: " Viaduct " ,
35
- dependencies: [ " MozillaRustComponents " ] ,
60
+ dependencies: [ " MozillaRustComponentsWrapper " ] ,
36
61
path: " external/application-services/components/viaduct/ios "
37
62
) ,
38
63
. target(
39
64
name: " Nimbus " ,
40
- dependencies: [ " MozillaRustComponents " , " Glean " ] ,
65
+ dependencies: [ " MozillaRustComponentsWrapper " , " Glean " ] ,
41
66
path: " generated/nimbus "
42
67
) ,
43
68
. target(
44
69
name: " CrashTest " ,
45
- dependencies: [ " MozillaRustComponents " ] ,
70
+ dependencies: [ " MozillaRustComponentsWrapper " ] ,
46
71
path: " generated/crashtest "
47
- ) ,
72
+ )
48
73
// TODO: other components will go here over time.
49
74
//.target(
50
75
// name: "Logins",
@@ -56,18 +81,5 @@ let package = Package(
56
81
// dependencies: ["MozillaRustComponents", "SwiftKeychainWrapper"],
57
82
// path: "external/application-services/components/fxa-client/ios"
58
83
//),
59
- . binaryTarget(
60
- name: " MozillaRustComponents " ,
61
- //
62
- // For release artifacts, reference the MozillaRustComponents as a URL with checksum.
63
- //
64
- url: " https://112912-129966583-gh.circle-artifacts.com/0/dist/MozillaRustComponents.xcframework.zip " ,
65
- checksum: " a67cfdab5e9a52eeb93435b20a4fc2813fe0486113c6eab5d7fa77fcbcb4fa07 "
66
- //
67
- // For local testing, you can point at an (unzipped) XCFramework that's part of the repo.
68
- // Note that you have to actually check it in and make a tag for it to work correctly.
69
- //
70
- //path: "./MozillaRustComponents.xcframework"
71
- )
72
84
]
73
85
)
0 commit comments