GithubHelp home page GithubHelp logo

jeanlebrument / react-native-fabric-digits Goto Github PK

View Code? Open in Web Editor NEW
109.0 109.0 53.0 29.17 MB

Fabric Digits wrapper for React-Native

JavaScript 6.47% Java 8.41% Objective-C 84.00% C 0.34% Ruby 0.78%

react-native-fabric-digits's People

Contributors

ansgarm avatar apinrdw avatar avishayil avatar brianjd avatar bryaneaton13 avatar dhrrgn avatar emilscherdin avatar farruxx avatar jerolimov avatar jimmyhurrah avatar jpdriver avatar metinseylan avatar muneebs avatar polbins avatar radko93 avatar rgovindji avatar thessem 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

react-native-fabric-digits's Issues

Cannot find symbol 'withEmail()'

When running react-native run-android, I get the error message below.

:react-native-fabric-digits:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/var/www/tipper/app/node_modules/react-native-fabric-digits/android/src/main/java/com/proxima/RCTDigits/DigitsManager.java:71: error: cannot find symbol
          digitsAuthConfigBuilder.withEmail();
                                 ^
  symbol:   method withEmail()
  location: variable digitsAuthConfigBuilder of type Builder

react-native-cli: 1.0.0
react-native: 0.34.1

Does anyone know what causes this?

Error code: 'EUNSPECIFIED'

After getting the code and entering it, this error is raised. And log message says that it failed WITHOUT EXCEPTION, with error code from the title. This causes 'response' prop to stay empty object, and 'logged' prop remains false.

This is full message:
'[Digits] Login Error', { [Error: Authentification failed without exception.] framesToPop: 1, code: 'EUNSPECIFIED' }

'[Digits] Login Error', { [TypeError: undefined is not an object (evaluating 'this.refs.DigitsLogoutButton.getSessionDetails')]

Any help is appreciated!
Thanks!

[Cancel] Crash on cancel during process

Hey Jean,

I'm having an issue with your component: When trying to cancel during the process, I'm prompted with this :

slack for ios upload

Any idea on how to fix it?

Thanks a lot

Is this a typo in README?

In android/app/build.gradle

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.facebook.react:react-native:0.14.+'
compile project(':react-native-digits') < == Add this
}


Should that be 'react-native-fabric-digits' ?

[Digits] Login Error on both iOS & Android

Followed all instructions, got to the nice login screen, got the SMS verification and after that, on Simulator it gives me the following screen, while on device it's just doesn't do anything.

Error

Both iOS and Android are the same.

Problem to install/build

I'm using react-native 0.25.1 and linked using rnpm (everything seems correct in the ios version, the .xcodeproj were added and the lib*.a linked --> I suggest to add this option to the README also).

The error log from XCode:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_DGTAppearance", referenced from:
      objc-class-ref in libRCTDigitsManager.a(RCTDigitsManager.o)
  "_OBJC_CLASS_$_DGTAuthenticationConfiguration", referenced from:
      objc-class-ref in libRCTDigitsManager.a(RCTDigitsManager.o)
  "_OBJC_CLASS_$_DGTOAuthSigning", referenced from:
      objc-class-ref in libRCTDigitsManager.a(RCTDigitsManager.o)
  "_OBJC_CLASS_$_Digits", referenced from:
      objc-class-ref in libRCTDigitsManager.a(RCTDigitsManager.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Just one more conceptual question. The android instructions asks for an API KEY and SECRET, but not the ios. How is that?

could not invoke digitsmanager.launchauthentication

Hi, I'm using the latest react-native-fabric-digits with react native .31. It works great on IOS but it's crashing on android. I've followed all of the installation docs repeatedly and cannot solve it. The emulator error I get is "could not invoke digitsmanager.launchauthentication". Android studio shows this:

08-23 17:35:59.739 6321-6754/com.thejump E/unknown:React: Exception in native call from JS
java.lang.RuntimeException: Could not invoke DigitsManager.launchAuthentication
at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:332)
at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:139)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:148)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:319)
at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:139) 
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 
at android.os.Handler.handleCallback(Handler.java:739) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) 
at android.os.Looper.loop(Looper.java:148) 
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) 
at java.lang.Thread.run(Thread.java:818) 
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/digits/sdk/android/DigitsAuthConfig$Builder;
at com.proxima.RCTDigits.DigitsManager.launchAuthentication(DigitsManager.java:71)
at java.lang.reflect.Method.invoke(Native Method) 
at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:319) 
at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:139) 
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 
at android.os.Handler.handleCallback(Handler.java:739) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) 
at android.os.Looper.loop(Looper.java:148) 
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) 
at java.lang.Thread.run(Thread.java:818) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.digits.sdk.android.DigitsAuthConfig$Builder" on path: DexPathList[[dex file "/data/data/com.thejump/files/instant-run/dex/slice-support-annotations-23.3.0_3681a8e99e5a9a555c1e885cb5b9edb24ea66b75-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-retrofit-mock-2.0.2_c3f2a6c7ffef5e1b4ad0b3b9bf83aff01fca3fea-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-retrofit-2.0.2_a02b98610d602b1130e7f010214dc1cbf14adf32-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-okio-1.9.0_4b0d89b3c968c5450341b2330eb3c1aecc812cc0-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-okhttp-ws-3.4.1_5f1e6dd4785eda38c1ffd1cb90602d013f90079f-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-okhttp-urlconnection-3.4.1_26bef851f10160960421d1a1a2551fa514f3f12c-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-okhttp-3.4.1_17390d9991ea95a979457c10502ff2139d9fbe68-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-library-2.4.0_53da2934dc05d965fbe5388a792416c0686f06de-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-jsr305-3.0.0_a927c9dba608f0aaf26cd01b0deccfc7887a34ee-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-jackson-core-2.2.3_1273d14ef5f4566a82d137d9dc36e6985a7e3605-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-io.fabric.sdk.android-fabric-1.3.13_b3f7b24059e88ad34ce0f97b55df098e12467e88-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-internal_impl-23.3.0_fd48f3805a2504473e6930350ae89656c76ccb08-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-infer-annotations-1.5_e77ebc21d8d665ddcc8b367707f3e8738d3ec621-classes.dex", dex file "/data/data/com.thejump/files/instant-run/dex/slice-gson-2.6.1_efa77e4d525d6b4e68c05c34c8ce607736f7300c-classes.dex", dex file "/data/data/c

Please help me figure this out. Could it have anything to do with the fact that my app is using digits 2.0.0 and react-native-fabric-digits is using 1.9.2?
thanks
Jeremey

Installation README refers to other repo

In the README, it's referred to other repo: npm install proximaio/react-native-fabric-digits --save

Is it right (may its some stable version)? Or should I npm install JeanLebrument/react-native-fabric-digits --save (as I did)?

How can we add app logo into fabric

After integrating fabric into my application, it shows the name of application at Auth screen, I want to add the logo of application as well besides name.

There is a way to do the same as mentioned in https://docs.fabric.io/android/digits/theming.html#customize-the-theme

But, when i added dgts__logoDrawable as

<style name="CustomDigitsTheme" parent="android:Theme.Material.Light">
	 <item name="dgts__logoDrawable">@drawable/ic_launcher</item>
</style>

it doesn't seems to work.

How can i achieve the same??

Can't attach ref

No matter whether i'm using string refs (as in the example) or callback refs (preferred way these days), can't seem to get a ref for the DigitsLoginButton component at all. This prevents me from getting session details. Any help would be appreciated.

Capture email option

Is it possible to add a prop to have the DGTAuthenticationConfiguration use the DGTAccountFieldsEmail option? Then we could ask for the email too.

Firebase Phone Auth

Digits will be retired on September, and I was wondering if there is any plan of supporting firebase Phone Auth, the service that will replace digits.

Option to change language?

I see language resource files under the path: MyApp/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/

How do I set the default language both in iOS and in Android?

No api secret

I just created an account on the Digits website and all all the examples they show do not have api secret - only api key. Where can I fetch the api secret?

Android support for styling

Hi, thanks for making react-native-fabric-digits! It's a solid piece of software.

The options prop field "appearance" works on iOS but does not seem to work on Android. Can you confirm whether this is supported, or I'm running into some bug? Is there some alternative way to get styling to work on Android?

Best regards,
Ian

Linking issue

After installation of react-native-fabric-digit package, when I do automatic link via 'rnpm link react-native-fabric-digits', and run 'react-native run-android', I get following error:

Building and installing the app on the device (cd android && ./gradlew installDebug...
Crashlytics was applied to an android-library project.
Android-library support is currently an incubating feature.
Contact [email protected] with any issues.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugCompile'.
Could not find com.digits.sdk.android:digits:1.11.2.
Searched in the following locations:
https://jcenter.bintray.com/com/digits/sdk/android/digits/1.11.2/digits-1.11.2.pom
https://jcenter.bintray.com/com/digits/sdk/android/digits/1.11.2/digits-1.11.2.aar
file:/me/Android/Sdk/extras/android/m2repository/com/digits/sdk/android/digits/1.11.2/digits-1.11.2.pom
file:/me/Sdk/extras/android/m2repository/com/digits/sdk/android/digits/1.11.2/digits-1.11.2.aar
file:/me/Android/Sdk/extras/google/m2repository/com/digits/sdk/android/digits/1.11.2/digits-1.11.2.pom
file:/me/Android/Sdk/extras/google/m2repository/com/digits/sdk/android/digits/1.11.2/digits-1.11.2.aar
Required by:
RealClean:app:unspecified > RealClean:react-native-fabric-digits:unspecified

Can you help me with this? I'm stuck here from yesterday, also tried manual linking by following steps from readme, but then I get even more errors. What am I doing wrong here?
P.S. I'm trying to add fabric-digits in existing react-native project. Maybe something else needs to be done in this case?
Thanks in advance!

Simulator freezes after SMS verification / in flow

In my React Native iOS app the simulator freezes up after sending the SMS verification (which arrives successfully on an actual phone). It doesn't advance to the next screen - and neither Xcode nor react native throw errors.

Xcode does show this screen
screen shot 2016-07-15 at 5 08 43 pm

*I'm new to React Native / mobile and Xcode - thanks for the help!

New instalation not working

I just followed the React Native getting started section (code on https://github.com/Semillas/semillas_react_native)

I followed the this repo's README and it's not working. This is the resulting code. And this is the diff of what I add for using react-native-fabric-digits.

The error I'm getting when running react-native run-android is the following:

        :app:generateDebugSources
        :app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
        :app:compileDebugJavaWithJavac
        :app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
        /home/ismael/branches/Semillas/android/app/src/main/java/com/semillas/MainApplication.java:6: error: cannot find symbol
        import com.facebook.react.ReactApplication;
                                 ^
          symbol:   class ReactApplication
          location: package com.facebook.react
        /home/ismael/branches/Semillas/android/app/src/main/java/com/semillas/MainApplication.java:8: error: cannot find symbol
        import com.facebook.react.ReactNativeHost;
                                 ^
          symbol:   class ReactNativeHost
          location: package com.facebook.react
        /home/ismael/branches/Semillas/android/app/src/main/java/com/semillas/MainApplication.java:18: error: cannot find symbol
        public class MainApplication extends Application implements ReactApplication {
                                                                    ^
          symbol: class ReactApplication
        /home/ismael/branches/Semillas/android/app/src/main/java/com/semillas/MainApplication.java:20: error: cannot find symbol
          private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
                        ^
          symbol:   class ReactNativeHost
          location: class MainApplication
        /home/ismael/branches/Semillas/android/app/src/main/java/com/semillas/MainApplication.java:36: error: cannot find symbol
          public ReactNativeHost getReactNativeHost() {
                 ^
          symbol:   class ReactNativeHost
          location: class MainApplication
        /home/ismael/branches/Semillas/android/app/src/main/java/com/semillas/MainActivity.java:5: error: MainActivity is not abstract and does not override abstract method getPackages() in ReactActiv
        ity
        public class MainActivity extends ReactActivity {
               ^
        /home/ismael/branches/Semillas/android/app/src/main/java/com/semillas/MainApplication.java:20: error: cannot find symbol
          private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
                                                               ^
          symbol:   class ReactNativeHost
          location: class MainApplication
        /home/ismael/branches/Semillas/android/app/src/main/java/com/semillas/MainApplication.java:35: error: method does not override or implement a method from a supertype
          @Override
          ^
        8 errors
        :app:compileDebugJavaWithJavac FAILED

        FAILURE: Build failed with an exception.

        * What went wrong:
        Execution failed for task ':app:compileDebugJavaWithJavac'.
        > Compilation failed; see the compiler error output for details.

Cheers!

Getting userID/userId

Hi, there's one thing with getting user's id:

  • Android, I can access it's value from getSessionDetails function by typing sessionDetails.userId
  • iOS, it requires slightly different name: sessionDetails.userID (both capitals ID)

Just in case anyone faces some json string errors on login action, should pay attention on this.
It can easily be changed in /ios/RCTDigitsManager.m, line 127, to be like for Android, or vice versa :)

What is the suggested way to check if user already logged in?

The way I am achieving this now is to render a hidden login button and then call loginButtonRef.getSessionDetails() to check if session data exist. If it exist then bypass the login UI flow.

However, rendering a hidden login button first feels a bit like a hack to me. Is there a better way to do this?

Not sure what to make of this error stack.

I get this strange error when I click login. Has anybody seen this before?

I can't even find the Digits.java file anywhere to view line 146. Is that part of the problem? Anybody else experience this?

This is only happening with droid, everything works on iOS.

image

constructor Digits in class Digits cannot be applied to given types

I get this error during build
image

Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:assembleDebug]
Warning:string 'catalyst_debugjs' has no default translation.
Warning:string 'catalyst_element_inspector' has no default translation.
Warning:string 'catalyst_jsload_error' has no default translation.
Warning:string 'catalyst_jsload_message' has no default translation.
Warning:string 'catalyst_jsload_title' has no default translation.
Warning:string 'catalyst_reloadjs' has no default translation.
Warning:string 'catalyst_settings' has no default translation.
Warning:string 'catalyst_settings_title' has no default translation.
Warning:string 'catalyst_debugjs' has no default translation.
Warning:string 'catalyst_element_inspector' has no default translation.
Warning:string 'catalyst_jsload_error' has no default translation.
Warning:string 'catalyst_jsload_message' has no default translation.
Warning:string 'catalyst_jsload_title' has no default translation.
Warning:string 'catalyst_reloadjs' has no default translation.
Warning:string 'catalyst_settings' has no default translation.
Warning:string 'catalyst_settings_title' has no default translation.
D:\Apps\cliptimeapp\node_modules\react-native-fabric-digits\android\src\main\java\com\proxima\RCTDigits\DigitsManager.java
Error:(66, 80) error: constructor Digits in class Digits cannot be applied to given types;
required: int,DigitsEventLogger
found: no arguments
reason: actual and formal argument lists differ in length
Error:Execution failed for task ':react-native-fabric-digits:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Information:BUILD FAILED
Information:Total time: 10.623 secs
Information:2 errors
Information:16 warnings
Information:See complete output in console

LifecycleEventListener

Is there a reason that DigitsManager on Android is listening to LifecycleEventListener such as onHostResume.
I can't figure out why they are needed at the moment. Did a small test where they're removed and looks like it's all working without it.

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.