Post

Replies

Boosts

Views

Activity

Task policy of an ANSI C program
Hi, I have developed and ported a sequencer to Apple macOS. It is written in ANSI C and uses Gtk+-3.0 (Gimp Toolkit) for UI. This toolkit uses some Cocoa specific backend, note there are different backends for different platforms available. After some research I have found this: https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/KernelProgramming/scheduler/scheduler.html#//apple_ref/doc/uid/TP30000905-CH211-BABCHEEB The function I wanted to use was: thread_policy_set() But the header file doesn't contain it: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/task_policy.h So was it deprecated? Howto do this, nowadays? 		struct task_category_policy tcatpolicy; 		int ret; 		tcatpolicy.role = TASK_FOREGROUND_APPLICATION; 		if((ret = task_policy_set(mach_task_self(), 			TASK_CATEGORY_POLICY, (thread_policy_t)&tcatpolicy, 			TASK_CATEGORY_POLICY_COUNT)) != KERN_SUCCESS) { 			fprintf(stderr, "set_my_task_policy() failed.\n"); 		} Because the UI animation performance is really bad. The threads interfacing CoreAudio are fine. The UI thread is usually the main thread of the process.
0
0
859
Dec ’20
XCodeCloud makefile run dependency and application build systems
Hi, I did a complex makefile setup with git LFS and submodules. All files extracted, build, installed and deploy to MyApplication.app by makefile. The application and its dependencies are built within 1 hour across many makefile targets. The finaly DMG is built by hditool invocation within makefile. I commented out the call to open -n MyApplication.app I would love to run the integration test suite of MyApplication.app, this are compiled tests. Are there common rules document writing makefiles for Apple XCodeCloud? How can I setup continues integration builds in cloud? What works so far is running build and showing opened git directories. I am familiar with Aquamacs.app or emacs and command line tools. But don't know much about XCode. I read some documents but they all were using integrated build system, I think. regards, J.
0
0
583
Jan ’24
secured HTTP connection libraries, App Uses Non-Exempt Encryption?
Hi, My application ships a copy of following cryptographic libraries: libp11-kit.0.dylib libnettle.8.dylib libgnutls.30.dylib It's purpose is to connect by secured HTTP to an optional server, that might be turned on to allow to receive HTTP requests. I think this is standard encryption, but do I need to mention this explicitely with App Uses Non-Exempt Encryption? The application doesn't encrypt content it is just for secured HTTP connections. regards, Joël
0
0
538
Jun ’24
application doesn't start anymore after codesign
Hi, I have codesigned my application and after this macos won't run the binary anymore. codesign -f -o runtime --timestamp -s "Developer ID Application: YOUR NAME (TEAM_ID)" --entitlements $HOME/workspace/GSequencer-cocoa/gsequencer-macos/macos-contrib/GSequencer.entitlements -i com.gsequencer.GSequencer --deep $HOME/workspace/GSequencer-cocoa/gsequencer-macos/build/universal/GSequencer.app Verify signature works. codesign -vv $HOME/workspace/GSequencer-cocoa/gsequencer-macos/build/universal/GSequencer.app The same for the DMG file, still doesn't work anymore. codesign -f -o runtime --timestamp -s "Developer ID Application: YOUR NAME (TEAM_ID)" $HOME/workspace/GSequencer-cocoa/gsequencer-macos/build/arm64/GSequencer-6.9.1.dmg I would love to distribute my application with code signing. Note all libraries are built using clang or clang++. I figured out that when I leave entitlements away it would launch but complains about library signatures. regards, Joël
1
0
761
Apr ’24
Can't use with testflight
After upload using transporter I get following message: "Cannot be used with TestFlight because the signature for the bundle at “GSequencer.app” is missing an application identifier but has an application identifier in the provisioning profile for the bundle. Bundles with application identifiers in the provisioning profile are expected to have the same identifier signed into the bundle in order to be eligible for TestFlight." (90886) I am unsure about the cause of this problem, please give some advice howto fix?
1
0
855
Apr ’24
CoreAudio audio output doesn't work anymore after signing application
Hi, My application doesn't start playback anymore after signing it with entitlements. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.files.user-selected.read-only</key> <true/> <key>com.apple.security.device.audio-input</key> <true/> <key>com.apple.security.device.microphone</key> <true/> <key>com.apple.security.assets.music.read-write</key> <true/> <key>com.apple.security.network.server</key> <true/> </dict> </plist> regards, Joël
1
0
1.1k
Apr ’24
debug dlopen returning NULL
Hi, For the very same plugin dlopen() sometimes fails. The library is present but sometimes it returns NULL and sometimes a valid plugin handle. Here is the code: char *filename; void *plugin_so; filename = "/Applications/com.example.MyApp/Contents/Plugins/myplugin.dylib"; plugin_so = dlopen(filename, RTLD_NOW); I have debugged using lldb checked filename and it is present. The myplugin.dylib file supports 2 architectures, arm64 and x86_64. regards, Joël
1
0
977
May ’24
macOS maximum CPU usage of application
My audio and MIDI sequencer application consumes about 600 % of CPU power with 10 different instruments during playback. While idle approximately 100%. What is the maximum of CPU power that an application can consume? Are there any limits and could they be modified? I am asking because if I add more instruments the real-time behaviour gets bad at 700 % of CPU power. I have got following HW: MacBook Pro 14-inch, Nov 2024 Apple M4 Pro 24 GB
1
0
218
Mar ’25
Essentials of macOS to read and write mp3 and mp4 audio files
Hi, On macOS I used to open MP3 and MP4 files with ExtAudioFile. For a few years it doesn't work anymore. So I decided to try different macOS API using the AudioFileID of AudioToolbox framework. I decided to write a test: https://gist.github.com/joelkraehemann/7f5b241b52ca38c3a765c138fb647588 It fails right here: AudioFileOpenWithCallbacks() By telling OSStatus error 1954115647, which means kAudioFileUnsupportedFileTypeError. The filename was set to an MP4 file: ~/Music/test.mp4 Howto fix this? regards, Joël
1
0
127
Jun ’25