I actually like it when there are issues with the code. Fixing errors is an essential part of coding so it's nice to see a live demo on how the issues were resolved.
Fantastic tutorial! clear and simple! I have a quick question in Firestore Suppose that we have list of "[Cateogires]" Each category has [subscribers]. How can I add/remove subscribers from the array of Categories? struct Categories: Identifiable, Codable, Hashable { var id : String? var categories : [Category]? } struct Category : Identifiable, Codable, Hashable{ var id :String var category_id: String? var subscribers: [String]? //. -> I want to add/remove/update in this array, and might be in a spasific index. }
Will you be covering having a user with an image that is stored in Firebase Storage? To go one step farther how to retrieve a group of users and their images?
Hello Nick, I have a question about this part. After I log out of my account and log in, all the data is reset. How can I deal with this issue? Thank you
You need to configure the auth logic to check if the user is already signed in or if they already have an account/profile in your database. I said in that video that we are not making a full application here and did not add that logic. The auth success returns “isNewUser” Boolean, or you can check if your user profile exists in Firestore.
Hello, I am trying to save/ upload a nested CGPoint array ([[CGPoint]]) into Firestore. I’ve seen that a possible solution is to convert the nested array into a data object like so: var ARRAYNAME : [[String]] = [[String()]] do { let tempArrayData = try NSKeyedArchiver.archivedData(withRootObject: self.ARRAYNAME, requiringSecureCoding: false) }catch{} I am confused if this solution only works for nested String arrays or can it be used for CGPoint as well. Also how would you get the ‘tempArrayData’ into firestore? Lastly, is this the best option? Only the user can edit the nested array and I am ok with deleting the whole array and uploading again when changes need to be made by the user
nick my man you are the GOAT of swift, Ive watched almost all your playlists in the past month. fr i cant express hwo muchh i Appreaciate all the qaulity content. keep it up bro
nick, may i asked... i got string like this "1+1" in my viewModel i write code like this... func addItem(calculateName: String) { let expression = NSExpression(format: calculateName) if let result = expression.expressionValue(with: nil, context: nil) as? Int { let newItem = ItemModel(calculateName: calculateName, isCompleted: false) items.append(newItem) }else { print("failed") } } what i want to result this code, should be "1+1 = 2" but in my case.. output what i got is "1+1"
You should use Integers and not Strings for numbers lol. Convert the number to a String when you want to display it on the screen inside a Text(“\(number)”)
@@kavinda_dilshan_paramsoodi here is my situation... i got test to calculate from image to text... for example i got picture where the text is "1 + 1" and "1 ×3" the result should be "1 +1 = 2" and " 1 × 3 = 3"... but my problem is... i can't calculate that text from image...
Highly recommend joining the Discord server ❤ people there are nice and are willing to help u out if u r stuck at some coding problem 😊 so thats almost always if u are like me 😅😂
I loved how at the beginning he forgot to edit, love your content nick!
It's refreshing to see that you're human like the rest of us
Confirming ….I’m human as well!
lol the intro makes me appreciate his videos even more
I actually like it when there are issues with the code. Fixing errors is an essential part of coding so it's nice to see a live demo on how the issues were resolved.
11 videos in and the quality is still as high as ever. Keep up the great work Nick!
Thanks Geno! 👍
Halfway through and this is gold, these simple tasks that are within every app and there are barely any tutorials on them😣 Thanks🎉
love the opening bloopers !!!
BRO Love the bloopers tho!❤
Relax, you make great points, I've benefited a lot from this.
😅 sweettt
I really appreciate your work, thank you so much 👍🏻
Thanks Andres!
Great stuff Nick. Thank you so much for this!
Keep up the great work Nick!))) 🙏
Take your time ❤
amazing content, amazing teacher
Great! Nick what course is next coming after this course?
Thanks man!
Fantastic tutorial! clear and simple!
I have a quick question in Firestore
Suppose that we have list of "[Cateogires]" Each category has [subscribers].
How can I add/remove subscribers from the array of Categories?
struct Categories: Identifiable, Codable, Hashable {
var id : String?
var categories : [Category]?
}
struct Category : Identifiable, Codable, Hashable{
var id :String
var category_id: String?
var subscribers: [String]? //. -> I want to add/remove/update in this array, and might be in a spasific index.
}
Good question… you would probably want to make a sub-collection for that instead of a simple array. We’ll do some examples in upcoming videos 👍
@@SwiftfulThinking Much appreciated
love your videos. are you going to cover realtime database in this course?
No, unless there’s a lot of requests for it. I recommend using Firestore over Real-time
appreciate your effort, good content!
perfect.
Love from Vietnam.
Will you be covering having a user with an image that is stored in Firebase Storage? To go one step farther how to retrieve a group of users and their images?
Of course, there’s a whole video on Firebase Storage after the Firestore section 🤙
This is more like a live stream than a tutorial imo
Hello Nick, I have a question about this part. After I log out of my account and log in, all the data is reset. How can I deal with this issue? Thank you
You need to configure the auth logic to check if the user is already signed in or if they already have an account/profile in your database. I said in that video that we are not making a full application here and did not add that logic.
The auth success returns “isNewUser” Boolean, or you can check if your user profile exists in Firestore.
Thanks for the effort Bruhhh
Hello, I am trying to save/ upload a nested CGPoint array ([[CGPoint]]) into Firestore. I’ve seen that a possible solution is to convert the nested array into a data object like so:
var ARRAYNAME : [[String]] = [[String()]]
do {
let tempArrayData = try NSKeyedArchiver.archivedData(withRootObject: self.ARRAYNAME, requiringSecureCoding: false)
}catch{}
I am confused if this solution only works for nested String arrays or can it be used for CGPoint as well. Also how would you get the ‘tempArrayData’ into firestore?
Lastly, is this the best option? Only the user can edit the nested array and I am ok with deleting the whole array and uploading again when changes need to be made by the user
nick my man you are the GOAT of swift, Ive watched almost all your playlists in the past month. fr i cant express hwo muchh i Appreaciate all the qaulity content. keep it up bro
Mohammad!!! Thanks for the comment. Happy to help 🤙
Дякую!
nick, may i asked...
i got string like this
"1+1"
in my viewModel i write code like this...
func addItem(calculateName: String) {
let expression = NSExpression(format: calculateName)
if let result = expression.expressionValue(with: nil, context: nil) as? Int {
let newItem = ItemModel(calculateName: calculateName, isCompleted: false)
items.append(newItem)
}else {
print("failed")
}
}
what i want to result this code, should be
"1+1 = 2"
but in my case.. output what i got is
"1+1"
You should use Integers and not Strings for numbers lol. Convert the number to a String when you want to display it on the screen inside a Text(“\(number)”)
@@SwiftfulThinking but "+" operator right? Is that ok if i use int?
@@kirayamato7875
func calculatedString(n1: Int, n2: Int) -> String {
return “\(n1)+\(n2) = \(n1+n2)”
}
print(calculatedString(n1: 1, n2: 1))
?? Is that what you are looking for.
@@kavinda_dilshan_paramsoodi here is my situation... i got test to calculate from image to text... for example i got picture where the text is "1 + 1" and "1 ×3" the result should be "1 +1 = 2" and " 1 × 3 = 3"... but my problem is... i can't calculate that text from image...
Highly recommend joining the Discord server ❤ people there are nice and are willing to help u out if u r stuck at some coding problem 😊 so thats almost always if u are like me 😅😂
He is human !!!😂
Best intro, love it
GoodJob,and thank you very much for your grind.
where is the link to your discord channel please Nick?
as always appreciate the hard work Sir 🫡
We’re waiting for you 🎉 discord.gg/KYrs7PFuPM