Post

Replies

Boosts

Views

Activity

Reply to "zero length data" error
captured using an exception handler and displayed using NSAlert. Don't do that; let the app crash, and then look at the crash logs that Apple will send you. These will include a stack trace so you'll have some chance of identifying the cause. If you really want to trap fatal exceptions yourself, include more diagnostics.
Topic: Programming Languages SubTopic: General Tags:
Feb ’24
Reply to Peer-to-Peer communications on devices on different networks
I've read up on Bonjour and on the Network framework and it appears to me (and I may be wrong) that these capabilities only support either devices on the same local network, or devices that are in close proximity to one another. Correct. This is a hard problem in general. As well as the things you’ve mentioned, you need to consider NAT. Have a look at this to get started: https://en.wikipedia.org/wiki/STUN The difficulty of true peer-to-peer communication on the Internet leads many to use a centralised server or some other alternative.
Feb ’24
Reply to StoreKit 2: cancellation button
I mentioned this in another thread: https://developer.apple.com/forums/thread/744803 I wasn't aware of manageSubscriptionsSheet. What does it actually do? The docs have literally no description: https://developer.apple.com/documentation/swiftui/view/managesubscriptionssheet(ispresented:)/ https://developer.apple.com/documentation/swiftui/view/managesubscriptionssheet(ispresented:subscriptiongroupid:)/
Topic: App & System Services SubTopic: StoreKit Tags:
Jan ’24
Reply to Which of the CLLocationUpdate.LiveConfiguration uses least battery?
Which mode uses the least battery? I think they are all probably very similar; they all use the same hardware, but do different software processing of the results IIUC. I would gladly trade battery performance for less frequent updates. My understanding of how the GPS hardware works is that the radio needs to be continuously on, whatever the update rate. Unless you want very infrequent updates, e.g. every ten minutes or less?, the energy cost is much the same. Maybe. I would use default and expect the OS to do the right thing. You might be disappointed. For example, “default” snaps to where Apple Maps thinks road centerlines are.
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’24
Reply to "zero length data" error
captured using an exception handler and displayed using NSAlert. Don't do that; let the app crash, and then look at the crash logs that Apple will send you. These will include a stack trace so you'll have some chance of identifying the cause. If you really want to trap fatal exceptions yourself, include more diagnostics.
Topic: Programming Languages SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Peer-to-Peer communications on devices on different networks
I've read up on Bonjour and on the Network framework and it appears to me (and I may be wrong) that these capabilities only support either devices on the same local network, or devices that are in close proximity to one another. Correct. This is a hard problem in general. As well as the things you’ve mentioned, you need to consider NAT. Have a look at this to get started: https://en.wikipedia.org/wiki/STUN The difficulty of true peer-to-peer communication on the Internet leads many to use a centralised server or some other alternative.
Replies
Boosts
Views
Activity
Feb ’24
Reply to StoreKit 2: cancellation button
I mentioned this in another thread: https://developer.apple.com/forums/thread/744803 I wasn't aware of manageSubscriptionsSheet. What does it actually do? The docs have literally no description: https://developer.apple.com/documentation/swiftui/view/managesubscriptionssheet(ispresented:)/ https://developer.apple.com/documentation/swiftui/view/managesubscriptionssheet(ispresented:subscriptiongroupid:)/
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jan ’24
Reply to Which of the CLLocationUpdate.LiveConfiguration uses least battery?
Which mode uses the least battery? I think they are all probably very similar; they all use the same hardware, but do different software processing of the results IIUC. I would gladly trade battery performance for less frequent updates. My understanding of how the GPS hardware works is that the radio needs to be continuously on, whatever the update rate. Unless you want very infrequent updates, e.g. every ten minutes or less?, the energy cost is much the same. Maybe. I would use default and expect the OS to do the right thing. You might be disappointed. For example, “default” snaps to where Apple Maps thinks road centerlines are.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’24