react-native-picture-selector 1.0.31 → 1.0.32
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.
package/android/CMakeLists.txt
CHANGED
|
@@ -18,3 +18,17 @@ include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/NitroPictureSelector+a
|
|
|
18
18
|
target_sources(${CMAKE_PROJECT_NAME} PRIVATE
|
|
19
19
|
src/main/cpp/cpp-adapter.cpp
|
|
20
20
|
)
|
|
21
|
+
|
|
22
|
+
# The react-native-nitro-modules prefab is header-only at CMake configure time,
|
|
23
|
+
# so react-native-nitro-modules::NitroModules adds no .so to the link command.
|
|
24
|
+
# Link libNitroModules.so directly using the known build output path.
|
|
25
|
+
string(TOLOWER "${CMAKE_BUILD_TYPE}" _build_type_lower)
|
|
26
|
+
if(_build_type_lower STREQUAL "release")
|
|
27
|
+
set(NITRO_BUILD_VARIANT "release")
|
|
28
|
+
else()
|
|
29
|
+
set(NITRO_BUILD_VARIANT "debug")
|
|
30
|
+
endif()
|
|
31
|
+
|
|
32
|
+
target_link_libraries(${CMAKE_PROJECT_NAME}
|
|
33
|
+
${CMAKE_SOURCE_DIR}/../../react-native-nitro-modules/android/build/intermediates/cmake/${NITRO_BUILD_VARIANT}/obj/${ANDROID_ABI}/libNitroModules.so
|
|
34
|
+
)
|
|
@@ -29,12 +29,12 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
|
|
|
29
29
|
// is empty (nitrogen was run before autolinking was configured).
|
|
30
30
|
// Registration is done here manually using the TAG from the generated spec.
|
|
31
31
|
margelo::nitro::HybridObjectRegistry::registerHybridObjectConstructor(
|
|
32
|
-
|
|
32
|
+
"HybridPictureSelector",
|
|
33
33
|
[]() -> std::shared_ptr<margelo::nitro::HybridObject> {
|
|
34
34
|
static const auto cls = facebook::jni::findClassStatic(
|
|
35
35
|
"com/margelo/pictureselector/HybridPictureSelector"
|
|
36
36
|
);
|
|
37
|
-
static const auto ctor = cls->getConstructor<facebook::jni::JObject()>();
|
|
37
|
+
static const auto ctor = cls->getConstructor<facebook::jni::JObject::javaobject()>();
|
|
38
38
|
auto javaObject = cls->newObject(ctor);
|
|
39
39
|
auto javaPart = facebook::jni::static_ref_cast<
|
|
40
40
|
margelo::nitro::pictureselector::JHybridHybridPictureSelectorSpec::JavaPart
|
package/package.json
CHANGED