Skip to content

iOS RC 1 #511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Oct 5, 2020
Merged

iOS RC 1 #511

merged 10 commits into from
Oct 5, 2020

Conversation

Copy link
Contributor

@ccho-mongodb ccho-mongodb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked at the ObjC and Swift examples on the listed pages only.
LGTM.
I added some nitpicks and questions that apply across the examples and are focused on staying consistent which could help with readability and catering to the user's expectations.
One additional inconsistency I noticed was on the Create/Manage API examples; you used comments in the following format "// ..." instead of printing a message or adding text to the comments to explain what happened in that branch of the code.

let expectation = XCTestExpectation(description: "it completes")

// :code-block-start: remote-mongodb
// mongodb-atlas is the name of cluster service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: I think you need an article before "cluster service" or alternatively reword as something like "mongodb-atlas is the cluster service name".

// Select the collection
let collection = database.collection(withName: "Task")

// Using the user's id to look up tasks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: if you want to match the imperative form of the other comments, you can use: "Use the user's id..."

// :hide-end:
return
}
// Print each document.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: to match the other comments, you might omit the "."

- (void)setUp {
XCTestExpectation *expectation = [self expectationWithDescription:@"registers and logs in"];

RLMApp *app = [RLMApp appWithId:YOUR_REALM_APP_ID];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: would it be useful to add the comment about replacing this similar to the Swift examples?

return;
}

// One way to use custom data:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear what usage is recommended by printing out the object. Did you mean "One way to view custom data"? Same comment for Swift version.

@@ -0,0 +1,39 @@
import XCTest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Should there be an Objective-C version alongside the Swift one? If not, should this identify itself as a Swift snippet or is that implied across the iOS docs?


// ... log in ...

// User must not be anonymous user.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: "User must not be an anonymous user"

// Create the API key
[client createAPIKeyWithName:@"someKeyName" completion:^(RLMUserAPIKey *apiKey, NSError *error) {
if (error != nil) {
// ... handle Error ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: should this show some code to handle the error similar to the Swift version? E.g. output "failed to create key: "

@cbush cbush merged commit 29ed063 into mongodb:master Oct 5, 2020
@cbush cbush deleted the ios-rc-1 branch October 5, 2020 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants