Post

Replies

Boosts

Views

Activity

Reply to Accessing iOS Device Serial Number to Comply with German KassenSichV
There is no public API to get the serial number. That would be a massive privacy vulnerability. If your point-of-sale iPad devices are managed, then maybe you could push down an app-readable setting or file with each device’s own serial number. (But I’m no MDM expert.) Or worst case, you could manually provision each device by copy-and-paste from the Settings > General > About screen into your app. Hopefully this would satisfy the legal requirement.
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’23
Reply to Downvote and spam reporting features broken?
Looks good, @App Store Connect Engineer. I’m able to downvote your reply above and report it for moderation. BTW, an unrelated issue: inserting an at-mention for your name doesn’t work right. If I hit the @ key it pops up a menu of thread participants as expected (you and @Claude31) but selecting your name results in just plain text in the final message as shown above.
Nov ’23
Reply to Unable to parse JSON using decode function
If an error is getting thrown, can you provide the exact error message? Or is something else going wrong? Just “it is broken” is not helpful for troubleshooting. And what do “before” and “now” mean in terms of OS version, Xcode version, anything else that may have changed? BTW, I tried out your code here (Xcode 14.3.1, iOS 17 simulator) and it actually works fine for me.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’23
Reply to JSONEncoder has changed
If you mean the order of keys is now different (and you aren’t using the sortedKeys output option) then see this thread for discussion of why that is. how do I revert to the previous JSONEncoder while using current OS & Xcode versions? You can’t. That class is built into the Foundation framework in the operating system. But one workaround could be to try the old JSONSerialization class. It’s not great with Swift but (when I tried this a while ago) you may get the old key ordering behavior, at least for now. (Or is your issue different from key ordering? It’s not clear from the original question.)
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’23
Reply to Dark blue heart emoji
You’ll probably get a gentle invitation to re-post this question in the user support forum, but on top of that: note the available emoji are defined in the Unicode standard which Apple simply uses. The Unicode Consortium presumably has some process for submitting feedback like this.
Topic: Design SubTopic: General Tags:
Oct ’23
Reply to JSONEncoder ASCII encoding issue
I can confirm your finding on iOS 17 and macOS Sonoma: JSONEncoder’s encoding of strings now stops at the first zero byte. It appears to be this bug which was introduced in the Swift rewrite of JSON encoding: JSONEncoder: Fixed escaping of certain strings. Since there’s no good workaround, is it feasible to change your blob encoding? Your current encoding scheme is pretty unusual. If you directly encode your image to JSON as a Data object, it uses base64 and just works.
Topic: App & System Services SubTopic: General Tags:
Oct ’23