Skip to content

Commit d099dc2

Browse files
committed
Update Swift test suite to 10.50.1
1 parent 0c633d6 commit d099dc2

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

examples/ios/Examples/RealmApp.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,17 @@ class RealmAppTest: XCTestCase {
109109
let configuration = AppConfiguration(baseURL: "http://localhost:80")
110110
let edgeApp = App(id: EDGE_SERVER_APP_ID, configuration: configuration)
111111

112+
// You can check the `baseURL` of an app to define app logic.
113+
if edgeApp.baseURL == "http://localhost:80" {
114+
print("Client app is currently connected to a local Edge Server instance")
115+
}
116+
XCTAssertEqual(edgeApp.baseURL, "http://localhost:80") // :remove:
112117
// ... log in a user and use the app...
113118
// ... some time later...
114119

115120
try await edgeApp.updateBaseUrl(to: "https://services.cloud.mongodb.com")
116121
// :snippet-end:
122+
XCTAssertEqual(edgeApp.baseURL, "https://services.cloud.mongodb.com")
117123
let user = try await edgeApp.login(credentials: Credentials.anonymous)
118124
XCTAssertNotNil(user)
119125
XCTAssert(user.isLoggedIn)

examples/ios/RealmExamples.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,8 +1499,8 @@
14991499
isa = XCRemoteSwiftPackageReference;
15001500
repositoryURL = "https://github.com/realm/realm-swift.git";
15011501
requirement = {
1502-
kind = exactVersion;
1503-
version = 10.49.3;
1502+
kind = upToNextMajorVersion;
1503+
minimumVersion = 10.50.1;
15041504
};
15051505
};
15061506
917CA79427ECADC200F9BDDC /* XCRemoteSwiftPackageReference "facebook-ios-sdk" */ = {
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
// Specify a baseURL to connect to a server other than the default.
22
// In this case, an Edge Server instance running on the device.
33
let configuration = AppConfiguration(baseURL: "http://localhost:80")
4-
let app = App(id: YOUR_APP_SERVICES_APP_ID, configuration: configuration)
4+
let edgeApp = App(id: EDGE_SERVER_APP_ID, configuration: configuration)
55

6+
// You can check the `baseURL` of an app to define app logic.
7+
if edgeApp.baseURL == "http://localhost:80" {
8+
print("Client app is currently connected to a local Edge Server instance")
9+
}
610
// ... log in a user and use the app...
711
// ... some time later...
812

9-
try await app.updateBaseUrl(to: "https://services.cloud.mongodb.com")
13+
try await edgeApp.updateBaseUrl(to: "https://services.cloud.mongodb.com")

source/examples/generated/code/start/RealmApp.snippet.custom-base-url.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// In this case, an Edge Server instance running on the device.
33
let configuration = AppConfiguration(baseURL: "http://localhost:80")
44

5-
let app = App(id: EDGE_SERVER_APP_ID, configuration: configuration)
5+
let edgeApp = App(id: EDGE_SERVER_APP_ID, configuration: configuration)

0 commit comments

Comments
 (0)