React Native New Architecture support Done
feat: added fabric example
fix: example testing
fix: removed unwated scripts
feat: new architecture support done
Thank you @SolankiYogesh. I don't currently have time to review & test. If anyone can review it? :)
Thanks @SolankiYogesh ! Do you use this in production at the moment?
These methods are missing for Android.
@ReactMethod
public void enable(final Boolean enabled) {
// no op
}
@Override
public Map<String, Object> getConstants() {
final Map<String, Object> constants = new HashMap<>();
constants.put("IsAndroid", true);
return constants;
}
enable seems to be just a stub,
getConstants might cause some regression for some devs
For iOS while there's enableInSilenceMode method, enable is missing.
enable vs enableInSilenceMode - these serve different purposes in iOS:
-
enable: UsesAVAudioSessionCategoryAmbient- sound is muted when phone is in silent mode -
enableInSilenceMode: UsesAVAudioSessionCategoryPlayback- sound plays even in silent mode
@RomualdPercereau maybe let's consider releasing alpha version with the new arch and ask devs to test it with us. I'll try to run some tests as well
@Okelm i think both methods are not required because. enable is for IOS only and for IsAndroid i am directly using Platfrom.OS
ok let me check again all code and yes i am currently using this patch in my product app
ok yes enable method is missing let me add
` RCT_EXPORT_METHOD(enable : (BOOL)enabled) { AVAudioSession *session = [AVAudioSession sharedInstance]; [session setCategory:AVAudioSessionCategoryAmbient error:nil]; [session setActive:enabled error:nil]; }
`
As long as there's no plan to ditch Windows support this will require Windows new arch rewrite as well.
@SolankiYogesh do you want to add windows support?
Yes currently i am checking how to apply new arch support in mac os and windows so i will update patch again with windows changes
@SolankiYogesh is your investigation still ongoing? These changes not being merged are preventing newer react-native projects from making use of this library.
Anxiously awaiting this.