react-native-picture-selector 1.0.17 → 1.0.19

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.
@@ -1,4 +1,6 @@
1
1
  require "json"
2
+ load File.join(__dir__, '..', 'nitrogen', 'generated', 'ios', 'NitroPictureSelector+autolinking.rb')
3
+
2
4
  package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
3
5
 
4
6
  Pod::Spec.new do |s|
@@ -14,26 +16,26 @@ Pod::Spec.new do |s|
14
16
  s.requires_arc = true
15
17
 
16
18
  # ── Sources ─────────────────────────────────────────────────────────────
17
- # Include both our hand-written Swift and the nitrogen-generated bridge files.
18
- s.source_files = [
19
- "ios/**/*.{h,m,mm,swift}",
20
- "../nitrogen/generated/ios/**/*.{h,m,mm,swift,hpp,cpp}",
21
- ]
19
+ # Hand-written Swift implementation (paths relative to this podspec in ios/).
20
+ s.source_files = "**/*.{h,m,mm,swift}"
22
21
 
23
22
  # ── Dependencies ─────────────────────────────────────────────────────────
24
23
  s.dependency "React-Core"
25
- s.dependency "react-native-nitro-modules"
26
24
 
27
- # HXPhotoPicker v5 — default subspec includes Picker + Editor + Camera
25
+ # HXPhotoPicker v5 — Picker + Editor + Camera
28
26
  s.dependency "HXPhotoPicker", "~> 5.0.5"
29
27
 
30
28
  # ── Compiler flags ───────────────────────────────────────────────────────
31
- # Enable HXPhotoPicker conditional compilation flags
32
- # Enable Swift/C++ interop required by Nitro for zero-overhead calls
29
+ # HXPhotoPicker feature flags + Swift/C++ interop for Nitro.
30
+ # CLANG_CXX_LANGUAGE_STANDARD and DEFINES_MODULE are merged in by add_nitrogen_files.
33
31
  s.pod_target_xcconfig = {
34
32
  "SWIFT_ACTIVE_COMPILATION_CONDITIONS" =>
35
33
  "HXPICKER_ENABLE_CORE HXPICKER_ENABLE_PICKER HXPICKER_ENABLE_EDITOR HXPICKER_ENABLE_CAMERA",
36
34
  "OTHER_SWIFT_FLAGS" => "-enable-experimental-cxx-interop",
37
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
38
35
  }
36
+
37
+ # ── Nitrogen ─────────────────────────────────────────────────────────────
38
+ # Adds nitrogen/generated/shared/**/* + nitrogen/generated/ios/**/* to source_files,
39
+ # sets public/private headers, adds NitroModules dependency, merges C++20 xcconfig.
40
+ add_nitrogen_files(s)
39
41
  end
@@ -0,0 +1,34 @@
1
+ //
2
+ // NitroPictureSelectorOnLoad.mm
3
+ // Registers HybridPictureSelector with Nitro's HybridObjectRegistry.
4
+ //
5
+ // The +load method runs automatically when the ObjC runtime loads this class,
6
+ // before main() — guaranteeing the factory is available when JS calls
7
+ // NitroModules.createHybridObject("PictureSelector").
8
+ //
9
+
10
+ #import <Foundation/Foundation.h>
11
+ #import <NitroModules/HybridObjectRegistry.hpp>
12
+ #import "NitroPictureSelector-Swift-Cxx-Umbrella.hpp"
13
+ #import "HybridHybridPictureSelectorSpecSwift.hpp"
14
+
15
+ using namespace margelo::nitro;
16
+ using namespace margelo::pictureselector;
17
+ using namespace margelo::pictureselector::bridge::swift;
18
+
19
+ @interface NitroPictureSelectorOnLoad: NSObject
20
+ @end
21
+
22
+ @implementation NitroPictureSelectorOnLoad
23
+
24
+ + (void)load {
25
+ HybridObjectRegistry::registerHybridObjectConstructor(
26
+ "PictureSelector",
27
+ []() -> std::shared_ptr<HybridObject> {
28
+ auto swiftPart = NitroPictureSelector::HybridPictureSelector();
29
+ return swiftPart.getCxxWrapper().getCxxPart();
30
+ }
31
+ );
32
+ }
33
+
34
+ @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-picture-selector",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "High-performance photo/video picker for React Native using Nitro Modules",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",