Post

Replies

Boosts

Views

Activity

Reply to Erasing strokes
A little bit of Set<> theory. When the draw state is set to erase (this behaviour will have to be modelled), do any current paths intercept any previously-stored paths if yes remove, place in a buffer (for undo purposes) and redraw. So instead of just drawing, you will need to model the behaviours.
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’22
Reply to iOS 15.2 takes too long for calculations.
Then the worst case of your algorithm needs improvement. What does the calculation pattern look like? Is the input driven by data? How many dimensions or for loops process this data? Is my algorithm more efficient with small amounts of data but takes longer as the data get larger? Answer those questions then look for ways to improve any pattern that might be causing the issue. Iteration vs recursion, those types of questions. Now the question is if it's your API then think about how to improve it. If it is not yours then file a bug with the creator of the particular api.
Topic: App & System Services SubTopic: General Tags:
Jan ’22
Reply to Digits move sideways
Monospaced is your best option. This makes a monospaced version of the current font struct ClockView: View {     @State private var date: String = "00:00:00"         var body: some View {             ZStack {                 Color.black                     .edgesIgnoringSafeArea(.all)                 Text(date)                     .foregroundColor(.white)                     .font(.system(size: 45, weight: .ultraLight, design: .default).monospaced())                     .foregroundColor(.secondary)                     .onReceive(ClockView.timer) { _ in                         self.date = ClockView.timeFormat.string(from: Date())                     }             }     }     static let timer = Timer.publish(every: 0.2, on: .main, in: .common).autoconnect()     static var timeFormat: DateFormatter {         let formatter = DateFormatter()         formatter.dateFormat = "HH:mm:ss"         return formatter } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to Separating CoreData functionality from the View (SwiftUI) but Still with observability
@DelawareMathGuy this is what I had to do to trigger the FRCDelegate but this goes against the FRC automatically doing it after the performFetch fetchedResultsController?                 .publisher(for: \.fetchedObjects)                 .receive(on: OperationQueue.main)                 .sink(receiveValue: { [weak self] data in                     guard let self = self,                             let data = data else { return }                     for (index, object) in data.enumerated() {                         let indexpath = IndexPath(item: index, section: 0)                         if let controller = self.fetchedResultsController as? NSFetchedResultsController<NSFetchRequestResult> {                             self.controller(controller, didChange: object,                                             at: nil,                                             for: .insert,                                             newIndexPath: indexpath)                         }                     }                 }).store(in: &cancellables)
Jan ’22
Reply to Socket - web server problems
Who wrote the webserver? What compiler tools did you use to write the webserver? Who is sending the packets to the clients? Is your handcrafted webserver following all of the RFC-based specs? Was the webserver written with Xcode, does it run on the mac or any Apple mobile products? In this scenario, your web server is sending data in response to a client, not the other way around other than a get URL request.
Topic: App & System Services SubTopic: General Tags:
Jan ’22
Reply to How to have the square (logo only) Apple sign in button.
Button(action: {}) {                 ZStack {                     RoundedRectangle(cornerRadius: 16)                         .fill(.gray)                     Image(systemName: "applelogo")                         .resizable()                         .padding(2.0)                 }             }             .frame(width: 120.0, height: 120.0)
Topic: App & System Services SubTopic: General Tags:
Jan ’22
Reply to Simulator stuck on white screen? (Django + Xcode)
This is most likely failing because you're ignoring failures on a non ssl http endpoint: read here if let response = try? JSONDecoder().decode([Account].self, from: data) {    DispatchQueue.main.async {              self.accounts = response     } } else { // add logic to handle api errors here }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to Error CSMERR_TP_NOT_TRUSTED
Wrong forum, Xamarin is Microsoft go https://developercommunity.visualstudio.com/search?space=41
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to In-App Purchase consumable can be purchased just once
Sounds like Nonconsumable's behaviour purchase once restore as many times. Just double-check your product setup in AppStore Connect for Type Consumable
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Erasing strokes
A little bit of Set<> theory. When the draw state is set to erase (this behaviour will have to be modelled), do any current paths intercept any previously-stored paths if yes remove, place in a buffer (for undo purposes) and redraw. So instead of just drawing, you will need to model the behaviours.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to iOS 15.2 takes too long for calculations.
Then the worst case of your algorithm needs improvement. What does the calculation pattern look like? Is the input driven by data? How many dimensions or for loops process this data? Is my algorithm more efficient with small amounts of data but takes longer as the data get larger? Answer those questions then look for ways to improve any pattern that might be causing the issue. Iteration vs recursion, those types of questions. Now the question is if it's your API then think about how to improve it. If it is not yours then file a bug with the creator of the particular api.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Digits move sideways
Monospaced is your best option. This makes a monospaced version of the current font struct ClockView: View {     @State private var date: String = "00:00:00"         var body: some View {             ZStack {                 Color.black                     .edgesIgnoringSafeArea(.all)                 Text(date)                     .foregroundColor(.white)                     .font(.system(size: 45, weight: .ultraLight, design: .default).monospaced())                     .foregroundColor(.secondary)                     .onReceive(ClockView.timer) { _ in                         self.date = ClockView.timeFormat.string(from: Date())                     }             }     }     static let timer = Timer.publish(every: 0.2, on: .main, in: .common).autoconnect()     static var timeFormat: DateFormatter {         let formatter = DateFormatter()         formatter.dateFormat = "HH:mm:ss"         return formatter } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to General NavigationView & List State during device rotation
After watching Demystifying SwiftUI it demystified this issue.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Distribution of a Custom Mac OS Control
You have the option of a custom framework or custom library based on pods, swift package manager, etc but placing a custom UI control into the Xcode IDE is not supported hence why there is no documentation.
Replies
Boosts
Views
Activity
Jan ’22
Reply to Separating CoreData functionality from the View (SwiftUI) but Still with observability
@DelawareMathGuy this is what I had to do to trigger the FRCDelegate but this goes against the FRC automatically doing it after the performFetch fetchedResultsController?                 .publisher(for: \.fetchedObjects)                 .receive(on: OperationQueue.main)                 .sink(receiveValue: { [weak self] data in                     guard let self = self,                             let data = data else { return }                     for (index, object) in data.enumerated() {                         let indexpath = IndexPath(item: index, section: 0)                         if let controller = self.fetchedResultsController as? NSFetchedResultsController<NSFetchRequestResult> {                             self.controller(controller, didChange: object,                                             at: nil,                                             for: .insert,                                             newIndexPath: indexpath)                         }                     }                 }).store(in: &cancellables)
Replies
Boosts
Views
Activity
Jan ’22
Reply to Socket - web server problems
That is a question for the guys a Microsoft.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to I am having trouble running a Xamarin iOS Application in an iOS Simulator on my Mac
This is a Microsoft product, please ask the guys over at Microsoft.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Started receiving RENEWAL notification type
Deprecated doesn't mean removed. Just means you're to prepare to stop using it before it is actually removed.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Socket - web server problems
Who wrote the webserver? What compiler tools did you use to write the webserver? Who is sending the packets to the clients? Is your handcrafted webserver following all of the RFC-based specs? Was the webserver written with Xcode, does it run on the mac or any Apple mobile products? In this scenario, your web server is sending data in response to a client, not the other way around other than a get URL request.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to How to have the square (logo only) Apple sign in button.
Button(action: {}) {                 ZStack {                     RoundedRectangle(cornerRadius: 16)                         .fill(.gray)                     Image(systemName: "applelogo")                         .resizable()                         .padding(2.0)                 }             }             .frame(width: 120.0, height: 120.0)
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Apple Sign In Button does not work properly
This only tells half or less of the story. What is the button nested in? More code is needed to see what is actually causing the problem.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Simulator stuck on white screen? (Django + Xcode)
This is most likely failing because you're ignoring failures on a non ssl http endpoint: read here if let response = try? JSONDecoder().decode([Account].self, from: data) {    DispatchQueue.main.async {              self.accounts = response     } } else { // add logic to handle api errors here }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22