-
Notifications
You must be signed in to change notification settings - Fork 88
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
iOS RC 1 #511
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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]; |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 ... |
There was a problem hiding this comment.
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: "
- This was getting out of sync - The complete examples now show everything, so it is no longer needed
Pull Request Info
Issue JIRA link:
https://jira.mongodb.org/browse/DOCSP-12572
Docs staging link (requires sign-in on MongoDB Corp SSO):
Please check the examples on the following pages:
https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/ios-rc-1/ios/remotely-access-mongodb.html
https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/ios-rc-1/ios/access-custom-user-data.html
https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/ios-rc-1/ios/call-a-function.html
https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/ios-rc-1/ios/create-manage-api-keys.html
https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/ios-rc-1/ios/work-with-multiple-users.html
Removed Credentials table:
https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/ios-rc-1/ios/authenticate.html