Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode build fails on version 2.3.3, 2.2.0 with Undefined symbol: _AudioServicesPlaySystemSound error #142

Open
illlama opened this issue Jan 22, 2025 · 1 comment

Comments

@illlama
Copy link

illlama commented Jan 22, 2025

When I build app in Xcode I got a error like bellow.

Undefined symbol: _AudioServicesPlaySystemSound

I'm using "react-native": "0.75.4", "react-native-haptic-feedback": "^2.3.3".

I installed as follow description.

  1. yarn add react-native-haptic-feedback
  2. cd ios && pod install

Can I get any help?

@illlama
Copy link
Author

illlama commented Jan 22, 2025

I removed bellow code at RNHapticFeedback.m

else if ([self supportsHapticFor6SAnd6SPlus]) {
        
    // generates alternative haptic feedback
    if ([type isEqual: @"impactMedium"]) {
        AudioServicesPlaySystemSound((SystemSoundID) 1520);
    } else if ([type isEqual:@"notificationWarning"]) {
        AudioServicesPlaySystemSound((SystemSoundID) 1521);
    } else {
        // Default selection haptic feedback
        AudioServicesPlaySystemSound((SystemSoundID) 1519);
    }

} else if (enableVibrateFallback) {
    AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}

And then build is successful.
(I don't support iPhone 6 or 6s)

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

No branches or pull requests

1 participant