Post

Replies

Boosts

Views

Activity

Object-C Packages [ Swift Playgrounds ]
I have been working on an app for messaging and storing information. Such as documents, Images, Calendars, etc. I have moved to the Swift Playgrounds because my friend is helping build the app, but he has an iPad, So I moved the app over to playgrounds so we can collaborate. I cannot import Firebase into my project, every time I do, Playgrounds crashes. I have found this thread on GitHub that was having the same issue, it has been over a year since this was open, are we ever going to get the ability to use non pure swift packages? Is there any work around to this? I have been searching for 2 days of other database options, but there are non that work. https://github.com/firebase/firebase-ios-sdk/issues/9107 Dec 16, 2021
2
0
643
Apr ’23
Checking if application went into the background & foreground
So I am building a chat app, one thing in most chat apps is a status. I want to be able to see who is online and using my app. I have all the functions set up and everything. these two functions that I have that are supposed to be called when the app enters foreground and background don't seem to be called. at all. func applicationDidEnterBackground(_ application: UIApplication) {         guard let userId = UserDefaults.standard.string(forKey: "uuid") else { return }         print(userId)         FirebaseManager().updateUserStatusOnDisconnect(status: false, userId: userId)         print("No longer using the app")     }     func applicationWillEnterForeground(_ application: UIApplication) {         guard let userId = UserDefaults.standard.string(forKey: "uuid") else { return }         print(userId)         FirebaseManager().updateUserStatusOnDisconnect(status: true, userId: userId)         print("Using the app")     } I don't even know if I have written these correctly or not, but I need the functions to be called for me to even understand what is going on. What should be happening? When the app enters into the background it's going to call the updateUserStatusOnDisconnect function that is in my FirebaseManager file. this function will update the status to the database to appear offline and all of the flashy viewings will be toggled. For when the app enters the foreground it will do the same thing except update the the database with users status to be true, as he or she will be online. Any help that can be brought to light for me will be greatly appreciated. I am fairly new to SwiftUI and just apple development in general. Ive only started 6 days ago, and im going strong. Just stuck on some problems that google can't even help with.
0
1
447
Mar ’23
Object-C Packages [ Swift Playgrounds ]
I have been working on an app for messaging and storing information. Such as documents, Images, Calendars, etc. I have moved to the Swift Playgrounds because my friend is helping build the app, but he has an iPad, So I moved the app over to playgrounds so we can collaborate. I cannot import Firebase into my project, every time I do, Playgrounds crashes. I have found this thread on GitHub that was having the same issue, it has been over a year since this was open, are we ever going to get the ability to use non pure swift packages? Is there any work around to this? I have been searching for 2 days of other database options, but there are non that work. https://github.com/firebase/firebase-ios-sdk/issues/9107 Dec 16, 2021
Replies
2
Boosts
0
Views
643
Activity
Apr ’23
Firebase in Swift Playgrounds
I want to use Firebase SDK in my swift playground app, but it doesnt allow me too.
Replies
1
Boosts
1
Views
900
Activity
Apr ’23
Checking if application went into the background & foreground
So I am building a chat app, one thing in most chat apps is a status. I want to be able to see who is online and using my app. I have all the functions set up and everything. these two functions that I have that are supposed to be called when the app enters foreground and background don't seem to be called. at all. func applicationDidEnterBackground(_ application: UIApplication) {         guard let userId = UserDefaults.standard.string(forKey: "uuid") else { return }         print(userId)         FirebaseManager().updateUserStatusOnDisconnect(status: false, userId: userId)         print("No longer using the app")     }     func applicationWillEnterForeground(_ application: UIApplication) {         guard let userId = UserDefaults.standard.string(forKey: "uuid") else { return }         print(userId)         FirebaseManager().updateUserStatusOnDisconnect(status: true, userId: userId)         print("Using the app")     } I don't even know if I have written these correctly or not, but I need the functions to be called for me to even understand what is going on. What should be happening? When the app enters into the background it's going to call the updateUserStatusOnDisconnect function that is in my FirebaseManager file. this function will update the status to the database to appear offline and all of the flashy viewings will be toggled. For when the app enters the foreground it will do the same thing except update the the database with users status to be true, as he or she will be online. Any help that can be brought to light for me will be greatly appreciated. I am fairly new to SwiftUI and just apple development in general. Ive only started 6 days ago, and im going strong. Just stuck on some problems that google can't even help with.
Replies
0
Boosts
1
Views
447
Activity
Mar ’23