Post

Replies

Boosts

Views

Activity

Reply to SwiftUI, REST, and websockets
You've got this: struct SummaryView: View { @ObservedObject var viewModel: ViewModel @State var dataIsLoaded: Bool = false }.onChange(of: dataIsLoaded) { setupWebSocket() } So you created a @State var and set it to false. It's not going to change. If you're calling that with SummaryView(viewModel: viewModel, dataIsLoaded: self.dataReceived) then the @State var should be a @Binding var instead. I don't know if that'll fix it, but it looks wrong to me.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’24
Reply to iOS 18 - Time Management
Why have you put iOS 18 beta onto your kid's phone? Are they doing development with it? There seem to be a few issues with Screen Time in iOS 18 beta, and - since it's a beta - I wouldn't put it on any device that doesn't need to have it. Unless your kid needs iOS 18 beta, you should probably downgrade to iOS 17. The internet is full of info on downgrading from a beta.
Jun ’24
Reply to How to detect if an app is locked by the user in iOS 18
I'm not sure you should do this, unless Apple is telling us all that there should only be one unlock action (which I haven't heard them suggesting). Let's say your iPhone is locked by Face ID, and you want to pay for something with Apple Pay. You have to authenticate with Face ID again. Or should you just be able to pay without authorising the action? Also, it might confuse your users as to why they don't have to unlock the app.
Jun ’24
Reply to How round an NSDate to midnight (00:00) of the day?
Something like this should work: -(NSDate *)startOfDay:(NSDate *)date { NSCalendar *cal = [NSCalendar currentCalendar]; NSDateComponents *components = [cal components:( NSMonthCalendarUnit | NSYearCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit ) fromDate:date]; [components setHour:0]; [components setMinute:0]; [components setSecond:0]; return [cal dateFromComponents:components]; }
Topic: App & System Services SubTopic: General Tags:
Jun ’24
Reply to SwiftUI, REST, and websockets
You've got this: struct SummaryView: View { @ObservedObject var viewModel: ViewModel @State var dataIsLoaded: Bool = false }.onChange(of: dataIsLoaded) { setupWebSocket() } So you created a @State var and set it to false. It's not going to change. If you're calling that with SummaryView(viewModel: viewModel, dataIsLoaded: self.dataReceived) then the @State var should be a @Binding var instead. I don't know if that'll fix it, but it looks wrong to me.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to iOS 18 - Time Management
Why have you put iOS 18 beta onto your kid's phone? Are they doing development with it? There seem to be a few issues with Screen Time in iOS 18 beta, and - since it's a beta - I wouldn't put it on any device that doesn't need to have it. Unless your kid needs iOS 18 beta, you should probably downgrade to iOS 17. The internet is full of info on downgrading from a beta.
Replies
Boosts
Views
Activity
Jun ’24
Reply to How to detect if an app is locked by the user in iOS 18
I'm not sure you should do this, unless Apple is telling us all that there should only be one unlock action (which I haven't heard them suggesting). Let's say your iPhone is locked by Face ID, and you want to pay for something with Apple Pay. You have to authenticate with Face ID again. Or should you just be able to pay without authorising the action? Also, it might confuse your users as to why they don't have to unlock the app.
Replies
Boosts
Views
Activity
Jun ’24
Reply to How round an NSDate to midnight (00:00) of the day?
Something like this should work: -(NSDate *)startOfDay:(NSDate *)date { NSCalendar *cal = [NSCalendar currentCalendar]; NSDateComponents *components = [cal components:( NSMonthCalendarUnit | NSYearCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit ) fromDate:date]; [components setHour:0]; [components setMinute:0]; [components setSecond:0]; return [cal dateFromComponents:components]; }
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to iOS 18 mac address rotation
Have you raised a Feedback report? If so, put the FB number here. If you haven't, please do so. Apple's developers don't all hang around here, and the ones who do aren't going to raise every issue anyone mentions. You must do this yourself.
Replies
Boosts
Views
Activity
Jun ’24