Skip to content

Commit

Permalink
fix: android on rn 0.76.1
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsek committed Oct 29, 2024
1 parent 08202cd commit f649753
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 1 addition & 2 deletions packages/react-native-audio-api/android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ find_package(fbjni REQUIRED CONFIG)
find_package (oboe REQUIRED CONFIG)

set(LINK_LIBRARIES
ReactAndroid::reactnative
ReactAndroid::jsi
ReactAndroid::reactnativejni
fbjni::fbjni
ReactAndroid::folly_runtime
android
log
oboe::oboe
Expand Down
14 changes: 9 additions & 5 deletions packages/react-native-audio-api/ios/AudioAPIModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,23 @@ @implementation AudioAPIModule
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install)
{
NSLog(@"Installing JSI bindings for react-native-audio-api...");
RCTBridge *bridge = [RCTBridge currentBridge];
RCTCxxBridge *cxxBridge = (RCTCxxBridge *)bridge;
RCTCxxBridge *cxxBridge = (RCTCxxBridge *)[RCTBridge currentBridge];

if (cxxBridge == nil) {
NSLog(@"Error during getting bridge!");
return @false;
}

using namespace facebook;

auto jsiRuntime = (jsi::Runtime *)cxxBridge.runtime;
if (jsiRuntime == nil) {
auto jsRuntime = (jsi::Runtime *)cxxBridge.runtime;

if (jsRuntime == nil) {
NSLog(@"Error during getting jsRuntime!");
return @false;
}
auto &runtime = *jsiRuntime;

auto &runtime = *jsRuntime;

auto wrapper = std::make_shared<audioapi::AudioAPIInstallerWrapper>();
auto hostObject = std::make_shared<audioapi::AudioAPIInstallerHostObject>(wrapper);
Expand Down

0 comments on commit f649753

Please sign in to comment.