We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5179f5 commit 0e68a05Copy full SHA for 0e68a05
templates/swift/guides/search/saveObjectsMCM.mustache
@@ -0,0 +1,25 @@
1
+import Foundation
2
+#if os(Linux) // For linux interop
3
+ import FoundationNetworking
4
+#endif
5
+
6
+import Core
7
+{{> snippets/import}}
8
9
+func saveObjectsMCM() async throws {
10
+ // Fetch from your own data storage and with your own code
11
+ // the list of application IDs and API keys to target each cluster
12
+ let configurations = getAllAppIDConfigurations();
13
14
+ // Send the records to each cluster
15
+ for (appID, apiKey) in configurations {
16
+ do {
17
+ let client = try SearchClient(appID: appID, apiKey: apiKey)
18
19
+ {{#dynamicSnippet}}saveObjectsPlaylists{{/dynamicSnippet}}
20
+ } catch {
21
+ print(error)
22
+ }
23
24
25
+}
0 commit comments