Open alexeyvax opened 2 years ago
Also, I can see an error inside the prod build on xcode console
[javascript] 'failed to load the sound ', { code: 'ENSOSSTATUSERRORDOMAIN-42',
message: 'The operation couldn\\U2019t be completed. (NSOSStatusErrorDomain error -42.)',
domain: 'NSOSStatusErrorDomain',
userInfo: {},
nativeStackIOS:
[ '0 MyApp 0x00000001006ddd88 RCTJSErrorFromCodeMessageAndNSError + 100',
'1 MyApp 0x00000001006ddce8 RCTJSErrorFromNSError + 204',
'2 MyApp 0x000000010067a028 -[RNSound prepare:withKey:withOptions:withCallback:] + 944',
'3 CoreFoundation 0x00000001a99fb724 338F58B1-9B75-38A0-B908-E2574AB1D39A + 1238820',
'4 CoreFoundation 0x00000001a98ced04 338F58B1-9B75-38A0-B908-E2574AB1D39A + 7428',
'5 CoreFoundation 0x00000001a98cf308 338F58B1-9B75-38A0-B9
Does anybody know, what does this error means?
I have the same issue as IOS Prod didnt play any sound, but debug works well. Any solution?
I figured this issue out. Instead of loading all sounds after app initialization, just load one sound when the user pressed a play button.
And that's it.
It takes some milliseconds to load your sound but it works perfectly for dev and prod builds.
:beetle: Description
The limit for preloading sounds on iOS.
:beetle: What have you tried?
I'm trying to preload more than 300 short sounds via
new Sound('file-name.mp3', Sound.MAIN_BUNDLE, () => {});
at the same time, but have no luck loading all sounds. It only loads about 150 sounds and that's it. Also, I would like to mention that this happened for prod build on iOS, but on dev build it works fine.:beetle: Please post your code:
Is your issue with...
Are you using...
react-native run-ios
)Which versions are you using?
Does the problem occur on...
If your problem is happening on a device, which device?