@@ -21,53 +21,65 @@ let package = Package(
2121 //.package(name: "SwiftKeychainWrapper", url: "https://github.com/jrendel/SwiftKeychainWrapper", from: "4.0.1")
2222 ] ,
2323 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+ ) ,
2449 . target(
2550 name: " Sync15 " ,
2651 path: " external/application-services/components/sync15/ios "
2752 ) ,
2853 . target(
2954 name: " RustLog " ,
30- dependencies: [ " MozillaRustComponents " ] ,
55+ dependencies: [ " MozillaRustComponentsWrapper " ] ,
3156 path: " external/application-services/components/rc_log/ios "
3257 ) ,
3358 . target(
3459 name: " Viaduct " ,
35- dependencies: [ " MozillaRustComponents " ] ,
60+ dependencies: [ " MozillaRustComponentsWrapper " ] ,
3661 path: " external/application-services/components/viaduct/ios "
3762 ) ,
3863 . target(
3964 name: " Nimbus " ,
40- dependencies: [ " MozillaRustComponents " , " Glean " ] ,
65+ dependencies: [ " MozillaRustComponentsWrapper " , " Glean " ] ,
4166 path: " generated/nimbus "
4267 ) ,
4368 . target(
4469 name: " CrashTest " ,
45- dependencies: [ " MozillaRustComponents " ] ,
70+ dependencies: [ " MozillaRustComponentsWrapper " ] ,
4671 path: " generated/crashtest "
47- ) ,
72+ )
4873 // TODO: other components will go here over time.
4974 //.target(
5075 // name: "Logins",
51- // dependencies: ["MozillaRustComponents ", "Sync15"],
76+ // dependencies: ["MozillaRustComponentsWrapper ", "Sync15"],
5277 // path: "external/application-services/components/logins/ios"
5378 //),
5479 //.target(
5580 // name: "FxAClient",
56- // dependencies: ["MozillaRustComponents ", "SwiftKeychainWrapper"],
81+ // dependencies: ["MozillaRustComponentsWrapper ", "SwiftKeychainWrapper"],
5782 // path: "external/application-services/components/fxa-client/ios"
5883 //),
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- )
7284 ]
7385)
0 commit comments