-
Notifications
You must be signed in to change notification settings - Fork 227
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
Documentation: Tutorial for Apple #217
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Hey, thank you so much for your PR. I really like that you create a habit tracker app, which is unique and super interesting.
I have some comments, and some of them apply to all pages, please carefully review them and apply to them all.
Let's fix these formatting issues, then I'll take a look at the code.
The Appwrite docs, just like Appwrite, is completely open sourced. | ||
This means, anyone can help improve them and add new guides and tutorials. | ||
{% only_dark %} | ||
 |
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.
Please give me originals of all your screenshots taking in a 1400x900 view port using DPR:3.0 on your browser's developer tools.
We will have our design team edit the screenshots to fit our style.
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.
@Mujhtech please provide original images for all screenshots.
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.
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.
Those are the screenshots @gewenyu99
} | ||
``` | ||
|
||
Add the following code to HomeScreen.swift inside **Home/View** folder. Here we will be using newly introduce ``ContentUnavailableView`` if the habits is empty else render ``HabitCellView`` inside the loop. |
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.
The code tags aren't correct here.
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.
This was not resolved
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.
Code tags here aren't working, should be single ` instead of two
@Mujhtech Remember to rerequest review from me so I know it's ready to look at again! |
@gewenyu99 You can check this out, I have pushed some update |
|
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.
Hi, did you forget to push your changes, my comments were not resolved.
The Appwrite docs, just like Appwrite, is completely open sourced. | ||
This means, anyone can help improve them and add new guides and tutorials. | ||
{% only_dark %} | ||
 |
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.
@Mujhtech please provide original images for all screenshots.
} | ||
``` | ||
|
||
Add the following code to HomeScreen.swift inside **Home/View** folder. Here we will be using newly introduce ``ContentUnavailableView`` if the habits is empty else render ``HabitCellView`` inside the loop. |
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.
This was not resolved
ContentUnavailableView(label: { | ||
Label("No habits", systemImage: "calendar") | ||
}, description: { | ||
Text("Start adding habit to see your list") | ||
}, actions: { | ||
Button("Add Habit") { | ||
router.push(.add_habit) | ||
} | ||
}) |
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.
This is what I was trying to reference to
Create a database file in the **Shared/Constant** folder to contain the database id and collection id. | ||
|
||
```swift | ||
import Foundation | ||
|
||
enum Database: String { | ||
case habit = "[DATABASE_ID]" | ||
} | ||
|
||
|
||
enum DatabaseCollections : String { | ||
case habits = "[COLLECTION_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.
Here @gewenyu99
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.
Hey, great work, but I think we have a lot of missing information and changes needed still. Can you upload the full app code into a repo, too? So I can go check and see when there's something missing/weird when I'm following, so there's less back and forth.
|
||
# Router {% #router %} | ||
|
||
Add the following code to Router.swift File in the root folder |
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.
I feel like we need just a little more explanation, not a lot, in each of these steps to describe what the files do and point out any documentation to swift docs that are relevant.
} | ||
} | ||
|
||
#Preview { |
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.
This a typo?
Here is the link to the repository https://github.com/Mujhtech/appwrite-hacktoberfest |
@Mujhtech Have you had a chance to take a look at my comments? |
Have you checked the link? I was kind of expecting your feedback and note I'm still working on your comment and will resolve all by tomorrow @gewenyu99 |
![]() |
Are you on Xcode 15? Xcode 15 is currently in beta and iOS 17 is not wide spread. Can you revert to a previous directive in your app? |
Hey, Due to time constraints, I'm going to mark this PR When it is merged, we'll contact you for Appwrite-specific Hacktoberfest swag. Thanks for helping us improve Appwrite! |
Hey, Due to time constraints, I'm going to mark this PR When it is merged, we'll contact you for Appwrite-specific Hacktoberfest swag. Thanks for helping us improve Appwrite! |
Yes, I'm using Xcode 15, and it is stable. You can comment on those preview directives and it should work, or can I do it and push the changes? Also I have push some update here @gewenyu99 |
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.
There is a lot of great work here:
- You are going through steps that will be very valuable for users
- Your opinionated approach will likely teach users some best practices for SwiftUI
- You're paving the way for iOS devs to understand how Appwrite can be used in their projects
I think it's worth noting that this tutorial will not help Appwrite achieve parity with the other platforms. While it's innovative to show how to build an app other than an idea tracker with Appwrite, any multilingual devs, or teams looking to familiarize themselves with Appwrite, will not have consistent resources across those platforms. Additionally, this tutorial goes above and beyond an Auth recipe, which means it doesn't sufficiently fix #94 .
All things considered, I'd like to know what @Mujhtech and @gewenyu99 think should be the next steps for this PR.
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.
Is this screenshot being used in the tutorial? Also, why is it different from static/images/docs/tutorials/xcode-new-project-setup.png ?
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.
Yeah it is, @gewenyu99 mentioned I used at least provide screenshot for both dark and light mode so one is dark while other one light.
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.
Several views are being implemented in this step; we should consider including screenshots of the different views. This will help users following along by ensuring their UI looks as expected and help users simply reading through to visually understand what is happening in the app.
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.
I think the idea is to limit the number of files added to the repo as much as possible so that's while in the header screenshot I made sure that all those screenshot are included
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.
Why is this UI different/special that it deserves its own step outside of the Habit UI step?
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.
That's the UI for creating/add new habit.
@Kilo-Loco I have pushed some changes, you can go through it again. |
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.
LGTM. Good job @Mujhtech
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.
This looks really good and we are definitely nearing the end. I think that we should consider removing the reference and step that shows OAuth as the tutorial isn't illustrating that specific flow.
@@ -7,7 +7,7 @@ step: 4 | |||
|
|||
# Appwrite service {% #appwrite-service %} | |||
|
|||
Create a new file AppwriteService.swift inside `Shared/Services` folder and add the following code to it, replacing [YOUR_PROJECT_ID] with your project ID. | |||
Create a new file AppwriteService.swift inside `Shared/Services` folder and add the following code to it, replacing [YOUR_PROJECT_ID] with your project ID. The purpose of this file is to initialize Appwrite SDK and create necessary methods needed for both authentication and read/write from documents. |
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.
I like that clarification was added here 👍🏽
@@ -7,6 +7,66 @@ step: 6 | |||
|
|||
# Authentication {% #authentication %} | |||
|
|||
In order to allow creating OAuth sessions, the following URL scheme must be added to your **Info.plist** file. |
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.
I don't think we are actually using OAuth in this flow. This means we should be able to omit the changes to the Info.plist
altogether.
In `AppwriteService.swift`, let's update the object to include the auth methods by adding the following snippets. | ||
|
||
```swift | ||
public func currentSession() async throws -> User<[String: AnyCodable]> { |
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.
I think we should either change the name or the functionality of the function to match what is actually happening. The function is getting the current user as is, but if we want to show it getting the current session, we should use the snippet below:
public func currentSession() async throws -> User<[String: AnyCodable]> { | |
func currentSession() async throws -> Session { | |
try await account.getSession( | |
sessionId: "current" | |
) | |
} |
@@ -8,3 +8,15 @@ step: 10 | |||
# Test your project {% #test-project %} | |||
At the top level menu click on **Product** then **Scheme** and click on **Choose scheme**, you will notice that the active scheme is selected if not click on it to mark it selected then next to it select any iOS Simulator you wish to run the app on then click on play button. | |||
|
|||
# Delete Appwrite Project in Console {% #delete-appwrite-project-in-console %} |
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.
I love that we are showing the user how to remove their project from the console. This is a huge plus in terms of keeping their account secure 😍
I still want us to consider whether this PR actually addresses #94 like the SvelteKit tutorial or if it is providing the user with a Mobile and Native tutorial like Android Tutorial. |
@Mujhtech Hey there! There were a lot of big PRs during this Hacktoberfest, and we wanted to give everyone ample time to collaborate with our engineering team. If you were able to merge your PRs during October, amazing. If it’s still not merged, don’t worry about it either. Either way, we’ve got your Hacktoberfest swag minted and ready to ship. Please comment with your Discord username here so we can contact you about your shipping information to deliver your Hacktoberfest swag. |
@gewenyu99 my discord username is mujhtech |
@gewenyu99 Please kindly confirm when you see it and also I dropped message to your DM on Discord |
Be in touch soon! Putting together some last minute things we need :) |
What does this PR do?
Added tutorial for Apple in Docs
Test Plan
The Tutorial can be found in the route
/docs/tutorials/apple/step-1
Related PRs and Issues
#94
Have you read the [Contributing Guidelines on issues]
Yes
close #94