Skip to content

Commit dbfb082

Browse files
exzosexzos
authored andcommitted
chore: set up again
1 parent d8e5884 commit dbfb082

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+3047
-1206
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
*.pbxproj -text
22
# specific for windows script files
3-
*.bat text eol=crlf
3+
*.bat text eol=crlf

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,5 @@ body:
6363
attributes:
6464
label: Reproducible example repository
6565
description: Please provide a link to a repository on GitHub with a reproducible example.
66-
render: js
6766
validations:
6867
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Feature Request 💡
4-
url: https://github.com/TestVaishnav/react-native-test/discussions/new?category=ideas
4+
url: https://github.com/exzos28/react-native-audio-analyzer/discussions/new?category=ideas
55
about: If you have a feature request, please create a new discussion on GitHub.
66
- name: Discussions on GitHub 💬
7-
url: https://github.com/TestVaishnav/react-native-test/discussions
7+
url: https://github.com/exzos28/react-native-audio-analyzer/discussions
88
about: If this library works as promised but you need help, please ask questions there.

.github/actions/setup/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ runs:
55
using: composite
66
steps:
77
- name: Setup Node.js
8-
uses: actions/setup-node@v4
8+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
99
with:
1010
node-version-file: .nvmrc
1111

1212
- name: Restore dependencies
1313
id: yarn-cache
14-
uses: actions/cache/restore@v4
14+
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
1515
with:
1616
path: |
1717
**/node_modules
@@ -28,7 +28,7 @@ runs:
2828

2929
- name: Cache dependencies
3030
if: steps.yarn-cache.outputs.cache-hit != 'true'
31-
uses: actions/cache/save@v4
31+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
3232
with:
3333
path: |
3434
**/node_modules

.github/workflows/ci.yml

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1919

2020
- name: Setup
2121
uses: ./.github/actions/setup
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Checkout
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3434

3535
- name: Setup
3636
uses: ./.github/actions/setup
@@ -42,7 +42,7 @@ jobs:
4242
runs-on: ubuntu-latest
4343
steps:
4444
- name: Checkout
45-
uses: actions/checkout@v4
45+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4646

4747
- name: Setup
4848
uses: ./.github/actions/setup
@@ -56,7 +56,7 @@ jobs:
5656
TURBO_CACHE_DIR: .turbo/android
5757
steps:
5858
- name: Checkout
59-
uses: actions/checkout@v4
59+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6060

6161
- name: Setup
6262
uses: ./.github/actions/setup
@@ -65,7 +65,7 @@ jobs:
6565
run: yarn nitrogen
6666

6767
- name: Cache turborepo for Android
68-
uses: actions/cache@v4
68+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
6969
with:
7070
path: ${{ env.TURBO_CACHE_DIR }}
7171
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
@@ -82,7 +82,7 @@ jobs:
8282
8383
- name: Install JDK
8484
if: env.turbo_cache_hit != 1
85-
uses: actions/setup-java@v4
85+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
8686
with:
8787
distribution: 'zulu'
8888
java-version: '17'
@@ -94,7 +94,7 @@ jobs:
9494
9595
- name: Cache Gradle
9696
if: env.turbo_cache_hit != 1
97-
uses: actions/cache@v4
97+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
9898
with:
9999
path: |
100100
~/.gradle/wrapper
@@ -116,7 +116,7 @@ jobs:
116116
TURBO_CACHE_DIR: .turbo/ios
117117
steps:
118118
- name: Checkout
119-
uses: actions/checkout@v4
119+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
120120

121121
- name: Setup
122122
uses: ./.github/actions/setup
@@ -125,7 +125,7 @@ jobs:
125125
run: yarn nitrogen
126126

127127
- name: Cache turborepo for iOS
128-
uses: actions/cache@v4
128+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
129129
with:
130130
path: ${{ env.TURBO_CACHE_DIR }}
131131
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
@@ -142,36 +142,18 @@ jobs:
142142
143143
- name: Use appropriate Xcode version
144144
if: env.turbo_cache_hit != 1
145-
uses: maxim-lobanov/setup-xcode@v1
145+
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
146146
with:
147147
xcode-version: ${{ env.XCODE_VERSION }}
148148

149-
- name: Restore cocoapods
150-
if: env.turbo_cache_hit != 1
151-
id: cocoapods-cache
152-
uses: actions/cache/restore@v4
153-
with:
154-
path: |
155-
**/ios/Pods
156-
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
157-
restore-keys: |
158-
${{ runner.os }}-cocoapods-
159-
160149
- name: Install cocoapods
161150
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
162151
run: |
163152
cd example
164153
bundle install
154+
bundle exec pod repo update --verbose
165155
bundle exec pod install --project-directory=ios
166156
167-
- name: Cache cocoapods
168-
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
169-
uses: actions/cache/save@v4
170-
with:
171-
path: |
172-
**/ios/Pods
173-
key: ${{ steps.cocoapods-cache.outputs.cache-key }}
174-
175157
- name: Build example for iOS
176158
run: |
177159
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "libs/miniaudio"]
2+
path = libs/miniaudio
3+
url = https://github.com/mackron/miniaudio.git

.java-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

AudioAnalyzer.podspec

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

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ The [example app](/example/) demonstrates usage of the library. You need to run
3838

3939
It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.
4040

41-
If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/TestExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-test`.
41+
If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/AudioAnalyzerExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-audio-analyzer`.
4242

43-
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-test` under `Android`.
43+
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-audio-analyzer` under `Android`.
4444

4545
You can use various commands from the root directory to work with the project.
4646

@@ -65,7 +65,7 @@ yarn example ios
6565
To confirm that the app is running with the new architecture, you can check the Metro logs for a message like this:
6666

6767
```sh
68-
Running "TestExample" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
68+
Running "AudioAnalyzerExample" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
6969
```
7070

7171
Note the `"fabric":true` and `"concurrentRoot":true` properties.

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
# react-native-test
1+
# react-native-audio-analyzer
22

3-
test
3+
Audio analyzer
44

55
## Installation
66

7+
78
```sh
8-
npm install react-native-test react-native-nitro-modules
9+
npm install react-native-audio-analyzer react-native-nitro-modules
910

1011
> `react-native-nitro-modules` is required as this library relies on [Nitro Modules](https://nitro.margelo.com/).
1112
```
1213

14+
1315
## Usage
1416

1517

1618
```js
17-
import { multiply } from 'react-native-test';
19+
import { multiply } from 'react-native-audio-analyzer';
1820

1921
// ...
2022

0 commit comments

Comments
 (0)