react-native-audio-api 0.4.12-beta.2 → 0.4.12-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,7 @@ Pod::Spec.new do |s|
30
30
  ss.subspec "ios" do |sss|
31
31
  sss.source_files = "ios/audioapi/**/*.{mm,h,m}"
32
32
  sss.header_dir = "audioapi"
33
- sss.header_mappings_dir = "ios/ausioapi"
33
+ sss.header_mappings_dir = "ios/audioapi"
34
34
  end
35
35
  end
36
36
 
@@ -55,13 +55,13 @@ Pod::Spec.new do |s|
55
55
  '"$(PODS_ROOT)/Headers/Public/React-hermes"',
56
56
  '"$(PODS_ROOT)/Headers/Public/hermes-engine"',
57
57
  "\"$(PODS_ROOT)/#{$config[:react_native_common_dir]}\"",
58
- "\"$(PODS_ROOT)/#{$config[:react_native_audioapi_dir_from_pods_root]}/ios\"",
59
- "\"$(PODS_ROOT)/#{$config[:react_native_audioapi_dir_from_pods_root]}/common/cpp\"",
58
+ "\"$(PODS_ROOT)/#{$config[:react_native_audioapi_dir_from_pods_root]}/ios/audioapi/ios\"",
59
+ "\"$(PODS_ROOT)/#{$config[:react_native_audioapi_dir_from_pods_root]}/common/cpp/audioapi\"",
60
60
  ].join(' '),
61
61
  'OTHER_CFLAGS' => "$(inherited) #{folly_flags} #{fabric_flags} #{version_flag}"
62
62
  }
63
63
 
64
64
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
65
65
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
66
- install_modules_dependencies(s, new_arch_enabled: true)
66
+ install_modules_dependencies(s)
67
67
  end
@@ -1,34 +1,41 @@
1
1
  #import "AudioAPIModule.h"
2
2
 
3
- #ifdef RCT_NEW_ARCH_ENABLED
4
3
  #import <React/RCTBridge+Private.h>
4
+
5
+ #ifdef RCT_NEW_ARCH_ENABLED
5
6
  #import <React/RCTCallInvoker.h>
6
7
  #import <ReactCommon/RCTTurboModule.h>
7
8
  #endif // RCT_NEW_ARCH_ENABLED
8
9
 
9
10
  #include <audioapi/AudioAPIModuleInstaller.h>
10
11
 
11
- @implementation AudioAPIModule
12
+ using namespace audioapi;
13
+ using namespace facebook::react;
12
14
 
13
- #if defined(RCT_NEW_ARCH_ENABLED)
15
+ @interface RCTBridge (JSIRuntime)
16
+ - (void *)runtime;
17
+ @end
18
+
19
+ #if defined(RCT_NEW_ARCH_ENABLED) && REACT_NATIVE_MINOR_VERSION >= 75
14
20
  // nothing
15
- #else // defined(RCT_NEW_ARCH_ENABLED)
21
+ #else // defined(RCT_NEW_ARCH_ENABLED) && REACT_NATIVE_MINOR_VERSION >= 75
16
22
  @interface RCTBridge (RCTTurboModule)
17
23
  - (std::shared_ptr<facebook::react::CallInvoker>)jsCallInvoker;
18
24
  - (void)_tryAndHandleError:(dispatch_block_t)block;
19
25
  @end
20
26
  #endif // RCT_NEW_ARCH_ENABLED
21
27
 
28
+ @implementation AudioAPIModule
29
+
22
30
  #if defined(RCT_NEW_ARCH_ENABLED)
23
31
  @synthesize callInvoker = _callInvoker;
24
32
  #endif // defined(RCT_NEW_ARCH_ENABLED)
25
33
 
26
- RCT_EXPORT_MODULE(AudioAPIModule)
34
+ RCT_EXPORT_MODULE(AudioAPIModule);
27
35
 
28
36
  RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install)
29
37
  {
30
- auto *cxxBridge = reinterpret_cast<RCTCxxBridge *>(self.bridge);
31
- auto jsiRuntime = reinterpret_cast<facebook::jsi::Runtime *>(cxxBridge.runtime);
38
+ auto jsiRuntime = reinterpret_cast<facebook::jsi::Runtime *>(self.bridge.runtime);
32
39
 
33
40
  #if defined(RCT_NEW_ARCH_ENABLED)
34
41
  auto jsCallInvoker = _callInvoker.callInvoker;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-audio-api",
3
- "version": "0.4.12-beta.2",
3
+ "version": "0.4.12-beta.3",
4
4
  "description": "react-native-audio-api provides system for controlling audio in React Native environment compatible with Web Audio API specification",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",