simplejsble 0.0.34 → 0.0.36

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.
@@ -11,8 +11,8 @@ Pod::Spec.new do |s|
11
11
  s.authors = package["author"]
12
12
 
13
13
  s.platforms = {
14
- :ios => '13.4',
15
- :osx => '10.13'
14
+ :ios => '15.8',
15
+ :osx => '13.0'
16
16
  }
17
17
 
18
18
  s.source = { :path => "." }
@@ -56,11 +56,9 @@ include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/NitroSimplejsble+autol
56
56
  target_include_directories(NitroSimplejsble PRIVATE
57
57
  src/main/cpp
58
58
  ../cpp
59
- ${JNI_INCLUDE_DIRS}
60
59
  )
61
60
 
62
61
  find_library(LOG_LIB log)
63
- find_package(JNI REQUIRED)
64
62
 
65
63
  # Link all libraries together
66
64
  target_link_libraries(NitroSimplejsble
@@ -68,7 +66,6 @@ target_link_libraries(NitroSimplejsble
68
66
  simpleble::simpleble
69
67
  android
70
68
  -ldl
71
- ${JNI_LIBRARIES}
72
69
  )
73
70
 
74
71
  # Allow undefined JNI symbols (resolved at runtime)
@@ -10,7 +10,7 @@
10
10
  <key>HeadersPath</key>
11
11
  <string>Headers</string>
12
12
  <key>LibraryIdentifier</key>
13
- <string>ios-arm64</string>
13
+ <string>ios-arm64-simulator</string>
14
14
  <key>LibraryPath</key>
15
15
  <string>libsimpleble.a</string>
16
16
  <key>SupportedArchitectures</key>
@@ -19,6 +19,8 @@
19
19
  </array>
20
20
  <key>SupportedPlatform</key>
21
21
  <string>ios</string>
22
+ <key>SupportedPlatformVariant</key>
23
+ <string>simulator</string>
22
24
  </dict>
23
25
  <dict>
24
26
  <key>BinaryPath</key>
@@ -43,7 +45,7 @@
43
45
  <key>HeadersPath</key>
44
46
  <string>Headers</string>
45
47
  <key>LibraryIdentifier</key>
46
- <string>ios-arm64-simulator</string>
48
+ <string>ios-arm64</string>
47
49
  <key>LibraryPath</key>
48
50
  <string>libsimpleble.a</string>
49
51
  <key>SupportedArchitectures</key>
@@ -52,8 +54,6 @@
52
54
  </array>
53
55
  <key>SupportedPlatform</key>
54
56
  <string>ios</string>
55
- <key>SupportedPlatformVariant</key>
56
- <string>simulator</string>
57
57
  </dict>
58
58
  </array>
59
59
  <key>CFBundlePackageType</key>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplejsble",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "description": "React Native Bluetooth Low Energy library using SimpleBLE with Nitro Modules",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",
@@ -1,77 +0,0 @@
1
- # SimpleDroidBridge Integration Decision
2
-
3
- ## Current Approach
4
-
5
- In `build.gradle`, the simpledroidbridge Java sources are included directly:
6
-
7
- ```gradle
8
- sourceSets {
9
- main {
10
- java.srcDirs += ["../simpledroidbridge/src/main/java"]
11
- }
12
- }
13
- ```
14
-
15
- ## Why Not Use `implementation project(":simpledroidbridge")`?
16
-
17
- ### Option 1: `java.srcDirs` (Current)
18
-
19
- Compiles simpledroidbridge sources directly into the main library.
20
-
21
- **Pros:**
22
- - No configuration needed in consumer app
23
- - Works seamlessly in npm package context
24
- - No build config conflicts
25
- - React Native autolinking works out of the box
26
-
27
- **Cons:**
28
- - Sources compiled together (single output)
29
-
30
- ### Option 2: `implementation project(":simpledroidbridge")`
31
-
32
- Would treat simpledroidbridge as a separate Gradle module dependency.
33
-
34
- **Pros:**
35
- - Cleaner separation of modules
36
- - Could be reused independently
37
-
38
- **Cons:**
39
- - Requires consumer app's `settings.gradle.kts` to include:
40
- ```kotlin
41
- include(":simpledroidbridge")
42
- project(":simpledroidbridge").projectDir = File("node_modules/simplejsble/simpledroidbridge")
43
- ```
44
- - `simpledroidbridge/build.gradle.kts` has its own SDK versions (`compileSdk = 31`, `minSdk = 31`) which may conflict with consumer apps
45
- - React Native autolinking doesn't handle transitive local project dependencies
46
- - Complex path resolution for npm packages
47
-
48
- ## Comparison
49
-
50
- | Aspect | `java.srcDirs` | `project(":simpledroidbridge")` |
51
- |--------|----------------|--------------------------------|
52
- | Consumer setup | None required | Must modify settings.gradle |
53
- | Build config conflicts | None | Possible SDK version conflicts |
54
- | npm package compatibility | Works out of the box | Complex path resolution |
55
- | Autolinking | Works | Not supported |
56
-
57
- ## Conclusion
58
-
59
- The `java.srcDirs` approach is the right choice for npm package distribution. Converting to a project dependency would add unnecessary friction for package consumers.
60
-
61
- ## Package Structure
62
-
63
- The npm package bundles simpledroidbridge (defined in `package.json`):
64
-
65
- ```json
66
- {
67
- "files": [
68
- "android/",
69
- "simpledroidbridge/",
70
- ...
71
- ]
72
- }
73
- ```
74
-
75
- This allows the relative path `../simpledroidbridge/src/main/java` to work correctly from the `android/` folder in both:
76
- - Monorepo development
77
- - npm package installation (`node_modules/simplejsble/`)