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

iOS build failed #323

Open
1 task done
SSzzPP opened this issue Dec 5, 2024 · 13 comments
Open
1 task done

iOS build failed #323

SSzzPP opened this issue Dec 5, 2024 · 13 comments

Comments

@SSzzPP
Copy link

SSzzPP commented Dec 5, 2024

Expo's EAS build failed for iOS.

Version 1.9.0 of React Native Compressor is works fine, I'm sure I just upgraded version to 1.10.1

Platform

  • iOS

React Native Version

  • 0.73.6

React Native Compressor Version

-1.10.1

Error log

❌  (node_modules/react-native-compressor/ios/Video/NextLevelSessionExporter.swift:376:69)

  374 |         for audioTrack in audioTracks {
  375 |             let mediaSubtypes = audioTrack.formatDescriptions.filter { CMFormatDescriptionGetMediaType($0 as! CMFormatDescription) == kCMMediaType_Audio }.map { CMFormatDescriptionGetMediaSubType($0 as! CMFormatDescription) }
> 376 |             for mediaSubtype in mediaSubtypes where mediaSubtype != kAudioFormatAPAC {
      |                                                                     ^ cannot find 'kAudioFormatAPAC' in scope
  377 |                 audioTracksToUse.append(audioTrack)
  378 |             }
  379 |         }
Copy link

github-actions bot commented Dec 5, 2024

👋 @SSzzPP
Thanks for opening your issue here! If you find this package useful hit the star🌟!

@SSzzPP
Copy link
Author

SSzzPP commented Dec 5, 2024

I added a patch locally and added import AudioToolbox to the NextLevelSessionExporter.swift file. After repackaging, everything worked fine.

@numandev1
Copy link
Owner

@SSzzPP can you make a PR of it?

@numandev1
Copy link
Owner

@SSzzPP can you remove import AudioToolbox and use import CoreAudioTypes and check?

@numandev1
Copy link
Owner

@SSzzPP can you check 1.10.2 version?

@serolgames
Copy link

@SSzzPP can you check 1.10.2 version?

it's still happenning in 1.10.2

@SSzzPP
Copy link
Author

SSzzPP commented Dec 5, 2024

@SSzzPP can you remove import AudioToolbox and use import CoreAudioTypes and check?

Yeal, I tried adding import CoreAudioTypes and It doesn't seem to work❌

@numandev1
Copy link
Owner

@serolgames can you connect with me on LinkedIn
https://www.linkedin.com/in/numandev/
as i wanna send you some code for test

@SSzzPP
Copy link
Author

SSzzPP commented Dec 5, 2024

Um, I rarely use LinkedIn, can you add me on Discord?
https://discord.gg/HReEzU62

@numandev1
Copy link
Owner

@SSzzPP
Copy link
Author

SSzzPP commented Dec 5, 2024

In fact, this error is lower than Xcode16.0, kAudioFormatAPAC is not a predefined constant of CoreAudioTypes.

I provide two solutions:

  • For app builds with eas, e.g. xcode version = 15.4, you need to upgrade the xcode version of the build environment.
  • For plugins, you need to define kAudioFormatAPAC manually.

env

@gaearon
Copy link

gaearon commented Dec 5, 2024

Confirmed 1.10.2 doesn't work, 1.10.3 works. It would be nice to keep Xcode 15 compatibility for now if possible since it feels like a major breaking change to drop it.

@numandev1
Copy link
Owner

@gaearon i agree with you, sorry for bug 🙏🏻

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

4 participants