simplejsble 0.0.32 → 0.0.34

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.
Files changed (59) hide show
  1. package/NitroSimplejsble.podspec +8 -8
  2. package/README.md +51 -0
  3. package/android/CMakeLists.txt +3 -0
  4. package/{ios → apple}/CMakeLists.txt +2 -2
  5. package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/libsimpleble.a +0 -0
  6. package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/libsimpleble.a +0 -0
  7. package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/libsimpleble.a +0 -0
  8. package/package.json +3 -3
  9. package/{ios → apple}/Bridge.h +0 -0
  10. package/{ios → apple}/CMAKE_INSTALL_OPTIONS.md +0 -0
  11. package/{ios → apple}/SimpleBLE.xcframework/Info.plist +8 -8
  12. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/Adapter.h +0 -0
  13. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/AdapterSafe.h +0 -0
  14. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/Advanced.h +0 -0
  15. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/Characteristic.h +0 -0
  16. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/Config.h +0 -0
  17. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/Descriptor.h +0 -0
  18. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/Exceptions.h +0 -0
  19. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/Logging.h +0 -0
  20. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/Peripheral.h +0 -0
  21. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/PeripheralSafe.h +0 -0
  22. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/Service.h +0 -0
  23. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/SimpleBLE.h +0 -0
  24. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/Types.h +0 -0
  25. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/Utils.h +0 -0
  26. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/export.h +0 -0
  27. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64/Headers/simpleble/kvn/kvn_bytearray.h +0 -0
  28. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/Adapter.h +0 -0
  29. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/AdapterSafe.h +0 -0
  30. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/Advanced.h +0 -0
  31. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/Characteristic.h +0 -0
  32. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/Config.h +0 -0
  33. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/Descriptor.h +0 -0
  34. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/Exceptions.h +0 -0
  35. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/Logging.h +0 -0
  36. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/Peripheral.h +0 -0
  37. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/PeripheralSafe.h +0 -0
  38. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/Service.h +0 -0
  39. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/SimpleBLE.h +0 -0
  40. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/Types.h +0 -0
  41. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/Utils.h +0 -0
  42. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/export.h +0 -0
  43. /package/{ios → apple}/SimpleBLE.xcframework/ios-arm64-simulator/Headers/simpleble/kvn/kvn_bytearray.h +0 -0
  44. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/Adapter.h +0 -0
  45. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/AdapterSafe.h +0 -0
  46. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/Advanced.h +0 -0
  47. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/Characteristic.h +0 -0
  48. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/Config.h +0 -0
  49. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/Descriptor.h +0 -0
  50. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/Exceptions.h +0 -0
  51. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/Logging.h +0 -0
  52. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/Peripheral.h +0 -0
  53. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/PeripheralSafe.h +0 -0
  54. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/Service.h +0 -0
  55. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/SimpleBLE.h +0 -0
  56. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/Types.h +0 -0
  57. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/Utils.h +0 -0
  58. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/export.h +0 -0
  59. /package/{ios → apple}/SimpleBLE.xcframework/macos-arm64_x86_64/Headers/simpleble/kvn/kvn_bytearray.h +0 -0
@@ -22,15 +22,15 @@ Pod::Spec.new do |s|
22
22
 
23
23
  s.source_files = [
24
24
  # Implementation (Swift)
25
- "ios/**/*.{swift}",
25
+ "apple/**/*.{swift}",
26
26
  # Autolinking/Registration (Objective-C++)
27
- "ios/**/*.{m,mm}",
27
+ "apple/**/*.{m,mm}",
28
28
  # Implementation (C++ objects)
29
29
  "cpp/**/*.{hpp,cpp}",
30
30
  ]
31
31
 
32
32
  # Exclude CMakeLists.txt from source files
33
- s.exclude_files = ["ios/CMakeLists.txt"]
33
+ s.exclude_files = ["apple/CMakeLists.txt"]
34
34
 
35
35
  load 'nitrogen/generated/ios/NitroSimplejsble+autolinking.rb'
36
36
  add_nitrogen_files(s)
@@ -45,8 +45,8 @@ Pod::Spec.new do |s|
45
45
  s.osx.frameworks = ['Foundation', 'CoreBluetooth', 'IOBluetooth', 'IOKit']
46
46
 
47
47
  # Vendored XCFramework containing all architectures (iOS + macOS)
48
- s.ios.vendored_frameworks = 'ios/SimpleBLE.xcframework'
49
- s.osx.vendored_frameworks = 'ios/SimpleBLE.xcframework'
48
+ s.ios.vendored_frameworks = 'apple/SimpleBLE.xcframework'
49
+ s.osx.vendored_frameworks = 'apple/SimpleBLE.xcframework'
50
50
 
51
51
  # Configure header search paths for SimpleBLE XCFramework
52
52
  # Headers are inside the XCFramework slices - we include all platforms so it works for any target
@@ -55,9 +55,9 @@ Pod::Spec.new do |s|
55
55
  'HEADER_SEARCH_PATHS' => [
56
56
  '"$(inherited)"',
57
57
  # XCFramework headers for each platform slice
58
- '"$(PODS_TARGET_SRCROOT)/ios/SimpleBLE.xcframework/ios-arm64/Headers"',
59
- '"$(PODS_TARGET_SRCROOT)/ios/SimpleBLE.xcframework/ios-arm64-simulator/Headers"',
60
- '"$(PODS_TARGET_SRCROOT)/ios/SimpleBLE.xcframework/macos-arm64_x86_64/Headers"',
58
+ '"$(PODS_TARGET_SRCROOT)/apple/SimpleBLE.xcframework/ios-arm64/Headers"',
59
+ '"$(PODS_TARGET_SRCROOT)/apple/SimpleBLE.xcframework/ios-arm64-simulator/Headers"',
60
+ '"$(PODS_TARGET_SRCROOT)/apple/SimpleBLE.xcframework/macos-arm64_x86_64/Headers"',
61
61
  ].join(' '),
62
62
  })
63
63
  end
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # simplejsble
2
+
3
+ React Native Bluetooth Low Energy library using SimpleBLE with Nitro Modules.
4
+
5
+ ## iOS Build Issue Fix
6
+
7
+ If you encounter this error when building your iOS project:
8
+
9
+ ```
10
+ Property with 'retain (or strong)' attribute must be of object type
11
+ /Users/.../Pods/Headers/Public/React-Core/React/RCTBridgeModule.h:164:1
12
+ ```
13
+
14
+ Add this to your `Podfile` in the `post_install` block:
15
+
16
+ ```ruby
17
+ post_install do |installer|
18
+ # Fix RCTBridgeModule.h dispatch_queue_t property issue
19
+ # See: https://github.com/facebook/react-native/issues/29681
20
+ rct_bridge_module_h = File.join(installer.sandbox.root, 'Headers/Public/React-Core/React/RCTBridgeModule.h')
21
+
22
+ if File.exist?(rct_bridge_module_h)
23
+ text = File.read(rct_bridge_module_h)
24
+ new_contents = text.gsub(
25
+ /@property \(nonatomic, strong, readonly\) dispatch_queue_t methodQueue RCT_DEPRECATED;/,
26
+ '@property (nonatomic, assign, readonly) dispatch_queue_t methodQueue RCT_DEPRECATED;'
27
+ )
28
+
29
+ if text != new_contents
30
+ File.open(rct_bridge_module_h, "w") { |file| file.puts new_contents }
31
+ puts "✓ Patched RCTBridgeModule.h methodQueue property (strong -> assign)"
32
+ end
33
+ end
34
+ end
35
+ ```
36
+
37
+ Then run `pod install` again.
38
+
39
+ ## Installation
40
+
41
+ ```bash
42
+ npm install simplejsble
43
+ ```
44
+
45
+ ## Usage
46
+
47
+ ```typescript
48
+ import { Adapter } from 'simplejsble';
49
+
50
+ // Your code here
51
+ ```
@@ -56,9 +56,11 @@ 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}
59
60
  )
60
61
 
61
62
  find_library(LOG_LIB log)
63
+ find_package(JNI REQUIRED)
62
64
 
63
65
  # Link all libraries together
64
66
  target_link_libraries(NitroSimplejsble
@@ -66,6 +68,7 @@ target_link_libraries(NitroSimplejsble
66
68
  simpleble::simpleble
67
69
  android
68
70
  -ldl
71
+ ${JNI_LIBRARIES}
69
72
  )
70
73
 
71
74
  # Allow undefined JNI symbols (resolved at runtime)
@@ -1,8 +1,8 @@
1
1
  cmake_minimum_required(VERSION 3.21)
2
2
 
3
3
  # Determine if we're in the SimpleBLE monorepo or npm package
4
- # In monorepo: packages/simplejsble/ios → ../../../.. has cmake/
5
- # In npm: node_modules/simplejsble/ios → .. has cmake/ (bundled)
4
+ # In monorepo: packages/simplejsble/apple → ../../../.. has cmake/
5
+ # In npm: node_modules/simplejsble/apple → .. has cmake/ (bundled)
6
6
  # This is used by the podspec's prepare_command when building the XCFramework
7
7
  if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/prelude.cmake")
8
8
  # npm package - bundled cmake
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplejsble",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "React Native Bluetooth Low Energy library using SimpleBLE with Nitro Modules",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",
@@ -12,7 +12,7 @@
12
12
  "lib",
13
13
  "nitrogen",
14
14
  "android/",
15
- "ios/",
15
+ "apple/",
16
16
  "cpp/",
17
17
  "simpleble/",
18
18
  "simpledroidbridge/",
@@ -29,7 +29,7 @@
29
29
  "prepack": "npm run build && npx nitrogen && bash scripts/prepare-package.sh",
30
30
  "typecheck": "tsc --noEmit",
31
31
  "build": "tsc",
32
- "clean": "rm -rf simpleble simpledroidbridge cmake dependencies VERSION nitrogen lib tsconfig.tsbuildinfo android/build android/.cxx android/.gradle ios/build_iphoneos_arm64 ios/build_iphonesimulator_arm64 ios/simpleble_iphoneos_arm64 ios/simpleble_iphonesimulator_arm64 ios/build_macosx_arm64 ios/build_macosx_x86_64 ios/simpleble_macosx_arm64 ios/simpleble_macosx_x86_64 ios/simpleble_macosx_universal ios/SimpleBLE.xcframework",
32
+ "clean": "rm -rf simpleble simpledroidbridge cmake dependencies VERSION nitrogen lib tsconfig.tsbuildinfo android/build android/.cxx android/.gradle apple/build_iphoneos_arm64 apple/build_iphonesimulator_arm64 apple/simpleble_iphoneos_arm64 apple/simpleble_iphonesimulator_arm64 apple/build_macosx_arm64 apple/build_macosx_x86_64 apple/simpleble_macosx_arm64 apple/simpleble_macosx_x86_64 apple/simpleble_macosx_universal apple/SimpleBLE.xcframework",
33
33
  "lint": "eslint \"**/*.{js,ts,tsx}\" --fix",
34
34
  "prepublishOnly": "npm run typecheck",
35
35
  "postpublish": "npm run clean",
File without changes
File without changes
@@ -10,7 +10,7 @@
10
10
  <key>HeadersPath</key>
11
11
  <string>Headers</string>
12
12
  <key>LibraryIdentifier</key>
13
- <string>ios-arm64-simulator</string>
13
+ <string>ios-arm64</string>
14
14
  <key>LibraryPath</key>
15
15
  <string>libsimpleble.a</string>
16
16
  <key>SupportedArchitectures</key>
@@ -19,8 +19,6 @@
19
19
  </array>
20
20
  <key>SupportedPlatform</key>
21
21
  <string>ios</string>
22
- <key>SupportedPlatformVariant</key>
23
- <string>simulator</string>
24
22
  </dict>
25
23
  <dict>
26
24
  <key>BinaryPath</key>
@@ -28,15 +26,16 @@
28
26
  <key>HeadersPath</key>
29
27
  <string>Headers</string>
30
28
  <key>LibraryIdentifier</key>
31
- <string>ios-arm64</string>
29
+ <string>macos-arm64_x86_64</string>
32
30
  <key>LibraryPath</key>
33
31
  <string>libsimpleble.a</string>
34
32
  <key>SupportedArchitectures</key>
35
33
  <array>
36
34
  <string>arm64</string>
35
+ <string>x86_64</string>
37
36
  </array>
38
37
  <key>SupportedPlatform</key>
39
- <string>ios</string>
38
+ <string>macos</string>
40
39
  </dict>
41
40
  <dict>
42
41
  <key>BinaryPath</key>
@@ -44,16 +43,17 @@
44
43
  <key>HeadersPath</key>
45
44
  <string>Headers</string>
46
45
  <key>LibraryIdentifier</key>
47
- <string>macos-arm64_x86_64</string>
46
+ <string>ios-arm64-simulator</string>
48
47
  <key>LibraryPath</key>
49
48
  <string>libsimpleble.a</string>
50
49
  <key>SupportedArchitectures</key>
51
50
  <array>
52
51
  <string>arm64</string>
53
- <string>x86_64</string>
54
52
  </array>
55
53
  <key>SupportedPlatform</key>
56
- <string>macos</string>
54
+ <string>ios</string>
55
+ <key>SupportedPlatformVariant</key>
56
+ <string>simulator</string>
57
57
  </dict>
58
58
  </array>
59
59
  <key>CFBundlePackageType</key>