├── .gitignore
├── .npmignore
├── DigitsLoginButton.js
├── DigitsLogoutButton.js
├── README.md
├── android
├── build.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── proxima
│ │ └── RCTDigits
│ │ ├── DigitsManager.java
│ │ └── DigitsPackage.java
│ └── res
│ └── values
│ └── styles.xml
├── example
└── Example.js
├── index.js
├── ios
├── DigitsKit.framework
│ ├── DigitsKit
│ ├── Headers
│ │ ├── DGTAPIClient.h
│ │ ├── DGTAppearance.h
│ │ ├── DGTAuthEventDelegate.h
│ │ ├── DGTAuthEventDetails.h
│ │ ├── DGTAuthenticateButton.h
│ │ ├── DGTAuthenticationConfiguration.h
│ │ ├── DGTCompletionViewController.h
│ │ ├── DGTContactAccessAuthorizationStatus.h
│ │ ├── DGTContacts.h
│ │ ├── DGTContactsDebugConfiguration.h
│ │ ├── DGTContactsEventDelegate.h
│ │ ├── DGTContactsUploadResult.h
│ │ ├── DGTDebugConfiguration.h
│ │ ├── DGTErrors.h
│ │ ├── DGTOAuthSigning.h
│ │ ├── DGTSession.h
│ │ ├── DGTSessionUpdateDelegate.h
│ │ ├── DGTUser.h
│ │ ├── Digits.h
│ │ └── DigitsKit.h
│ ├── Info.plist
│ ├── Modules
│ │ └── module.modulemap
│ ├── Resources
│ └── Versions
│ │ ├── A
│ │ └── Resources
│ │ │ └── DigitsKitResources.bundle
│ │ │ ├── DGTAssistedAuthViewController.nib
│ │ │ ├── DGTAuthViewController.nib
│ │ │ ├── DGTChallengeViewController.nib
│ │ │ ├── DGTCodeField.nib
│ │ │ ├── DGTCountryTableViewController.nib
│ │ │ ├── DGTEmailViewController.nib
│ │ │ ├── DGTPinCodeFormViewController.nib
│ │ │ ├── DGTUploadContactsViewController.nib
│ │ │ ├── TFSScribe.momd
│ │ │ ├── TFSScribe.mom
│ │ │ └── VersionInfo.plist
│ │ │ ├── addressbook-find-friends.png
│ │ │ ├── addressbook-find-friends@2x.png
│ │ │ ├── addressbook-find-friends@3x.png
│ │ │ ├── ar.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── bg.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── bn.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ca.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── country-codes.json
│ │ │ ├── cs.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── da.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── de.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── digits-logo-icon-mid.png
│ │ │ ├── digits-logo-icon.png
│ │ │ ├── digits-logo-icon@2x.png
│ │ │ ├── digits-logo-icon@3x.png
│ │ │ ├── digits-logo-name-mid.png
│ │ │ ├── digits-logo-name.png
│ │ │ ├── digits-logo-name@2x.png
│ │ │ ├── digits-logo-name@3x.png
│ │ │ ├── el.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── en-gb.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── en.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── es.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── fa.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── fi.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── fr.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── gu.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── he.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── hi.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── hr.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── hu.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── id.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── it.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ja.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── kn.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ko.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── mr.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ms.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── nb.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── nl.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── pl.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── pt.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ro.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ru.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── sk.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── sr.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── sv.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── ta.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── th.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── tl.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── tr.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── uk.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── unable-phone.png
│ │ │ ├── unable-phone@2x.png
│ │ │ ├── unable-phone@3x.png
│ │ │ ├── ur.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── vi.lproj
│ │ │ └── Localizable.strings
│ │ │ ├── zh-Hans.lproj
│ │ │ └── Localizable.strings
│ │ │ └── zh-Hant.lproj
│ │ │ └── Localizable.strings
│ │ └── Current
├── Fabric.framework
│ ├── Fabric
│ ├── Headers
│ │ ├── FABAttributes.h
│ │ └── Fabric.h
│ ├── Info.plist
│ ├── Modules
│ │ └── module.modulemap
│ ├── run
│ └── uploadDSYM
├── RCTDigitsManager.h
├── RCTDigitsManager.m
├── RCTDigitsManager.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── TwitterCore.framework
│ ├── Headers
│ ├── TWTRAPIErrorCode.h
│ ├── TWTRAuthConfig.h
│ ├── TWTRAuthSession.h
│ ├── TWTRConstants.h
│ ├── TWTRCoreOAuthSigning.h
│ ├── TWTRDefines.h
│ ├── TWTRGuestSession.h
│ ├── TWTRSession.h
│ ├── TWTRSessionStore.h
│ └── TwitterCore.h
│ ├── Info.plist
│ ├── Modules
│ └── module.modulemap
│ └── TwitterCore
├── package.json
└── react-native-fabric-digits.podspec
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # Created by https://www.gitignore.io/api/sublimetext,gradle,java,xcode,osx,intellij,webstorm,android
3 |
4 | ### SublimeText ###
5 | # cache files for sublime text
6 | *.tmlanguage.cache
7 | *.tmPreferences.cache
8 | *.stTheme.cache
9 |
10 | # workspace files are user-specific
11 | *.sublime-workspace
12 |
13 | # project files should be checked into the repository, unless a significant
14 | # proportion of contributors will probably not be using SublimeText
15 | # *.sublime-project
16 |
17 | # sftp configuration file
18 | sftp-config.json
19 |
20 |
21 | ### Gradle ###
22 | .gradle
23 | build/
24 |
25 | # Ignore Gradle GUI config
26 | gradle-app.setting
27 |
28 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
29 | !gradle-wrapper.jar
30 |
31 | # Cache of project
32 | .gradletasknamecache
33 |
34 |
35 | ### Java ###
36 | *.class
37 |
38 | # Mobile Tools for Java (J2ME)
39 | .mtj.tmp/
40 |
41 | # Package Files #
42 | *.jar
43 | *.war
44 | *.ear
45 |
46 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
47 | hs_err_pid*
48 |
49 |
50 | ### Xcode ###
51 | # Xcode
52 | #
53 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
54 |
55 | ## Build generated
56 | build/
57 | DerivedData
58 |
59 | ## Various settings
60 | *.pbxuser
61 | !default.pbxuser
62 | *.mode1v3
63 | !default.mode1v3
64 | *.mode2v3
65 | !default.mode2v3
66 | *.perspectivev3
67 | !default.perspectivev3
68 | xcuserdata
69 |
70 | ## Other
71 | *.xccheckout
72 | *.moved-aside
73 | *.xcuserstate
74 |
75 |
76 | ### OSX ###
77 | .DS_Store
78 | .AppleDouble
79 | .LSOverride
80 |
81 | # Icon must end with two \r
82 | Icon
83 |
84 |
85 | # Thumbnails
86 | ._*
87 |
88 | # Files that might appear in the root of a volume
89 | .DocumentRevisions-V100
90 | .fseventsd
91 | .Spotlight-V100
92 | .TemporaryItems
93 | .Trashes
94 | .VolumeIcon.icns
95 |
96 | # Directories potentially created on remote AFP share
97 | .AppleDB
98 | .AppleDesktop
99 | Network Trash Folder
100 | Temporary Items
101 | .apdisk
102 |
103 |
104 | ### Intellij ###
105 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
106 |
107 | *.iml
108 |
109 | ## Directory-based project format:
110 | .idea/
111 | # if you remove the above rule, at least ignore the following:
112 |
113 | # User-specific stuff:
114 | # .idea/workspace.xml
115 | # .idea/tasks.xml
116 | # .idea/dictionaries
117 | # .idea/shelf
118 |
119 | # Sensitive or high-churn files:
120 | # .idea/dataSources.ids
121 | # .idea/dataSources.xml
122 | # .idea/sqlDataSources.xml
123 | # .idea/dynamic.xml
124 | # .idea/uiDesigner.xml
125 |
126 | # Gradle:
127 | # .idea/gradle.xml
128 | # .idea/libraries
129 |
130 | # Mongo Explorer plugin:
131 | # .idea/mongoSettings.xml
132 |
133 | ## File-based project format:
134 | *.ipr
135 | *.iws
136 |
137 | ## Plugin-specific files:
138 |
139 | # IntelliJ
140 | /out/
141 |
142 | # mpeltonen/sbt-idea plugin
143 | .idea_modules/
144 |
145 | # JIRA plugin
146 | atlassian-ide-plugin.xml
147 |
148 | # Crashlytics plugin (for Android Studio and IntelliJ)
149 | com_crashlytics_export_strings.xml
150 | crashlytics.properties
151 | crashlytics-build.properties
152 | fabric.properties
153 |
154 |
155 | ### WebStorm ###
156 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
157 |
158 | *.iml
159 |
160 | ## Directory-based project format:
161 | .idea/
162 | # if you remove the above rule, at least ignore the following:
163 |
164 | # User-specific stuff:
165 | # .idea/workspace.xml
166 | # .idea/tasks.xml
167 | # .idea/dictionaries
168 | # .idea/shelf
169 |
170 | # Sensitive or high-churn files:
171 | # .idea/dataSources.ids
172 | # .idea/dataSources.xml
173 | # .idea/sqlDataSources.xml
174 | # .idea/dynamic.xml
175 | # .idea/uiDesigner.xml
176 |
177 | # Gradle:
178 | # .idea/gradle.xml
179 | # .idea/libraries
180 |
181 | # Mongo Explorer plugin:
182 | # .idea/mongoSettings.xml
183 |
184 | ## File-based project format:
185 | *.ipr
186 | *.iws
187 |
188 | ## Plugin-specific files:
189 |
190 | # IntelliJ
191 | /out/
192 |
193 | # mpeltonen/sbt-idea plugin
194 | .idea_modules/
195 |
196 | # JIRA plugin
197 | atlassian-ide-plugin.xml
198 |
199 | # Crashlytics plugin (for Android Studio and IntelliJ)
200 | com_crashlytics_export_strings.xml
201 | crashlytics.properties
202 | crashlytics-build.properties
203 | fabric.properties
204 |
205 |
206 | ### Android ###
207 | # Built application files
208 | *.apk
209 | *.ap_
210 |
211 | # Files for the Dalvik VM
212 | *.dex
213 |
214 | # Java class files
215 | *.class
216 |
217 | # Generated files
218 | bin/
219 | gen/
220 |
221 | # Gradle files
222 | .gradle/
223 | build/
224 |
225 | # Local configuration file (sdk path, etc)
226 | local.properties
227 |
228 | # Proguard folder generated by Eclipse
229 | proguard/
230 |
231 | # Log Files
232 | *.log
233 |
234 | # Android Studio Navigation editor temp files
235 | .navigation/
236 |
237 | # Android Studio captures folder
238 | captures/
239 |
240 | ### Android Patch ###
241 | gen-external-apklibs
242 |
243 | example/node_modules
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | example
2 |
--------------------------------------------------------------------------------
/DigitsLoginButton.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { NativeModules, Text, TouchableHighlight } from 'react-native';
3 |
4 | class DigitsLoginButton extends Component {
5 | constructor(props) {
6 | super(props);
7 |
8 | this.buttonPressed = this.buttonPressed.bind(this);
9 | this.getSessionDetails = this.getSessionDetails.bind(this);
10 | }
11 |
12 | getSessionDetails(callback) {
13 | NativeModules.DigitsManager.sessionDetails((error, sessionDetails) => {
14 | if (error) {
15 | console.error(error);
16 | } else {
17 | callback(sessionDetails);
18 | }
19 | });
20 | }
21 |
22 | buttonPressed() {
23 | NativeModules.DigitsManager.launchAuthentication(this.props.options).then((responseData) => {
24 | console.log("[Digits] Login Successful", responseData);
25 | this.props.completion(null, responseData);
26 | }).catch((error) => {
27 | if(error && error.code != 1){
28 | console.error("[Digits] Login Error", error);
29 | }
30 | this.props.completion(error, null);
31 | });
32 | }
33 |
34 | render() {
35 | return (
36 |
37 | {this.props.text}
38 |
39 | );
40 | }
41 | }
42 |
43 | DigitsLoginButton.defaultProps = {
44 | highlightColor: 'black',
45 | };
46 |
47 | module.exports = DigitsLoginButton;
48 |
--------------------------------------------------------------------------------
/DigitsLogoutButton.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { NativeModules, Text, TouchableHighlight } from 'react-native';
3 |
4 | class DigitsLogoutButton extends Component {
5 | constructor(props) {
6 | super(props);
7 |
8 | this.buttonPressed = this.buttonPressed.bind(this);
9 | this.getSessionDetails = this.getSessionDetails.bind(this);
10 | }
11 |
12 | getSessionDetails(callback) {
13 | NativeModules.DigitsManager.sessionDetails((error, sessionDetails) => {
14 | if (error) {
15 | console.error(error);
16 | } else {
17 | callback(sessionDetails);
18 | }
19 | });
20 | }
21 |
22 | buttonPressed() {
23 | NativeModules.DigitsManager.logout();
24 | this.props.completion(null, {});
25 | }
26 |
27 | render() {
28 | return (
29 |
30 | {this.props.text}
31 |
32 | );
33 | }
34 | }
35 |
36 | DigitsLogoutButton.defaultProps = {
37 | highlightColor: 'black',
38 | };
39 |
40 | module.exports = DigitsLogoutButton;
41 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # react-native-fabric-digits
2 |
3 | ## Introduction
4 |
5 | **Fabric Digits wrapper for React-Native.**
6 |
7 | Special thanks to the following people/projects:
8 | - [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).
9 | - [thessem](https://github.com/thessem/react-native-fabric-digits) for providing the Android support
10 | - [react-native-digits](https://github.com/fixt/react-native-digits) for helping me figure out how to package the Android version.
11 | - [Corentin S.](http://stackoverflow.com/a/33563461) for providing the basis of the Android implementation in a Stack Overflow answer
12 |
13 | ## Before Installing
14 |
15 | 1. Open your React Native app in Xcode / Android Studio / similar
16 | 2. Install DigitsKit (the same way you would for non-React Native projects)
17 |
18 | For 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)
19 |
20 | For 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)
21 |
22 | Don't forget about initializing Fabric using `with` method!
23 |
24 | ## Install
25 |
26 | `npm install JeanLebrument/react-native-fabric-digits --save`
27 |
28 | ## Either Link with RNPM... (Automatic)
29 |
30 | 1. `npm install rnpm -g --save`
31 | 2. `rnpm link react-native-fabric-digits`
32 |
33 | ## ...or Link (Manual)
34 |
35 | ### iOS procedure
36 | 1. Follow the usual Digits installation procedure on your project, including adding the frameworks and modifying any files.
37 | 2. In the XCode's "Project navigator", right click on your project's Libraries folder ➜ `Add Files to <...>`
38 | 3. Go to `node_modules` ➜ `react-native-fabric-digits` ➜ `ios` -> select the `RCTDigitsManager.xcodeproj`
39 | 4. Go to `Build Phases` tab of your project, select a target, open `Link Binary With Libraries`, click on `+` and add `libRCTDigitsManager.a`
40 |
41 | ### Android procedure
42 |
43 | ### In `settings.gradle`
44 |
45 | Add to bottom:
46 |
47 | ```java
48 | include ':react-native-fabric-digits'
49 | project(':react-native-fabric-digits').projectDir = new File(settingsDir, '../node_modules/react-native-fabric-digits/android')
50 | ```
51 |
52 | #### In `android/build.gradle`
53 |
54 | ```java
55 | allprojects {
56 | repositories {
57 | mavenLocal()
58 | jcenter()
59 | maven { url 'https://maven.fabric.io/public' } <--- ADD THIS
60 | }
61 | }
62 | ```
63 |
64 | #### In `android/app/build.gradle`
65 |
66 | ```java
67 | dependencies {
68 | compile fileTree(dir: 'libs', include: ['*.jar'])
69 | compile 'com.android.support:appcompat-v7:23.0.0'
70 | compile 'com.facebook.react:react-native:0.14.+'
71 | compile project(':react-native-fabric-digits') <--- ADD THIS
72 | }
73 | ```
74 |
75 | #### In `MainActivity.java`
76 |
77 | ```java
78 | import com.proxima.RCTDigits.DigitsPackage; <--- ADD THIS
79 |
80 | @Override
81 | protected List getPackages() {
82 | return Arrays.asList(
83 | new MainReactPackage(),
84 | new DigitsPackage() <--- ADD THIS
85 | );
86 | }
87 | ```
88 |
89 | #### In `AndroidManifest.xml`
90 |
91 | Add this inside the `application` tag.
92 |
93 | ```xml
94 |
97 |
100 | ```
101 |
102 | ### Styling on Android
103 |
104 | On Android, you have to add a custom Digits Theme in your app's `styles` resource.
105 |
106 | #### In `android/app/src/main/res/values/styles.xml`
107 |
108 | ```xml
109 |
110 |
111 |
112 |
113 |
120 |
121 | ```
122 |
123 | See the Digits Android Theming docs for more information: [Digits Android Theming](https://docs.fabric.io/android/digits/theming.html#customize-the-theme)
124 |
125 | ## Usage
126 |
127 | This package provide two classes: `DigitsLoginButton` and `DigitsLogoutButton`. You should `render` the version that corresponds to the Log In state in your app.
128 |
129 | Start with `DigitsLoginButton`, then when a user has successfully logged in, swap this out for `DigitsLogoutButton`.
130 |
131 | Have a look at the Example, which illustrates all the features.
132 |
133 | ## FAQ
134 |
135 | ### What's Digits?
136 | * please see https://get.digits.com. Digits is part of Fabric -- a suite of tools for building mobile apps from Twitter.
137 |
138 | ### Does Digits officially support React Native?
139 | * Not directly on its own. Officially, DigitsKit only supports the native languages (Objective C, Swift, and Java).
140 | * However, React Native has the ability to expose native modules to JavaScript components, which is exactly what this library does.
141 |
142 | ### Can I see the OAuth details that the DigitsAPI returns?
143 | * In our example, the returned OAuth `response` is put into the component state.
144 |
145 | ### Can I see the phone number the user entered?
146 | * Yes! Once a user has logged in, you can call `getSessionDetails()` to get the sessionId and phoneNumber.
147 |
148 | ## Licence
149 |
150 | **MIT**
151 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 |
2 | buildscript {
3 | repositories {
4 | jcenter()
5 | maven { url 'https://maven.fabric.io/public' }
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:1.5.0'
10 | classpath 'io.fabric.tools:gradle:1.+'
11 | }
12 | }
13 |
14 | apply plugin: 'com.android.library'
15 | apply plugin: 'io.fabric'
16 |
17 | android {
18 | compileSdkVersion 23
19 | buildToolsVersion "23.0.2"
20 |
21 | defaultConfig {
22 | minSdkVersion 16
23 | targetSdkVersion 22
24 | versionCode 1
25 | versionName "1.0"
26 | }
27 | lintOptions {
28 | abortOnError false
29 | }
30 | }
31 |
32 | repositories {
33 | mavenCentral()
34 | maven { url 'https://maven.fabric.io/public' }
35 | }
36 |
37 | dependencies {
38 | compile 'com.android.support:appcompat-v7:23.1.1'
39 | compile 'com.facebook.react:react-native:0.19.+'
40 | compile('com.digits.sdk.android:digits:2.0.4@aar') {
41 | transitive = true;
42 | }
43 | }
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/android/src/main/java/com/proxima/RCTDigits/DigitsManager.java:
--------------------------------------------------------------------------------
1 | package com.proxima.RCTDigits;
2 |
3 | import android.content.pm.ApplicationInfo;
4 | import android.content.pm.PackageManager;
5 | import android.os.Bundle;
6 | import android.util.Log;
7 |
8 | import com.digits.sdk.android.AuthCallback;
9 | import com.digits.sdk.android.Digits;
10 | import com.digits.sdk.android.AuthConfig;
11 | import com.digits.sdk.android.DigitsException;
12 | import com.digits.sdk.android.DigitsOAuthSigning;
13 | import com.digits.sdk.android.DigitsSession;
14 | import com.facebook.react.bridge.Callback;
15 | import com.facebook.react.bridge.LifecycleEventListener;
16 | import com.facebook.react.bridge.Promise;
17 | import com.facebook.react.bridge.ReactApplicationContext;
18 | import com.facebook.react.bridge.ReactContextBaseJavaModule;
19 | import com.facebook.react.bridge.ReactMethod;
20 | import com.facebook.react.bridge.ReadableMap;
21 | import com.facebook.react.bridge.WritableMap;
22 | import com.facebook.react.bridge.WritableNativeMap;
23 | import com.twitter.sdk.android.core.TwitterAuthConfig;
24 | import com.twitter.sdk.android.core.TwitterAuthToken;
25 | import com.twitter.sdk.android.core.TwitterCore;
26 |
27 | import java.util.Map;
28 |
29 | import io.fabric.sdk.android.Fabric;
30 |
31 | public class DigitsManager extends ReactContextBaseJavaModule implements LifecycleEventListener, AuthCallback {
32 |
33 | private static final String META_DATA_KEY = "io.Digits.ApiKey";
34 | private static final String META_DATA_SECRET = "io.Digits.ApiSecret";
35 | private static final String TAG = "RCTDigits";
36 |
37 | private boolean paused = false;
38 |
39 | private Promise promise;
40 | private DigitsSession digitsSession;
41 | private DigitsException digitsException;
42 |
43 | public DigitsManager(ReactApplicationContext reactContext) {
44 | super(reactContext);
45 |
46 | // Check for Twitter config
47 | TwitterAuthConfig authConfig = getTwitterAuthConfig();
48 | Fabric.with(getReactApplicationContext(), new TwitterCore(authConfig), new Digits.Builder().build());
49 | }
50 |
51 | @Override
52 | public String getName() {
53 | return "DigitsManager";
54 | }
55 |
56 | @ReactMethod
57 | public void launchAuthentication(ReadableMap options, final Promise promise) {
58 | if (this.promise != null) {
59 | promise.reject("Authentification process still in progress.");
60 | return;
61 | }
62 |
63 | getReactApplicationContext().addLifecycleEventListener(this);
64 | this.promise = promise;
65 |
66 | String phoneNumber = options != null && options.hasKey("phoneNumber") ?
67 | options.getString("phoneNumber") : "";
68 |
69 | AuthConfig.Builder digitsAuthConfigBuilder = new AuthConfig.Builder()
70 | .withAuthCallBack(this)
71 | .withPhoneNumber(phoneNumber);
72 |
73 | if (options != null && options.hasKey("email")) {
74 | digitsAuthConfigBuilder.withEmailCollection();
75 | }
76 |
77 | Digits.authenticate(digitsAuthConfigBuilder.build());
78 | }
79 |
80 | @ReactMethod
81 | public void logout() {
82 | Digits.clearActiveSession();
83 | }
84 |
85 | @ReactMethod
86 | public void enableSandbox() {
87 | Digits.enableSandbox();
88 | }
89 |
90 | @ReactMethod
91 | public void sessionDetails(Callback callback) {
92 | DigitsSession session = Digits.getActiveSession();
93 | if (session != null) {
94 | WritableMap sessionData = new WritableNativeMap();
95 | sessionData.putString("authToken", session.getAuthToken().token);
96 | sessionData.putString("authTokenSecret", session.getAuthToken().secret);
97 | sessionData.putString("userId", new Long(session.getId()).toString());
98 | sessionData.putString("phoneNumber", session.getPhoneNumber().replaceAll("[^0-9]", ""));
99 | sessionData.putString("emailAddress", session.getEmail().address);
100 | sessionData.putBoolean("emailAddressIsVerified", session.getEmail().verified);
101 | callback.invoke(null, sessionData);
102 | } else {
103 | callback.invoke(null, null);
104 | }
105 | }
106 |
107 | private TwitterAuthConfig getTwitterAuthConfig() {
108 | try {
109 | ReactApplicationContext context = getReactApplicationContext();
110 | PackageManager packageManager = context.getPackageManager();
111 | ApplicationInfo applicationInfo = packageManager.getApplicationInfo(
112 | context.getPackageName(),
113 | PackageManager.GET_META_DATA
114 | );
115 | Bundle metaData = applicationInfo.metaData;
116 | if (metaData == null) {
117 | Log.w(TAG, "Application metaData is null. Unable to get Digits configuration.");
118 | return null;
119 | }
120 | String key = metaData.getString(META_DATA_KEY);
121 | String secret = metaData.getString(META_DATA_SECRET);
122 | if (key == null || secret == null) {
123 | Log.w(TAG, "Application metaData does not contain Digits configuration.");
124 | return null;
125 | }
126 | return new TwitterAuthConfig(key, secret);
127 | } catch (PackageManager.NameNotFoundException e) {
128 | Log.w(TAG, "Error while configure Digits: " + e, e);
129 | return null;
130 | }
131 | }
132 |
133 | @Override
134 | public void success(DigitsSession session, String phoneNumber) {
135 | digitsSession = session;
136 | invokePromise();
137 | }
138 |
139 | @Override
140 | public void failure(DigitsException exception) {
141 | digitsException = exception;
142 | invokePromise();
143 | }
144 |
145 | @Override
146 | public void onHostResume() {
147 | paused = false;
148 | invokePromise();
149 | }
150 |
151 | @Override
152 | public void onHostPause() {
153 | paused = true;
154 | }
155 |
156 | @Override
157 | public void onHostDestroy() {
158 | paused = true;
159 | }
160 |
161 | private void invokePromise() {
162 | if (promise == null || paused) {
163 | return;
164 | }
165 |
166 |
167 | if (digitsSession != null) {
168 | TwitterAuthConfig authConfig = TwitterCore.getInstance().getAuthConfig();
169 | TwitterAuthToken authToken = (TwitterAuthToken) digitsSession.getAuthToken();
170 | DigitsOAuthSigning oauthSigning = new DigitsOAuthSigning(authConfig, authToken);
171 | Map authHeaders = oauthSigning.getOAuthEchoHeadersForVerifyCredentials();
172 | WritableNativeMap authHeadersNativeMap = new WritableNativeMap();
173 |
174 | for (Map.Entry entry : authHeaders.entrySet()) {
175 | authHeadersNativeMap.putString(entry.getKey(), entry.getValue());
176 | }
177 |
178 | promise.resolve(authHeadersNativeMap);
179 | promise = null;
180 | } else if (digitsException != null) {
181 | promise.reject(digitsException.toString());
182 | promise = null;
183 | }
184 |
185 | digitsSession = null;
186 | digitsException = null;
187 | getReactApplicationContext().removeLifecycleEventListener(this);
188 | }
189 | }
190 |
--------------------------------------------------------------------------------
/android/src/main/java/com/proxima/RCTDigits/DigitsPackage.java:
--------------------------------------------------------------------------------
1 | package com.proxima.RCTDigits;
2 |
3 | import com.facebook.react.ReactPackage;
4 | import com.facebook.react.bridge.JavaScriptModule;
5 | import com.facebook.react.bridge.NativeModule;
6 | import com.facebook.react.bridge.ReactApplicationContext;
7 | import com.facebook.react.uimanager.ViewManager;
8 | import java.util.ArrayList;
9 | import java.util.Collections;
10 | import java.util.List;
11 |
12 | public class DigitsPackage implements ReactPackage {
13 | @Override
14 | public List createNativeModules(ReactApplicationContext reactContext) {
15 | List modules = new ArrayList<>();
16 | modules.add(new DigitsManager(reactContext));
17 | return modules;
18 | }
19 |
20 | @Override
21 | public List> createJSModules() {
22 | return Collections.emptyList();
23 | }
24 |
25 | @Override
26 | public List createViewManagers(ReactApplicationContext reactContext) {
27 | return Collections.emptyList();
28 | }
29 | }
--------------------------------------------------------------------------------
/android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/example/Example.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | * @flow
5 | */
6 |
7 | import React, { Component } from 'react';
8 | import {
9 | Alert,
10 | AppRegistry,
11 | StyleSheet,
12 | Text,
13 | View,
14 | } from 'react-native';
15 |
16 | const Digits = require('react-native-fabric-digits');
17 | const { DigitsLoginButton, DigitsLogoutButton } = Digits;
18 |
19 | class Example extends Component {
20 | constructor(props) {
21 | super(props);
22 | this.state = {
23 | logged: false,
24 | error: false,
25 | response: {}
26 | };
27 | this.completion = this.completion.bind(this);
28 | this.getSessionDetails = this.getSessionDetails.bind(this);
29 | }
30 |
31 | completion(error, response) {
32 | if (error && error.code !== 1) {
33 | this.setState({ logged: false, error: true, response: {} });
34 | } else if (response) {
35 | const logged = JSON.stringify(response) === '{}' ? false : true;
36 | this.setState({ logged: logged, error: false, response: response }, this.getSessionDetails);
37 | }
38 | }
39 |
40 | getSessionDetails() {
41 | if (this.state.logged) {
42 | this.refs.DigitsLogoutButton.getSessionDetails(function(sessionDetails) {
43 | Alert.alert('Success!', sessionDetails.phoneNumber);
44 | });
45 | }
46 | }
47 |
48 | render() {
49 | const error = this.state.error ? An error occured. : null;
50 | const content = this.state.logged ?
51 | (
52 |
53 | OAuth Token: {this.state.response['X-Verify-Credentials-Authorization']}
54 |
55 |
61 | ) : ();
93 | return (
94 |
95 | {error}
96 | {content}
97 |
98 | );
99 | }
100 | }
101 |
102 | const styles = StyleSheet.create({
103 | container: {
104 | flex: 1,
105 | justifyContent: 'center',
106 | alignItems: 'center',
107 | backgroundColor: '#F5FCFF',
108 | },
109 | DigitsAuthenticateButton: {
110 | height: 50,
111 | width: 230,
112 | backgroundColor: '#13988A',
113 | justifyContent: 'center',
114 | borderRadius: 5,
115 | },
116 | DigitsAuthenticateButtonText: {
117 | fontSize: 16,
118 | color: '#fff',
119 | alignSelf: 'center',
120 | fontWeight: 'bold',
121 | },
122 | });
123 |
124 | AppRegistry.registerComponent('Example', () => Example);
125 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | var DigitsManager = require("react-native").NativeModules.DigitsManager;
2 | var DigitsLoginButton = require('./DigitsLoginButton');
3 | var DigitsLogoutButton = require('./DigitsLogoutButton');
4 |
5 | module.exports.DigitsLoginButton = DigitsLoginButton;
6 | module.exports.DigitsLogoutButton = DigitsLogoutButton;
7 | module.exports.DigitsManager = DigitsManager;
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/DigitsKit:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/DigitsKit
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTAPIClient.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTAPIClient.h
3 | // DigitsKit
4 | //
5 | // Copyright © 2015 Twitter Inc. All rights reserved.
6 | //
7 |
8 | #import
9 | #import "DGTSession.h"
10 |
11 | @class DGTDeviceRegisterResponse;
12 | @class DGTLogInAuthResponse;
13 | @class DGTPhoneNumber;
14 | @class DGTAuthenticationConfiguration;
15 | @protocol DGTAPIAuthenticationDelegate;
16 | @protocol DGTAPIChallengeDelegate;
17 |
18 | @interface DGTAPIClient : NSObject
19 |
20 | /**
21 | * Returns an API Client capable of authenticating a Digits user programatically.
22 | *
23 | */
24 | - (instancetype)init;
25 |
26 | /**
27 | *
28 | * Starts the authentication flow using a predetermined phone number.
29 | *
30 | * @param configuration Options to configure the Digits experience. The phoneNumber should be a string containing only numbers, and prefixed with an optional '+' character if the number includes a country dial code. Examples: '+15555555555' (USA, 5555555555), '+525555555555' (Mexico, 5555555555)
31 | * @param authDelegate Delegate will receive a new Challenge view controller once the authentication flow has started. The delegate is required to push or present it to continue the auth flow.
32 | * @param completion Block called after the authentication flow has ended.
33 | */
34 | -(void)authenticateWithConfiguration:(DGTAuthenticationConfiguration *)configuration
35 | delegate:(id)authDelegate
36 | completion:(DGTAuthenticationCompletion)completionBlock;
37 |
38 | @end
39 |
40 | @protocol DGTAPIAuthenticationDelegate
41 |
42 | @required
43 |
44 | /**
45 | * The challenge code has been sent the phone number, the next step is for this delegate is to show the challenge view controller.
46 | *
47 | * @param challengeViewController Challenge view controller to create or log the user in. It can be nil if there was an error.
48 | * @param error Contains an error in the domain `DGTErrorDomain` with one of the codes in `DGTErrorCode`.
49 | */
50 | -(void)challengeViewController:(UIViewController *)challengeViewController error:(NSError *)error;
51 |
52 |
53 | @optional
54 |
55 | /**
56 | * Instantiate a new Challenge view controller for new users signing up for Digits
57 | */
58 | - (UIViewController *)signUpViewControllerWithDeviceRegisterResponse:(DGTDeviceRegisterResponse *)deviceRegisterResponse;
59 |
60 | /**
61 | * Instantiate a new Challenge view controller for existing users logging into Digits
62 | */
63 | - (UIViewController *)logInViewControllerWithLogInResponse:(DGTLogInAuthResponse *)logInResponse;
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTAppearance.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTAppearance.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | /**
10 | * Controls the appearance of all Digits screens and UI elements.
11 | *
12 | * The properties `backgroundColor` and `accentColor` are the only user-configurable colors. The remaining colors are derived from these two colors. The object is always initialized with the default color set.
13 | *
14 | * Fonts in labels, input fields and buttons can be configured with custom fonts using the `headerFont`, `labelFont` and `bodyFont` properties. The disclamers and legal text shown in Digits cannot be configured.
15 | *
16 | * @warning If you disable view controllers from styling the status bar (via `UIViewControllerBasedStatusBarAppearance = NO` in the Info.plist file), your app will have to ensure the status bar style is compatible with the Digits background color, otherwise the status bar may not be legible during the Digits screens. See Apple's documentation for `UIStatusBarStyle` for more information.
17 | *
18 | */
19 | @interface DGTAppearance : NSObject
20 |
21 | /**
22 | * The background color for all views in the Digits flow.
23 | *
24 | * Tip: You can use `[UIColor colorWithPatternImage:]` to have a tiled background image.
25 | *
26 | */
27 | @property (nonatomic, strong) UIColor *backgroundColor;
28 |
29 | /**
30 | * The accent color for all views in the Digits flow. This determines the main color of elements associated with user actions (e.g. buttons).
31 | */
32 | @property (nonatomic, strong) UIColor *accentColor;
33 |
34 | /**
35 | * The font for all headers in the Digits flow.
36 | */
37 | @property (nonatomic, strong) UIFont *headerFont;
38 |
39 | /**
40 | * The font for all labels and buttons in the Digits flow
41 | */
42 | @property (nonatomic, strong) UIFont *labelFont;
43 |
44 | /**
45 | * The font for all text in input fields, country names and other text fields.
46 | */
47 | @property (nonatomic, strong) UIFont *bodyFont;
48 |
49 | /**
50 | * An image for the Login View header.
51 | *
52 | * The image container has a max height of 100px and fit to maintain aspect ratio.
53 | */
54 | @property (nonatomic, strong) UIImage *logoImage;
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTAuthEventDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTAuthEventDelegate.h
3 | // DigitsKit
4 | //
5 | // Copyright © 2016 Twitter Inc. All rights reserved.
6 | //
7 | // DGTAuthEventDelegate is a protocol that allows app using digits sdk to listen and get notified about
8 | // login/signup related events. It defines a number of optional methods as the callbacks to be triggered when
9 | // corresponding events occur.
10 | //
11 | // To use it, make a class implementing this protocol (on selected callbacks) and set the authEventDelegate property
12 | // on [Digits sharedInstance]
13 | //
14 | // Notice that the purpose of these callbacks are for notifications, not for flow controls. So app related logging/stats would
15 | // be good fit for the processing in these callbacks. Executions of these callback events will be dispatched to a non ios main
16 | // queue/thread (created by digits sdk) to follow the best practice. As a result, these callbacks shold not do any UI related
17 | // operations.
18 | //
19 | // This feature is in beta release which means the interface can have breaking changes
20 | // in the future
21 |
22 | @class DGTAuthEventDetails;
23 |
24 | @protocol DGTAuthEventDelegate
25 |
26 | @optional
27 |
28 | /**
29 | * Called when the Digits authentication flow starts.
30 | */
31 | - (void)digitsAuthenticationDidBegin:(DGTAuthEventDetails *)authEventDetails;
32 |
33 | /**
34 | * Called as soon as the phone number screen appears.
35 | */
36 | - (void)digitsPhoneNumberEntryScreenVisited:(DGTAuthEventDetails *)authEventDetails;
37 |
38 | /**
39 | * Called each time a phone number is submitted to Digits.
40 | */
41 | - (void)digitsPhoneNumberSubmitted:(DGTAuthEventDetails *)authEventDetails;
42 |
43 | /**
44 | * Called when the phone number is accepted by Digits. This is an indication that we were able to successfully send a confirmation code to the end-user.
45 | */
46 | - (void)digitsPhoneNumberSubmissionDidSucceed:(DGTAuthEventDetails *)authEventDetails;
47 |
48 | /**
49 | * Called as soon as the confirmation screen appears.
50 | */
51 | - (void)digitsConfirmationCodeEntryScreenVisited:(DGTAuthEventDetails *)authEventDetails;
52 |
53 | /**
54 | * Called each time a confirmation code is submitted to Digits.
55 | */
56 | - (void)digitsConfirmationCodeSubmitted:(DGTAuthEventDetails *)authEventDetails;
57 |
58 | /**
59 | * Called when the whole authentication flow succeesfully finishes.
60 | */
61 | - (void)digitsAuthenticationDidComplete:(DGTAuthEventDetails *)authEventDetails;
62 |
63 | /**
64 | * Called if the -[Digits logout] method is invoked.
65 | */
66 | - (void)digitsLogout:(DGTAuthEventDetails *)authEventDetails;
67 |
68 | /**
69 | * Called when the screen for 2FA pin code entrance is displayed
70 | */
71 | - (void)digitsTwoFactorPinEntryScreenVisited:(DGTAuthEventDetails *)authEventDetails;
72 |
73 | /**
74 | * Called when the user taps the button to submit 2FA pin code
75 | */
76 | - (void)digitsTwoFactorPinSubmitted:(DGTAuthEventDetails *)authEventDetails;
77 |
78 | /**
79 | * Called when the request to submit 2FA pin code receives a successful result from server
80 | */
81 | - (void)digitsTwoFactorPinSubmissionSucceeded:(DGTAuthEventDetails *)authEventDetails;
82 |
83 | /**
84 | * Called when the screen for updating user email is displayed
85 | */
86 | - (void)digitsEmailUpdateScreenVisited:(DGTAuthEventDetails *)authEventDetails;
87 |
88 | /**
89 | * Called when the user taps the button to submit email update
90 | */
91 | - (void)digitsEmailUpdateSubmitted:(DGTAuthEventDetails *)authEventDetails;
92 |
93 | /**
94 | * Called when the request to submit email update request succeeds
95 | */
96 | - (void)digitsEmailUpdateSubmissionSucceeded:(DGTAuthEventDetails *)authEventDetails;
97 |
98 | /**
99 | * Called when the screen for error rescue screen is displayed, which happens when the user runs into
100 | * aggregate number of errors
101 | */
102 | - (void)digitsErrorRescueScreenVisited:(DGTAuthEventDetails *)authEventDetails;
103 |
104 | /**
105 | * Called when the user chooses to dismiss the error rescue screen
106 | */
107 | - (void)digitsUserDismissErrorRescue:(DGTAuthEventDetails *)authEventDetails;
108 |
109 | /**
110 | * Called when the user chooses to retry (with a different phone number) from the error rescue screen
111 | */
112 | - (void)digitsUserRetryOnErrorRescueScreen:(DGTAuthEventDetails *)authEventDetails;
113 |
114 | @end
115 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTAuthEventDetails.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTAuthEventDetails.h
3 | // DigitsKit
4 | //
5 | // Created by Joey Carmello on 5/19/16.
6 | // Copyright © 2016 Twitter Inc. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface DGTAuthEventDetails : NSObject
14 |
15 | // How long has passed since the initial event in the authentication flow
16 | @property (assign, nonatomic, readonly) NSTimeInterval elapsedTime;
17 |
18 | // The language from the locale of the device
19 | @property (strong, nonatomic, readonly) NSString *language;
20 |
21 | // The country derived from the phone number provided
22 | @property (strong, nonatomic, readonly, nullable) NSString *countryISOCode;
23 |
24 | - (instancetype)init __unavailable;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTAuthenticateButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTAuthenticateButton.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 | #import
9 |
10 | @class DGTAppearance;
11 |
12 | /**
13 | * A button that launches the Digits authentication flow.
14 | */
15 | @interface DGTAuthenticateButton : UIButton
16 |
17 | /**
18 | * Returns a pre-customized `UIButton` subclass that launches the Digits authentication flow when tapped and calls `completion` when authentication succeeds or fails.
19 | *
20 | * Internally, this button simply calls `-[Digits authenticateWithCompletion:]`.
21 | *
22 | * @param completion The completion to be called with a `session` object if successful. If the user cancels the authentication flow the session object is `nil`.
23 | * @return An initialized `DGTAuthenticateButton`.
24 | */
25 | + (instancetype)buttonWithAuthenticationCompletion:(DGTAuthenticationCompletion)completion;
26 |
27 | /**
28 | * Sets the appearance of the button and the authentication flow. See `DGTAppearance` for details.
29 | *
30 | * @note Changing the appearance after the button has been added to the window has no effect. In order to see the effect of an appearance change, remove the button from the window and add it again.
31 | *
32 | */
33 | @property (nonatomic, copy) DGTAppearance *digitsAppearance;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTAuthenticationConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTAuthenticationConfiguration.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | @class DGTAppearance;
8 |
9 | /**
10 | * Controls several of the features for authentication flow.
11 | *
12 | */
13 |
14 | typedef NS_OPTIONS(NSInteger, DGTAccountFields) {
15 | DGTAccountFieldsNone = 1 << 0,
16 | DGTAccountFieldsEmail = 1 << 1,
17 | DGTAccountFieldsDefaultOptionMask = DGTAccountFieldsNone
18 | };
19 |
20 | @interface DGTAuthenticationConfiguration : NSObject
21 |
22 | // Appearance of the authentication flow views.
23 | @property (nonatomic, strong) DGTAppearance *appearance;
24 |
25 | // Prepopulate the phone number field with this value.
26 | // Value should be a string containing only numbers, and prefixed with an optional '+' character if the number includes a country dial code.
27 | // If a '+' is provided, the country dial code will be parsed out and selected from the country picker.
28 | // You could also pass only the country code using the '+' prefix and only the country picker will be populated, no phone number.
29 | // Examples: '+15555555555' (USA, 5555555555), '5555555555' (USA, 5555555555), '+345555555555' (Spain, 5555555555), '+52' (Mexico, no number input)
30 | @property (nonatomic, strong) NSString *phoneNumber;
31 |
32 | // Title for the modal screens. Will default to the name of your app.
33 | @property (nonatomic, strong) NSString *title;
34 |
35 | - (instancetype)initWithAccountFields:(DGTAccountFields)accountFields;
36 |
37 | - (instancetype)init __unavailable;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTCompletionViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTCompletionViewController.h
3 | // DigitsKit
4 | //
5 | // Copyright (c) 2015 Twitter Inc. All rights reserved.
6 | //
7 |
8 | @class DGTSession;
9 |
10 | /**
11 | * This protocol is to be implemented by an UIViewController that is pushed into the navigation stack after the Digits non-modal flow is completed.
12 | */
13 | @protocol DGTCompletionViewController
14 |
15 | /*
16 | * It is called after the Digits auth flow has completed with a success or failure before the ViewController
17 | * is pushed into your UINavigationController and `viewDidLoad` is called.
18 | */
19 | -(void)digitsAuthenticationFinishedWithSession:(DGTSession *)session error:(NSError *)error;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTContactAccessAuthorizationStatus.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTContactAccessAuthorizationStatus.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | /**
8 | * Status codes for how the user has responded to a prompt to access their Address Book.
9 | */
10 | typedef NS_ENUM(NSInteger, DGTContactAccessAuthorizationStatus) {
11 |
12 | /**
13 | * User has neither denied nor granted access to their Address Book. They will be prompted for permission to their Address Book when requested.
14 | */
15 | DGTContactAccessAuthorizationStatusPending = 0,
16 |
17 | /**
18 | * User denied access to their Address Book. They will have manually go into privacy settings and grant access to the app.
19 | */
20 | DGTContactAccessAuthorizationStatusDenied = 1,
21 |
22 | /**
23 | * User granted access to their Address Book.
24 | */
25 | DGTContactAccessAuthorizationStatusAccepted = 2
26 | };
27 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTContacts.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTContacts.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 | #import "DGTContactAccessAuthorizationStatus.h"
9 | #import "DGTContactsDebugConfiguration.h"
10 |
11 | @class DGTAppearance;
12 | @class DGTContactsUploadResult;
13 | @class DGTSession;
14 |
15 | /**
16 | * Block type called after the Digits upload contacts flow is complete.
17 | *
18 | * result will be nil in the case of an error.
19 | * error is of the `DGTErrorDomain` domain with one of the codes in `DGTErrorCode`.
20 | */
21 | typedef void (^DGTUploadContactsCompletion)(DGTContactsUploadResult *result, NSError *error);
22 |
23 | /**
24 | * Block type called after Digits lookup contacts is complete.
25 | *
26 | * The matches object contains instances of DGTUser
27 | * error is of the `DGTErrorDomain` domain with one of the codes in `DGTErrorCode`.
28 | */
29 | typedef void (^DGTLookupContactsCompletion)(NSArray *matches, NSString *nextCursor, NSError *error);
30 |
31 | /**
32 | * Block type called after Digits delete all contacts is complete.
33 | *
34 | * error is of the `DGTErrorDomain` domain with one of the codes in `DGTErrorCode`.
35 | */
36 | typedef void (^DGTDeleteAllUploadedContactsCompletion)(NSError *error);
37 |
38 | @interface DGTContacts : NSObject
39 |
40 | /**
41 | * Configuration to override Contacts behavior. e.g. provide a list of contacts that will be used instead of making a real upload request.
42 | */
43 | @property (nonatomic, strong) DGTContactsDebugConfiguration *uploadDebugOverrides;
44 |
45 | /**
46 | * Configuration to override Contacts behavior. e.g. provide a list of contacts that will be used instead of making a real lookup request.
47 | */
48 | @property (nonatomic, strong) DGTContactsDebugConfiguration *lookupDebugOverrides;
49 |
50 | /**
51 | * @return The user's Address Book authorization status for this app.
52 | */
53 | + (DGTContactAccessAuthorizationStatus)contactsAccessAuthorizationStatus;
54 |
55 | /**
56 | * Returns an instance of DGTContacts that can make authenticated requests using the given user session. Subsequent calls to upload, lookup, and delete contacts will be scoped to the user for this session.
57 | *
58 | * @return an instance of DGTContacts
59 | * @param userSession (required) An authenticated user session, such as from `[[Digits sharedInstance] session]`.
60 | */
61 | - (instancetype)initWithUserSession:(DGTSession *)userSession;
62 |
63 | - (instancetype)init __attribute__((unavailable("Use -initWithUserSession: instead")));
64 |
65 | /**
66 | * Uploads the user's Address Book to Digits. If `+[DGTContacts contactsAccessAuthorizationStatus]` is DGTContactAccessAuthorizationStatusPending, the Address Book permission UI will be presented to the user with the standard appearance. The UI is presented as a modal off of the top-most view controller. The modal title is the application name.
67 | *
68 | * @param completion Block called after the upload contacts flow has ended.
69 | */
70 | - (void)startContactsUploadWithCompletion:(DGTUploadContactsCompletion)completion;
71 |
72 | /**
73 | * Uploads the user's Address Book to Digits. If `+[DGTContacts contactsAccessAuthorizationStatus]` is DGTContactAccessAuthorizationStatusPending,, the Address Book permission UI will be presented to the user with the standard appearance. The UI is presented as a modal off of the top-most view controller.
74 | *
75 | * @param title Title for the modal screens. Pass `nil` to use default app name.
76 | * @param completion Block called after the upload contacts flow has ended.
77 | */
78 | - (void)startContactsUploadWithTitle:(NSString *)title completion:(DGTUploadContactsCompletion)completion;
79 |
80 | /**
81 | * Uploads the user's Address Book to Digits. If `+[DGTContacts contactsAccessAuthorizationStatus]` is DGTContactAccessAuthorizationStatusPending,, the Address Book permission UI will be presented to the user with the standard appearance.
82 | *
83 | * @param presenterViewController View controller used to present the modal upload contacts controller. Pass `nil` to use default top-most view controller.
84 | * @param title Title for the modal screens. Pass `nil` to use default app name.
85 | * @param completion Block called after the upload contacts flow has ended.
86 | */
87 | - (void)startContactsUploadWithPresenterViewController:(UIViewController *)presenterViewController title:(NSString *)title completion:(DGTUploadContactsCompletion)completion;
88 |
89 | /**
90 | * Uploads the user's Address Book to Digits. If `+[DGTContacts contactsAccessAuthorizationStatus]` is DGTContactAccessAuthorizationStatusPending,, the Address Book permission UI will be presented to the user.
91 | *
92 | * @param appearance Appearance of the upload contacts flow UI views. Pass `nil` to use the default appearance.
93 | * @param presenterViewController View controller used to present the modal upload contacts controller. Pass `nil` to use default top-most view controller.
94 | * @param title Title for the modal screens. Pass `nil` to use default app name.
95 | * @param completion Block called after the upload contacts flow has ended.
96 | */
97 | - (void)startContactsUploadWithDigitsAppearance:(DGTAppearance *)appearance presenterViewController:(UIViewController *)presenterViewController title:(NSString *)title completion:(DGTUploadContactsCompletion)completion;
98 |
99 | /**
100 | * Initiates a request to retrieve the authenticated user's contact matches. This method will fetch a portion of matches from Digits, and will yield a cursor that can be provided in a subsequent call to offset the next set of matches.
101 | *
102 | * @param cursor An opaque string that can be used in a follow up call to this method to indicate an offset for the returned results. If null, return the first `count` of users.
103 | * @param completion Block called after the lookup contact matches request has finished.
104 | */
105 | - (void)lookupContactMatchesWithCursor:(NSString *)cursor completion:(DGTLookupContactsCompletion)completion;
106 |
107 | /**
108 | * Initiates a request to delete all of the authenticated user's uploaded contacts.
109 | *
110 | * @param completion Block called after the delete all uploaded contacts request has finished.
111 | */
112 | - (void)deleteAllUploadedContactsWithCompletion:(DGTDeleteAllUploadedContactsCompletion)completion;
113 |
114 | @end
115 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTContactsDebugConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTContactsDebugConfiguration.h
3 | // DigitsKit
4 | //
5 | // Copyright © 2016 Twitter Inc. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | @class DGTUser;
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /**
15 | * Overrides for Digits contacts features
16 | */
17 | @interface DGTContactsDebugConfiguration : NSObject
18 |
19 | - (instancetype)initSuccessStateWithContacts:(NSArray *)contacts;
20 |
21 | - (instancetype)initErrorStateWithDigitsError:(DGTErrorCode)error;
22 |
23 | - (instancetype)init __unavailable;
24 |
25 | + (NSArray *)stubbedContactsWithDigitsUserIDs:(NSArray *)digitsUserIDs;
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTContactsEventDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTContactsEventDelegate.h
3 | // DigitsKit
4 | //
5 | // Copyright © 2016 Twitter Inc. All rights reserved.
6 | //
7 | // DGTContactsEventDelegate is a protocol that allows app using digits sdk to listen and get notified about
8 | // contacts related events. It defines a number of optional methods as the callbacks to be triggered when
9 | // corresponding events occur.
10 | //
11 | // To use it, make a class implementing this protocol (on selected callbacks) and set the contactsEventDelegate property
12 | // on [Digits sharedInstance]
13 | //
14 | // Notice that the purpose of these callbacks are for notifications, not for flow controls. So app related logging/stats would
15 | // be good fit for the processing in these callbacks. Executions of these callback events will be dispatched to a non ios main
16 | // queue/thread (created by digits sdk) to follow the best practice. As a result, these callbacks shold not do any UI related
17 | // operations.
18 | //
19 | // For each callback event, there is an associated event detail parameter, whose type is defined as a protocol. They
20 | // provide additional data regarding the event. Some of these event parameter protocols are as of now empty without any methods
21 | // they are defined to be a placeholder so that we can add data to these types in the future.
22 | //
23 | // This feature is in beta release which means the interface can have breaking changes
24 | // in the future
25 |
26 |
27 | #import
28 |
29 | #import "DGTErrors.h"
30 |
31 | @protocol ContactsPermissionForDigitsImpressionDetails
32 | @end
33 |
34 | @protocol ContactsPermissionForDigitsAllowedDetails
35 | @end
36 |
37 | @protocol ContactsPermissionForDigitsDeferredDetails
38 | @end
39 |
40 | @protocol ContactsUploadStartDetails
41 | @end
42 |
43 | @protocol ContactsUploadSuccessDetails
44 | // return the number of contacts the app tries to upload
45 | - (int)totalContactsCount;
46 | // return the number of contacts that are uploaded successfully
47 | - (int)successContactsUploadCount;
48 | @end
49 |
50 | @protocol ContactsUploadFailureDetails
51 | // return error code (defined in DGTErrorCode) for encountered failure during contacts upload
52 | - (DGTErrorCode) errorCode;
53 | @end
54 |
55 | @protocol ContactsLookupStartDetails
56 | // whether this is a lookup query with a non-nil cursor
57 | - (BOOL)hasCursor;
58 | @end
59 |
60 | @protocol ContactsLookupSuccessDetails
61 | // how many contacts matches are found in this query
62 | - (int)matchCount;
63 | @end
64 |
65 | @protocol ContactsLookupFailureDetails
66 | @end
67 |
68 | @protocol ContactsDeletionStartDetails
69 | @end
70 |
71 | @protocol ContactsDeletionSuccessDetails
72 | @end
73 |
74 | @protocol ContactsDeletionFailureDetails
75 | @end
76 |
77 | // external facing logger protocol for contacts related events
78 | @protocol DGTContactsEventDelegate
79 | @optional
80 |
81 | /**
82 | * Called when the contacts read permission screen is displayed.
83 | */
84 | - (void)contactsPermissionForDigitsImpression:(id)details;
85 |
86 | /**
87 | * Called when the users allows read permission on the address book read permission screen.
88 | */
89 | - (void)contactsPermissionForDigitsAllowed:(id)details;
90 |
91 | /**
92 | * Called when the users rejects read permission on the address book read permission screen.
93 | */
94 | - (void)contactsPermissionForDigitsDeferred:(id)details;
95 |
96 |
97 | /**
98 | * Called when sdk starts to upload user contacts.
99 | */
100 | - (void)contactsUploadStart:(id)details;
101 |
102 | /**
103 | * Called when we see a full success or partial success ( have >= 1 records uploaded successfully) of the
104 | * contacts upload operation.
105 | * The event parameter type ContactsUploadSuccessDetails allows you to tell how many actually succeeded
106 | */
107 | - (void)contactsUploadSuccess:(id)details;
108 |
109 | /**
110 | * Called when we see a full failure in sdk's contacts upload attempt: 0 contact is uploaded successfully.
111 | * Notice that for partial upload success case, only contactsUploadSuccess is triggered
112 | */
113 | - (void)contactsUploadFailure:(id)details;
114 |
115 | /**
116 | * Called when sdk starts to fetch next page of contacts matches.
117 | */
118 | - (void)contactsLookupStart:(id)details;
119 |
120 | /**
121 | * Called when we see contacts match query for the current page succeed. It's possible that the matchCount is
122 | * 0 in such an event
123 | */
124 | - (void)contactsLookupSuccess:(id)details;
125 |
126 | /**
127 | * Called when we see a failure of contacts lookup request
128 | */
129 | - (void)contactsLookupFailure:(id)details;
130 |
131 | /**
132 | * Called when sdk starts to delete user uploaded contacts
133 | */
134 | - (void)contactsDeletionStart:(id)details;
135 |
136 | /**
137 | * Called the contacts deletion is successful
138 | */
139 | - (void)contactsDeletionSuccess:(id)details;
140 |
141 | /**
142 | * Called when we see a failure of contacts deletion operation
143 | */
144 | - (void)contactsDeletionFailure:(id)details;
145 |
146 | @end
147 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTContactsUploadResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTContactsUploadResult.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | @interface DGTContactsUploadResult : NSObject
10 |
11 | /**
12 | * The total number of records from the Address Book Digits attempted to upload.
13 | */
14 | @property (nonatomic, readonly) NSUInteger totalContacts;
15 |
16 | /**
17 | * The number of attempted contacts that were successfully uploaded.
18 | */
19 | @property (nonatomic, readonly) NSUInteger numberOfUploadedContacts;
20 |
21 | - (instancetype)init __unavailable;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTDebugConfiguration.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTDebugConfiguration.h
3 | //
4 | // Copyright © 2016 Twitter Inc. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | @class DGTSession;
10 |
11 | /**
12 | * Overrides for Digits authentication features
13 | */
14 |
15 | @interface DGTDebugConfiguration : NSObject
16 |
17 | - (instancetype)initSuccessStateWithDigitsSession:(DGTSession *)session;
18 |
19 | - (instancetype)initErrorStateWithDigitsError:(DGTErrorCode)error;
20 |
21 | - (instancetype)init __unavailable;
22 |
23 | /**
24 | * Returns a stubbed session. Note that this session will not provide valid oauth echo headers.
25 | * If passing this session to a server, note that you'll be unable to query the Digits ouath echo API to lookup account details.
26 | * Be careful to handle this case in your testing (possibly by checking for the stubbed userID value `STUBBED_SESSION`).
27 | */
28 | + (DGTSession *)defaultDebugSession;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTErrors.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTErrors.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | /**
8 | * The NSError domain of errors surfaced by Digits.
9 | */
10 | FOUNDATION_EXPORT NSString * const DGTErrorDomain;
11 |
12 | /**
13 | * Error codes surfaced by the Digits kit.
14 | */
15 | typedef NS_ENUM(NSInteger, DGTErrorCode) {
16 | /**
17 | * Unspecified error.
18 | */
19 | DGTErrorCodeUnspecifiedError = 0,
20 |
21 | /**
22 | * User canceled the Digits authentication flow.
23 | */
24 | DGTErrorCodeUserCanceledAuthentication = 1,
25 |
26 | /**
27 | * One of a few things may be happening:
28 | * - The network is down.
29 | * - The phone number is invalid or incomplete.
30 | * - An unexpected server error occurred.
31 | */
32 | DGTErrorCodeUnableToAuthenticateNumber = 2,
33 |
34 | /**
35 | * User entered incorrect confirmation number too many times.
36 | */
37 | DGTErrorCodeUnableToConfirmNumber = 3,
38 |
39 | /**
40 | * User entered incorrect pin number too many times.
41 | */
42 | DGTErrorCodeUnableToAuthenticatePin = 4,
43 |
44 | /**
45 | * User canceled find contacts flow.
46 | */
47 | DGTErrorCodeUserCanceledFindContacts = 5,
48 |
49 | /**
50 | * User did not grant Digits access to their Address Book.
51 | */
52 | DGTErrorCodeUserDeniedAddressBookAccess = 6,
53 |
54 | /**
55 | * Failure to read from the AddressBook.
56 | * When ABAddressBookCreateWithOptions fails to return a proper AddressBook.
57 | */
58 | DGTErrorCodeFailedToReadAddressBook = 7,
59 |
60 | /**
61 | * Legacy catch-all error for contact upload failure.
62 | */
63 | DGTErrorCodeUnableToUploadContacts = 8,
64 |
65 | /**
66 | * Something went wrong while deleting contacts.
67 | */
68 | DGTErrorCodeUnableToDeleteContacts = 9,
69 |
70 | /**
71 | * Something went wrong while looking up contact matches.
72 | */
73 | DGTErrorCodeUnableToLookupContactMatches = 10,
74 |
75 | /**
76 | * Something went wrong while attempting to save the user's email address
77 | */
78 | DGTErrorCodeUnableToCreateEmailAddress = 11,
79 |
80 | /**
81 | * Contact upload failed due to rate limiting
82 | */
83 | DGTErrorCodeUnableToUploadContactsRateLimit = 12,
84 |
85 | /**
86 | * Contact upload failed due to internal server error 0
87 | */
88 | DGTErrorCodeUnableToUploadContactsInternalServer0 = 13,
89 |
90 | /**
91 | * Contact upload failed due to internal server error 131
92 | */
93 | DGTErrorCodeUnableToUploadContactsInternalServer131 = 14,
94 |
95 | /**
96 | * Contact upload failed due to the server being unavailable
97 | */
98 | DGTErrorCodeUnableToUploadContactsServerUnavailable = 15,
99 |
100 | /**
101 | * Contact upload failed due to request entity being too large
102 | */
103 | DGTErrorCodeUnableToUploadContactsEntityTooLarge = 16,
104 |
105 | /**
106 | * Contact upload failed due to bad authentication data
107 | */
108 | DGTErrorCodeUnableToUploadContactsBadAuthentication = 17,
109 |
110 | /**
111 | * Contact upload failed due to out of bounds timestamp
112 | */
113 | DGTErrorCodeUnableToUploadContactsOutOfBoundsTimestamp = 18,
114 |
115 | /**
116 | * Contact upload failed due to generic bad request
117 | */
118 | DGTErrorCodeUnableToUploadContactsGenericBadRequest = 19
119 | };
120 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTOAuthSigning.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTOAuthSigning.h
3 | // DigitsKit
4 | //
5 | // Copyright (c) 2015 Twitter Inc. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | @class TWTRAuthConfig;
11 | @class DGTSession;
12 |
13 | @interface DGTOAuthSigning : NSObject
14 |
15 | /**
16 | * @name Initialization
17 | */
18 |
19 | /**
20 | * Instantiate a `DGTOAuthSigning` object with the parameters it needs to generate the OAuth signatures.
21 | *
22 | * @param authConfig (required) Encapsulates credentials required to authenticate a Digits application.
23 | * @param authSession (required) Encapsulated credentials associated with a user session.
24 | *
25 | * @return An initialized `DGTOAuthSigning` object or nil if any of the parameters are missing.
26 | *
27 | * @see TWTRAuthConfig
28 | * @see DGTSession
29 | */
30 | - (instancetype)initWithAuthConfig:(TWTRAuthConfig *)authConfig authSession:(DGTSession *)authSession NS_DESIGNATED_INITIALIZER;
31 |
32 | /**
33 | * Unavailable. Use `-initWithAuthConfig:authSession:` instead.
34 | */
35 | - (instancetype)init __attribute__((unavailable("Use -initWithAuthConfig:authSession: instead.")));
36 |
37 | /**
38 | * This method provides you with the OAuth signature, as well as the formed URL with the query string, to send a request to `/sdk/account`.
39 | *
40 | * @param params (optional) Extra custom params to be added to the Request URL. These parameters will be part of the signature which authenticity is validated by the Digits' API. These extra parameters help as a Nonce between the client's session but they are ignored by the Digits' API. The params in the Request URL can be parsed and used by your server to validate that this header is not being reused by another one of your sessions.
41 | *
42 | * @return A dictionary with the fully formed Request URL under `TWTROAuthEchoRequestURLStringKey` (`NSString`), and the `Authorization` header in `TWTROAuthEchoAuthorizationHeaderKey` (`NSString`), to be used to sign the request.
43 | *
44 | * @see More information about OAuth Echo: https://dev.twitter.com/oauth/echo
45 | * @see More information about Verify Credentials: https://docs.fabric.io/ios/twitter/oauth-echo.html
46 | */
47 | - (NSDictionary *)OAuthEchoHeadersToVerifyCredentialsWithParams:(NSDictionary *)params;
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTSession.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTSession.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import "DGTErrors.h"
8 | #import
9 |
10 | /**
11 | * A `DGTSession` object contains user session information after a successful Digits authentication.
12 | */
13 | @interface DGTSession : NSObject
14 |
15 | /**
16 | * The authorization token for this session. Save this token in order to make future authenticated requests to Digits APIs.
17 | */
18 | @property (nonatomic, copy, readonly) NSString *authToken;
19 |
20 | /**
21 | * The token secret for this session. Save this secret in order to make future authenticated requests to Digits APIs.
22 | */
23 | @property (nonatomic, copy, readonly) NSString *authTokenSecret;
24 |
25 | /**
26 | * The unique ID of the authenticated user. Save this ID in order to make future requests to Digits on behalf of the authenticated user.
27 | */
28 | @property (nonatomic, copy, readonly) NSString *userID;
29 |
30 | /**
31 | * The phone number provided by the user, prefixed by the country code (e.g. `+15554443322`).
32 | */
33 | @property (nonatomic, copy, readonly) NSString *phoneNumber;
34 |
35 | /**
36 | * The email address provided by the user.
37 | *
38 | * @warning The email address is `nil` if the user hasn't provided it to an app. Email address should be considered an optional field.
39 | */
40 | @property (nonatomic, copy, readonly) NSString *emailAddress;
41 |
42 | @property (nonatomic, readonly) BOOL emailAddressIsVerified;
43 |
44 | /**
45 | * Initializes a session object with the provided session details.
46 | *
47 | * @param authToken The authorization token for the session.
48 | * @param authTokenSecret The authorization token secret for the session.
49 | * @param userID The unique ID for the user associated with the session.
50 | * @param phoneNumber The user's phone number, e.g. `+15554443322`.
51 | *
52 | * @return A `DGTSession` object initialized with the provided parameters.
53 | */
54 | - (instancetype)initWithAuthToken:(NSString *)authToken authTokenSecret:(NSString *)authTokenSecret userID:(NSString *)userID phoneNumber:(NSString *)phoneNumber;
55 |
56 | /**
57 | * Initializes a session object with the provided session details.
58 | *
59 | * @param authToken The authorization token for the session.
60 | * @param authTokenSecret The authorization token secret for the session.
61 | * @param userID The unique ID for the user associated with the session.
62 | * @param phoneNumber The user's phone number, e.g. `+15554443322`.
63 | * @param emailAddress The user's email address, e.g. `test@example.com`.
64 | * @param emailAddressIsVerified Whether the user's email address has been verified or not
65 | *
66 | * @return A `DGTSession` object initialized with the provided parameters.
67 | */
68 | - (instancetype)initWithAuthToken:(NSString *)authToken authTokenSecret:(NSString *)authTokenSecret userID:(NSString *)userID phoneNumber:(NSString *)phoneNumber emailAddress:(NSString *)emailAddress emailAddressIsVerified:(BOOL)emailAddressIsVerified;
69 |
70 | @end
71 |
72 |
73 | /**
74 | * Block type called after the Digits authentication flow is complete.
75 | *
76 | * The `session` object contains the session data if the authentication was successful. If the authentication was unsuccessful, `session` is `nil` and `error` contains an error in the domain `DGTErrorDomain` with one of the codes in `DGTErrorCode`.
77 | */
78 | typedef void (^DGTAuthenticationCompletion)(DGTSession *session, NSError *error);
79 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTSessionUpdateDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTSessionUpdateDelegate.h
3 | // DigitsKit
4 | //
5 | // Copyright (c) 2015 Twitter Inc. All rights reserved.
6 | //
7 |
8 | @class DGTSession;
9 |
10 | /**
11 | * This delegate is notified whenever there has been a change in the `Digits` session.
12 | */
13 | @protocol DGTSessionUpdateDelegate
14 |
15 | /**
16 | * Notifies when the access token and secret, or the phone number for the current user have changed.
17 | *
18 | * @param newSession New `Digits` session containing the updated values. The new phone number in a normalized format e.g. +15555555555
19 | */
20 | - (void)digitsSessionHasChanged:(DGTSession *)newSession;
21 |
22 | /**
23 | * Notifies when the current session has expired. At this moment the Digits session has been logged out and you should start the Digit's login flow again to fetch a new Session.
24 | * Examples of this: the user has been suspended or they have deactivated their account.
25 | *
26 | * @param userID The id for which user the session has been invalidated
27 | */
28 | - (void)digitsSessionExpiredForUserID:(NSString *)userID;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DGTUser.h:
--------------------------------------------------------------------------------
1 | //
2 | // DGTUser.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | @interface DGTUser : NSObject
10 |
11 | /**
12 | * The ID of the Digits user
13 | */
14 | @property (nonatomic, copy, readonly) NSString *userID;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/Digits.h:
--------------------------------------------------------------------------------
1 | //
2 | // Digits.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #if TARGET_OS_WATCH
8 | #error Digits doesn't support watchOS
9 | #endif
10 |
11 | #import
12 | #if !TARGET_OS_TV
13 | #import
14 | #import
15 | #endif
16 | #import
17 | #import
18 |
19 | @class DGTAuthenticationConfiguration;
20 | @class DGTDebugConfiguration;
21 | @class TWTRAuthConfig;
22 | @class UIViewController;
23 | @protocol DGTSessionUpdateDelegate;
24 | @protocol DGTAuthEventDelegate;
25 | @protocol DGTContactsEventDelegate;
26 | @protocol DGTCompletionViewController;
27 |
28 | NS_ASSUME_NONNULL_BEGIN
29 |
30 | /**
31 | * The `Digits` class contains the main methods to implement the Digits authentication flow.
32 | */
33 | @interface Digits : NSObject
34 |
35 | /**
36 | * Returns the unique Digits object (singleton).
37 | *
38 | * @return The Digits singleton.
39 | */
40 | + (Digits *)sharedInstance;
41 |
42 | /**
43 | * Start Digits with your consumer key and secret. These will override any credentials
44 | * present in your applications Info.plist.
45 | *
46 | * You do not need to call this method unless you wish to provide credentials other than those
47 | * in your Info.plist.
48 | *
49 | * @param consumerKey Your Digits application's consumer key.
50 | * @param consumerSecret Your Digits application's consumer secret.
51 | */
52 | - (void)startWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)consumerSecret;
53 |
54 | /**
55 | * Start Digits with a consumer key, secret, and keychain access group. See -[Digits startWithConsumerKey:consumerSecret:]
56 | *
57 | * @param consumerKey Your Digits application's consumer key.
58 | * @param consumerSecret Your Digits application's consumer secret.
59 | * @param accessGroup An optional keychain access group to apply to session objects stored in the keychain.
60 | *
61 | * @note In the majority of situations applications will not need to specify an access group to use with Digits sessions.
62 | * This value is only needed if you plan to share credentials with another application that you control or if you are
63 | * using Digits with an app extension.
64 | */
65 | - (void)startWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)consumerSecret accessGroup:(nullable NSString *)accessGroup;
66 |
67 | /**
68 | *
69 | * @return The Digits user session or nil if there's no authenticated user.
70 | */
71 | - (nullable DGTSession *)session;
72 |
73 | /**
74 | * Authentication configuration details. Encapsulates the `consumerKey` and `consumerSecret` credentials required to authenticate a Twitter application.
75 | */
76 | @property (nonatomic, strong, readonly) TWTRAuthConfig *authConfig;
77 |
78 | /**
79 | * Notifies whenever there have been changes to the Digits Session or if it is no longer a valid session.
80 | */
81 | @property (nonatomic, weak) id sessionUpdateDelegate;
82 |
83 | /**
84 | * Be notified of various events taking place during the authentcation flow.
85 | */
86 | @property (nonatomic, weak) id authEventDelegate;
87 |
88 | /**
89 | * Be notified of various contacts related activities flow.
90 | */
91 | @property (nonatomic, weak) id contactsEventDelegate;
92 |
93 |
94 | /**
95 | * Configuration to override Digits behavior. e.g. provide a digits session stub that will be returned instead of completing the authentication flow.
96 | */
97 | @property (nonatomic, strong, nullable) DGTDebugConfiguration *debugOverrides;
98 |
99 | /**
100 | * Starts the authentication flow UI with the standard appearance. The UI is presented as a modal off of the top-most view controller. The modal title is the application name.
101 | *
102 | * @param completion Block called after the authentication flow has ended.
103 | */
104 | - (void)authenticateWithCompletion:(DGTAuthenticationCompletion)completion __TVOS_UNAVAILABLE;
105 |
106 | /**
107 | * Starts the authentication flow in a modal UI
108 | *
109 | * @param viewController View controller used to present the modal authentication controller. Pass `nil` to use default top-most view controller.
110 | * @param configuration Options to configure the Digits experience
111 | * @param completion Block called after the authentication flow has ended.
112 | */
113 | - (void)authenticateWithViewController:(nullable UIViewController *)viewController configuration:(DGTAuthenticationConfiguration *)configuration completion:(DGTAuthenticationCompletion)completion __TVOS_UNAVAILABLE;
114 |
115 | /**
116 | * Starts the authentication flow in your own navigation UI. Digits view controllers will be pushed into the passed navigation controller and after the flow is done, success or failure; the completion view controller will be pushed into the top of the original stack.
117 | *
118 | * @param navigationController Navigation controller used to pushed the Digits view into.
119 | * @param configuration Options to configure the Digits experience
120 | * @param completionViewController View controller pushed to the navigation controller when the auth flow is completed
121 | */
122 | - (void)authenticateWithNavigationViewController:(UINavigationController *)navigationController configuration:(DGTAuthenticationConfiguration *)configuration completionViewController:(id)completionViewController __TVOS_UNAVAILABLE;
123 |
124 | /**
125 | * Deletes the local Digits user session from this app. This will not make a network request to invalidate the session. Subsequent calls to `authenticateWith` methods will start a new Digits authentication flow.
126 | */
127 | - (void)logOut;
128 |
129 | @end
130 |
131 | NS_ASSUME_NONNULL_END
132 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Headers/DigitsKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // DigitsKit.h
3 | // DigitsKit
4 | //
5 | // Copyright (c) 2015 Twitter Inc. All rights reserved.
6 | //
7 |
8 | #if __has_feature(modules)
9 | @import AddressBook;
10 | @import Foundation;
11 | @import UIKit;
12 | @import TwitterCore;
13 | #else
14 | #import
15 | #import
16 | #import
17 | #import
18 | #endif
19 |
20 | #if TARGET_OS_IOS
21 | #import
22 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000
23 | #error "Digits doesn't support iOS 7.x and lower. Please, change your minimum deployment target to iOS 8.0"
24 | #endif
25 | #elif TARGET_OS_TV
26 | #error This is Digits for iOS. Use the Digits for tvOS framework instead.
27 | #elif TARGET_OS_WATCH
28 | #error Digits doesn't support watchOS
29 | #else
30 | #import
31 | #endif
32 |
33 | #import "DGTAPIClient.h"
34 | #import "DGTAuthEventDelegate.h"
35 | #import "DGTContactsEventDelegate.h"
36 | #import "DGTAuthEventDetails.h"
37 | #import "DGTAuthenticateButton.h"
38 | #import "DGTAuthenticationConfiguration.h"
39 | #import "DGTCompletionViewController.h"
40 | #import "DGTContactAccessAuthorizationStatus.h"
41 | #import "DGTContacts.h"
42 | #import "DGTContactsDebugConfiguration.h"
43 | #import "DGTContactsUploadResult.h"
44 | #import "DGTDebugConfiguration.h"
45 | #import "DGTUser.h"
46 | #import "DGTAppearance.h"
47 | #import "DGTErrors.h"
48 | #import "DGTOAuthSigning.h"
49 | #import "DGTSession.h"
50 | #import "DGTSessionUpdateDelegate.h"
51 | #import "Digits.h"
52 |
53 | /**
54 | * `DigitsKit` can be used as an element in the array passed to the `+[Fabric with:]`.
55 | */
56 | #define DigitsKit [Digits sharedInstance]
57 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Info.plist
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module DigitsKit {
2 | umbrella header "DigitsKit.h"
3 |
4 | export *
5 | module * { export * }
6 |
7 | link framework "AddressBook"
8 | link framework "SafariServices"
9 |
10 | header "DGTAPIClient.h"
11 | header "DGTAppearance.h"
12 | header "DGTAuthEventDelegate.h"
13 | header "DGTAuthEventDetails.h"
14 | header "DGTAuthenticateButton.h"
15 | header "DGTAuthenticationConfiguration.h"
16 | header "DGTCompletionViewController.h"
17 | header "DGTContactAccessAuthorizationStatus.h"
18 | header "DGTContacts.h"
19 | header "DGTContactsDebugConfiguration.h"
20 | header "DGTContactsEventDelegate.h"
21 | header "DGTContactsUploadResult.h"
22 | header "DGTDebugConfiguration.h"
23 | header "DGTErrors.h"
24 | header "DGTOAuthSigning.h"
25 | header "DGTSession.h"
26 | header "DGTSessionUpdateDelegate.h"
27 | header "DGTUser.h"
28 | header "Digits.h"
29 | header "DigitsKit.h"
30 | }
31 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Resources:
--------------------------------------------------------------------------------
1 | Versions/Current/Resources
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTAssistedAuthViewController.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTAssistedAuthViewController.nib
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTAuthViewController.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTAuthViewController.nib
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTChallengeViewController.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTChallengeViewController.nib
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTCodeField.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTCodeField.nib
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTCountryTableViewController.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTCountryTableViewController.nib
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTEmailViewController.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTEmailViewController.nib
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTPinCodeFormViewController.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTPinCodeFormViewController.nib
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTUploadContactsViewController.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/DGTUploadContactsViewController.nib
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/TFSScribe.momd/TFSScribe.mom:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/TFSScribe.momd/TFSScribe.mom
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/TFSScribe.momd/VersionInfo.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/TFSScribe.momd/VersionInfo.plist
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/addressbook-find-friends.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/addressbook-find-friends.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/addressbook-find-friends@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/addressbook-find-friends@2x.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/addressbook-find-friends@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/addressbook-find-friends@3x.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ar.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ar.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/bg.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/bg.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/bn.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/bn.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ca.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ca.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/cs.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/cs.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/da.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/da.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/de.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/de.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-icon-mid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-icon-mid.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-icon.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-icon@2x.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-icon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-icon@3x.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-name-mid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-name-mid.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-name.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-name@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-name@2x.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-name@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/digits-logo-name@3x.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/el.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/el.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/en-gb.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/en-gb.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/en.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /* Label instructing customer on how to enter the code on digits.com */
2 | "ASSISTED_AUTH_INSTRUCTIONS" = "Visit %@ and enter the following code to sign into %@";
3 |
4 | /* Label before phone input field */
5 | "LABEL_ENTER_PHONE_NUMBER" = "What's your phone number?";
6 |
7 | /* Send confirmation code button text */
8 | "BUTTON_SEND_CONF_CODE" = "Send confirmation code";
9 |
10 | /* Sending confirmation code button text */
11 | "BUTTON_SENDING_CONF_CODE" = "Sending confirmation code";
12 |
13 | /* Sent confirmation code button text */
14 | "BUTTON_SENT_CONF_CODE" = "Sent confirmation code";
15 |
16 | /* Footnote disclaimer for send confirmation code screen */
17 | "FOOTNOTE_SEND_CONF_CODE" = "By tapping “Send confirmation code” above, Digits by Twitter will send you an SMS to confirm your phone number. On the next screen, you can choose “Resend Code” to initiate another SMS or “Call me” to initiate a phone call to confirm your phone number. Message, call, & data rates may apply.";
18 |
19 | /* Footnote disclaimer for call me to send a confirmation code screen */
20 | "FOOTNOTE_CONF_CODE_CALL_ME" = "By tapping “Call me” above, Digits by Twitter will send you a voice call to confirm your phone number. Call & data rates may apply.";
21 |
22 | /* Description that email is being added to a user's Digits profile */
23 | "FOOTNOTE_EMAIL_DISCLOSURE" = "By tapping “Continue” above, you are adding this email to your Digits account. You agree that this app and all apps listed in your Digits account can access this email address and that their users can discover you by email.";
24 |
25 | /* Label before confirmation code input field */
26 | "LABEL_ENTER_CONF_CODE" = "We sent you a 6-digit code.";
27 |
28 | /* Label before email input field */
29 | "LABEL_ENTER_EMAIL" = "Enter your email.";
30 |
31 | /* Button to go back from Challenge VC */
32 | "BUTTON_EDIT_NUMBER" = "Edit number";
33 |
34 | /* Create account button title */
35 | "BUTTON_CREATE_ACCOUNT" = "Create account";
36 |
37 | /* Creating account button title */
38 | "BUTTON_CREATING_ACCOUNT" = "Creating account";
39 |
40 | /* Created account button title */
41 | "BUTTON_CREATED_ACCOUNT" = "Created account";
42 |
43 | /* Button title to indicate moving forward to the next step */
44 | "BUTTON_CONTINUE" = "Continue";
45 |
46 | /* Button title for logging-in event */
47 | "BUTTON_LOGGING_IN" = "Logging in";
48 |
49 | /* Button title for verifying accont event */
50 | "BUTTON_VERIFYING" = "Verifying";
51 |
52 | /* Button title for in-progress event */
53 | "BUTTON_SENDING" = "Sending...";
54 |
55 | /* Button title for successful continuation */
56 | "BUTTON_DONE" = "Done";
57 |
58 | /* Button title for initiating a voice verification call */
59 | "CALL_ME_ACTION" = "Call me";
60 |
61 | /* Button title showing progress towards a phone call being initiated */
62 | "CALL_ME_LOADING" = "Calling...";
63 |
64 | /* Button title for requesting a new confirmation code */
65 | "BUTTON_RESEND_CONF_CODE" = "Resend code";
66 |
67 | /* Footnote when creating account */
68 | "FOOTNOTE_CREATE_ACCOUNT" = "By tapping “Create account” above, you agree to the Terms of Service, Privacy Policy, and Cookies Use of Digits by Twitter, to share your phone number with %@, and that other users of %@ can discover you by phone number.";
69 |
70 | /* Footnote when logging into an existing account */
71 | "FOOTNOTE_LOGIN" = "By tapping “Continue” above, your Digits phone number and/or email address will be shared with %@ and other users of %@ can discover you by phone number and/or email.";
72 |
73 | /* Footnote when logging into an existing account but the terms of service have changed */
74 | "FOOTNOTE_TOS_UPDATE" = "By tapping “Continue” above, you agree to the updated Terms of Service, Privacy Policy, and Cookies Use of Digits by Twitter, to share your Digits phone number and/or email address with %@, and that other users of %@ can discover you by phone number and/or email.";
75 |
76 | /* Text to be inserted when the name of the app is unknown in the sentence: "... other users of [app name] can discover you..." */
77 | "PARTIAL_FOOTNOTE_THIS_APP" = "this app";
78 |
79 | /* Dismiss button text */
80 | "BUTTON_DISMISS" = "Dismiss";
81 |
82 | /* Retry button text */
83 | "BUTTON_RETRY" = "Retry";
84 |
85 | /* Not now button text */
86 | "BUTTON_NOT_NOW" = "Not now";
87 |
88 | /* Okay button text */
89 | "BUTTON_OKAY" = "OK";
90 |
91 | /* Large label when we couldn't confirm a user's number */
92 | "LABEL_UNABLE_TO_CONFIRM_NUMBER" = "Unable to confirm your phone number";
93 |
94 | /* Text explaining why we couldn't confirm a user's number */
95 | "LABEL_UNABLE_TO_CONFIRM_NUMBER_EXPLANATION" = "Sorry, we are having trouble sending you a confirmation code.";
96 |
97 | /* Title for description explaining what the find your friends feature does */
98 | "LABEL_FIND_YOUR_FRIENDS_TITLE" = "Find your friends";
99 |
100 | /* Text explaining why we're asking to upload the user's address book */
101 | "LABEL_EXPLAIN_FIND_YOUR_FRIENDS" = "We use Digits by Twitter to find more of your friends who use this app. When you tap Ok, we'll upload your address book to Digits by Twitter so that we can help you find users of %@ that you know or help other users of %@ find you.";
102 |
103 | /* Button text for trying a different number */
104 | "BUTTON_TRY_DIFFERENT_NUMBER" = "Try a different number";
105 |
106 | /* Error text when number may be invalid */
107 | "ERROR_CHECK_NUMBER_TRY_AGAIN" = "Please check your number and try again";
108 |
109 | /* Error text when confirmation code may be invalid */
110 | "ERROR_CHECK_CODE_TRY_AGAIN" = "Please check your code and try again";
111 |
112 | "ERROR_CANT_SMS" = "Unable to send this number an SMS message.";
113 |
114 | /* Error text when email may be invalid */
115 | "ERROR_CHECK_EMAIL_TRY_AGAIN" = "Please check your email and try again";
116 |
117 | /* Error text when network connection may be broken, includes error code */
118 | "ERROR_CHECK_CONNECTION_TRY_AGAIN" = "Whoops, looks like we hit a network issue. Let’s try that again? [%@]";
119 |
120 | /* Authenticate button label */
121 | "BUTTON_AUTHENTICATE" = "Use my phone number";
122 |
123 | /* PIN Code entry screen header label */
124 | "LABEL_ENTER_2_STEP_VERIFICATION_CODE" = "Enter 2-step verification code.";
125 |
126 | /* PIN Code entry screen footer label */
127 | "FOOTNOTE_2_STEP_VERIFICATION_CODE" = "You have previously set a 2-step verification code on digits.com";
128 |
129 | /* Message to show developers to configure their Digits app */
130 | "ONBOARDING_MESSAGE" = "Log into https://fabric.io to set your App's name which will be included in verification emails and SMS/voice authorization messages.";
131 |
132 | /* Message to show developers to configure their Answers logging */
133 | "ONBOARDING_MESSAGE_ANSWERS" = "Add the Answers framework to your app to enable Digits event logging automatically. Learn more at https://answers.io";
134 |
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/es.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/es.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/fa.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/fa.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/fi.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/fi.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/fr.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/fr.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/gu.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/gu.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/he.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/he.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/hi.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/hi.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/hr.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/hr.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/hu.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/hu.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/id.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/id.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/it.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/it.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ja.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ja.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/kn.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/kn.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ko.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ko.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/mr.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/mr.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ms.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ms.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/nb.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/nb.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/nl.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/nl.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/pl.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/pl.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/pt.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/pt.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ro.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ro.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ru.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ru.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/sk.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/sk.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/sr.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/sr.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/sv.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/sv.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ta.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ta.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/th.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/th.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/tl.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/tl.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/tr.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/tr.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/uk.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/uk.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/unable-phone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/unable-phone.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/unable-phone@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/unable-phone@2x.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/unable-phone@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/unable-phone@3x.png
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ur.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/ur.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/vi.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/vi.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/zh-Hans.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/zh-Hans.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/zh-Hant.lproj/Localizable.strings:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/DigitsKit.framework/Versions/A/Resources/DigitsKitResources.bundle/zh-Hant.lproj/Localizable.strings
--------------------------------------------------------------------------------
/ios/DigitsKit.framework/Versions/Current:
--------------------------------------------------------------------------------
1 | A
--------------------------------------------------------------------------------
/ios/Fabric.framework/Fabric:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/Fabric.framework/Fabric
--------------------------------------------------------------------------------
/ios/Fabric.framework/Headers/FABAttributes.h:
--------------------------------------------------------------------------------
1 | //
2 | // FABAttributes.h
3 | // Fabric
4 | //
5 | // Copyright (C) 2015 Twitter, Inc.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #pragma once
21 |
22 | #define FAB_UNAVAILABLE(x) __attribute__((unavailable(x)))
23 |
24 | #if __has_feature(nullability)
25 | #define fab_nullable nullable
26 | #define fab_nonnull nonnull
27 | #define fab_null_unspecified null_unspecified
28 | #define fab_null_resettable null_resettable
29 | #define __fab_nullable __nullable
30 | #define __fab_nonnull __nonnull
31 | #define __fab_null_unspecified __null_unspecified
32 | #else
33 | #define fab_nullable
34 | #define fab_nonnull
35 | #define fab_null_unspecified
36 | #define fab_null_resettable
37 | #define __fab_nullable
38 | #define __fab_nonnull
39 | #define __fab_null_unspecified
40 | #endif
41 |
42 | #ifndef NS_ASSUME_NONNULL_BEGIN
43 | #define NS_ASSUME_NONNULL_BEGIN
44 | #endif
45 |
46 | #ifndef NS_ASSUME_NONNULL_END
47 | #define NS_ASSUME_NONNULL_END
48 | #endif
49 |
50 |
51 | /**
52 | * The following macros are defined here to provide
53 | * backwards compatability. If you are still using
54 | * them you should migrate to the new versions that
55 | * are defined above.
56 | */
57 | #define FAB_NONNULL __fab_nonnull
58 | #define FAB_NULLABLE __fab_nullable
59 | #define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN
60 | #define FAB_END_NONNULL NS_ASSUME_NONNULL_END
61 |
--------------------------------------------------------------------------------
/ios/Fabric.framework/Headers/Fabric.h:
--------------------------------------------------------------------------------
1 | //
2 | // Fabric.h
3 | // Fabric
4 | //
5 | // Copyright (C) 2015 Twitter, Inc.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 | #import "FABAttributes.h"
22 |
23 | NS_ASSUME_NONNULL_BEGIN
24 |
25 | #if TARGET_OS_IPHONE
26 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000
27 | #error "Fabric's minimum iOS version is 6.0"
28 | #endif
29 | #else
30 | #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070
31 | #error "Fabric's minimum OS X version is 10.7"
32 | #endif
33 | #endif
34 |
35 | /**
36 | * Fabric Base. Coordinates configuration and starts all provided kits.
37 | */
38 | @interface Fabric : NSObject
39 |
40 | /**
41 | * Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use.
42 | *
43 | * For example, in Objective-C:
44 | *
45 | * `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];`
46 | *
47 | * Swift:
48 | *
49 | * `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])`
50 | *
51 | * Only the first call to this method is honored. Subsequent calls are no-ops.
52 | *
53 | * @param kitClasses An array of kit Class objects
54 | *
55 | * @return Returns the shared Fabric instance. In most cases this can be ignored.
56 | */
57 | + (instancetype)with:(NSArray *)kitClasses;
58 |
59 | /**
60 | * Returns the Fabric singleton object.
61 | */
62 | + (instancetype)sharedSDK;
63 |
64 | /**
65 | * This BOOL enables or disables debug logging, such as kit version information. The default value is NO.
66 | */
67 | @property (nonatomic, assign) BOOL debug;
68 |
69 | /**
70 | * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance.
71 | */
72 | - (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance.");
73 |
74 | @end
75 |
76 | NS_ASSUME_NONNULL_END
77 |
78 |
--------------------------------------------------------------------------------
/ios/Fabric.framework/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildMachineOSBuild
6 | 14F1021
7 | CFBundleDevelopmentRegion
8 | en
9 | CFBundleExecutable
10 | Fabric
11 | CFBundleIdentifier
12 | io.fabric.sdk.ios
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | Fabric
17 | CFBundlePackageType
18 | FMWK
19 | CFBundleShortVersionString
20 | 1.6.7
21 | CFBundleSignature
22 | ????
23 | CFBundleSupportedPlatforms
24 |
25 | iPhoneOS
26 |
27 | CFBundleVersion
28 | 53
29 | DTCompiler
30 | com.apple.compilers.llvm.clang.1_0
31 | DTPlatformBuild
32 | 13C75
33 | DTPlatformName
34 | iphoneos
35 | DTPlatformVersion
36 | 9.2
37 | DTSDKBuild
38 | 13C75
39 | DTSDKName
40 | iphoneos9.2
41 | DTXcode
42 | 0721
43 | DTXcodeBuild
44 | 7C1002
45 | MinimumOSVersion
46 | 6.0
47 | NSHumanReadableCopyright
48 | Copyright © 2015 Twitter. All rights reserved.
49 | UIDeviceFamily
50 |
51 | 3
52 | 2
53 | 1
54 | 4
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/ios/Fabric.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module Fabric {
2 | umbrella header "Fabric.h"
3 |
4 | export *
5 | module * { export * }
6 | }
--------------------------------------------------------------------------------
/ios/Fabric.framework/run:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # run
4 | #
5 | # Copyright (c) 2015 Crashlytics. All rights reserved.
6 |
7 | # Figure out where we're being called from
8 | DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
9 |
10 | # Quote path in case of spaces or special chars
11 | DIR="\"${DIR}"
12 |
13 | PATH_SEP="/"
14 | VALIDATE_COMMAND="uploadDSYM\" $@ validate run-script"
15 | UPLOAD_COMMAND="uploadDSYM\" $@ run-script"
16 |
17 | # Ensure params are as expected, run in sync mode to validate
18 | eval $DIR$PATH_SEP$VALIDATE_COMMAND
19 | return_code=$?
20 |
21 | if [[ $return_code != 0 ]]; then
22 | exit $return_code
23 | fi
24 |
25 | # Verification passed, upload dSYM in background to prevent Xcode from waiting
26 | # Note: Validation is performed again before upload.
27 | # Output can still be found in Console.app
28 | eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 &
29 |
--------------------------------------------------------------------------------
/ios/Fabric.framework/uploadDSYM:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/Fabric.framework/uploadDSYM
--------------------------------------------------------------------------------
/ios/RCTDigitsManager.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "React/RCTBridgeModule.h"
3 |
4 | @interface RCTDigitsManager : NSObject
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/ios/RCTDigitsManager.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import "RCTDigitsManager.h"
3 |
4 | @implementation RCTDigitsManager
5 |
6 | RCT_EXPORT_MODULE()
7 |
8 | - (unsigned int)intFromHexString:(NSString *)hexStr {
9 | unsigned int hexInt = 0;
10 |
11 | // Create scanner
12 | NSScanner *scanner = [NSScanner scannerWithString:hexStr];
13 |
14 | // Tell scanner to skip the # character
15 | [scanner setCharactersToBeSkipped:[NSCharacterSet characterSetWithCharactersInString:@"#"]];
16 |
17 | // Scan hex value
18 | [scanner scanHexInt:&hexInt];
19 |
20 | return hexInt;
21 | }
22 |
23 | - (UIColor *)getUIColorObjectFromHexString:(NSString *)hexStr alpha:(CGFloat)alpha
24 | {
25 | // Convert hex string to an integer
26 | unsigned int hexint = [self intFromHexString:hexStr];
27 |
28 | // Create color object, specifying alpha as well
29 | UIColor *color =
30 | [UIColor colorWithRed:((CGFloat) ((hexint & 0xFF0000) >> 16))/255
31 | green:((CGFloat) ((hexint & 0xFF00) >> 8))/255
32 | blue:((CGFloat) (hexint & 0xFF))/255
33 | alpha:alpha];
34 |
35 | return color;
36 | }
37 |
38 | - (void)setColorToApparence:(DGTAppearance *)appearance
39 | withKeyApparence:(NSString *)keyAppearance
40 | fromOptions:(NSDictionary *)options
41 | withKeyHex:(NSString *)keyHex
42 | andKeyAlpha:(NSString *)keyAlpha {
43 | id hex = [options valueForKeyPath:keyHex];
44 | id alpha = [options valueForKeyPath:keyAlpha];
45 |
46 | if (hex && alpha && [hex isKindOfClass:[NSString class]] && [alpha isKindOfClass:[NSNumber class]]) {
47 | [appearance setValue:[self getUIColorObjectFromHexString: (NSString *)hex alpha:[(NSNumber *)alpha doubleValue]] forKey:keyAppearance];
48 | }
49 | }
50 |
51 | - (void)setFontToApparence:(DGTAppearance *)appearance
52 | withKeyApparence:(NSString *)keyAppearance
53 | fromOptions:(NSDictionary *)options
54 | withKeyName:(NSString *)keyName
55 | andKeySize:(NSString *)keySize {
56 | id fontName = [options valueForKeyPath:keyName];
57 | id fontSize = [options valueForKeyPath:keySize];
58 |
59 | if (fontName && [fontName isKindOfClass:[NSString class]] && [fontSize isKindOfClass:[NSNumber class]]) {
60 | [appearance setValue:[UIFont fontWithName:(NSString *)fontName size:[(NSNumber *)fontSize doubleValue]] forKey:keyAppearance];
61 | }
62 | }
63 |
64 | - (void)setImageToApparence:(DGTAppearance *)appearance
65 | withKeyApparence:(NSString *)keyAppearance
66 | fromOptions:(NSDictionary *)options
67 | withKeyImageName:(NSString *)keyImageName {
68 | id imageName = [options valueForKeyPath:keyImageName];
69 |
70 | if (imageName && imageName && [imageName isKindOfClass:[NSString class]]) {
71 | [appearance setValue:[UIImage imageNamed:imageName] forKey:keyAppearance];
72 | }
73 | }
74 |
75 | RCT_REMAP_METHOD(launchAuthentication,
76 | view:(NSDictionary*)options
77 | resolver:(RCTPromiseResolveBlock)resolve
78 | rejecter:(RCTPromiseRejectBlock)reject) {
79 |
80 | DGTAppearance *appearance = [[DGTAppearance alloc] init];
81 | DGTAuthenticationConfiguration *configuration = [[DGTAuthenticationConfiguration alloc] initWithAccountFields:(options[@"email"]) ? DGTAccountFieldsEmail : DGTAccountFieldsDefaultOptionMask];
82 |
83 | [self setColorToApparence:appearance withKeyApparence:@"backgroundColor" fromOptions:options withKeyHex:@"appearance.backgroundColor.hex" andKeyAlpha:@"appearance.backgroundColor.alpha"];
84 | [self setColorToApparence:appearance withKeyApparence:@"accentColor" fromOptions:options withKeyHex:@"appearance.accentColor.hex" andKeyAlpha:@"appearance.accentColor.alpha"];
85 | [self setFontToApparence:appearance withKeyApparence:@"headerFont" fromOptions:options withKeyName:@"appearance.headerFont.name" andKeySize:@"appearance.headerFont.size"];
86 | [self setFontToApparence:appearance withKeyApparence:@"labelFont" fromOptions:options withKeyName:@"appearance.labelFont.name" andKeySize:@"appearance.labelFont.size"];
87 | [self setFontToApparence:appearance withKeyApparence:@"bodyFont" fromOptions:options withKeyName:@"appearance.bodyFont.name" andKeySize:@"appearance.bodyFont.size"];
88 | [self setImageToApparence:appearance withKeyApparence:@"logoImage" fromOptions:options withKeyImageName:@"appearance.logoImageName"];
89 |
90 | configuration.title = options[@"title"];
91 | configuration.phoneNumber = options[@"phoneNumber"];
92 | configuration.appearance = appearance;
93 |
94 | dispatch_async(dispatch_get_main_queue(), ^{
95 | UIViewController *root = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
96 |
97 | [[Digits sharedInstance] authenticateWithViewController:root configuration:configuration completion:^(DGTSession *session, NSError *error) {
98 | if (error) {
99 | reject([NSString stringWithFormat: @"%lu", (long)error.code], error.localizedDescription, error);
100 | } else {
101 | Digits *digits = [Digits sharedInstance];
102 | DGTOAuthSigning *oauthSigning = [[DGTOAuthSigning alloc] initWithAuthConfig:digits.authConfig authSession:session];
103 | NSDictionary *authHeaders = [oauthSigning OAuthEchoHeadersToVerifyCredentials];
104 | resolve(authHeaders);
105 | }
106 | }];
107 | });
108 | }
109 |
110 | RCT_EXPORT_METHOD(logout) {
111 | [[Digits sharedInstance] logOut];
112 | }
113 |
114 | RCT_EXPORT_METHOD(enableSandbox) {
115 | Digits *digits = [Digits sharedInstance];
116 | DGTSession *session = [DGTDebugConfiguration defaultDebugSession];
117 | digits.debugOverrides = [[DGTDebugConfiguration alloc] initSuccessStateWithDigitsSession:session];
118 | }
119 |
120 | RCT_EXPORT_METHOD(sessionDetails:(RCTResponseSenderBlock)callback) {
121 | DGTSession* session =[[Digits sharedInstance] session];
122 | if (session) {
123 | NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"[^0-9]"
124 | options:NSRegularExpressionCaseInsensitive
125 | error:nil];
126 | NSString *phoneNumber = [regex stringByReplacingMatchesInString:session.phoneNumber
127 | options:0
128 | range:NSMakeRange(0, session.phoneNumber.length)
129 | withTemplate:@""];
130 | NSDictionary *events = @{
131 | @"authToken": session.authToken,
132 | @"authTokenSecret": session.authTokenSecret,
133 | @"userId": session.userID,
134 | @"phoneNumber": phoneNumber,
135 | @"emailAddress": (session.emailAddress ? session.emailAddress : @""),
136 | @"emailAddressIsVerified": @(session.emailAddressIsVerified)
137 | };
138 | callback(@[[NSNull null], events]);
139 | } else {
140 | callback(@[[NSNull null], [NSNull null]]);
141 | }
142 | }
143 |
144 | @end
145 |
--------------------------------------------------------------------------------
/ios/RCTDigitsManager.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 830C52CC1D58B06D00E6CF3B /* Fabric.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 830C52C81D58B06D00E6CF3B /* Fabric.framework */; };
11 | 830C52CD1D58B06D00E6CF3B /* DigitsKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 830C52C91D58B06D00E6CF3B /* DigitsKit.framework */; };
12 | 830C52CE1D58B06D00E6CF3B /* TwitterCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 830C52CB1D58B06D00E6CF3B /* TwitterCore.framework */; };
13 | F80790201C6319A400E8F8A3 /* RCTDigitsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = F807901F1C6319A400E8F8A3 /* RCTDigitsManager.h */; };
14 | F80790221C6319B500E8F8A3 /* RCTDigitsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F80790211C6319B500E8F8A3 /* RCTDigitsManager.m */; };
15 | /* End PBXBuildFile section */
16 |
17 | /* Begin PBXCopyFilesBuildPhase section */
18 | 4D8BECAC1BDFF0FB000A1462 /* CopyFiles */ = {
19 | isa = PBXCopyFilesBuildPhase;
20 | buildActionMask = 2147483647;
21 | dstPath = "include/$(PRODUCT_NAME)";
22 | dstSubfolderSpec = 16;
23 | files = (
24 | );
25 | runOnlyForDeploymentPostprocessing = 0;
26 | };
27 | /* End PBXCopyFilesBuildPhase section */
28 |
29 | /* Begin PBXFileReference section */
30 | 4D8BECAE1BDFF0FB000A1462 /* libRCTDigitsManager.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTDigitsManager.a; sourceTree = BUILT_PRODUCTS_DIR; };
31 | 830C52C81D58B06D00E6CF3B /* Fabric.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Fabric.framework; sourceTree = ""; };
32 | 830C52C91D58B06D00E6CF3B /* DigitsKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = DigitsKit.framework; sourceTree = ""; };
33 | 830C52CB1D58B06D00E6CF3B /* TwitterCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = TwitterCore.framework; sourceTree = ""; };
34 | F807901F1C6319A400E8F8A3 /* RCTDigitsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTDigitsManager.h; sourceTree = ""; };
35 | F80790211C6319B500E8F8A3 /* RCTDigitsManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTDigitsManager.m; sourceTree = ""; };
36 | /* End PBXFileReference section */
37 |
38 | /* Begin PBXFrameworksBuildPhase section */
39 | 4D8BECAB1BDFF0FB000A1462 /* Frameworks */ = {
40 | isa = PBXFrameworksBuildPhase;
41 | buildActionMask = 2147483647;
42 | files = (
43 | 830C52CC1D58B06D00E6CF3B /* Fabric.framework in Frameworks */,
44 | 830C52CE1D58B06D00E6CF3B /* TwitterCore.framework in Frameworks */,
45 | 830C52CD1D58B06D00E6CF3B /* DigitsKit.framework in Frameworks */,
46 | );
47 | runOnlyForDeploymentPostprocessing = 0;
48 | };
49 | /* End PBXFrameworksBuildPhase section */
50 |
51 | /* Begin PBXGroup section */
52 | 4D8BECA51BDFF0FB000A1462 = {
53 | isa = PBXGroup;
54 | children = (
55 | F807901F1C6319A400E8F8A3 /* RCTDigitsManager.h */,
56 | F80790211C6319B500E8F8A3 /* RCTDigitsManager.m */,
57 | 4D8BECBA1BDFF2AD000A1462 /* Frameworks */,
58 | 4D8BECAF1BDFF0FB000A1462 /* Products */,
59 | );
60 | sourceTree = "";
61 | };
62 | 4D8BECAF1BDFF0FB000A1462 /* Products */ = {
63 | isa = PBXGroup;
64 | children = (
65 | 4D8BECAE1BDFF0FB000A1462 /* libRCTDigitsManager.a */,
66 | );
67 | name = Products;
68 | sourceTree = "";
69 | };
70 | 4D8BECBA1BDFF2AD000A1462 /* Frameworks */ = {
71 | isa = PBXGroup;
72 | children = (
73 | 830C52C81D58B06D00E6CF3B /* Fabric.framework */,
74 | 830C52C91D58B06D00E6CF3B /* DigitsKit.framework */,
75 | 830C52CB1D58B06D00E6CF3B /* TwitterCore.framework */,
76 | );
77 | name = Frameworks;
78 | sourceTree = "";
79 | };
80 | /* End PBXGroup section */
81 |
82 | /* Begin PBXHeadersBuildPhase section */
83 | F8078FEC1C62FA0300E8F8A3 /* Headers */ = {
84 | isa = PBXHeadersBuildPhase;
85 | buildActionMask = 2147483647;
86 | files = (
87 | F80790201C6319A400E8F8A3 /* RCTDigitsManager.h in Headers */,
88 | );
89 | runOnlyForDeploymentPostprocessing = 0;
90 | };
91 | /* End PBXHeadersBuildPhase section */
92 |
93 | /* Begin PBXNativeTarget section */
94 | 4D8BECAD1BDFF0FB000A1462 /* RCTDigitsManager */ = {
95 | isa = PBXNativeTarget;
96 | buildConfigurationList = 4D8BECB71BDFF0FB000A1462 /* Build configuration list for PBXNativeTarget "RCTDigitsManager" */;
97 | buildPhases = (
98 | 4D8BECAA1BDFF0FB000A1462 /* Sources */,
99 | 4D8BECAB1BDFF0FB000A1462 /* Frameworks */,
100 | 4D8BECAC1BDFF0FB000A1462 /* CopyFiles */,
101 | F8078FEC1C62FA0300E8F8A3 /* Headers */,
102 | );
103 | buildRules = (
104 | );
105 | dependencies = (
106 | );
107 | name = RCTDigitsManager;
108 | productName = RNFabricDigit;
109 | productReference = 4D8BECAE1BDFF0FB000A1462 /* libRCTDigitsManager.a */;
110 | productType = "com.apple.product-type.library.static";
111 | };
112 | /* End PBXNativeTarget section */
113 |
114 | /* Begin PBXProject section */
115 | 4D8BECA61BDFF0FB000A1462 /* Project object */ = {
116 | isa = PBXProject;
117 | attributes = {
118 | LastUpgradeCheck = 0700;
119 | ORGANIZATIONNAME = "Jean Lebrument";
120 | TargetAttributes = {
121 | 4D8BECAD1BDFF0FB000A1462 = {
122 | CreatedOnToolsVersion = 7.0.1;
123 | };
124 | };
125 | };
126 | buildConfigurationList = 4D8BECA91BDFF0FB000A1462 /* Build configuration list for PBXProject "RCTDigitsManager" */;
127 | compatibilityVersion = "Xcode 3.2";
128 | developmentRegion = English;
129 | hasScannedForEncodings = 0;
130 | knownRegions = (
131 | en,
132 | );
133 | mainGroup = 4D8BECA51BDFF0FB000A1462;
134 | productRefGroup = 4D8BECAF1BDFF0FB000A1462 /* Products */;
135 | projectDirPath = "";
136 | projectRoot = "";
137 | targets = (
138 | 4D8BECAD1BDFF0FB000A1462 /* RCTDigitsManager */,
139 | );
140 | };
141 | /* End PBXProject section */
142 |
143 | /* Begin PBXSourcesBuildPhase section */
144 | 4D8BECAA1BDFF0FB000A1462 /* Sources */ = {
145 | isa = PBXSourcesBuildPhase;
146 | buildActionMask = 2147483647;
147 | files = (
148 | F80790221C6319B500E8F8A3 /* RCTDigitsManager.m in Sources */,
149 | );
150 | runOnlyForDeploymentPostprocessing = 0;
151 | };
152 | /* End PBXSourcesBuildPhase section */
153 |
154 | /* Begin XCBuildConfiguration section */
155 | 4D8BECB51BDFF0FB000A1462 /* Debug */ = {
156 | isa = XCBuildConfiguration;
157 | buildSettings = {
158 | ALWAYS_SEARCH_USER_PATHS = NO;
159 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
160 | CLANG_CXX_LIBRARY = "libc++";
161 | CLANG_ENABLE_MODULES = YES;
162 | CLANG_ENABLE_OBJC_ARC = YES;
163 | CLANG_WARN_BOOL_CONVERSION = YES;
164 | CLANG_WARN_CONSTANT_CONVERSION = YES;
165 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
166 | CLANG_WARN_EMPTY_BODY = YES;
167 | CLANG_WARN_ENUM_CONVERSION = YES;
168 | CLANG_WARN_INT_CONVERSION = YES;
169 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
170 | CLANG_WARN_UNREACHABLE_CODE = YES;
171 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
172 | COPY_PHASE_STRIP = NO;
173 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
174 | ENABLE_STRICT_OBJC_MSGSEND = YES;
175 | ENABLE_TESTABILITY = YES;
176 | GCC_C_LANGUAGE_STANDARD = gnu99;
177 | GCC_DYNAMIC_NO_PIC = NO;
178 | GCC_NO_COMMON_BLOCKS = NO;
179 | GCC_OPTIMIZATION_LEVEL = 0;
180 | GCC_PREPROCESSOR_DEFINITIONS = (
181 | "DEBUG=1",
182 | "$(inherited)",
183 | );
184 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
185 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
186 | GCC_WARN_UNDECLARED_SELECTOR = YES;
187 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
188 | GCC_WARN_UNUSED_FUNCTION = YES;
189 | GCC_WARN_UNUSED_VARIABLE = YES;
190 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
191 | MTL_ENABLE_DEBUG_INFO = YES;
192 | ONLY_ACTIVE_ARCH = YES;
193 | SDKROOT = iphoneos;
194 | };
195 | name = Debug;
196 | };
197 | 4D8BECB61BDFF0FB000A1462 /* Release */ = {
198 | isa = XCBuildConfiguration;
199 | buildSettings = {
200 | ALWAYS_SEARCH_USER_PATHS = NO;
201 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
202 | CLANG_CXX_LIBRARY = "libc++";
203 | CLANG_ENABLE_MODULES = YES;
204 | CLANG_ENABLE_OBJC_ARC = YES;
205 | CLANG_WARN_BOOL_CONVERSION = YES;
206 | CLANG_WARN_CONSTANT_CONVERSION = YES;
207 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
208 | CLANG_WARN_EMPTY_BODY = YES;
209 | CLANG_WARN_ENUM_CONVERSION = YES;
210 | CLANG_WARN_INT_CONVERSION = YES;
211 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
212 | CLANG_WARN_UNREACHABLE_CODE = YES;
213 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
214 | COPY_PHASE_STRIP = NO;
215 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
216 | ENABLE_NS_ASSERTIONS = NO;
217 | ENABLE_STRICT_OBJC_MSGSEND = YES;
218 | GCC_C_LANGUAGE_STANDARD = gnu99;
219 | GCC_NO_COMMON_BLOCKS = NO;
220 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
221 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
222 | GCC_WARN_UNDECLARED_SELECTOR = YES;
223 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
224 | GCC_WARN_UNUSED_FUNCTION = YES;
225 | GCC_WARN_UNUSED_VARIABLE = YES;
226 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
227 | MTL_ENABLE_DEBUG_INFO = NO;
228 | SDKROOT = iphoneos;
229 | VALIDATE_PRODUCT = YES;
230 | };
231 | name = Release;
232 | };
233 | 4D8BECB81BDFF0FB000A1462 /* Debug */ = {
234 | isa = XCBuildConfiguration;
235 | buildSettings = {
236 | FRAMEWORK_SEARCH_PATHS = (
237 | "$(inherited)",
238 | "$(PROJECT_DIR)",
239 | );
240 | HEADER_SEARCH_PATHS = (
241 | "$(SRCROOT)/../../react-native/React/**",
242 | "$(SRCROOT)/../../../React",
243 | );
244 | OTHER_LDFLAGS = "-ObjC";
245 | PRODUCT_NAME = RCTDigitsManager;
246 | SKIP_INSTALL = YES;
247 | };
248 | name = Debug;
249 | };
250 | 4D8BECB91BDFF0FB000A1462 /* Release */ = {
251 | isa = XCBuildConfiguration;
252 | buildSettings = {
253 | FRAMEWORK_SEARCH_PATHS = (
254 | "$(inherited)",
255 | "$(PROJECT_DIR)",
256 | );
257 | HEADER_SEARCH_PATHS = (
258 | "$(SRCROOT)/../../react-native/React/**",
259 | "$(SRCROOT)/../../../React",
260 | );
261 | OTHER_LDFLAGS = "-ObjC";
262 | PRODUCT_NAME = RCTDigitsManager;
263 | SKIP_INSTALL = YES;
264 | };
265 | name = Release;
266 | };
267 | /* End XCBuildConfiguration section */
268 |
269 | /* Begin XCConfigurationList section */
270 | 4D8BECA91BDFF0FB000A1462 /* Build configuration list for PBXProject "RCTDigitsManager" */ = {
271 | isa = XCConfigurationList;
272 | buildConfigurations = (
273 | 4D8BECB51BDFF0FB000A1462 /* Debug */,
274 | 4D8BECB61BDFF0FB000A1462 /* Release */,
275 | );
276 | defaultConfigurationIsVisible = 0;
277 | defaultConfigurationName = Release;
278 | };
279 | 4D8BECB71BDFF0FB000A1462 /* Build configuration list for PBXNativeTarget "RCTDigitsManager" */ = {
280 | isa = XCConfigurationList;
281 | buildConfigurations = (
282 | 4D8BECB81BDFF0FB000A1462 /* Debug */,
283 | 4D8BECB91BDFF0FB000A1462 /* Release */,
284 | );
285 | defaultConfigurationIsVisible = 0;
286 | defaultConfigurationName = Release;
287 | };
288 | /* End XCConfigurationList section */
289 | };
290 | rootObject = 4D8BECA61BDFF0FB000A1462 /* Project object */;
291 | }
292 |
--------------------------------------------------------------------------------
/ios/RCTDigitsManager.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRAPIErrorCode.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRAPIErrorCode.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | NS_ASSUME_NONNULL_BEGIN
10 |
11 | /**
12 | * The NSError domain of errors surfaced by the Twitter API.
13 | */
14 | FOUNDATION_EXPORT NSString * const TWTRAPIErrorDomain;
15 |
16 | /**
17 | * Error codes surfaced by the Twitter API.
18 | * @see https://dev.twitter.com/docs/error-codes-responses
19 | */
20 | typedef NS_ENUM(NSUInteger, TWTRAPIErrorCode) {
21 | /**
22 | * Your call could not be completed as dialed.
23 | */
24 | TWTRAPIErrorCodeCouldNotAuthenticate = 32,
25 |
26 | /**
27 | * Corresponds with an HTTP 404 - the specified resource was not found.
28 | */
29 | TWTRAPIErrorCodePageNotExist = 34,
30 |
31 | /**
32 | * Not authorized to use this endpoint.
33 | */
34 | TWTRAPIErrorCodeNotAuthorizedForEndpoint = 37,
35 |
36 | /**
37 | * Corresponds with an HTTP 403 — the access token being used belongs to a suspended user and they can't complete the action you're trying to take
38 | */
39 | TWTRAPIErrorCodeAccountSuspended = 64,
40 |
41 | /**
42 | * Corresponds to a HTTP request to a retired v1-era URL.
43 | */
44 | TWTRAPIErrorCodeAPIVersionRetired = 68,
45 |
46 | /**
47 | * The request limit for this resource has been reached for the current rate limit window.
48 | */
49 | TWTRAPIErrorCodeRateLimitExceeded = 88,
50 |
51 | /**
52 | * The access token used in the request is incorrect or has expired. Used in API v1.1.
53 | */
54 | TWTRAPIErrorCodeInvalidOrExpiredToken = 89,
55 |
56 | /**
57 | * Only SSL connections are allowed in the API, you should update your request to a secure connection. See [how to connect using SSL](https://dev.twitter.com/docs/security/using-ssl).
58 | */
59 | TWTRAPIErrorCodeSSLInvalid = 92,
60 |
61 | /**
62 | * Corresponds with an HTTP 503 - Twitter is temporarily over capacity.
63 | */
64 | TWTRAPIErrorCodeOverCapacity = 130,
65 |
66 | /**
67 | * Corresponds with an HTTP 500 - An unknown internal error occurred.
68 | */
69 | TWTRAPIErrorCodeInternalError = 131,
70 |
71 | /**
72 | * Corresponds with a HTTP 401 - it means that your oauth_timestamp is either ahead or behind our acceptable range.
73 | */
74 | TWTRAPIErrorCodeCouldNotAuthenticateTimestampOutOfRange = 135,
75 |
76 | /**
77 | * You have already favorited this status.
78 | */
79 | TWTRAPIErrorCodeAlreadyFavorited = 139,
80 |
81 | /**
82 | * Corresponds with HTTP 403 — returned when a user cannot follow another user due to some kind of limit.
83 | */
84 | TWTRAPIErrorCodeCannotFollowOverLimit = 161,
85 |
86 | /**
87 | * Corresponds with HTTP 403 — returned when a Tweet cannot be viewed by the authenticating user, usually due to the Tweet's author having protected their Tweets.
88 | */
89 | TWTRAPIErrorCodeNotAuthorizedToSeeStatus = 179,
90 |
91 | /**
92 | * Corresponds with HTTP 403 — returned when a Tweet cannot be posted due to the user having no allowance remaining to post. Despite the text in the error message indicating that this error is only returned when a daily limit is reached, this error will be returned whenever a posting limitation has been reached. Posting allowances have roaming windows of time of unspecified duration.
93 | */
94 | TWTRAPIErrorCodeOverDailyStatusUpdateLimit = 185,
95 |
96 | /**
97 | * The status text has been Tweeted already by the authenticated account.
98 | */
99 | TWTRAPIErrorCodeStatusIsDuplicate = 187,
100 |
101 | /**
102 | * Typically sent with 1.1 responses with HTTP code 400. The method requires authentication but it was not presented or was wholly invalid.
103 | */
104 | TWTRAPIErrorCodeBadAuthenticationData = 215,
105 |
106 | /**
107 | * We constantly monitor and adjust our filters to block spam and malicious activity on the Twitter platform. These systems are tuned in real-time. If you get this response our systems have flagged the Tweet or DM as possibly fitting this profile. If you feel that the Tweet or DM you attempted to create was flagged in error, please report the details around that to us by filing a ticket at https://support.twitter.com/forms/platform
108 | */
109 | TWTRAPIErrorCodeRequestIsAutomated = 226,
110 |
111 | /**
112 | * Returned as a challenge in xAuth when the user has login verification enabled on their account and needs to be directed to twitter.com to [generate a temporary password](https://twitter.com/settings/applications).
113 | */
114 | TWTRAPIErrorCodeUserMustVerifyLogin = 231,
115 |
116 | /**
117 | * "Bad guest token." The token has probably expired. Try calling `-[Twitter logInGuestWithCompletion:]` again later.
118 | */
119 | TWTRAPIErrorCodeBadGuestToken = 239,
120 |
121 | /**
122 | * Corresponds to a HTTP request to a retired URL.
123 | */
124 | TWTRAPIErrorCodeEndpointRetired = 251,
125 |
126 | /**
127 | * Corresponds with HTTP 403 — returned when the application is restricted from POST, PUT, or DELETE actions. See [How to appeal application suspension and other disciplinary actions](https://support.twitter.com/articles/72585).
128 | */
129 | TWTRAPIErrorCodeApplicationCannotPerformWriteAction = 261,
130 |
131 | /**
132 | * Corresponds with HTTP 403. The authenticated user account cannot mute itself.
133 | */
134 | TWTRAPIErrorCodeCannotMuteSelf = 271,
135 |
136 | /**
137 | * Corresponds with HTTP 403. The authenticated user account is not muting the account a call is attempting to unmute.
138 | */
139 | TWTRAPIErrorCodeCannotMuteSpecifiedUser = 272,
140 |
141 | /**
142 | * You have already retweeted this tweet.
143 | */
144 | TWTRAPIErrorCodeAlreadyRetweeted = 327,
145 |
146 | /**
147 | * Returned in API v1.1 when a request cannot be served due to the application's rate limit having been exhausted for the resource. See [Rate Limiting in API v1.1](https://dev.twitter.com/docs/rate-limiting/1.1).
148 | */
149 | TWTRAPIErrorCodeTooManyRequests = 429
150 | };
151 |
152 | NS_ASSUME_NONNULL_END
153 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRAuthConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRAuthConfig.h
3 | // TwitterKit
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #import
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | /**
13 | * Authentication configuration details. Encapsulates credentials required to authenticate a Twitter application. You can obtain your credentials at https://apps.twitter.com/.
14 | */
15 | @interface TWTRAuthConfig : NSObject
16 |
17 | /**
18 | * The consumer key of the Twitter application.
19 | */
20 | @property (nonatomic, copy, readonly) NSString *consumerKey;
21 | /**
22 | * The consumer secret of the Twitter application.
23 | */
24 | @property (nonatomic, copy, readonly) NSString *consumerSecret;
25 |
26 | /**
27 | * Returns an `TWTRAuthConfig` object initialized by copying the values from the consumer key and consumer secret.
28 | *
29 | * @param consumerKey The consumer key.
30 | * @param consumerSecret The consumer secret.
31 | */
32 | - (instancetype)initWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)consumerSecret;
33 |
34 | /**
35 | * Unavailable. Use `initWithConsumerKey:consumerSecret:` instead.
36 | */
37 | - (instancetype)init NS_UNAVAILABLE;
38 |
39 | @end
40 |
41 | NS_ASSUME_NONNULL_END
42 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRAuthSession.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRAuthSession.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | NS_ASSUME_NONNULL_BEGIN
10 |
11 | /**
12 | * The base session which all sessions must conform to.
13 | */
14 | @protocol TWTRBaseSession
15 | @end
16 |
17 | /**
18 | * Encapsulates the authorization details of an OAuth Session.
19 | */
20 | @protocol TWTRAuthSession
21 |
22 | @property (nonatomic, readonly, copy) NSString *authToken;
23 | @property (nonatomic, readonly, copy) NSString *authTokenSecret;
24 | @property (nonatomic, readonly, copy) NSString *userID;
25 |
26 | @end
27 |
28 | NS_ASSUME_NONNULL_END
29 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRConstants.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRConstants.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | NS_ASSUME_NONNULL_BEGIN
10 |
11 | /**
12 | * The NSError domain of errors surfaced by the Twitter SDK.
13 | */
14 | FOUNDATION_EXPORT NSString * const TWTRErrorDomain;
15 |
16 | /**
17 | * Error codes surfaced by the Twitter SDK.
18 | */
19 | typedef NS_ENUM(NSInteger, TWTRErrorCode) {
20 |
21 | /**
22 | * Unknown error.
23 | */
24 | TWTRErrorCodeUnknown = -1,
25 |
26 | /**
27 | * Authentication has not been set up yet. You must call -[Twitter logInWithCompletion:] or -[Twitter logInGuestWithCompletion:]
28 | */
29 | TWTRErrorCodeNoAuthentication = 0,
30 |
31 | /**
32 | * Twitter has not been initialized yet. Call +[Fabric with:@[TwitterKit]] or -[Twitter startWithConsumerKey:consumerSecret:].
33 | */
34 | TWTRErrorCodeNotInitialized = 1,
35 |
36 | /**
37 | * User has declined to grant permission to information such as their email address.
38 | */
39 | TWTRErrorCodeUserDeclinedPermission = 2,
40 |
41 | /**
42 | * User has granted permission to their email address but no address is associated with their account.
43 | */
44 | TWTRErrorCodeUserHasNoEmailAddress = 3,
45 |
46 | /**
47 | * A resource has been requested by ID, but that ID was not found.
48 | */
49 | TWTRErrorCodeInvalidResourceID = 4,
50 |
51 | /**
52 | * A request has been issued for an invalid URL.
53 | */
54 | TWTRErrorCodeInvalidURL = 5,
55 |
56 | /**
57 | * Type mismatch in parsing JSON from the Twitter API.
58 | */
59 | TWTRErrorCodeMismatchedJSONType = 6,
60 |
61 | /**
62 | * Fail to save to keychain.
63 | */
64 | TWTRErrorCodeKeychainSerializationFailure = 7,
65 |
66 | /**
67 | * Fail to save to disk.
68 | */
69 | TWTRErrorCodeDiskSerializationError = 8,
70 |
71 | /**
72 | * Error authenticating with the webview.
73 | */
74 | TWTRErrorCodeWebViewError = 9,
75 |
76 | /**
77 | * A required parameter is missing.
78 | */
79 | TWTRErrorCodeMissingParameter = 10
80 | };
81 |
82 | /**
83 | * The NSError domain of errors surfaced by the Twitter SDK during the login operation.
84 | */
85 | FOUNDATION_EXPORT NSString * const TWTRLogInErrorDomain;
86 |
87 | /**
88 | * Error codes surfaced by the Twitter SDK with the `TWTRLogInErrorDomain` error domain.
89 | */
90 | typedef NS_ENUM(NSInteger, TWTRLogInErrorCode) {
91 |
92 | /**
93 | * Unknown error.
94 | */
95 | TWTRLogInErrorCodeUnknown = -1,
96 |
97 | /**
98 | * User denied login.
99 | */
100 | TWTRLogInErrorCodeDenied = 0,
101 |
102 | /**
103 | * User canceled login.
104 | */
105 | TWTRLogInErrorCodeCanceled = 1,
106 |
107 | /**
108 | * No Twitter account found.
109 | */
110 | TWTRLogInErrorCodeNoAccounts = 2,
111 |
112 | /**
113 | * Reverse auth with linked account failed.
114 | */
115 | TWTRLogInErrorCodeReverseAuthFailed = 3,
116 |
117 | /**
118 | * Refreshing session tokens failed.
119 | */
120 | TWTRLogInErrorCodeCannotRefreshSession = 4,
121 |
122 | /**
123 | * No such session or session is not tracked
124 | * in the associated session store.
125 | */
126 | TWTRLogInErrorCodeSessionNotFound = 5,
127 |
128 | /**
129 | * The login request failed.
130 | */
131 | TWTRLogInErrorCodeFailed = 6,
132 |
133 | /**
134 | * The system account credentials are no longer valid and the
135 | * user will need to update their credentials in the Settings app.
136 | */
137 | TWTRLogInErrorCodeSystemAccountCredentialsInvalid = 7
138 | };
139 |
140 | NS_ASSUME_NONNULL_END
141 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRCoreOAuthSigning.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRCoreOAuthSigning.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 |
9 | NS_ASSUME_NONNULL_BEGIN
10 |
11 | FOUNDATION_EXPORT NSString * const TWTROAuthEchoRequestURLStringKey;
12 | FOUNDATION_EXPORT NSString * const TWTROAuthEchoAuthorizationHeaderKey;
13 |
14 | @protocol TWTRCoreOAuthSigning
15 |
16 | /**
17 | * @name OAuth Echo
18 | */
19 |
20 | /**
21 | * OAuth Echo is a means to securely delegate OAuth authorization to a third party while interacting with an API.
22 | * For example, you may wish to verify a user's credentials from your app's server (the third party) rather than your app.
23 | * This method provides you with the OAuth signature to add to the third party's request to `URLString`, as well as the formed
24 | * URL with the query string to send that request to.
25 | * This is equivalent to calling `-URLRequestWithMethod:URL:parameters:error:` and getting the URL and the `Authorization` HTTP header out of the request.
26 | *
27 | * @param method Request method, GET, POST, PUT, DELETE, etc.
28 | * @param URLString The full URL of the Twitter endpoint you plan to send a request to. E.g. https://api.twitter.com/1.1/account/verify_credentials.json
29 | * @param parameters Request parameters.
30 | * @param error Error in the `TWTRErrorDomain` domain. The code will be `TWTRErrorCodeInvalidURL` if the `URLString`'s host is not api.twitter.com
31 | *
32 | * @return `nil` if there's an error or a missing required parameter, or a dictionary with the fully formed request URL under `TWTROAuthEchoRequestURLStringKey` (`NSString`), and the `Authorization` header in `TWTROAuthEchoAuthorizationHeaderKey` (`NSString`), to be used to sign the request.
33 | *
34 | * @see More information about OAuth Echo: https://dev.twitter.com/oauth/echo
35 | */
36 | - (NSDictionary *)OAuthEchoHeadersForRequestMethod:(NSString *)method URLString:(NSString *)URLString parameters:(nullable NSDictionary *)parameters error:(NSError **)error;
37 |
38 | /**
39 | * This method provides you with the OAuth signature, as well as the formed URL with the query string, to send a request to `verify_credentials`.
40 | *
41 | * @return A dictionary with the fully formed Request URL under `TWTROAuthEchoRequestURLStringKey` (`NSString`), and the `Authorization` header in `TWTROAuthEchoAuthorizationHeaderKey` (`NSString`), to be used to sign the request.
42 | *
43 | * @see More information about OAuth Echo: https://dev.twitter.com/oauth/echo
44 | * @see More information about Verify Credentials: https://dev.twitter.com/rest/reference/get/account/verify_credentials
45 | */
46 | - (NSDictionary *)OAuthEchoHeadersToVerifyCredentials;
47 |
48 | @end
49 |
50 | NS_ASSUME_NONNULL_END
51 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRDefines.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRDefines.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #pragma once
8 |
9 | #define TWC_STR_HELPER(x) #x
10 | #define TWC_STR(x) TWC_STR_HELPER(x)
11 |
12 | #define IS_UIKIT_AVAILABLE (TARGET_OS_IOS || TARGET_OS_TV)
13 | #define IS_SOCIAL_ACCOUNTS_AVAILABLE (TARGET_OS_MAC && !TARGET_OS_WATCH && !TARGET_OS_TV)
14 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRGuestSession.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRGuestSession.h
3 | // TwitterKit
4 | //
5 | // Copyright (c) 2015 Twitter. All rights reserved.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | @class TWTRGuestSession;
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | /**
16 | * Completion block called when guest login succeeds or fails.
17 | *
18 | * @param guestSession A `TWTRGuestSession` containing the OAuth tokens or nil.
19 | * @param error Error that will be non nil if the authentication request failed.
20 | */
21 | typedef void (^TWTRGuestLogInCompletion)(TWTRGuestSession * _Nullable guestSession, NSError * _Nullable error);
22 |
23 | /**
24 | * `TWTRGuestSession` represents a guest session authenticated with the Twitter API. See `TWTRSession` for user sessions.
25 | */
26 | @interface TWTRGuestSession : NSObject
27 |
28 | /**
29 | * The bearer access token for guest auth.
30 | */
31 | @property (nonatomic, copy, readonly) NSString *accessToken;
32 |
33 | /**
34 | * The guest access token.
35 | */
36 | @property (nonatomic, copy, readonly) NSString *guestToken;
37 |
38 | /**
39 | * This property can be used to make a best guess about whether the token will
40 | * still be valid or not.
41 | *
42 | * Guest tokens expire after a short time interval but
43 | * the actual interval is not specified. This property will return YES if a sufficient
44 | * amount of time has passed indicating that the token is probably no longer valid.
45 | * In most situations you should make a request with the token and see if the API
46 | * accepts the token or not.
47 | */
48 | @property (nonatomic, readonly) BOOL probablyNeedsRefreshing;
49 |
50 | /**
51 | * Returns an `TWTRGuestSession` object initialized by copying the values from the dictionary or nil if the dictionary is missing.
52 | *
53 | * @param sessionDictionary (required) The dictionary received after successfull authentication from Twitter guest-only authentication.
54 | */
55 | - (instancetype)initWithSessionDictionary:(NSDictionary *)sessionDictionary;
56 |
57 | /**
58 | * Returns a `TWTRGuestSession` object
59 | *
60 | * @param accessToken the access token
61 | * @param guestToken the guest access token
62 | */
63 | - (instancetype)initWithAccessToken:(NSString *)accessToken guestToken:(nullable NSString *)guestToken;
64 |
65 | /**
66 | * Unavailable. Use `-initWithSessionDictionary:` instead.
67 | */
68 | - (instancetype)init NS_UNAVAILABLE;
69 |
70 | @end
71 |
72 | NS_ASSUME_NONNULL_END
73 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRSession.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRSession.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 | #import
9 | #import
10 |
11 | @class TWTRSession;
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | /**
16 | * Completion block called when user login succeeds or fails.
17 | *
18 | * @param session Contains the OAuth tokens and minimal information associated with the logged in user or nil.
19 | * @param error Error that will be non nil if the authentication request failed.
20 | */
21 | typedef void (^TWTRLogInCompletion)(TWTRSession * _Nullable session, NSError * _Nullable error);
22 |
23 | /**
24 | * TWTRSession represents a user's session authenticated with the Twitter API.
25 | */
26 | @interface TWTRSession : NSObject
27 |
28 | /**
29 | * The authorization token.
30 | */
31 | @property (nonatomic, copy, readonly) NSString *authToken;
32 | /**
33 | * The authorization token secret.
34 | */
35 | @property (nonatomic, copy, readonly) NSString *authTokenSecret;
36 | /**
37 | * The username associated with the access token.
38 | */
39 | @property (nonatomic, copy, readonly) NSString *userName;
40 | /**
41 | * The user ID associated with the access token.
42 | */
43 | @property (nonatomic, copy, readonly) NSString *userID;
44 |
45 | /**
46 | * Returns an `TWTRSession` object initialized by copying the values from the dictionary or nil if the dictionary is missing.
47 | *
48 | * @param sessionDictionary (required) The dictionary received after successfull authentication from Twitter OAuth.
49 | */
50 | - (instancetype)initWithSessionDictionary:(NSDictionary *)sessionDictionary;
51 |
52 | /**
53 | * Returns an `TWTRSession` object initialized by copying the given tokens and user info.
54 | *
55 | * @param authToken (required) The authorization token for the session
56 | * @param authTokenSecret (required) The authorization token secret for the session
57 | * @param userName (required) The username for the user associated with the session.
58 | * @param userID (required) The unique ID for the user associated with the session.
59 | *
60 | * @return A `TWTRSession` object initialized with the provided parameters.
61 | */
62 | - (instancetype)initWithAuthToken:(NSString *)authToken authTokenSecret:(NSString *)authTokenSecret userName:(NSString *)userName userID:(NSString *)userID NS_DESIGNATED_INITIALIZER;
63 |
64 | /**
65 | * Unavailable. Use -initWithSessionDictionary: instead.
66 | */
67 | - (instancetype)init NS_UNAVAILABLE;
68 |
69 | @end
70 |
71 | NS_ASSUME_NONNULL_END
72 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TWTRSessionStore.h:
--------------------------------------------------------------------------------
1 | //
2 | // TWTRSessionStore.h
3 | // TwitterCore
4 | //
5 | // Copyright (c) 2015 Twitter Inc. All rights reserved.
6 | //
7 |
8 | @class TWTRAuthConfig;
9 | @class TWTRGuestSession;
10 | @class TWTRSession;
11 | @protocol TWTRAuthSession;
12 | @protocol TWTRAPIServiceConfig;
13 | @protocol TWTRErrorLogger;
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | #pragma mark - TWTRSessionRefreshingStore Protocol
18 |
19 | /**
20 | * Completion block called when a session refresh succeeds or fails.
21 | *
22 | * @param refreshedSession The refreshed session
23 | * @param error Error that will be non nil if the refresh request failed
24 | */
25 | typedef void (^TWTRSessionStoreRefreshCompletion)(id _Nullable refreshedSession, NSError * _Nullable error);
26 |
27 | /**
28 | * Protocol for session stores that can refresh expired sessions.
29 | */
30 | @protocol TWTRSessionRefreshingStore
31 |
32 | /**
33 | * Refresh an expired session.
34 | *
35 | * @param sessionClass The class of the session
36 | * @param sessionID ID of the session wherever applicable e.g. `userID` if it's a user session.
37 | * @param completion The completion block to call when the refresh request succeeds or fails.
38 | */
39 | - (void)refreshSessionClass:(Class)sessionClass sessionID:(nullable NSString *)sessionID completion:(TWTRSessionStoreRefreshCompletion)completion;
40 |
41 | /**
42 | * Determines whether the given session has expired.
43 | *
44 | * @param session The session to check for expiration
45 | * @param response API request response to check for expiration
46 | *
47 | * @return Whether the session has expired.
48 | */
49 | - (BOOL)isExpiredSession:(id)session response:(NSHTTPURLResponse *)response;
50 |
51 | /**
52 | * Determines whether the given session has expired based on a given error.
53 | *
54 | * @param session The session to check for expiration
55 | * @param error API request error to check for expiration
56 | *
57 | * @return Whether the session has expired.
58 | */
59 | - (BOOL)isExpiredSession:(id)session error:(NSError *)error;
60 |
61 | @end
62 |
63 | #pragma mark - TWTRUserSessionStore Protocol
64 |
65 | /**
66 | * Completion block called when a user session saved to the session store or fails.
67 | *
68 | * @param session The saved session
69 | * @param error Error that will be non nil if the save request fails.
70 | */
71 | typedef void (^TWTRSessionStoreSaveCompletion)(id _Nullable session, NSError * _Nullable error);
72 |
73 | /**
74 | * Completion block called when fetching all stored user sessions completes or fails.
75 | *
76 | * @param sessions All stored user sessions or empty array if there are no user sessions found.
77 | */
78 | typedef void (^TWTRSessionStoreBatchFetchCompletion)(NSArray *sessions);
79 |
80 | /**
81 | * Completion block to call when the session is deleted or fails.
82 | *
83 | * @param session The deleted session or nil if none was found for the user.
84 | */
85 | typedef void (^TWTRSessionStoreDeleteCompletion)(id _Nullable session);
86 |
87 | /**
88 | * Protocol for session store that manages user sessions.
89 | */
90 | @protocol TWTRUserSessionStore
91 |
92 | /**
93 | * Saves the existing session to the store after validations.
94 | *
95 | * @param session The user session to save
96 | * @param completion Completion block to call when the save request succeeds or fails
97 | */
98 | - (void)saveSession:(id)session completion:(TWTRSessionStoreSaveCompletion)completion;
99 |
100 | /**
101 | * Fetches the user session for for the given auth tokens and saves it to the store after validations.
102 | *
103 | * @param authToken The existing authToken to use for authentication.
104 | * @param authTokenSecret The existing authTokenSecret to use for authentication.
105 | * @param completion Completion block to call when the save request succeeds or fails
106 | */
107 | - (void)saveSessionWithAuthToken:(NSString *)authToken authTokenSecret:(NSString *)authTokenSecret completion:(TWTRSessionStoreSaveCompletion)completion;
108 |
109 | /**
110 | * Checks to see if the user is logged in and has a saved session.
111 | *
112 | * @param userID The user ID to fetch session for.
113 | */
114 | - (nullable id)sessionForUserID:(NSString *)userID;
115 |
116 | /**
117 | * Retrieve all logged in user sessions in ascending order of last saved date
118 | *
119 | * @note This is a blocking call.
120 | */
121 | - (NSArray *)existingUserSessions;
122 |
123 | /**
124 | * Retrieves the last logged in user session.
125 | *
126 | * @return The last logged in user session.
127 | */
128 | - (nullable id)session;
129 |
130 | /**
131 | * Deletes the local Twitter user session from this app. This will not remove the system Twitter account nor make a network request to invalidate the session.
132 | *
133 | * @param userID ID of the user to log out
134 | */
135 | - (void)logOutUserID:(NSString *)userID;
136 |
137 | @end
138 |
139 | #pragma mark - TWTRGuestSessionStore Protocol
140 |
141 | /**
142 | * Completion block called when retrieving a guest session succeeds or fails.
143 | *
144 | * @param guestSession The retrieved guest session
145 | * @param error Error that will be non nil if the save request fails.
146 | */
147 | typedef void (^TWTRSessionGuestLogInCompletion)(TWTRGuestSession * _Nullable guestSession, NSError * _Nullable error);
148 |
149 | /**
150 | * Protocol for session stores that can manage guest sessions.
151 | */
152 | @protocol TWTRGuestSessionStore
153 |
154 | /**
155 | * Log in as a guest user and return the guest session. This can be used when the user is not a Twitter user.
156 | *
157 | * @param completion Completion block to call when the authentication succeeds or fails.
158 | *
159 | * @warning This method assumes your application, as indicated by the `consumerKey` and `consumerSecret` in the `authConfig`, has been whitelisted for guest authentication.
160 | */
161 | - (void)fetchGuestSessionWithCompletion:(TWTRSessionGuestLogInCompletion)completion;
162 |
163 | @end
164 |
165 | #pragma mark - Composite TWTRSessionStore Protocol
166 |
167 | /**
168 | * Convenience composite protocol of a store that handles user, guest, and refreshable sessions.
169 | */
170 | @protocol TWTRSessionStore
171 |
172 | /**
173 | * Returns the store's auth config.
174 | */
175 | @property (nonatomic, readonly) TWTRAuthConfig *authConfig;
176 |
177 | @end
178 |
179 |
180 | #pragma mark - Concrete Session Store Class
181 |
182 | /**
183 | * Concrete implementation of . This session store supports fetching and storage of
184 | * user and guest sessions. In addition, the session store also supports refreshing of such sessions when they expire.
185 | *
186 | * @warning Instances of the session manager at the same path are not synchronized. The session store
187 | * will simply choose the latest version in the case of conflicts.
188 | */
189 | @interface TWTRSessionStore : NSObject
190 |
191 | - (instancetype)init NS_UNAVAILABLE;
192 |
193 | /**
194 | * Provides a mechanism for reloading the session store. This method will force the session store
195 | * to find any sessions that may have been saved by another session store or application that is
196 | * using the same keychain access groups.
197 | *
198 | * Most applications will not need to call this method. You may need to call this method if you are
199 | * using multiple stores within your application and you need to synchronize when one writes to the
200 | * store. The more likely case for needing to call this method is if you are sharing credentials
201 | * between applications. In this situation you will want to call this method when the application
202 | * comes back to the foreground.
203 | *
204 | * This method does not need to be called when the store is created because this process happens
205 | * by default at time of instantiation.
206 | *
207 | * You should avoid calling this method if you do not have a specific reason to do so, like the reasons
208 | * mentioned above as this method does cause disk I/O and multiple calls can cause performance problems.
209 | */
210 | - (void)reloadSessionStore;
211 |
212 | @end
213 |
214 | NS_ASSUME_NONNULL_END
215 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Headers/TwitterCore.h:
--------------------------------------------------------------------------------
1 | //
2 | // TwitterCore.h
3 | //
4 | // Copyright (c) 2015 Twitter. All rights reserved.
5 | //
6 |
7 | #import
8 | #if !TARGET_OS_TV
9 | #import
10 | #endif
11 | #import
12 | #if !TARGET_OS_TV
13 | #import
14 | #endif
15 | #import
16 |
17 | #if IS_UIKIT_AVAILABLE
18 | #import
19 | #else
20 | #import
21 | #endif
22 |
23 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000
24 | #error "TwitterCore doesn't support iOS 7.x and lower. Please, change your minimum deployment target to iOS 8.0"
25 | #endif
26 |
27 | #import
28 | #import
29 | #import
30 | #import
31 | #import
32 | #import
33 | #import
34 | #import
35 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Info.plist:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/TwitterCore.framework/Info.plist
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/Modules/module.modulemap:
--------------------------------------------------------------------------------
1 | framework module TwitterCore {
2 | umbrella header "TwitterCore.h"
3 |
4 | export *
5 | module * { export * }
6 |
7 | link framework "Accounts"
8 | link framework "CoreData"
9 | link framework "Social"
10 |
11 | header "TwitterCore.h"
12 | header "TWTRAPIErrorCode.h"
13 | header "TWTRAuthConfig.h"
14 | header "TWTRAuthSession.h"
15 | header "TWTRConstants.h"
16 | header "TWTRCoreOAuthSigning.h"
17 | header "TWTRDefines.h"
18 | header "TWTRGuestSession.h"
19 | header "TWTRSession.h"
20 | header "TWTRSessionStore.h"
21 | }
22 |
--------------------------------------------------------------------------------
/ios/TwitterCore.framework/TwitterCore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeanLebrument/react-native-fabric-digits/64fee2759b7be210cebc63a4d3a107a3885fa5fd/ios/TwitterCore.framework/TwitterCore
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-fabric-digits",
3 | "version": "1.0.28",
4 | "description": "Fabric Digits wrapper to use it in React-Native",
5 | "main": "index.js",
6 | "directories": {
7 | "example": "example"
8 | },
9 | "scripts": {
10 | "test": "echo \"Error: no test specified\" && exit 1"
11 | },
12 | "repository": {
13 | "type": "git",
14 | "url": "git+https://github.com/JeanLebrument/react-native-fabric-digit.git"
15 | },
16 | "keywords": [
17 | "react-native",
18 | "js",
19 | "fabric",
20 | "digits"
21 | ],
22 | "author": "Jean Lebrument (https://github.com/JeanLebrument/)",
23 | "license": "MIT",
24 | "bugs": {
25 | "url": "https://github.com/JeanLebrument/react-native-fabric-digit/issues"
26 | },
27 | "homepage": "https://github.com/JeanLebrument/react-native-fabric-digit#readme"
28 | }
29 |
--------------------------------------------------------------------------------
/react-native-fabric-digits.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 |
3 | s.name = "react-native-fabric-digits"
4 | s.version = "1.0.6"
5 | s.summary = "react-native-fabric-digits"
6 |
7 | s.homepage = "https://github.com/jeanlebrument/react-native-fabric-digits"
8 |
9 | s.author = { "Jean Lebrument" => "jean@vimies.com" }
10 |
11 | s.platform = :ios, '7.1'
12 |
13 | s.source = { :git => "https://github.com/jeanlebrument/react-native-fabric-digits", :tag => s.version.to_s }
14 |
15 | s.source_files = 'ios/RNFabricDigits/*.{h,m,swift}'
16 |
17 | s.dependency 'Digits'
18 | s.dependency 'Fabric'
19 | s.dependency 'TwitterCore'
20 |
21 | end
--------------------------------------------------------------------------------