Giter Site home page Giter Site logo

opennative / open-native Goto Github PK

View Code? Open in Web Editor NEW
440.0 5.0 7.0 8.19 MB

Open Native brings cross-platform communities together to help them collaborate and strengthen each other through development diversity.

Home Page: https://open-native.org/

License: MIT License

Shell 0.03% JavaScript 1.10% Ruby 1.02% Starlark 0.68% Kotlin 0.52% Swift 0.16% Objective-C 28.42% TypeScript 24.44% SCSS 0.01% C++ 5.79% Objective-C++ 5.94% Java 31.24% HTML 0.01% CSS 0.65%
ios nativescript react-native android java kotlin objective-c swift

open-native's Introduction

open native logo

We all want to build apps in a way that's approachable to us, regardless of the target platform. Projects like React Native, Flutter, Capacitor, and NativeScript enable us to build native (e.g. iOS and Android) apps using alternative idioms such as JavaScript, Web tech, or platform-agnostic UI.

Each of these projects has a way to map platform APIs into their idiom (e.g. React Native has "native modules"), but none are completely mutually compatible. That is to say, a React Native native module cannot be used in a Flutter app as-is, and vice versa. This situation has led to a great amount of duplicated effort, and an isolation of communities.

Open Native is the long overdue Rosetta Stone that allows native modules to be used cross-ecosystem. It handles all the necessary autolinking, type marshalling and API-binding to allow you to choose the highest quality native module for your project, no matter what ecosystem it comes from.

For our first integration, we've enabled NativeScript to use React Native native modules the same way one would use them in React Native.

Getting Started

Head over to the installation guide to learn how you can integrate Open Native in your NativeScript app.

Links

I want to contribute

That is great news! There is a lot happening at a very fast pace in this library right now. Every little help is precious. You can contribute in many ways:

  • If you have suggestion or idea you want to discuss, open an issue.
  • Open an issue if you want to make a pull request, and tell me what you want to improve or add so we can discuss about it.

Contributors

Thanks to

  • Osei Fortune: For his expert help with the NativeScript Android runtime.
  • Eduardo Speroni: For his expert help with v8 as we take on JSI.
  • The NativeScript Community: For being awesome day after day. It's hard to name everyone who helped us and encouraged us to accomplish this.
  • React Native: We both have a background in React Native and were able to learn a lot from it. This wouldn't have been possible without React Native and the communities around it.

MIT License

open-native's People

Contributors

ammarahm-ed avatar edusperoni avatar nathanwalker avatar rigor789 avatar shirakaba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

open-native's Issues

Error implementing @react-native-firebase/messaging on Android

I am trying to implement @react-native-firebase/messaging, the required RN packages are as follows:

@react-native-firebase/app
@react-native-firebase/messaging

The error I have when building the application is the following:

:react-native-firebase_app package.json found at C:\workspaces\abll\abll\abll-monorepo\apps\abll-app\node_modules\@react-native-firebase\app\package.json
:react-native-firebase_app:firebase.bom using default value: 31.0.2
:react-native-firebase_app:play.play-services-auth using default value: 20.3.0
:react-native-firebase_app package.json found at C:\workspaces\abll\abll\abll-monorepo\apps\abll-app\node_modules\@react-native-firebase\app\package.json
:react-native-firebase_app:version set from package.json: 16.4.3 (16,4,3 - 16004003)
:react-native-firebase_app:android.compileSdk using default value: 33
:react-native-firebase_app:android.targetSdk using default value: 33
:react-native-firebase_app:android.minSdk using default value: 19
:react-native-firebase_app:reactNativeAndroidDir C:\workspaces\abll\abll\abll-monorepo\apps\abll-app\node_modules\react-native\android
:react-native-firebase_messaging package.json found at C:\workspaces\abll\abll\abll-monorepo\apps\abll-app\node_modules\@react-native-firebase\messaging\package.json
:react-native-firebase_app package.json found at C:\workspaces\abll\abll\abll-monorepo\apps\abll-app\node_modules\@react-native-firebase\app\package.json
:react-native-firebase_messaging:firebase.bom using default value: 31.0.2
:react-native-firebase_messaging package.json found at C:\workspaces\abll\abll\abll-monorepo\apps\abll-app\node_modules\@react-native-firebase\messaging\package.json
:react-native-firebase_messaging:version set from package.json: 16.4.3 (16,4,3 - 16004003)
:react-native-firebase_messaging:android.compileSdk using default value: 33
:react-native-firebase_messaging:android.targetSdk using default value: 33
:react-native-firebase_messaging:android.minSdk using default value: 19
:react-native-firebase_messaging:reactNativeAndroidDir C:\workspaces\abll\abll\abll-monorepo\apps\abll-app\node_modules\react-native\android

Build file 'C:\workspaces\abll\abll\abll-monorepo\apps\abll-app\platforms\android\app\build.gradle' line: 575
A problem occurred configuring project ':app'.
Could not find any matches for com.facebook.react:react-native:+ as no versions of com.facebook.react:react-native are available.
Required by:
    project :app > project :react-native-firebase_app
    project :app > project :react-native-firebase_messaging

If you need anything else let me know

react-native-app-auth errors

/Volumes/Development/Work/.../node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.h:11:9: error: expected selector for
      Objective-C method
- (void);
~~~~~~~~^
/Volumes/Development/Work/.../node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.h:13:9: error: expected selector for
      Objective-C method
- (void);
~~~~~~~~^
/Volumes/Development/Work/.../node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.h:15:9: error: expected selector for
      Objective-C method
- (void);
~~~~~~~~^
/Volumes/Development/Work/.../node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.h:17:91: error: expected selector for
      Objective-C method
- (void)/**Create a OIDServiceConfiguration from passed serviceConfiguration dictionary*/ - (OIDServiceConfiguration*) createServiceConfiguration:(NSDictionary*;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Volumes/Development/Work/.../node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.m:5:5: error: expected ';' after method
      prototype
@end
    ^
    ;
/Volumes/Development/Work/.../node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.m:5:5: error: missing '@end'
@end
    ^
In file included from /Volumes/Development/Work/.../node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.m:1:
/Volumes/Development/Work/.../node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.h:8:1: note: category started here
@interface RNAppAuth (TNSRNAppAuth)
^
3 warnings and 6 errors generated.

(Android) RCTNativeAppEventEmitter not found

I am trying to use this plugin and I have this error. I imagine that import was missing. https://github.com/revtel/react-native-nfc-manager

/Users/vallemar/workspaces/myAwesomeApp/node_modules/react-native-nfc-manager/android/src/main/java/community/revteltech/nfc/NfcManager.java:17: error: cannot find symbol
import com.facebook.react.modules.core.RCTNativeAppEventEmitter;
                                      ^
  symbol:   class RCTNativeAppEventEmitter
  location: package com.facebook.react.modules.core
/Users/vallemar/workspaces/myAwesomeApp/node_modules/react-native-nfc-manager/android/src/main/java/community/revteltech/nfc/NfcManager.java:1249: error: cannot find symbol
                .getJSModule(RCTNativeAppEventEmitter.class)
                             ^
  symbol:   class RCTNativeAppEventEmitter
  location: class NfcManager
Note: /Users/vallemar/workspaces/myAwesomeApp/node_modules/react-native-nfc-manager/android/src/main/java/community/revteltech/nfc/NfcManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

Execution failed for task ':react-native-nfc-manager:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.

EDIT, it doesn't work on ios either. here I have this error:

1 warning generated.
In file included from /Users/vallemar/workspaces/myAwesomeApp/node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.m:1:
/Users/vallemar/workspaces/myAwesomeApp/node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.h:5:9: fatal error: 'react_native_nfc_manager/NfcManager+Felica.h' file not found
#import <react_native_nfc_manager/NfcManager+Felica.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/vallemar/workspaces/myAwesomeApp/node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.h:5:9: note: did not find header 'NfcManager+Felica.h' in framework 'react_native_nfc_manager' (loaded from
      '/Users/vallemar/workspaces/myAwesomeApp/platforms/ios/build/Debug-iphonesimulator/react-native-nfc-manager')

Dark mode Docs issue, iOS, install-module page

When the install-module page renders, especially if you have dark mode on, the text is dark, and so is the background of the code sample. This specifically happened to me with iOS. Every browser. Because they are all Safari. See below.
image

.../Components/TextInput/TextInputState Types do not exist (likely other Base components too)

As per title, @open-native/core/Libraries/Components/TextInput/TextInputState do not seem to exist (likely other Base components too).

This is reproducible by installing @open-native as per the docs, and adding @stripe/stripe-react-native

Details / logs spoiler

ERROR in ./node_modules/@stripe/stripe-react-native/lib/module/helpers.js 1:344-413
Module not found: Error: Can't resolve 'react-native/Libraries/Components/TextInput/TextInputState' in '/Users/mac-user/code-temp/sample-app-vue3/node_modules/@stripe/stripe-react-native/lib/module'
resolve 'react-native/Libraries/Components/TextInput/TextInputState' in '/Users/mac-user/code-temp/sample-app-vue3/node_modules/@stripe/stripe-react-native/lib/module'
  Parsed request is a module
  using description file: /Users/mac-user/code-temp/sample-app-vue3/node_modules/@stripe/stripe-react-native/package.json (relative path: ./lib/module)
    aliased with mapping 'react-native': '@open-native/core' to '@open-native/core/Libraries/Components/TextInput/TextInputState'
      Parsed request is a module
      using description file: /Users/mac-user/code-temp/sample-app-vue3/node_modules/@stripe/stripe-react-native/package.json (relative path: ./lib/module)
        resolve as module
          looking for modules in /Users/mac-user/code-temp/sample-app-vue3/node_modules
            existing directory /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core
              using description file: /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/package.json (relative path: .)
                using description file: /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/package.json (relative path: ./Libraries/Components/TextInput/TextInputState)
                  no extension
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState doesn't exist
                  .ios.vue
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.vue doesn't exist
                  .vue
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.vue doesn't exist
                  .ios.ts
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.ts doesn't exist
                  .ts
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ts doesn't exist
                  .ios.js
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.js doesn't exist
                  .js
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.js doesn't exist
                  .ios.mjs
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.mjs doesn't exist
                  .mjs
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.mjs doesn't exist
                  .ios.css
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.css doesn't exist
                  .css
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.css doesn't exist
                  .ios.scss
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.scss doesn't exist
                  .scss
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.scss doesn't exist
                  .ios.json
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.json doesn't exist
                  .json
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.json doesn't exist
                  as directory
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState doesn't exist
          /Users/mac-user/code-temp/sample-app-vue3/node_modules/@stripe/stripe-react-native/lib/module/node_modules doesn't exist or is not a directory
          /Users/mac-user/code-temp/sample-app-vue3/node_modules/@stripe/stripe-react-native/lib/node_modules doesn't exist or is not a directory
          /Users/mac-user/code-temp/sample-app-vue3/node_modules/@stripe/stripe-react-native/node_modules doesn't exist or is not a directory
          /Users/mac-user/code-temp/sample-app-vue3/node_modules/@stripe/node_modules doesn't exist or is not a directory
          /Users/mac-user/code-temp/sample-app-vue3/node_modules/node_modules doesn't exist or is not a directory
          looking for modules in /Users/mac-user/code-temp/sample-app-vue3/node_modules
            existing directory /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core
              using description file: /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/package.json (relative path: .)
                using description file: /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/package.json (relative path: ./Libraries/Components/TextInput/TextInputState)
                  no extension
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState doesn't exist
                  .ios.vue
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.vue doesn't exist
                  .vue
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.vue doesn't exist
                  .ios.ts
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.ts doesn't exist
                  .ts
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ts doesn't exist
                  .ios.js
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.js doesn't exist
                  .js
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.js doesn't exist
                  .ios.mjs
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.mjs doesn't exist
                  .mjs
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.mjs doesn't exist
                  .ios.css
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.css doesn't exist
                  .css
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.css doesn't exist
                  .ios.scss
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.scss doesn't exist
                  .scss
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.scss doesn't exist
                  .ios.json
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.ios.json doesn't exist
                  .json
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState.json doesn't exist
                  as directory
                    /Users/mac-user/code-temp/sample-app-vue3/node_modules/@open-native/core/Libraries/Components/TextInput/TextInputState doesn't exist
          /Users/mac-user/code-temp/node_modules doesn't exist or is not a directory
          /Users/mac-user/node_modules doesn't exist or is not a directory
          /Users/node_modules doesn't exist or is not a directory
          /node_modules doesn't exist or is not a directory
 @ ./node_modules/@stripe/stripe-react-native/lib/module/functions.js 1:1202-1222
 @ ./node_modules/@stripe/stripe-react-native/lib/module/index.js 1:3140-3162
 @ ./node_modules/@nativescript/webpack/dist/loaders/nativescript-worker-loader/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-3.use[0]!./node_modules/nativescript-vue/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/CheckoutPage.vue?vue&type=script&setup=true&lang=ts 20:0-96 74:22-32 79:22-38 103:55-74
 @ ./src/components/CheckoutPage.vue?vue&type=script&setup=true&lang=ts 1:0-327 1:0-327 1:328-644 1:328-644
 @ ./src/components/CheckoutPage.vue 2:0-74 3:0-69 3:0-69 6:49-55
 @ ./node_modules/@nativescript/webpack/dist/loaders/nativescript-worker-loader/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-3.use[0]!./node_modules/nativescript-vue/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/AddressPage.vue?vue&type=script&setup=true&lang=ts 15:0-46 58:32-44 95:28-40
 @ ./src/components/AddressPage.vue?vue&type=script&setup=true&lang=ts 1:0-326 1:0-326 1:327-642 1:327-642
 @ ./src/components/AddressPage.vue 2:0-73 3:0-68 3:0-68 8:49-55
 @ ./node_modules/@nativescript/webpack/dist/loaders/nativescript-worker-loader/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-3.use[0]!./node_modules/nativescript-vue/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/pages/Home.vue?vue&type=script&lang=ts&setup=true 9:0-55 58:23-34
 @ ./src/pages/Home.vue?vue&type=script&lang=ts&setup=true 1:0-319 1:0-319 1:320-628 1:320-628
 @ ./src/pages/Home.vue 2:0-66 3:0-61 3:0-61 6:49-55
 @ ./node_modules/@nativescript/webpack/dist/loaders/nativescript-worker-loader/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-3.use[0]!./node_modules/nativescript-vue/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/pages/Auth.vue?vue&type=script&lang=ts&setup=true 7:0-30 20:28-32 29:36-40 41:181-185
 @ ./src/pages/Auth.vue?vue&type=script&lang=ts&setup=true 1:0-319 1:0-319 1:320-628 1:320-628
 @ ./src/pages/Auth.vue 2:0-66 3:0-61 3:0-61 8:49-55
 @ ./src/app.ts 5:0-36 10:22-26

webpack 5.89.0 compiled with 1 error in 3796 ms
Webpack compilation complete.
Executing webpack failed with exit code 1.

Also, once @stripe/stripe-react-native had been manually added to the list of entries in webpack's babel config, the following additional issue has been found:

Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /Users/mac-user/code-temp/sample-app-vue3/node_modules/@stripe/stripe-react-native/package.json: Missing semicolon. (2:8)
Full details/log for 2nd issue spoiler

ERROR in ./node_modules/@stripe/stripe-react-native/package.json
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /Users/mac-user/code-temp/sample-app-vue3/node_modules/@stripe/stripe-react-native/package.json: Missing semicolon. (2:8)

  1 | {
> 2 |   "name": "@stripe/stripe-react-native",
    |         ^
  3 |   "version": "0.35.0",
  4 |   "author": "Stripe",
  5 |   "description": "Stripe SDK for React Native",
    at constructor (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:356:19)
    at FlowParserMixin.raise (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:3223:19)
    at FlowParserMixin.semicolon (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:3580:10)
    at FlowParserMixin.parseExpressionStatement (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:13158:10)
    at FlowParserMixin.parseExpressionStatement (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:5110:18)
    at FlowParserMixin.parseStatementContent (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:12741:19)
    at FlowParserMixin.parseStatementLike (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:12588:17)
    at FlowParserMixin.parseStatementLike (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:5088:24)
    at FlowParserMixin.parseStatementListItem (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:12568:17)
    at FlowParserMixin.parseBlockOrModuleBlockBody (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:13189:61)
    at FlowParserMixin.parseBlockBody (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:13182:10)
    at FlowParserMixin.parseBlock (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:13170:10)
    at FlowParserMixin.parseStatementContent (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:12690:21)
    at FlowParserMixin.parseStatementLike (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:12588:17)
    at FlowParserMixin.parseStatementLike (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:5088:24)
    at FlowParserMixin.parseModuleItem (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:12565:17)
    at FlowParserMixin.parseBlockOrModuleBlockBody (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:13189:36)
    at FlowParserMixin.parseBlockBody (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:13182:10)
    at FlowParserMixin.parseProgram (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:12464:10)
    at FlowParserMixin.parseTopLevel (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:12454:25)
    at FlowParserMixin.parseTopLevel (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:5893:28)
    at FlowParserMixin.parse (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:14376:10)
    at parse (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/parser/lib/index.js:14417:38)
    at parser (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/core/lib/parser/index.js:41:34)
    at parser.next (<anonymous>)
    at normalizeFile (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/core/lib/transformation/normalize-file.js:64:37)
    at normalizeFile.next (<anonymous>)
    at run (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/core/lib/transformation/index.js:21:50)
    at run.next (<anonymous>)
    at transform (/Users/mac-user/code-temp/sample-app-vue3/node_modules/@babel/core/lib/transform.js:22:33)
    at transform.next (<anonymous>)
    at step (/Users/mac-user/code-temp/sample-app-vue3/node_modules/gensync/index.js:261:32)
    at /Users/mac-user/code-temp/sample-app-vue3/node_modules/gensync/index.js:273:13
    at async.call.result.err.err (/Users/mac-user/code-temp/sample-app-vue3/node_modules/gensync/index.js:223:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
 @ ./node_modules/@stripe/stripe-react-native/lib/module/components/StripeProvider.js 1:501-533
 @ ./node_modules/@stripe/stripe-react-native/lib/module/index.js 1:2683-2721
 @ ./node_modules/@nativescript/webpack/dist/loaders/nativescript-worker-loader/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-3.use[0]!./node_modules/nativescript-vue/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/CheckoutPage.vue?vue&type=script&setup=true&lang=ts 20:0-96 74:22-32 79:22-38 103:55-74
 @ ./src/components/CheckoutPage.vue?vue&type=script&setup=true&lang=ts 1:0-327 1:0-327 1:328-644 1:328-644
 @ ./src/components/CheckoutPage.vue 2:0-74 3:0-69 3:0-69 6:49-55
 @ ./node_modules/@nativescript/webpack/dist/loaders/nativescript-worker-loader/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-3.use[0]!./node_modules/nativescript-vue/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/AddressPage.vue?vue&type=script&setup=true&lang=ts 15:0-46 58:32-44 95:28-40
 @ ./src/components/AddressPage.vue?vue&type=script&setup=true&lang=ts 1:0-326 1:0-326 1:327-642 1:327-642
 @ ./src/components/AddressPage.vue 2:0-73 3:0-68 3:0-68 8:49-55
 @ ./node_modules/@nativescript/webpack/dist/loaders/nativescript-worker-loader/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-3.use[0]!./node_modules/nativescript-vue/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/pages/Home.vue?vue&type=script&lang=ts&setup=true 9:0-55 58:23-34
 @ ./src/pages/Home.vue?vue&type=script&lang=ts&setup=true 1:0-319 1:0-319 1:320-628 1:320-628
 @ ./src/pages/Home.vue 2:0-66 3:0-61 3:0-61 6:49-55
 @ ./node_modules/@nativescript/webpack/dist/loaders/nativescript-worker-loader/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-3.use[0]!./node_modules/nativescript-vue/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/pages/Auth.vue?vue&type=script&lang=ts&setup=true 7:0-30 20:28-32 29:36-40 41:181-185
 @ ./src/pages/Auth.vue?vue&type=script&lang=ts&setup=true 1:0-319 1:0-319 1:320-628 1:320-628
 @ ./src/pages/Auth.vue 2:0-66 3:0-61 3:0-61 8:49-55
 @ ./src/app.ts 5:0-36 10:22-26

webpack 5.89.0 compiled with 2 errors in 4358 ms
Webpack compilation complete.
Executing webpack failed with exit code 1.

For understanding, this is in a NativeScript app running on Vue 3

Any suggestions will be highly appreciated!

Component Support?

Does this support the ability to add React Native components to a Nativescript Angular application? Examples would be React Native core components or React Native Paper.

No signature of method: before_plugins_f31qds46uanbzcp13ta91b9jm.ext()

Hello, i followed your guide but when i launch the project i receive:

`before-plugins.gradle' line: 1
A problem occurred evaluating script.

No signature of method: before_plugins_f31qds46uanbzcp13ta91b9jm.ext() is applicable for argument types: (before_plugins_f31qds46uanbzcp13ta91b9jm$_run_closure1) values: [before_plugins_f31qds46uanbzcp13ta91b9jm$_run_closure1@59cc70c9]

Possible solutions: exec(groovy.lang.Closure), exec(org.gradle.api.Action), wait(), run(), run(), any()

�[33mUnable to apply changes on device: 2c9edbb29804. Error is: Command gradlew.bat failed with exit code 1.
�[39m
[NSDebugAdapter] The tns command finished its execution with code 0.`

[bug] Unable to marshal native value to JS

Using react-native-auth0 2.17.0 as example case, appears NSError is not properly handled.
Might be better to use @nativescript/core 8.4+ Utils.dataDeserialize(data) instead of custom handling there. The throw is likely unnecessary on this line - rather can just return the data object "as-is" which is what core Utils does in this case.

  NativeScript encountered a fatal error: Uncaught Error: Unable to marshal native value to JS: NSError:Error Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=2 "Cannot start ASWebAuthenticationSession without providing presentation context. Set presentationContextProvider before calling -start." UserInfo={NSDebugDescription=Cannot start ASWebAuthenticationSession without providing presentation context. Set presentationContextProvider before calling -start.}
  at
  toJSValue(file: src/webpack:/node_modules/@open-native/core/src/ios/converter.js:325:10)
  at toJSValue(file: src/webpack:/node_modules/@open-native/core/src/ios/converter.js:305:23)

Capacitor compat for React Native

Hey, I'm the creator of Capgo, a live update system for Capacitor,
I would like to address live update also in RN, so I have placed a bounty into my project to explore if open-native and be the graal to have one codebase to serve both.

If any of you in this community want to help, I would like to make it happen, by probably create in open-native a capacitor bridge
Cap-go/capacitor-updater#266

react_native_rsa_native/RNRSA.h' file not found

Library

npm install --save @open-native/core react-native-rsa-native

Error

In file included from /Volumes/Development/Work/.../node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.m:1:
/Volumes/Development/Work/.../node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.h:4:9: fatal error: 
      'react_native_rsa_native/RNRSA.h' file not found
#import <react_native_rsa_native/RNRSA.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Development/Work/.../node_modules/@open-native/core/platforms/ios/lib_community/RNPodspecs.h:4:9: note: did not find header 'RNRSA.h' in
      framework 'react_native_rsa_native' (loaded from '/Volumes/Development/Work/.../platforms/ios/build/Debug-iphonesimulator/react-native-rsa-native')
1 error generated.

react-native-quick-crypto not working

I am testing react-native-quick-crypto and react-native-quick-base64 but it is not working on ios and android

I have been testing it on android and ios, but it does not work on any

In IOS I have this error:

[!] Unable to find a specification for `React-callinvoker` depended upon by `react-native-quick-crypto`

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

In android I have this error:

Build file '/xxxx/node_modules/react-native-quick-crypto/android/build.gradle' line: 51
A problem occurred evaluating project ':react-native-quick-crypto'.
/xxxx/node_modules/react-native/ReactAndroid/gradle.properties (No such file or directory)

react-native-tcp-socket error NativeModules.TcpSockets

When I try to use the react-native-tcp-socket plugin I get an exception when making the connection:

System.err: An uncaught Exception occurred on "main" thread.
  System.err: Calling js method onClick failed
  System.err: TypeError: Cannot read property 'connect' of undefined
  System.err:
  System.err: StackTrace:
  System.err: connect(file: app\webpack:\app-ns-rn\node_modules\react-native-tcp-socket\src\Socket.js:168:16)
  System.err:   at createConnection(file: app\webpack:\app-ns-rn\node_modules\react-native-tcp-socket\src\index.js:50:21)

It seems that TcpSockets is undefined in this line: https://github.com/Rapsssito/react-native-tcp-socket/blob/master/src/Socket.js#L167 and this import comes from here https://github.com/Rapsssito/react-native-tcp-socket/blob/master/src/Socket.js#L6 and from react-native

Issue with react-native-app-auth

As discussed on Discord I'm having issues with react-native-app-auth.
After setting up open-native and adding react-native-app-auth, I get the following error on Android when calling authorize():

  JS: CONSOLE LOG: Error: �����
  JS:     at file: src/webpack:/ns-ng-open-native/node_modules/@open-native/core/src/android/converter.js:278:0
  JS:     at new ZoneAwarePromise (file: src/webpack:/ns-ng-open-native/node_modules/zone.js/fesm2015/zone.js:1411:0)
  JS:     at promisify (file: src/webpack:/ns-ng-open-native/node_modules/@open-native/core/src/android/converter.js:276:0)
  JS:     at <computed> [as authorize] (file: src/webpack:/ns-ng-open-native/node_modules/@open-native/core/src/android/nativemodules.js:87:36)
  JS:     at authorize (file: src/webpack:/ns-ng-open-native/node_modules/react-native-app-auth/index.js:246:19)
  JS:     at ItemsComponent.doAuthorize (file: src/webpack:/ns-ng-open-native/src/app/item/items.component.ts:14:17)
  JS:     at ItemsComponent_Template_Button_tap_2_listener (file: src/webpack:/ns-ng-open-native/src/app/item/items.component.ts:45:88)
  JS:     at executeListenerWithErrorHandling (file: src/webpack:/ns-ng-open-native/node_modules/@angular/core/fesm2015/core.mjs:13956:0)
  JS:     at Object.wrapListenerIn_markDirtyAndPreventDefault (file:///data/data/org.nativescript.nsngopennative/files/app/...

On iOS I get this this error:

  ***** Fatal JavaScript exception - application has been terminated. *****
  NativeScript encountered a fatal error: Uncaught Error: Unexpected type 'other' at index 10 - the autolinker must have failed to parse the native module.
  at
  toNativeArguments(file: src/webpack:/ns-ng-open-native/node_modules/@open-native/core/src/ios/converter.js:45:22)
  at (file: src/webpack:/ns-ng-open-native/node_modules/@open-native/core/src/ios/converter.js:206:42)

The log output when starting the app looks OK:

[@open-native/core/hooks/before-prepare.js] Autolinking React Native ios native modules...
[@open-native/core/hooks/prepare-ios.js] Unable to extract any methods from RCTBridgeModule named "EventDispatcher".
[@open-native/core/hooks/prepare-ios.js]: Writing RNPodspecs.h
[@open-native/core/hooks/prepare-ios.js]: Writing Podfile
[@open-native/core/hooks/prepare-ios.js]: Writing React-Native-Podspecs.podspec
[@open-native/core/hooks/prepare-ios.js]: Writing modulemap.json
[@open-native/core/hooks/before-prepare.js] Autolinked @open-native/core!
[@open-native/core/hooks/before-prepare.js] Autolinked react-native-app-auth!
[@open-native/core/hooks/before-prepare.js] ... Finished autolinking React Native ios native modules.

Example repo: https://github.com/fpaaske/open-native-issue-23

Fatal error...new NativeEventEmitter() requires a non-null argument

Description

This error seems to throw when building from a clean environment. After the first build and run, this error expresses itself along with the app crashing upon startup. After exiting the run and running again, the error does not manifest, and the app startup as expected. See the steps to reproduce below.

Versions

"@open-native/core": "1.0.0-alpha.9",
"react-native-auth0": "2.13.3",

Error

Restarting application on device F3C7587C-166D-48BA-92F0-085892E2FC86...
  ***** Fatal JavaScript exception - application has been terminated. *****
  NativeScript encountered a fatal error: Uncaught Error: `new NativeEventEmitter()` requires a non-null argument.
  at
  NativeEventEmitter(file: app/webpack:/test-app/node_modules/@open-native/core/Libraries/EventEmitter/NativeEventEmitter.js:25:0)
  at _Linking(file: app/webpack:/test-app/node_modules/@open-native/core/Libraries/Linking/Linking.js:23:0)
  at ./node_modules/@open-native/core/Libraries/Linking/Linking.js(file: app/webpack:/test-app/node_modules/@open-native/core/Libraries/Linking/Linking.js:112:7)
  at __webpack_require__(file: app/webpack:/test-app/webpack/bootstrap:24:0)
  at fn(file: app/webpack:/test-app/webpack/runtime/hot module replacement:62:0)
  at ./node_modules/@open-native/core/index.ios.js(file:///app/vendor.js:49208:84)
  at __webpack_require__(file: app/webpack:/test-app/webpack/bootstrap:24:0)
  at fn(file: app/webpack:/test-app/webpack/runtime/hot module replacement:62:0)
  at ./node_modules/react-native-auth0/src/webauth/agent.js(file: app/webpack:/test-app/node_modules/react-native-auth0/src/webauth/agent.js:1:0)
  at __webpack_require__(file: app/webpack:/test-app/webpack/bootstrap:24:0)
  at fn(file: app/webpack:/test-app/webpack/runtime/hot module replacement:62:0)
  at ./node_modules/react-native-auth0/src/webauth/index.js(file: app/webpack:/test-app/node_modules/react-native-auth0/src/webauth/index.js:1:0)
  at __webpack_require__(file: app/webpack:/test-app/webpack/bootstrap:24:0)
  at fn(file: app/webpack:/test-app/webpack/runtime/hot module replacement:62:0)
  at ./node_modules/react-native-auth0/index.js(file:///app/vendor.js:<…>

Steps to reproduce

  1. ns clean
  2. ns run ios
  3. See above error
  4. ctrl-c to exit
  5. ns run ios
  6. App runs without error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.