Post

Replies

Boosts

Views

Activity

Reply to Weird DateFormatter behavior
Thank you for your replies, I think I found the answer myself. The issue seems to be that I am formatting from the components. If I use string(from: to:), then the output is as I would expect it! let formatter = DateComponentsFormatter() formatter.unitsStyle = .full formatter.allowedUnits = [.year, .month, .weekOfMonth, .day] let result = formatter.string(from: startDate, to: endDate)
Topic: App & System Services SubTopic: General Tags:
Jul ’25
Reply to Diffie Hellman Key exchange with .Net Cryptography
Thank you for your reply. Loopbacks and further experimentation, as well as reading code from .Net and Android got me the solution: let symmetricKey = sharedSecret.withUnsafeBytes { rawBufferPointer in var sha = SHA256() sha.update(bufferPointer: rawBufferPointer) let digest = sha.finalize() return SymmetricKey(data: digest) } return symmetricKey My biggest question here is: Is this x9.63 or hkdf, and I am simply using these functions wrong? Or is this derivation method missing from CryptoKit?
Aug ’23
Reply to Info.plist preprocessing appears to have issues
Answering to myself: Works as designed The trick here is that INFOPLIST_PREPROCESS = YES, and that the defines are in the preprocess header. To make it work like about, turn off INFOPLIST_PREPROCESS. What I actually was is to keep it on, get rid of the .xcconfig files entirely, and use <key>SharedGroupName</key> <string>SHARED_GROUP_NAME_IOS</string> which solved my primary problem
Jun ’23
Reply to Reading (NS)Bundle in iOS after relaunch
It seems the path to the file change after a re-launch: The prefs say …/Containers/Data/Application/25E88AEC-9B14-48E9-A7BF-3F93C05AFCB8/Documents/Sample.quizlist When I get the path to the documents folder after relaunch, it is …/Containers/Data/Application/DA18292E-D744-41FF-A98B-A2085E9F4318/Documents/Sample.quizlist I assume this is a feature, not a bug. But why? And where is it documented?
Topic: App & System Services SubTopic: General Tags:
Sep ’22