Post

Replies

Boosts

Views

Activity

Reply to Xcode does not respect '__builtin_available' availability API
I ran into this too and figured it out. The issue is that the to_chars functions’ availability attributes use the “strict” modifier, which means it isn’t possible to check for them at runtime. From the Clang docs: The flag strict disallows using API when deploying back to a platform version prior to when the declaration was introduced. An attempt to use such API before its introduction causes a hard error. So unfortunately, to use these functions in an app that supports older OSs, you have to use compile-time checks with ifdefs.
Jul ’24
Reply to Setting shared memory in Catalina
If you need a lot of shared memory, use a memory-mapped file instead. Create a file, then call mmap on it with permissions PROT_READ | PROT_WRITE and attributes MAP_FILE | MAP_SHARED. If you don't want the file to hang around in the filesystem, you can delete (unlink) it as soon as your process(es) have mapped it; the memory remains valid until the memory map is removed or all the processes exit.
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’21
Reply to Xcode does not respect '__builtin_available' availability API
I ran into this too and figured it out. The issue is that the to_chars functions’ availability attributes use the “strict” modifier, which means it isn’t possible to check for them at runtime. From the Clang docs: The flag strict disallows using API when deploying back to a platform version prior to when the declaration was introduced. An attempt to use such API before its introduction causes a hard error. So unfortunately, to use these functions in an app that supports older OSs, you have to use compile-time checks with ifdefs.
Replies
Boosts
Views
Activity
Jul ’24
Reply to WKNavigationDelegate never called (Obj-C, macOS)
Yes, I filed FB10015555 and FB10015541.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Setting shared memory in Catalina
If you need a lot of shared memory, use a memory-mapped file instead. Create a file, then call mmap on it with permissions PROT_READ | PROT_WRITE and attributes MAP_FILE | MAP_SHARED. If you don't want the file to hang around in the filesystem, you can delete (unlink) it as soon as your process(es) have mapped it; the memory remains valid until the memory map is removed or all the processes exit.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21