Skip to content

fix(ios): declare AVFoundation framework in podspec - #18

Merged
Mhp23 merged 1 commit into
mhpdev-com:mainfrom
gimi-anders:fix/ios-podspec-avfoundation
Oct 26, 2026
Merged

Mhp23 merged 1 commit into
mhpdev-com:mainfrom
gimi-anders:fix/ios-podspec-avfoundation

Conversation

@gimi-anders

Copy link
Copy Markdown
Contributor

Fixes #17.

Cause. RNSpeech.mm uses AVSpeechSynthesizer and AVAudioSession (AVFoundation), but RNSpeech.podspec doesn't declare the framework. With use_frameworks! :linkage => :dynamic the pod is linked as its own framework, so the link fails with Undefined symbols: _AVAudioSessionCategoryPlayback (and other AVAudioSession constants). Static linkage hides this because the app's final link already includes AVFoundation.

Fix. Add s.frameworks = "AVFoundation" to the podspec.

Compatibility. No code changes. For static linkage nothing changes in practice, since AVFoundation was already linked by the app.

Verification. We use this exact change as a local patch on 1.4.3 in our app (React Native 0.86.3, New Architecture, use_frameworks! :linkage => :dynamic), and the app links again. I also checked this repo's example app with USE_FRAMEWORKS=dynamic: the build fails without the change and succeeds with it.

Drafted with help from Claude (AI), reviewed by me.

@Mhp23

Mhp23 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

LGTM! Thanks for the PR.

@Mhp23
Mhp23 merged commit c414179 into mhpdev-com:main Oct 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS: link fails with use_frameworks! :linkage => :dynamic (podspec doesn't declare AVFoundation)

2 participants