{"id":4746,"url":"https://github.com/JeanLebrument/react-native-fabric-digits","last_synced_at":"2025-08-04T02:31:44.481Z","repository":{"id":57336887,"uuid":"44985087","full_name":"JeanLebrument/react-native-fabric-digits","owner":"JeanLebrument","description":"Fabric Digits wrapper for React-Native","archived":false,"fork":false,"pushed_at":"2017-04-05T12:30:25.000Z","size":29875,"stargazers_count":109,"open_issues_count":22,"forks_count":50,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-27T23:43:29.292Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JeanLebrument.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-26T17:22:39.000Z","updated_at":"2021-04-22T11:57:05.000Z","dependencies_parsed_at":"2022-09-12T11:02:51.416Z","dependency_job_id":null,"html_url":"https://github.com/JeanLebrument/react-native-fabric-digits","commit_stats":null,"previous_names":["jeanlebrument/react-native-fabric-digit"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/JeanLebrument/react-native-fabric-digits","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeanLebrument%2Freact-native-fabric-digits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeanLebrument%2Freact-native-fabric-digits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeanLebrument%2Freact-native-fabric-digits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeanLebrument%2Freact-native-fabric-digits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JeanLebrument","download_url":"https://codeload.github.com/JeanLebrument/react-native-fabric-digits/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeanLebrument%2Freact-native-fabric-digits/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268639931,"owners_count":24282678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:17:22.040Z","updated_at":"2025-08-04T02:31:44.453Z","avatar_url":"https://github.com/JeanLebrument.png","language":"Objective-C","funding_links":[],"categories":["Components"],"sub_categories":["Integrations"],"readme":"# react-native-fabric-digits\n\n## Introduction\n\n**Fabric Digits wrapper for React-Native.**\n\nSpecial thanks to the following people/projects:\n- [jpdriver](https://github.com/jpdriver) for his tutorial on [how to integrate Digits in a React-Native project](https://medium.com/p/getting-started-with-digits-and-react-native-f79b22439416).\n- [thessem](https://github.com/thessem/react-native-fabric-digits) for providing the Android support\n- [react-native-digits](https://github.com/fixt/react-native-digits) for helping me figure out how to package the Android version.\n- [Corentin S.](http://stackoverflow.com/a/33563461) for providing the basis of the Android implementation in a Stack Overflow answer\n\n## Before Installing\n\n1. Open your React Native app in Xcode / Android Studio / similar\n2. Install DigitsKit (the same way you would for non-React Native projects)\n\nFor iOS apps, you can install DigitsKit either through the [Fabric OS X app](https://fabric.io/downloads/apple) or [CocoaPods](https://fabric.io/kits/ios/digits/install)\n\nFor Android apps, you can install DigitsKit either through the [Fabric IDE plugin](https://fabric.io/downloads/android) or [Gradle](https://fabric.io/kits/android/digits/install)\n\nDon't forget about initializing Fabric using `with` method!\n\n## Install\n\n`npm install JeanLebrument/react-native-fabric-digits --save`\n\n## Either Link with RNPM... (Automatic)\n\n1. `npm install rnpm -g --save`\n2. `rnpm link react-native-fabric-digits`\n\n## ...or Link (Manual)\n\n### iOS procedure\n1. Follow the usual Digits installation procedure on your project, including adding the frameworks and modifying any files.\n2. In the XCode's \"Project navigator\", right click on your project's Libraries folder ➜ `Add Files to \u003c...\u003e`\n3. Go to `node_modules` ➜ `react-native-fabric-digits` ➜ `ios` -\u003e select the `RCTDigitsManager.xcodeproj`\n4. Go to `Build Phases` tab of your project, select a target, open `Link Binary With Libraries`, click on `+` and add `libRCTDigitsManager.a`\n\n### Android procedure\n\n### In `settings.gradle`\n\nAdd to bottom:\n\n```java\ninclude ':react-native-fabric-digits'\nproject(':react-native-fabric-digits').projectDir = new File(settingsDir, '../node_modules/react-native-fabric-digits/android')\n```\n\n#### In `android/build.gradle`\n\n```java\nallprojects {\n  repositories {\n    mavenLocal()\n    jcenter()\n    maven { url 'https://maven.fabric.io/public' }   \u003c--- ADD THIS\n  }\n}\n```\n\n#### In `android/app/build.gradle`\n\n```java\ndependencies {\n  compile fileTree(dir: 'libs', include: ['*.jar'])\n  compile 'com.android.support:appcompat-v7:23.0.0'\n  compile 'com.facebook.react:react-native:0.14.+'\n  compile project(':react-native-fabric-digits')          \u003c--- ADD THIS\n}\n```\n\n#### In `MainActivity.java`\n\n```java\nimport com.proxima.RCTDigits.DigitsPackage;         \u003c--- ADD THIS\n\n    @Override\n    protected List\u003cReactPackage\u003e getPackages() {\n      return Arrays.\u003cReactPackage\u003easList(\n        new MainReactPackage(),\n        new DigitsPackage()                         \u003c--- ADD THIS\n      );\n    }\n ```\n\n#### In `AndroidManifest.xml`\n\nAdd this inside the `application` tag.\n\n```xml\n\u003cmeta-data\n  android:name=\"io.Digits.ApiKey\"\n  android:value=\"YOUR_API_KEY\" /\u003e\n\u003cmeta-data\n  android:name=\"io.Digits.ApiSecret\"\n  android:value=\"YOUR_API_SECRET\" /\u003e\n```\n\n### Styling on Android\n\nOn Android, you have to add a custom Digits Theme in your app's `styles` resource.\n\n#### In `android/app/src/main/res/values/styles.xml`\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cresources\u003e\n  \u003c!-- your other app styles here --\u003e\n\n  \u003cstyle name=\"CustomDigitsTheme\" parent=\"android:Theme.Material.Light\"\u003e\n    \u003citem name=\"android:textColorPrimary\"\u003e@android:color/black\u003c/item\u003e\n    \u003citem name=\"android:textColorSecondary\"\u003e@android:color/darker_gray\u003c/item\u003e\n    \u003citem name=\"android:windowBackground\"\u003e@android:color/white\u003c/item\u003e\n    \u003citem name=\"android:textColorLink\"\u003e#ff398622\u003c/item\u003e\n    \u003citem name=\"android:colorAccent\"\u003e#ff398622\u003c/item\u003e\n  \u003c/style\u003e\n\u003c/resources\u003e\n```\n\nSee the Digits Android Theming docs for more information: [Digits Android Theming](https://docs.fabric.io/android/digits/theming.html#customize-the-theme)\n\n## Usage\n\nThis package provide two classes: `DigitsLoginButton` and `DigitsLogoutButton`. You should `render` the version that corresponds to the Log In state in your app.\n\nStart with `DigitsLoginButton`, then when a user has successfully logged in, swap this out for `DigitsLogoutButton`.\n\nHave a look at the Example, which illustrates all the features.\n\n## FAQ\n\n### What's Digits?\n* please see https://get.digits.com. Digits is part of Fabric -- a suite of tools for building mobile apps from Twitter.\n\n### Does Digits officially support React Native?\n* Not directly on its own. Officially, DigitsKit only supports the native languages (Objective C, Swift, and Java).\n* However, React Native has the ability to expose native modules to JavaScript components, which is exactly what this library does.\n\n### Can I see the OAuth details that the DigitsAPI returns?\n* In our example, the returned OAuth `response` is put into the component state.\n\n### Can I see the phone number the user entered?\n* Yes! Once a user has logged in, you can call `getSessionDetails()` to get the sessionId and phoneNumber.\n\n## Licence\n\n**MIT**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJeanLebrument%2Freact-native-fabric-digits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJeanLebrument%2Freact-native-fabric-digits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJeanLebrument%2Freact-native-fabric-digits/lists"}