Skip to content

Commit

Permalink
release 2.0.0-alpha.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Jul 13, 2023
1 parent 894d258 commit efe402c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/core/package-for-npm.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@open-native/core",
"version": "1.0.0-alpha.38",
"version": "2.0.0-alpha.0",
"description": "Open Native helps cross platform communities work better together.",
"main": "index",
"types": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@open-native/core",
"version": "1.0.0-alpha.38",
"version": "2.0.0-alpha.0",
"description": "Open Native helps cross platform communities work better together.",
"main": "index",
"types": "index.d.ts",
Expand Down
12 changes: 8 additions & 4 deletions packages/core/src/android/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,14 @@ export function getCurrentBridge() {
);
reactApplicationContext.initializeWithInstance(catalysInstance.instance);

if (Utils.android.getApplication().getReactNativeHost) {
const reactNativeHost = Utils.android
.getApplication()
.getReactNativeHost();
if (
(
Utils.android.getApplication() as com.facebook.react.ReactCustomApplication
).getReactNativeHost
) {
const reactNativeHost = (
Utils.android.getApplication() as com.facebook.react.ReactCustomApplication
).getReactNativeHost();
reactNativeHost
.getReactInstanceManager?.()
.setupReactContext?.(reactApplicationContext);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/typings/android/android.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ declare module com {
declare module com {
export module facebook {
export module react {
export class ReactCustomApplication implements com.facebook.react.ReactApplication {
export class ReactCustomApplication implements com.facebook.react.ReactApplication extends android.app.Application {
public static class: java.lang.Class<com.facebook.react.ReactCustomApplication>;
public static mReactNativeHost: com.facebook.react.ReactNativeHost;
public getReactNativeHost(): com.facebook.react.ReactNativeHost;
Expand Down

0 comments on commit efe402c

Please sign in to comment.