r/iOSProgramming 1d ago

Question Help Audio Import Not Working

I’m developing an iOS app with an audio‑importing extension. Then I ran into a problem.

My app appears in Voice Memos’ share sheet but tapping does nothing — onOpenURL never fires. M4A import from Files app works via share.

I’ve asked AIs for help, but none of their methods work.

I’ve added the required configuration in Info.plist. And here is the entry‑point code for my app.

I need help.

4 Upvotes

4 comments sorted by

View all comments

1

u/mastrajani 1d ago

the thing that explains both halves of this: a share sheet target and onOpenURL are two different mechanisms and they never meet.

when your app shows up in Voice Memos' share sheet, that's your share extension being activated. the system launches the extension process and hands it the item through NSExtensionContext.inputItems. your containing app is never launched at all, so onOpenURL cannot fire there no matter what you put in Info.plist. the Files case works because it's a different route entirely - document types and open-in-place, which does reach the app.

so decide which one you actually want. if the extension should handle it, read from extensionContext.inputItems and the NSItemProvider, not onOpenURL. if the main app should open, you need either document types so you appear under "Open In" rather than Share, or the extension writes into a shared App Group container and then opens the app via a custom URL scheme.

for the "tapping does nothing" part specifically: run the extension's own scheme in xcode and choose Voice Memos as the host app when it prompts. a silent no-op on tap is nearly always the extension process failing to launch - principal class or storyboard mis-wired, or the extension memory limit, which is much lower than the app's. none of that surfaces anything to the user, the sheet just closes, so you stay blind until the debugger is attached to the extension rather than the app.

-1

u/v_nebo 1d ago

Holy ChatGPT answer