reactnative-plugin-appice 1.7.28 → 1.7.29
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/README.md +37 -37
- package/android/README.md +14 -14
- package/android/build.gradle +138 -158
- package/android/gitignore +47 -47
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -5
- package/android/gradlew +234 -234
- package/android/local.properties +8 -8
- package/android/src/main/AndroidManifest.xml +120 -164
- package/android/src/main/java/com/{reactlibrary → appice/react}/AppICEUtils.java +274 -274
- package/android/src/main/java/com/{reactlibrary → appice/react}/AppIceReactPluginModule.java +778 -778
- package/android/src/main/java/com/{reactlibrary → appice/react}/AppIceReactPluginPackage.java +28 -28
- package/android/src/main/java/com/{reactlibrary → appice/react}/CampaignCampsReceiver.java +56 -56
- package/android/src/main/java/com/{reactlibrary → appice/react}/EnumConstants.java +282 -282
- package/android/src/main/java/com/{reactlibrary → appice/react}/NotificationEventService.java +59 -59
- package/android/src/main/java/com/{reactlibrary → appice/react}/StringConstants.java +24 -24
- package/campaign.js +25 -25
- package/example/App.js +332 -332
- package/example/Gemfile +6 -6
- package/example/PageA.tsx +15 -15
- package/example/__tests__/App-test.js +14 -14
- package/example/ancilliary.js +486 -486
- package/example/android/app/_BUCK +55 -55
- package/example/android/app/build.gradle +320 -320
- package/example/android/app/build_defs.bzl +19 -19
- package/example/android/app/proguard-rules.pro +10 -10
- package/example/android/app/src/debug/AndroidManifest.xml +13 -13
- package/example/android/app/src/debug/java/com/example/ReactNativeFlipper.java +73 -73
- package/example/android/app/src/main/AndroidManifest.xml +72 -72
- package/example/android/app/src/main/java/com/example/MainActivity.java +48 -48
- package/example/android/app/src/main/java/com/example/MainApplication.java +91 -91
- package/example/android/app/src/main/java/com/example/newarchitecture/MainApplicationReactNativeHost.java +116 -116
- package/example/android/app/src/main/java/com/example/newarchitecture/components/MainComponentsRegistry.java +36 -36
- package/example/android/app/src/main/java/com/example/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -48
- package/example/android/app/src/main/jni/Android.mk +48 -48
- package/example/android/app/src/main/jni/MainApplicationModuleProvider.cpp +24 -24
- package/example/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -16
- package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -45
- package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -38
- package/example/android/app/src/main/jni/MainComponentsRegistry.cpp +61 -61
- package/example/android/app/src/main/jni/MainComponentsRegistry.h +32 -32
- package/example/android/app/src/main/jni/OnLoad.cpp +11 -11
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -36
- package/example/android/app/src/main/res/values/strings.xml +3 -3
- package/example/android/app/src/main/res/values/styles.xml +9 -9
- package/example/android/build.gradle +73 -73
- package/example/android/gradle/wrapper/gradle-wrapper.properties +5 -5
- package/example/android/gradle.properties +40 -40
- package/example/android/gradlew +234 -234
- package/example/android/settings.gradle +11 -11
- package/example/app.json +3 -3
- package/example/babel.config.js +3 -3
- package/example/index.js +9 -9
- package/example/ios/Podfile +44 -44
- package/example/ios/Podfile.lock +561 -561
- package/example/ios/_xcode.env +11 -11
- package/example/ios/example/AppDelegate.h +8 -8
- package/example/ios/example/AppDelegate.mm +174 -174
- package/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json +53 -53
- package/example/ios/example/Images.xcassets/Contents.json +6 -6
- package/example/ios/example/Info.plist +62 -62
- package/example/ios/example/LaunchScreen.storyboard +47 -47
- package/example/ios/example/example.entitlements +8 -8
- package/example/ios/example/main.m +10 -10
- package/example/ios/example.xcodeproj/project.pbxproj +712 -712
- package/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme +88 -88
- package/example/ios/example.xcworkspace/contents.xcworkspacedata +10 -10
- package/example/ios/example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
- package/example/ios/exampleTests/Info.plist +24 -24
- package/example/ios/exampleTests/exampleTests.m +66 -66
- package/example/metro.config.js +17 -17
- package/example/package.json +36 -36
- package/example/yarn.lock +7176 -7176
- package/index.js +590 -590
- package/ios/AppICEReactEvent.h +23 -23
- package/ios/AppICEReactEvent.m +86 -86
- package/ios/AppIceReactPlugin.h +65 -65
- package/ios/AppIceReactPlugin.m +683 -683
- package/ios/AppIceReactPlugin.xcodeproj/project.pbxproj +364 -364
- package/ios/AppIceReactPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -4
- package/ios/AppIceReactPlugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
- package/ios/AppIceReactPlugin.xcodeproj/xcuserdata/Adi.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
- package/ios/AppIceReactPlugin.xcodeproj/xcuserdata/artherajesh.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
- package/ios/AppIceReactPlugin.xcworkspace/contents.xcworkspacedata +10 -10
- package/ios/AppIceReactPlugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
- package/ios/Podfile +10 -10
- package/ios/Podfile.lock +3 -3
- package/ios/Pods/Manifest.lock +3 -3
- package/ios/Pods/Pods.xcodeproj/project.pbxproj +395 -395
- package/ios/Pods/Pods.xcodeproj/xcuserdata/Adi.xcuserdatad/xcschemes/Pods-AppIceReactPlugin.xcscheme +58 -58
- package/ios/Pods/Pods.xcodeproj/xcuserdata/Adi.xcuserdatad/xcschemes/xcschememanagement.plist +18 -18
- package/ios/Pods/Pods.xcodeproj/xcuserdata/artherajesh.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-Info.plist +26 -26
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-acknowledgements.markdown +3 -3
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-acknowledgements.plist +29 -29
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-dummy.m +5 -5
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-umbrella.h +16 -16
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin.debug.xcconfig +6 -6
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin.modulemap +6 -6
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin.release.xcconfig +6 -6
- package/package.json +6 -9
- package/reactnative-plugin-appice.podspec +30 -30
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
THIS_DIR := $(call my-dir)
|
|
2
|
-
|
|
3
|
-
include $(REACT_ANDROID_DIR)/Android-prebuilt.mk
|
|
4
|
-
|
|
5
|
-
# If you wish to add a custom TurboModule or Fabric component in your app you
|
|
6
|
-
# will have to include the following autogenerated makefile.
|
|
7
|
-
# include $(GENERATED_SRC_DIR)/codegen/jni/Android.mk
|
|
8
|
-
include $(CLEAR_VARS)
|
|
9
|
-
|
|
10
|
-
LOCAL_PATH := $(THIS_DIR)
|
|
11
|
-
|
|
12
|
-
# You can customize the name of your application .so file here.
|
|
13
|
-
LOCAL_MODULE := example_appmodules
|
|
14
|
-
|
|
15
|
-
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
16
|
-
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
17
|
-
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
|
18
|
-
|
|
19
|
-
# If you wish to add a custom TurboModule or Fabric component in your app you
|
|
20
|
-
# will have to uncomment those lines to include the generated source
|
|
21
|
-
# files from the codegen (placed in $(GENERATED_SRC_DIR)/codegen/jni)
|
|
22
|
-
#
|
|
23
|
-
# LOCAL_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
|
|
24
|
-
# LOCAL_SRC_FILES += $(wildcard $(GENERATED_SRC_DIR)/codegen/jni/*.cpp)
|
|
25
|
-
# LOCAL_EXPORT_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
|
|
26
|
-
|
|
27
|
-
# Here you should add any native library you wish to depend on.
|
|
28
|
-
LOCAL_SHARED_LIBRARIES := \
|
|
29
|
-
libfabricjni \
|
|
30
|
-
libfbjni \
|
|
31
|
-
libfolly_runtime \
|
|
32
|
-
libglog \
|
|
33
|
-
libjsi \
|
|
34
|
-
libreact_codegen_rncore \
|
|
35
|
-
libreact_debug \
|
|
36
|
-
libreact_nativemodule_core \
|
|
37
|
-
libreact_render_componentregistry \
|
|
38
|
-
libreact_render_core \
|
|
39
|
-
libreact_render_debug \
|
|
40
|
-
libreact_render_graphics \
|
|
41
|
-
librrc_view \
|
|
42
|
-
libruntimeexecutor \
|
|
43
|
-
libturbomodulejsijni \
|
|
44
|
-
libyoga
|
|
45
|
-
|
|
46
|
-
LOCAL_CFLAGS := -DLOG_TAG=\"ReactNative\" -fexceptions -frtti -std=c++17 -Wall
|
|
47
|
-
|
|
48
|
-
include $(BUILD_SHARED_LIBRARY)
|
|
1
|
+
THIS_DIR := $(call my-dir)
|
|
2
|
+
|
|
3
|
+
include $(REACT_ANDROID_DIR)/Android-prebuilt.mk
|
|
4
|
+
|
|
5
|
+
# If you wish to add a custom TurboModule or Fabric component in your app you
|
|
6
|
+
# will have to include the following autogenerated makefile.
|
|
7
|
+
# include $(GENERATED_SRC_DIR)/codegen/jni/Android.mk
|
|
8
|
+
include $(CLEAR_VARS)
|
|
9
|
+
|
|
10
|
+
LOCAL_PATH := $(THIS_DIR)
|
|
11
|
+
|
|
12
|
+
# You can customize the name of your application .so file here.
|
|
13
|
+
LOCAL_MODULE := example_appmodules
|
|
14
|
+
|
|
15
|
+
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
16
|
+
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
17
|
+
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
|
18
|
+
|
|
19
|
+
# If you wish to add a custom TurboModule or Fabric component in your app you
|
|
20
|
+
# will have to uncomment those lines to include the generated source
|
|
21
|
+
# files from the codegen (placed in $(GENERATED_SRC_DIR)/codegen/jni)
|
|
22
|
+
#
|
|
23
|
+
# LOCAL_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
|
|
24
|
+
# LOCAL_SRC_FILES += $(wildcard $(GENERATED_SRC_DIR)/codegen/jni/*.cpp)
|
|
25
|
+
# LOCAL_EXPORT_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
|
|
26
|
+
|
|
27
|
+
# Here you should add any native library you wish to depend on.
|
|
28
|
+
LOCAL_SHARED_LIBRARIES := \
|
|
29
|
+
libfabricjni \
|
|
30
|
+
libfbjni \
|
|
31
|
+
libfolly_runtime \
|
|
32
|
+
libglog \
|
|
33
|
+
libjsi \
|
|
34
|
+
libreact_codegen_rncore \
|
|
35
|
+
libreact_debug \
|
|
36
|
+
libreact_nativemodule_core \
|
|
37
|
+
libreact_render_componentregistry \
|
|
38
|
+
libreact_render_core \
|
|
39
|
+
libreact_render_debug \
|
|
40
|
+
libreact_render_graphics \
|
|
41
|
+
librrc_view \
|
|
42
|
+
libruntimeexecutor \
|
|
43
|
+
libturbomodulejsijni \
|
|
44
|
+
libyoga
|
|
45
|
+
|
|
46
|
+
LOCAL_CFLAGS := -DLOG_TAG=\"ReactNative\" -fexceptions -frtti -std=c++17 -Wall
|
|
47
|
+
|
|
48
|
+
include $(BUILD_SHARED_LIBRARY)
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
#include "MainApplicationModuleProvider.h"
|
|
2
|
-
|
|
3
|
-
#include <rncore.h>
|
|
4
|
-
|
|
5
|
-
namespace facebook {
|
|
6
|
-
namespace react {
|
|
7
|
-
|
|
8
|
-
std::shared_ptr<TurboModule> MainApplicationModuleProvider(
|
|
9
|
-
const std::string moduleName,
|
|
10
|
-
const JavaTurboModule::InitParams ¶ms) {
|
|
11
|
-
// Here you can provide your own module provider for TurboModules coming from
|
|
12
|
-
// either your application or from external libraries. The approach to follow
|
|
13
|
-
// is similar to the following (for a library called `samplelibrary`:
|
|
14
|
-
//
|
|
15
|
-
// auto module = samplelibrary_ModuleProvider(moduleName, params);
|
|
16
|
-
// if (module != nullptr) {
|
|
17
|
-
// return module;
|
|
18
|
-
// }
|
|
19
|
-
// return rncore_ModuleProvider(moduleName, params);
|
|
20
|
-
return rncore_ModuleProvider(moduleName, params);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
} // namespace react
|
|
24
|
-
} // namespace facebook
|
|
1
|
+
#include "MainApplicationModuleProvider.h"
|
|
2
|
+
|
|
3
|
+
#include <rncore.h>
|
|
4
|
+
|
|
5
|
+
namespace facebook {
|
|
6
|
+
namespace react {
|
|
7
|
+
|
|
8
|
+
std::shared_ptr<TurboModule> MainApplicationModuleProvider(
|
|
9
|
+
const std::string moduleName,
|
|
10
|
+
const JavaTurboModule::InitParams ¶ms) {
|
|
11
|
+
// Here you can provide your own module provider for TurboModules coming from
|
|
12
|
+
// either your application or from external libraries. The approach to follow
|
|
13
|
+
// is similar to the following (for a library called `samplelibrary`:
|
|
14
|
+
//
|
|
15
|
+
// auto module = samplelibrary_ModuleProvider(moduleName, params);
|
|
16
|
+
// if (module != nullptr) {
|
|
17
|
+
// return module;
|
|
18
|
+
// }
|
|
19
|
+
// return rncore_ModuleProvider(moduleName, params);
|
|
20
|
+
return rncore_ModuleProvider(moduleName, params);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
} // namespace react
|
|
24
|
+
} // namespace facebook
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include <memory>
|
|
4
|
-
#include <string>
|
|
5
|
-
|
|
6
|
-
#include <ReactCommon/JavaTurboModule.h>
|
|
7
|
-
|
|
8
|
-
namespace facebook {
|
|
9
|
-
namespace react {
|
|
10
|
-
|
|
11
|
-
std::shared_ptr<TurboModule> MainApplicationModuleProvider(
|
|
12
|
-
const std::string moduleName,
|
|
13
|
-
const JavaTurboModule::InitParams ¶ms);
|
|
14
|
-
|
|
15
|
-
} // namespace react
|
|
16
|
-
} // namespace facebook
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <memory>
|
|
4
|
+
#include <string>
|
|
5
|
+
|
|
6
|
+
#include <ReactCommon/JavaTurboModule.h>
|
|
7
|
+
|
|
8
|
+
namespace facebook {
|
|
9
|
+
namespace react {
|
|
10
|
+
|
|
11
|
+
std::shared_ptr<TurboModule> MainApplicationModuleProvider(
|
|
12
|
+
const std::string moduleName,
|
|
13
|
+
const JavaTurboModule::InitParams ¶ms);
|
|
14
|
+
|
|
15
|
+
} // namespace react
|
|
16
|
+
} // namespace facebook
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
#include "MainApplicationTurboModuleManagerDelegate.h"
|
|
2
|
-
#include "MainApplicationModuleProvider.h"
|
|
3
|
-
|
|
4
|
-
namespace facebook {
|
|
5
|
-
namespace react {
|
|
6
|
-
|
|
7
|
-
jni::local_ref<MainApplicationTurboModuleManagerDelegate::jhybriddata>
|
|
8
|
-
MainApplicationTurboModuleManagerDelegate::initHybrid(
|
|
9
|
-
jni::alias_ref<jhybridobject>) {
|
|
10
|
-
return makeCxxInstance();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
void MainApplicationTurboModuleManagerDelegate::registerNatives() {
|
|
14
|
-
registerHybrid({
|
|
15
|
-
makeNativeMethod(
|
|
16
|
-
"initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid),
|
|
17
|
-
makeNativeMethod(
|
|
18
|
-
"canCreateTurboModule",
|
|
19
|
-
MainApplicationTurboModuleManagerDelegate::canCreateTurboModule),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
std::shared_ptr<TurboModule>
|
|
24
|
-
MainApplicationTurboModuleManagerDelegate::getTurboModule(
|
|
25
|
-
const std::string name,
|
|
26
|
-
const std::shared_ptr<CallInvoker> jsInvoker) {
|
|
27
|
-
// Not implemented yet: provide pure-C++ NativeModules here.
|
|
28
|
-
return nullptr;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
std::shared_ptr<TurboModule>
|
|
32
|
-
MainApplicationTurboModuleManagerDelegate::getTurboModule(
|
|
33
|
-
const std::string name,
|
|
34
|
-
const JavaTurboModule::InitParams ¶ms) {
|
|
35
|
-
return MainApplicationModuleProvider(name, params);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(
|
|
39
|
-
std::string name) {
|
|
40
|
-
return getTurboModule(name, nullptr) != nullptr ||
|
|
41
|
-
getTurboModule(name, {.moduleName = name}) != nullptr;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
} // namespace react
|
|
45
|
-
} // namespace facebook
|
|
1
|
+
#include "MainApplicationTurboModuleManagerDelegate.h"
|
|
2
|
+
#include "MainApplicationModuleProvider.h"
|
|
3
|
+
|
|
4
|
+
namespace facebook {
|
|
5
|
+
namespace react {
|
|
6
|
+
|
|
7
|
+
jni::local_ref<MainApplicationTurboModuleManagerDelegate::jhybriddata>
|
|
8
|
+
MainApplicationTurboModuleManagerDelegate::initHybrid(
|
|
9
|
+
jni::alias_ref<jhybridobject>) {
|
|
10
|
+
return makeCxxInstance();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
void MainApplicationTurboModuleManagerDelegate::registerNatives() {
|
|
14
|
+
registerHybrid({
|
|
15
|
+
makeNativeMethod(
|
|
16
|
+
"initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid),
|
|
17
|
+
makeNativeMethod(
|
|
18
|
+
"canCreateTurboModule",
|
|
19
|
+
MainApplicationTurboModuleManagerDelegate::canCreateTurboModule),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
std::shared_ptr<TurboModule>
|
|
24
|
+
MainApplicationTurboModuleManagerDelegate::getTurboModule(
|
|
25
|
+
const std::string name,
|
|
26
|
+
const std::shared_ptr<CallInvoker> jsInvoker) {
|
|
27
|
+
// Not implemented yet: provide pure-C++ NativeModules here.
|
|
28
|
+
return nullptr;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
std::shared_ptr<TurboModule>
|
|
32
|
+
MainApplicationTurboModuleManagerDelegate::getTurboModule(
|
|
33
|
+
const std::string name,
|
|
34
|
+
const JavaTurboModule::InitParams ¶ms) {
|
|
35
|
+
return MainApplicationModuleProvider(name, params);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(
|
|
39
|
+
std::string name) {
|
|
40
|
+
return getTurboModule(name, nullptr) != nullptr ||
|
|
41
|
+
getTurboModule(name, {.moduleName = name}) != nullptr;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
} // namespace react
|
|
45
|
+
} // namespace facebook
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
#include <memory>
|
|
2
|
-
#include <string>
|
|
3
|
-
|
|
4
|
-
#include <ReactCommon/TurboModuleManagerDelegate.h>
|
|
5
|
-
#include <fbjni/fbjni.h>
|
|
6
|
-
|
|
7
|
-
namespace facebook {
|
|
8
|
-
namespace react {
|
|
9
|
-
|
|
10
|
-
class MainApplicationTurboModuleManagerDelegate
|
|
11
|
-
: public jni::HybridClass<
|
|
12
|
-
MainApplicationTurboModuleManagerDelegate,
|
|
13
|
-
TurboModuleManagerDelegate> {
|
|
14
|
-
public:
|
|
15
|
-
// Adapt it to the package you used for your Java class.
|
|
16
|
-
static constexpr auto kJavaDescriptor =
|
|
17
|
-
"Lcom/example/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
|
|
18
|
-
|
|
19
|
-
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject>);
|
|
20
|
-
|
|
21
|
-
static void registerNatives();
|
|
22
|
-
|
|
23
|
-
std::shared_ptr<TurboModule> getTurboModule(
|
|
24
|
-
const std::string name,
|
|
25
|
-
const std::shared_ptr<CallInvoker> jsInvoker) override;
|
|
26
|
-
std::shared_ptr<TurboModule> getTurboModule(
|
|
27
|
-
const std::string name,
|
|
28
|
-
const JavaTurboModule::InitParams ¶ms) override;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Test-only method. Allows user to verify whether a TurboModule can be
|
|
32
|
-
* created by instances of this class.
|
|
33
|
-
*/
|
|
34
|
-
bool canCreateTurboModule(std::string name);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
} // namespace react
|
|
38
|
-
} // namespace facebook
|
|
1
|
+
#include <memory>
|
|
2
|
+
#include <string>
|
|
3
|
+
|
|
4
|
+
#include <ReactCommon/TurboModuleManagerDelegate.h>
|
|
5
|
+
#include <fbjni/fbjni.h>
|
|
6
|
+
|
|
7
|
+
namespace facebook {
|
|
8
|
+
namespace react {
|
|
9
|
+
|
|
10
|
+
class MainApplicationTurboModuleManagerDelegate
|
|
11
|
+
: public jni::HybridClass<
|
|
12
|
+
MainApplicationTurboModuleManagerDelegate,
|
|
13
|
+
TurboModuleManagerDelegate> {
|
|
14
|
+
public:
|
|
15
|
+
// Adapt it to the package you used for your Java class.
|
|
16
|
+
static constexpr auto kJavaDescriptor =
|
|
17
|
+
"Lcom/example/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;";
|
|
18
|
+
|
|
19
|
+
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject>);
|
|
20
|
+
|
|
21
|
+
static void registerNatives();
|
|
22
|
+
|
|
23
|
+
std::shared_ptr<TurboModule> getTurboModule(
|
|
24
|
+
const std::string name,
|
|
25
|
+
const std::shared_ptr<CallInvoker> jsInvoker) override;
|
|
26
|
+
std::shared_ptr<TurboModule> getTurboModule(
|
|
27
|
+
const std::string name,
|
|
28
|
+
const JavaTurboModule::InitParams ¶ms) override;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Test-only method. Allows user to verify whether a TurboModule can be
|
|
32
|
+
* created by instances of this class.
|
|
33
|
+
*/
|
|
34
|
+
bool canCreateTurboModule(std::string name);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
} // namespace react
|
|
38
|
+
} // namespace facebook
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
#include "MainComponentsRegistry.h"
|
|
2
|
-
|
|
3
|
-
#include <CoreComponentsRegistry.h>
|
|
4
|
-
#include <fbjni/fbjni.h>
|
|
5
|
-
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
6
|
-
#include <react/renderer/components/rncore/ComponentDescriptors.h>
|
|
7
|
-
|
|
8
|
-
namespace facebook {
|
|
9
|
-
namespace react {
|
|
10
|
-
|
|
11
|
-
MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {}
|
|
12
|
-
|
|
13
|
-
std::shared_ptr<ComponentDescriptorProviderRegistry const>
|
|
14
|
-
MainComponentsRegistry::sharedProviderRegistry() {
|
|
15
|
-
auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
|
|
16
|
-
|
|
17
|
-
// Custom Fabric Components go here. You can register custom
|
|
18
|
-
// components coming from your App or from 3rd party libraries here.
|
|
19
|
-
//
|
|
20
|
-
// providerRegistry->add(concreteComponentDescriptorProvider<
|
|
21
|
-
// AocViewerComponentDescriptor>());
|
|
22
|
-
return providerRegistry;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
jni::local_ref<MainComponentsRegistry::jhybriddata>
|
|
26
|
-
MainComponentsRegistry::initHybrid(
|
|
27
|
-
jni::alias_ref<jclass>,
|
|
28
|
-
ComponentFactory *delegate) {
|
|
29
|
-
auto instance = makeCxxInstance(delegate);
|
|
30
|
-
|
|
31
|
-
auto buildRegistryFunction =
|
|
32
|
-
[](EventDispatcher::Weak const &eventDispatcher,
|
|
33
|
-
ContextContainer::Shared const &contextContainer)
|
|
34
|
-
-> ComponentDescriptorRegistry::Shared {
|
|
35
|
-
auto registry = MainComponentsRegistry::sharedProviderRegistry()
|
|
36
|
-
->createComponentDescriptorRegistry(
|
|
37
|
-
{eventDispatcher, contextContainer});
|
|
38
|
-
|
|
39
|
-
auto mutableRegistry =
|
|
40
|
-
std::const_pointer_cast<ComponentDescriptorRegistry>(registry);
|
|
41
|
-
|
|
42
|
-
mutableRegistry->setFallbackComponentDescriptor(
|
|
43
|
-
std::make_shared<UnimplementedNativeViewComponentDescriptor>(
|
|
44
|
-
ComponentDescriptorParameters{
|
|
45
|
-
eventDispatcher, contextContainer, nullptr}));
|
|
46
|
-
|
|
47
|
-
return registry;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
delegate->buildRegistryFunction = buildRegistryFunction;
|
|
51
|
-
return instance;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
void MainComponentsRegistry::registerNatives() {
|
|
55
|
-
registerHybrid({
|
|
56
|
-
makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid),
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
} // namespace react
|
|
61
|
-
} // namespace facebook
|
|
1
|
+
#include "MainComponentsRegistry.h"
|
|
2
|
+
|
|
3
|
+
#include <CoreComponentsRegistry.h>
|
|
4
|
+
#include <fbjni/fbjni.h>
|
|
5
|
+
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
6
|
+
#include <react/renderer/components/rncore/ComponentDescriptors.h>
|
|
7
|
+
|
|
8
|
+
namespace facebook {
|
|
9
|
+
namespace react {
|
|
10
|
+
|
|
11
|
+
MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {}
|
|
12
|
+
|
|
13
|
+
std::shared_ptr<ComponentDescriptorProviderRegistry const>
|
|
14
|
+
MainComponentsRegistry::sharedProviderRegistry() {
|
|
15
|
+
auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
|
|
16
|
+
|
|
17
|
+
// Custom Fabric Components go here. You can register custom
|
|
18
|
+
// components coming from your App or from 3rd party libraries here.
|
|
19
|
+
//
|
|
20
|
+
// providerRegistry->add(concreteComponentDescriptorProvider<
|
|
21
|
+
// AocViewerComponentDescriptor>());
|
|
22
|
+
return providerRegistry;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
jni::local_ref<MainComponentsRegistry::jhybriddata>
|
|
26
|
+
MainComponentsRegistry::initHybrid(
|
|
27
|
+
jni::alias_ref<jclass>,
|
|
28
|
+
ComponentFactory *delegate) {
|
|
29
|
+
auto instance = makeCxxInstance(delegate);
|
|
30
|
+
|
|
31
|
+
auto buildRegistryFunction =
|
|
32
|
+
[](EventDispatcher::Weak const &eventDispatcher,
|
|
33
|
+
ContextContainer::Shared const &contextContainer)
|
|
34
|
+
-> ComponentDescriptorRegistry::Shared {
|
|
35
|
+
auto registry = MainComponentsRegistry::sharedProviderRegistry()
|
|
36
|
+
->createComponentDescriptorRegistry(
|
|
37
|
+
{eventDispatcher, contextContainer});
|
|
38
|
+
|
|
39
|
+
auto mutableRegistry =
|
|
40
|
+
std::const_pointer_cast<ComponentDescriptorRegistry>(registry);
|
|
41
|
+
|
|
42
|
+
mutableRegistry->setFallbackComponentDescriptor(
|
|
43
|
+
std::make_shared<UnimplementedNativeViewComponentDescriptor>(
|
|
44
|
+
ComponentDescriptorParameters{
|
|
45
|
+
eventDispatcher, contextContainer, nullptr}));
|
|
46
|
+
|
|
47
|
+
return registry;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
delegate->buildRegistryFunction = buildRegistryFunction;
|
|
51
|
+
return instance;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
void MainComponentsRegistry::registerNatives() {
|
|
55
|
+
registerHybrid({
|
|
56
|
+
makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
} // namespace react
|
|
61
|
+
} // namespace facebook
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include <ComponentFactory.h>
|
|
4
|
-
#include <fbjni/fbjni.h>
|
|
5
|
-
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
6
|
-
#include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
|
|
7
|
-
|
|
8
|
-
namespace facebook {
|
|
9
|
-
namespace react {
|
|
10
|
-
|
|
11
|
-
class MainComponentsRegistry
|
|
12
|
-
: public facebook::jni::HybridClass<MainComponentsRegistry> {
|
|
13
|
-
public:
|
|
14
|
-
// Adapt it to the package you used for your Java class.
|
|
15
|
-
constexpr static auto kJavaDescriptor =
|
|
16
|
-
"Lcom/example/newarchitecture/components/MainComponentsRegistry;";
|
|
17
|
-
|
|
18
|
-
static void registerNatives();
|
|
19
|
-
|
|
20
|
-
MainComponentsRegistry(ComponentFactory *delegate);
|
|
21
|
-
|
|
22
|
-
private:
|
|
23
|
-
static std::shared_ptr<ComponentDescriptorProviderRegistry const>
|
|
24
|
-
sharedProviderRegistry();
|
|
25
|
-
|
|
26
|
-
static jni::local_ref<jhybriddata> initHybrid(
|
|
27
|
-
jni::alias_ref<jclass>,
|
|
28
|
-
ComponentFactory *delegate);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
} // namespace react
|
|
32
|
-
} // namespace facebook
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <ComponentFactory.h>
|
|
4
|
+
#include <fbjni/fbjni.h>
|
|
5
|
+
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
6
|
+
#include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
|
|
7
|
+
|
|
8
|
+
namespace facebook {
|
|
9
|
+
namespace react {
|
|
10
|
+
|
|
11
|
+
class MainComponentsRegistry
|
|
12
|
+
: public facebook::jni::HybridClass<MainComponentsRegistry> {
|
|
13
|
+
public:
|
|
14
|
+
// Adapt it to the package you used for your Java class.
|
|
15
|
+
constexpr static auto kJavaDescriptor =
|
|
16
|
+
"Lcom/example/newarchitecture/components/MainComponentsRegistry;";
|
|
17
|
+
|
|
18
|
+
static void registerNatives();
|
|
19
|
+
|
|
20
|
+
MainComponentsRegistry(ComponentFactory *delegate);
|
|
21
|
+
|
|
22
|
+
private:
|
|
23
|
+
static std::shared_ptr<ComponentDescriptorProviderRegistry const>
|
|
24
|
+
sharedProviderRegistry();
|
|
25
|
+
|
|
26
|
+
static jni::local_ref<jhybriddata> initHybrid(
|
|
27
|
+
jni::alias_ref<jclass>,
|
|
28
|
+
ComponentFactory *delegate);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
} // namespace react
|
|
32
|
+
} // namespace facebook
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#include <fbjni/fbjni.h>
|
|
2
|
-
#include "MainApplicationTurboModuleManagerDelegate.h"
|
|
3
|
-
#include "MainComponentsRegistry.h"
|
|
4
|
-
|
|
5
|
-
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
|
|
6
|
-
return facebook::jni::initialize(vm, [] {
|
|
7
|
-
facebook::react::MainApplicationTurboModuleManagerDelegate::
|
|
8
|
-
registerNatives();
|
|
9
|
-
facebook::react::MainComponentsRegistry::registerNatives();
|
|
10
|
-
});
|
|
11
|
-
}
|
|
1
|
+
#include <fbjni/fbjni.h>
|
|
2
|
+
#include "MainApplicationTurboModuleManagerDelegate.h"
|
|
3
|
+
#include "MainComponentsRegistry.h"
|
|
4
|
+
|
|
5
|
+
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
|
|
6
|
+
return facebook::jni::initialize(vm, [] {
|
|
7
|
+
facebook::react::MainApplicationTurboModuleManagerDelegate::
|
|
8
|
+
registerNatives();
|
|
9
|
+
facebook::react::MainComponentsRegistry::registerNatives();
|
|
10
|
+
});
|
|
11
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Copyright (C) 2014 The Android Open Source Project
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
-->
|
|
16
|
-
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
|
17
|
-
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
|
|
18
|
-
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
|
|
19
|
-
android:insetTop="@dimen/abc_edit_text_inset_top_material"
|
|
20
|
-
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
|
|
21
|
-
|
|
22
|
-
<selector>
|
|
23
|
-
<!--
|
|
24
|
-
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
|
|
25
|
-
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
|
|
26
|
-
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
|
|
27
|
-
|
|
28
|
-
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
29
|
-
|
|
30
|
-
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
|
|
31
|
-
-->
|
|
32
|
-
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
33
|
-
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
|
|
34
|
-
</selector>
|
|
35
|
-
|
|
36
|
-
</inset>
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Copyright (C) 2014 The Android Open Source Project
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
-->
|
|
16
|
+
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
|
17
|
+
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
|
|
18
|
+
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
|
|
19
|
+
android:insetTop="@dimen/abc_edit_text_inset_top_material"
|
|
20
|
+
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
|
|
21
|
+
|
|
22
|
+
<selector>
|
|
23
|
+
<!--
|
|
24
|
+
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
|
|
25
|
+
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
|
|
26
|
+
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
|
|
27
|
+
|
|
28
|
+
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
29
|
+
|
|
30
|
+
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
|
|
31
|
+
-->
|
|
32
|
+
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
33
|
+
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
|
|
34
|
+
</selector>
|
|
35
|
+
|
|
36
|
+
</inset>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<resources>
|
|
2
|
-
<string name="app_name">example</string>
|
|
3
|
-
</resources>
|
|
1
|
+
<resources>
|
|
2
|
+
<string name="app_name">example</string>
|
|
3
|
+
</resources>
|