Post

Replies

Boosts

Views

Activity

AVAudioEngine Hangs/Locks Apps After Call to -connect:to:format:
Periodically when testing I am running into a situation where the app hangs and beach balls forever when using AVAudioEngine. This seems to log out when this affect happens: Now when this happens if I pause the debugger it's hanging at a call to: [engine connect:playerNode to:engine.mainMixerNode format:buffer.format]; #0 0x000000019391ca9c in __psynch_mutexwait () #1 0x0000000104d49100 in _pthread_mutex_firstfit_lock_wait () #2 0x0000000104d49014 in _pthread_mutex_firstfit_lock_slow () #3 0x00000001938928ec in std::__1::recursive_mutex::lock () #4 0x00000001ef80e988 in CADeprecated::RealtimeMessenger::_PerformPendingMessages () #5 0x00000001ef818868 in AVAudioNodeTap::Uninitialize () #6 0x00000001ef7fdc68 in AUGraphNodeBase::Uninitialize () #7 0x00000001ef884f38 in AVAudioEngineGraph::PerformCommand () #8 0x00000001ef88e780 in AVAudioEngineGraph::_Connect () #9 0x00000001ef8b7e70 in AVAudioEngineImpl::Connect () #10 0x00000001ef8bc05c in -[AVAudioEngine connect:to:format:] () Current all my audio engine related calls are on the main queue (though I am curious about this https://forums.developer.apple.com/forums/thread/123540?answerId=816827022#816827022). In any case, anyone know where I'm going wrong here?
6
0
160
1w
Error Message when Trying to Submit EU Trader Status: "Something went wrong. Please try again."
I can’t submit an App Update without providing the EU trader information. I keep trying to submit this information. I upload all the documents, go through all the steps, then at the end I get the following error message: “Something went wrong. Please try again.” This is pretty frustrating. Then I had to start over...did it all again and ended up with the exact same error message. So I'm blocked from updating an app today...any advice on how I should proceed?
2
0
239
Nov ’24
EU Trader Question, How Long Before Apps Removed from EU?
I've been putting off entering my EU "trader status" info. I see this is published on the developer site: "Starting October 16, 2024, developers must provide their trader status to submit new apps or app updates for distribution in the European Union. To comply with the Digital Services Act, go to the Business section by February 17, 2025 to provide your trader status or your app will be removed from the App Store in the EU." So do I have to do this now (today October 16, 2024) to prevent my apps from being removed from the EU App Store (or do I have until February 17, 2025)?
2
0
314
Oct ’24
App Store Promo Codes Not Working for Subscriptions on iOS 18
I tried redeeming a promo code for a subscription on iOS 18. It's a yearly subscription (the promo code is for myself in this case). This always worked before. Now on iOS 18 when I redeem the code in the App Store it just spins an activity indicator in the navigation bar for a few seconds and stops. Promo code doesn't redeem. No error message either. Now when I try to redeem the promo code on the Mac App Store I get the following error: "You must redeem this code on a device that supports App name". This error makes sense because the app is iOS/iPadOS only. But the fact that the Mac App Store displays the App name in the error message indicates that the code is valid and should work on iOS, but it does not.
4
1
350
Oct ’24
Project Navigator Broken in Xcode 16? Drag and Drop to Reorder Files Doesn't Work. "New Groups" Creates New Folders.
I just created a new project in the newest version of Xcode as a sample project for a feedback. Bug 1 So simply what I do in every new project is create a "Supporting Files" group (not a folder because I don't want to move these files on the file system). I put the following files in this group: .entitlements file -the Info.plist (which apparently new projects don't create anymore because I don't see one). main.m Assets.xcassets In previous version of Xcode this was done with the "New Group without Folder" action (though back in the day I believe you'd get yellow folders in "New Group" and blue folder with 'New Folder" and they were separate actions.... which was actually better and much less insane IMO but that's not really important to this). In any case, "New Group without Folder" is nowhere to be found in the context menu. I finally was able to get "New Group" to appear as long as I wasn't right clicking underneath any directory. But.... New Group actually creates a New Folder, just like New Folder. So I put the .entitlements in the Supporting Files group (which is not a group, but a directory) and the app won't compile unless I fix the path in project settings because I moved the file which is most definitely not what I wanted. So we can no longer group files in the project navigator without moving them to new directories? Is this intentional behavior? It can't be, right? Bug 2 I noticed dragging and dropping to reorder files in the project navigator no longer seems to work? In previous versions of Xcode I could drag and drop to reorder files (in groups and in folders, this would work). This appears to no longer work. I just have to accept the way Xcode orders my project files?
5
0
990
Sep ’24
Possible to have NSWindow *without* NSWindowStyleMaskTitled to make the screen its on the main screen?
I have a NSWindow subclass. The window has a custom shape, and thus has a custom contentView which overrides drawRect to draw . Since the window has a custom shape it cannot use the system provided titlebar. The problem I'm having is when there are multiple screens, if my window is on the inactive screen (not mainScreen with menu bar) and I move the mouse over to the second monitor and click the window....the menu bar doesn't travel to the screen my app is on after the window is clicked. This does not happen with any other window. In all other windows, the menu bar moves to the screen once you click a window on that screen. So it appears this is because my window is not using NSWindowStyleMaskTitled. As far as I know, I can't use the system title bar and draw my custom window shape. Abandoning the custom window shape is not an option. Without going into too many details as to why I care, the menu bar really should travel with first click on my window like other apps.. Is there a way to tell the system (other than using the NSWindowStyleMaskTitled) that clicking on my window should make that screen the "main screen" (bring the menu bar over? I tried programmatically activating the application, ordering the window to the front, etc. but none of this works. This forces the user to click outside my app window, say on the desktop, to move the menu bar over, which feels wrong. Thanks in advance if anyone has any suggestions.
5
0
394
Sep ’24
Mac App Store Bug Fix Updates Getting Blocked, Reviewer Sending "App Sandbox Design Guide" Broken Link
My app, which has been on the Mac App Store for many years, has an update being blocked by App review. The only change made is a bug fix (documented in the release notes). First rejection: Said I was using an entitlement I didn't need. My response: I explained the feature that required the entitlement. App goes back in review and gets rejected again for completely different reasons. They don't want me to write files in my App Sandbox container and instead write them in a more traditional user facing location (like in the Documents folder). They keep sending me a link to the "App Sandbox Design Guide" in the Documentation Archive (which appears to redirect to a different page?) and are quoting a section that is nowhere to be found in the link they send me (on the page I'm redirected to). I keep explaining to them that I cannot write outside my sandbox container and that this isn't my choice. And they keep rejecting my app and sending me a broken link to the "App Sandbox design guide." It isn't my fault that I have to write to my sandboxed container by default or have a non-functioning app. In any case, I don't understand why a bug fix update is being held up and I'm getting some vague instructions about possibly having to design some long winded explanation to the user in some ridiculously complicated onboarding process about choosing a folder in a save panel, why you have to choose the folder in the save panel (because I need your permission), OR just quit the app you just bought because it'll otherwise do nothing if you don't choose a folder in the save panel. Users got enough panels to deal with. At the very least App review shouldn't send me broken links from the Documentation Archive. So I'm using my sandbox container by default (because by default I cannot do anything else). I've been doing this for a long time and I don't understand why it is suddenly a problem. What is my sandboxed container for if I can't write to it? If documentation such as the "App Sandbox Design Guide" is still relevant and important why is it being archived anyway ? The link redirects I cannot find the section the reviewer is citing in the provided link. I don't mind being asked to do something to improve the app but I've wasted a lot of time trying to satisfy app review in the past only to misinterpret what they actually are asking me to do causing more wasted time and energy and not getting a whole lot in return. And I don't think it's fair to block a bug fix update.
3
0
404
Sep ’24
vImageConverter_CreateWithCGImageFormat Fails with kvImageInvalidImageFormat When Trying to Convert CMYK to RGB
So I get JPEG data in my app. Previously I was using the higher level NSBitmapImageRep API and just feeding the JPEG data to it. But now I've noticed on Sonoma If I get a JPEG in the CMYK color space the NSBitmapImageRep renders mostly black and is corrupted. So I'm trying to drop down to the lower level APIs. Specifically I grab a CGImageRef and and trying to use the Accelerate API to convert it to another format (to hopefully workaround the issue... CGImageRef sourceCGImage = `CGImageCreateWithJPEGDataProvider(jpegDataProvider,` NULL, shouldInterpolate, kCGRenderingIntentDefault); Now I use vImageConverter_CreateWithCGImageFormat... with the following values for source and destination formats: Source format: (derived from sourceCGImage) bitsPerComponent = 8 bitsPerPixel = 32 colorSpace = (kCGColorSpaceICCBased; kCGColorSpaceModelCMYK; Generic CMYK Profile) bitmapInfo = kCGBitmapByteOrderDefault version = 0 decode = 0x000060000147f780 renderingIntent = kCGRenderingIntentDefault Destination format: bitsPerComponent = 8 bitsPerPixel = 24 colorSpace = (DeviceRBG) bitmapInfo = 8197 version = 0 decode = 0x0000000000000000 renderingIntent = kCGRenderingIntentDefault But vImageConverter_CreateWithCGImageFormat fails with kvImageInvalidImageFormat. Now if I change the destination format to use 32 bitsPerpixel and use alpha in the bitmap info the vImageConverter_CreateWithCGImageFormat does not return an error but I get a black image just like NSBitmapImageRep
13
0
826
Sep ’24
Mac App with Python Embedded: Sandbox Blocks Python Script from Running Only in Release Mode?
I have an XPC service that embeds Python. It executes a python script on behalf of the main app. The app and xpc service are sandboxed. All seems to work just fine in the development environment but the script fails in the released version. I disabled writing pycache by setting the PYTHONDONTWRITEBYTECODE environment variable because pycache tries to write inside my app bundle which fails (I believe I can redirect the pycache directory with PYTHONPYCACHEPREFIX and may experiment with that later). Specifically this line fails in the release version only (not from Xcode): PyObject *pModule = PyImport_Import(moduleNameHere); if (pModuleOwnedRef == NULL) { // this is null in release mode only. } Any ideas what can be going wrong? Thanks in advance.
3
0
752
Jul ’24
Mac App That Embed Python Interpreter Rejected from App Store
I have a simple little Mac app that embeds a Python interpreter. I wrote this app almost ten years ago and completely forgot about it. Anyway I submitted an update to it with a new version of Python but it's being rejected by App review for the following reason: Your app uses or references the following non-public or deprecated APIs: Symbols: • _Tcl_NewByteArrayObj • _Tcl_ResetResult • _Tcl_MutexLock • _Tcl_GetBooleanFromObj • _Tcl_SetObjResult • _Tcl_CreateInterp • _Tcl_ThreadQueueEvent • _Tcl_UnsetVar2 • _Tcl_GetBignumFromObj • _TclBN_mp_to_unsigned_bin_n • _Tcl_ListObjLength • _Tcl_ConditionWait • _Tcl_GetDouble • _Tcl_GetDouble • _Tcl_DeleteFileHandler • _Tcl_SetVar • _Tcl_SetVar • _Tcl_SetVar • _Tcl_DoOneEvent • _TclFreeObj • _Tcl_Eval • _Tcl_Eval • _Tcl_Eval • _Tcl_FindExecutable • _Tcl_NewLongObj • _Tcl_CreateTimerHandler • _Tcl_Init • _Tcl_ConditionFinalize • _Tcl_GetByteArrayFromObj • _Tcl_ListObjIndex • _Tcl_ExprLong • _Tcl_NewDoubleObj • _Tcl_GetDoubleFromObj • _Tcl_ExprString • _TclBN_mp_read_radix • _Tcl_DeleteTimerHandler • _Tcl_CreateFileHandler • _Tcl_GetVar • _Tcl_GetVar • _Tcl_CreateObjCommand • _Tcl_SetVar2Ex • _Tcl_GetStringFromObj • _Tcl_NewStringObj • _Tcl_GetObjType • _Tcl_MutexUnlock • _Tcl_DeleteCommand • _TclBN_mp_init • _Tcl_GetCurrentThread • _Tcl_ExprDouble • _Tcl_AddErrorInfo • _Tcl_Free • _Tcl_GetStringResult • _Tcl_SetVar2 • _Tcl_SetVar2 • _Tcl_GetBoolean • _Tcl_GetBoolean • _Tcl_RecordAndEval • _Tcl_EvalFile • _Tcl_GetLongFromObj • _TclBN_mp_clear • _Tcl_ThreadAlert • _Tcl_ExprBoolean • _Tcl_DeleteInterp • _TclBN_mp_unsigned_bin_size • _Tcl_AttemptAlloc • _Tcl_GetObjResult • _Tcl_GetWideIntFromObj • _Tcl_NewListObj • _Tcl_ConditionNotify • _Tcl_NewBooleanObj • _Tcl_SplitList • _Tcl_EvalObjv • _Tcl_GetThreadData • _Tcl_GetVar2Ex • _Tcl_NewWideIntObj • _Tcl_NewBignumObj • _Tcl_ListObjGetElements • _Tcl_GetString • _Tcl_GetString • _Tcl_GetString The use of non-public or deprecated APIs is not permitted on the App Store, as they can lead to a poor user experience should these APIs change and are otherwise not supported on Apple platforms. I read online that this is a sort of a widespread issue right now with apps that embed Python (would share links but then my post will have to be approved by a moderator). Anyone have a workaround?
3
0
650
Jul ’24
Understanding AVAudioTime in AVAudioNodeTapBlock? Is there a way to get time relative to a scheduled Buffer?
I'm using AVAudioEngine to play AVAudioPCMBuffers. I'd like to synchronize some events with the playback. For example if the audio's frame position is >= some point && less than some point trigger some code. So I'm looking at - (void)installTapOnBus:(AVAudioNodeBus)bus bufferSize:(AVAudioFrameCount)bufferSize format:(AVAudioFormat * __nullable)format block:(AVAudioNodeTapBlock)tapBlock; Now I have frame positions calculated (predetermined before audio is scheduled I already made all necessary computations) . So I just need to fire code at certain points during playback: [playerNode installTapOnBus:bus bufferSize:bufferSize format:format block:^(AVAudioPCMBuffer * _Nonnull buffer, AVAudioTime * _Nonnull when) { //Inspect current audio here and fire... }]; [playerNode scheduleBuffer:fullbuffer atTime:startTime options:0 completionCallbackType:AVAudioPlayerNodeCompletionDataPlayedBack completionHandler:^(AVAudioPlayerNodeCompletionCallbackType callbackType) { // some code is here, not important to this question. }]; The problem I'm having is figuring out at what point in full buffer I'm at within the tap block. The tap block passes chunks (not the full audio buffer). I tried using the when parameter of the block to calculate the frame position relative to the entire audio but have be unsuccessful so far. I'm assuming the when parameter is relative to the buffer passed in the tap block (not my entire audio buffer I scheduled). Not installing a tap and just using a timer before scheduling my fullBuffer has given me good results but I'd rather avoid using a timer if possible and use sample time.
3
0
893
Apr ’24
NSWindow Suddenly Closes After NSTextField Ends Editing (By Clicking into Another NSTextField)
Configuration: I have a NSTextField (multiline) inside an NSWindow. I have another NSTextField (single line) inside an NSBox (which is in the same window). The multiline text field is first responder and is editing. I click on the single line text field inside the NSBox to edit that one. The NSWindow just closes. This is on Sonoma 14.2.1. I subclassed NSWindow and override the close method and put a breakpoint. Here's the call stack that leads to the window suddenly closing: #1 0x0000000189c73d90 in -[NSWindow __close] () #2 0x000000032343 in -[NSApplication(NSResponder) sendAction:to:from:] () #3 0x0000000189b543ac in -[NSControl sendAction:to:] () #4 0x0000000189b542f0 in __26-[NSCell _sendActionFrom:]_block_invoke () #5 0x0000000189b54218 in -[NSCell _sendActionFrom:] () #6 0x0000000189b5413c in -[NSButtonCell _sendActionFrom:] () #7 0x0000000189c4c508 in __29-[NSButtonCell performClick:]_block_invoke () #8 0x0000000189c4c264 in -[NSButtonCell performClick:] () #9 0x0000000189b545a8 in -[NSApplication(NSResponder) sendAction:to:from:] () #10 0x0000000189b543ac in -[NSControl sendAction:to:] () #11 0x0000000189befb48 in -[NSTextField textDidEndEditing:] () #12 0x0000000__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ () #13 0x000000018625c65c in ___CFXRegistrationPost_block_invoke () #14 0x000000018625c5a4 in _CFXRegistrationPost () #15 0x00000001861971dc in _CFXNotificationPost () #16 0x0000000187289ff0 in -[NSNotificationCenter postNotificationName:object:userInfo:] () #17 0x0000000189bef754 in -[NSTextView(NSSharing) resignFirstResponder] () #18 0x0000000189a9fab8 in -[NSWindow _realMakeFirstResponder:] () #19 0x0000000189b4f18c in -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] () #20 0x0000000189ada79c in -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] () #21 0x0000000189ada45c in -[NSWindow(NSEventRouting) sendEvent:] () #22 0x000000018a1879f4 in -[NSApplication(NSEventRouting) sendEvent:] () #23 0x0000000189dd6908 in -[NSApplication _handleEvent:] () #24 0x00000001899a1d74 in -[NSApplication run] () The mouse click is no where near the close button in the title bar.
2
0
621
Feb ’24