-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathAudioAnalyzer.podspec
More file actions
59 lines (49 loc) · 1.78 KB
/
AudioAnalyzer.podspec
File metadata and controls
59 lines (49 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
require "json"
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
# Run the miniaudio preparation script
script_path = File.join(__dir__, "scripts", "prepare_miniaudio.rb")
if File.exist?(script_path)
system("ruby #{script_path}")
else
puts "Warning: Miniaudio preparation script not found at #{script_path}"
end
Pod::Spec.new do |s|
s.name = "AudioAnalyzer"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]
s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/exzos28/react-native-audio-analyzer.git", :tag => "#{s.version}" }
# Use pod_target_xcconfig instead of compiler_flags
s.pod_target_xcconfig = {
# C++ compiler flags for miniaudio on iOS
'GCC_PREPROCESSOR_DEFINITIONS' => 'MA_NO_PTHREAD_IN_HEADER=1',
'OTHER_CFLAGS' => '-DMA_NO_PTHREAD_IN_HEADER',
'OTHER_LDFLAGS' => '-lm -lpthread',
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11',
'CLANG_CXX_LIBRARY' => 'libstdc++'
}
# Required frameworks for iOS audio (Core Audio)
s.frameworks = [
'AVFoundation'
]
s.source_files = [
# Implementation (Swift)
"ios/**/*.{swift}",
# Autolinking/Registration (Objective-C++)
"ios/**/*.{m,mm}",
# Miniaudio implementation - compile as Objective-C (generated)
"libs/generated/miniaudio.m",
"libs/miniaudio/miniaudio.h",
# Implementation (C++ objects)
"cpp/**/*.{hpp,cpp}",
]
s.public_header_files = "libs/miniaudio/miniaudio.h"
s.dependency 'React-jsi'
s.dependency 'React-callinvoker'
load 'nitrogen/generated/ios/AudioAnalyzer+autolinking.rb'
add_nitrogen_files(s)
install_modules_dependencies(s)
end