improve plugin implementation: update method signatures, consolidate event emitter, and regenerate dependencies
This commit is contained in:
parent
ad9b15801b
commit
124380e1fc
@ -71,7 +71,7 @@ dependencies {
|
||||
implementation "com.google.code.gson:gson:2.10.1"
|
||||
|
||||
implementation("com.facebook.react:react-android")
|
||||
def product_catalog_version = "15.1.1"
|
||||
def product_catalog_version = "15.3.0"
|
||||
|
||||
implementation ("de.webid-solutions:android_meta_plugin:$product_catalog_version") {
|
||||
changing = true
|
||||
|
||||
@ -7,9 +7,12 @@ import com.facebook.react.uimanager.ViewManager
|
||||
|
||||
|
||||
class WebIdMetaPluginPackage : ReactPackage {
|
||||
override fun createNativeModules(reactContext: ReactApplicationContext)
|
||||
= listOf(WebIdMetaPluginModule(reactContext))
|
||||
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
|
||||
return listOf(WebIdMetaPluginModule(reactContext))
|
||||
}
|
||||
|
||||
override fun createViewManagers(reactContext: ReactApplicationContext)
|
||||
= emptyList<ViewManager<*, *>>()
|
||||
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
||||
return emptyList()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ import com.facebook.react.ReactActivity
|
||||
import com.facebook.react.ReactActivityDelegate
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
|
||||
import com.facebook.react.defaults.DefaultReactActivityDelegate
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
|
||||
|
||||
class MainActivity : ReactActivity() {
|
||||
|
||||
@ -19,5 +18,5 @@ class MainActivity : ReactActivity() {
|
||||
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
|
||||
*/
|
||||
override fun createReactActivityDelegate(): ReactActivityDelegate =
|
||||
DefaultReactActivityDelegate(this, mainComponentName, false)
|
||||
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
|
||||
}
|
||||
|
||||
@ -11,9 +11,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "19.2.3",
|
||||
"react-dom": "19.2.3",
|
||||
"react-native": "0.84.0",
|
||||
"react-native-web-id-meta-plugin": "file:.."
|
||||
"react-native-bouncy-checkbox": "^4.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.0",
|
||||
|
||||
@ -57,12 +57,18 @@ export default function App() {
|
||||
});
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
paddingHorizontal: 16,
|
||||
paddingBottom: 16,
|
||||
paddingTop: 64,
|
||||
},
|
||||
input: {
|
||||
height: 40,
|
||||
margin: 12,
|
||||
borderWidth: 1,
|
||||
padding: 10,
|
||||
},
|
||||
btn: { marginVertical: 8 },
|
||||
});
|
||||
|
||||
const showAlert = (title: string, message: string) => {
|
||||
@ -122,7 +128,7 @@ export default function App() {
|
||||
};
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<SafeAreaView style={styles.container}>
|
||||
<StatusBar />
|
||||
<View>
|
||||
<View>
|
||||
@ -164,15 +170,21 @@ export default function App() {
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<Button title="Create Meta Plugin" onPress={onCreateMetaPlugin} />
|
||||
<View style={styles.btn}>
|
||||
<Button title="Create Meta Plugin" onPress={onCreateMetaPlugin} />
|
||||
</View>
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
onChangeText={onChangeActionId}
|
||||
value={actionId}
|
||||
placeholder="Action Id"
|
||||
/>
|
||||
<Button title="Verify Action Id" onPress={onVerifyActionId} />
|
||||
<Button title="Start" onPress={onStart} />
|
||||
<View style={styles.btn}>
|
||||
<Button title="Verify Action Id" onPress={onVerifyActionId} />
|
||||
</View>
|
||||
<View style={styles.btn}>
|
||||
<Button title="Start" onPress={onStart} />
|
||||
</View>
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
);
|
||||
|
||||
@ -135,7 +135,9 @@
|
||||
"@react-native",
|
||||
"prettier"
|
||||
],
|
||||
"plugins": ["prettier"],
|
||||
"plugins": [
|
||||
"prettier"
|
||||
],
|
||||
"rules": {
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"prettier/prettier": [
|
||||
|
||||
@ -17,9 +17,7 @@ const WebIdMetaPlugin = NativeModules.WebIdMetaPlugin
|
||||
}
|
||||
);
|
||||
|
||||
export const webIdEventEmitter = new NativeEventEmitter(
|
||||
Platform.OS === 'android' ? undefined : WebIdMetaPlugin
|
||||
);
|
||||
export const webIdEventEmitter = new NativeEventEmitter(WebIdMetaPlugin);
|
||||
|
||||
export function createMetaPlugin(
|
||||
uri: string,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user