createViewManagers(@NonNull ReactApplicationContext reactContext) {
26 | return Collections.emptyList();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/bcrypt-react-native.podspec:
--------------------------------------------------------------------------------
1 | require "json"
2 |
3 | package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4 |
5 | Pod::Spec.new do |s|
6 | s.name = "bcrypt-react-native"
7 | s.version = package["version"]
8 | s.summary = package["description"]
9 | s.homepage = package["homepage"]
10 | s.license = package["license"]
11 | s.authors = package["author"]
12 |
13 | s.platforms = { :ios => "11.0" }
14 | s.source = { :git => "https://github.com/andreshsingh/bcrypt-react-native.git", :tag => "#{s.version}" }
15 |
16 |
17 | s.source_files = "ios/**/*.{h,m,mm,swift}"
18 |
19 |
20 | s.dependency "React"
21 | s.dependency "BCrypt"
22 | end
23 |
--------------------------------------------------------------------------------
/example/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android
4 | Project android created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/example/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation
19 | * entryFile: "index.android.js",
20 | *
21 | * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
22 | * bundleCommand: "ram-bundle",
23 | *
24 | * // whether to bundle JS and assets in debug mode
25 | * bundleInDebug: false,
26 | *
27 | * // whether to bundle JS and assets in release mode
28 | * bundleInRelease: true,
29 | *
30 | * // whether to bundle JS and assets in another build variant (if configured).
31 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
32 | * // The configuration property can be in the following formats
33 | * // 'bundleIn${productFlavor}${buildType}'
34 | * // 'bundleIn${buildType}'
35 | * // bundleInFreeDebug: true,
36 | * // bundleInPaidRelease: true,
37 | * // bundleInBeta: true,
38 | *
39 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
40 | * // for BcryptReactNativeExample: to disable dev mode in the staging build type (if configured)
41 | * devDisabledInStaging: true,
42 | * // The configuration property can be in the following formats
43 | * // 'devDisabledIn${productFlavor}${buildType}'
44 | * // 'devDisabledIn${buildType}'
45 | *
46 | * // the root of your project, i.e. where "package.json" lives
47 | * root: "../../",
48 | *
49 | * // where to put the JS bundle asset in debug mode
50 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
51 | *
52 | * // where to put the JS bundle asset in release mode
53 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
54 | *
55 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
56 | * // require('./image.png')), in debug mode
57 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
58 | *
59 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
60 | * // require('./image.png')), in release mode
61 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
62 | *
63 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
64 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
65 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
66 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
67 | * // for BcryptReactNativeExample, you might want to remove it from here.
68 | * inputExcludes: ["android/**", "ios/**"],
69 | *
70 | * // override which node gets called and with what additional arguments
71 | * nodeExecutableAndArgs: ["node"],
72 | *
73 | * // supply additional arguments to the packager
74 | * extraPackagerArgs: []
75 | * ]
76 | */
77 |
78 | project.ext.react = [
79 | enableHermes: false, // clean and rebuild if changing
80 | ]
81 |
82 | apply from: "../../node_modules/react-native/react.gradle"
83 |
84 | /**
85 | * Set this to true to create two separate APKs instead of one:
86 | * - An APK that only works on ARM devices
87 | * - An APK that only works on x86 devices
88 | * The advantage is the size of the APK is reduced by about 4MB.
89 | * Upload all the APKs to the Play Store and people will download
90 | * the correct one based on the CPU architecture of their device.
91 | */
92 | def enableSeparateBuildPerCPUArchitecture = false
93 |
94 | /**
95 | * Run Proguard to shrink the Java bytecode in release builds.
96 | */
97 | def enableProguardInReleaseBuilds = false
98 |
99 | /**
100 | * The preferred build flavor of JavaScriptCore.
101 | *
102 | * For BcryptReactNativeExample, to use the international variant, you can use:
103 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
104 | *
105 | * The international variant includes ICU i18n library and necessary data
106 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
107 | * give correct results when using with locales other than en-US. Note that
108 | * this variant is about 6MiB larger per architecture than default.
109 | */
110 | def jscFlavor = 'org.webkit:android-jsc:+'
111 |
112 | /**
113 | * Whether to enable the Hermes VM.
114 | *
115 | * This should be set on project.ext.react and mirrored here. If it is not set
116 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
117 | * and the benefits of using Hermes will therefore be sharply reduced.
118 | */
119 | def enableHermes = project.ext.react.get("enableHermes", false);
120 |
121 | android {
122 | compileSdkVersion rootProject.ext.compileSdkVersion
123 |
124 | compileOptions {
125 | sourceCompatibility JavaVersion.VERSION_1_8
126 | targetCompatibility JavaVersion.VERSION_1_8
127 | }
128 |
129 | defaultConfig {
130 | applicationId "com.example.bcryptreactnative"
131 | minSdkVersion rootProject.ext.minSdkVersion
132 | targetSdkVersion rootProject.ext.targetSdkVersion
133 | versionCode 1
134 | versionName "1.0"
135 | }
136 | splits {
137 | abi {
138 | reset()
139 | enable enableSeparateBuildPerCPUArchitecture
140 | universalApk false // If true, also generate a universal APK
141 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
142 | }
143 | }
144 | signingConfigs {
145 | debug {
146 | storeFile file('debug.keystore')
147 | storePassword 'android'
148 | keyAlias 'androiddebugkey'
149 | keyPassword 'android'
150 | }
151 | }
152 | buildTypes {
153 | debug {
154 | signingConfig signingConfigs.debug
155 | }
156 | release {
157 | // Caution! In production, you need to generate your own keystore file.
158 | // see https://facebook.github.io/react-native/docs/signed-apk-android.
159 | signingConfig signingConfigs.debug
160 | minifyEnabled enableProguardInReleaseBuilds
161 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
162 | }
163 | }
164 | // applicationVariants are e.g. debug, release
165 | applicationVariants.all { variant ->
166 | variant.outputs.each { output ->
167 | // For each separate APK per architecture, set a unique version code as described here:
168 | // https://developer.android.com/studio/build/configure-apk-splits.html
169 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
170 | def abi = output.getFilter(OutputFile.ABI)
171 | if (abi != null) { // null for the universal-debug, universal-release variants
172 | output.versionCodeOverride =
173 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
174 | }
175 |
176 | }
177 | }
178 |
179 | packagingOptions {
180 | pickFirst "lib/armeabi-v7a/libc++_shared.so"
181 | pickFirst "lib/arm64-v8a/libc++_shared.so"
182 | pickFirst "lib/x86/libc++_shared.so"
183 | pickFirst "lib/x86_64/libc++_shared.so"
184 | }
185 | }
186 |
187 | dependencies {
188 | implementation fileTree(dir: "libs", include: ["*.jar"])
189 | //noinspection GradleDynamicVersion
190 | implementation "com.facebook.react:react-native:+" // From node_modules
191 |
192 |
193 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
194 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
195 | exclude group:'com.facebook.fbjni'
196 | }
197 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
198 | exclude group:'com.facebook.flipper'
199 | }
200 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
201 | exclude group:'com.facebook.flipper'
202 | }
203 |
204 | if (enableHermes) {
205 | def hermesPath = "../../node_modules/hermes-engine/android/";
206 | debugImplementation files(hermesPath + "hermes-debug.aar")
207 | releaseImplementation files(hermesPath + "hermes-release.aar")
208 | } else {
209 | implementation jscFlavor
210 | }
211 |
212 | implementation project(':bcryptreactnative')
213 | }
214 |
215 | // Run this once to be able to run the application with BUCK
216 | // puts all compile dependencies into folder libs for BUCK to use
217 | task copyDownloadableDepsToLibs(type: Copy) {
218 | from configurations.compile
219 | into 'libs'
220 | }
221 |
222 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
223 |
--------------------------------------------------------------------------------
/example/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreshsingh/bcrypt-react-native/f5206a6d18b5e95c8312011167942ed167b4c208/example/android/app/debug.keystore
--------------------------------------------------------------------------------
/example/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/java/com/example/bcryptreactnative/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.example.bcryptreactnative;
8 |
9 | import android.content.Context;
10 | import com.facebook.flipper.android.AndroidFlipperClient;
11 | import com.facebook.flipper.android.utils.FlipperUtils;
12 | import com.facebook.flipper.core.FlipperClient;
13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22 | import com.facebook.react.ReactInstanceManager;
23 | import com.facebook.react.bridge.ReactContext;
24 | import com.facebook.react.modules.network.NetworkingModule;
25 | import okhttp3.OkHttpClient;
26 |
27 | public class ReactNativeFlipper {
28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
29 | if (FlipperUtils.shouldEnableFlipper(context)) {
30 | final FlipperClient client = AndroidFlipperClient.getInstance(context);
31 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
32 | client.addPlugin(new ReactFlipperPlugin());
33 | client.addPlugin(new DatabasesFlipperPlugin(context));
34 | client.addPlugin(new SharedPreferencesFlipperPlugin(context));
35 | client.addPlugin(CrashReporterPlugin.getInstance());
36 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
37 | NetworkingModule.setCustomClientBuilder(
38 | new NetworkingModule.CustomClientBuilder() {
39 | @Override
40 | public void apply(OkHttpClient.Builder builder) {
41 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
42 | }
43 | });
44 | client.addPlugin(networkFlipperPlugin);
45 | client.start();
46 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
47 | // Hence we run if after all native modules have been initialized
48 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
49 | if (reactContext == null) {
50 | reactInstanceManager.addReactInstanceEventListener(
51 | new ReactInstanceManager.ReactInstanceEventListener() {
52 | @Override
53 | public void onReactContextInitialized(ReactContext reactContext) {
54 | reactInstanceManager.removeReactInstanceEventListener(this);
55 | reactContext.runOnNativeModulesQueueThread(
56 | new Runnable() {
57 | @Override
58 | public void run() {
59 | client.addPlugin(new FrescoFlipperPlugin());
60 | }
61 | });
62 | }
63 | });
64 | } else {
65 | client.addPlugin(new FrescoFlipperPlugin());
66 | }
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/example/bcryptreactnative/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.bcryptreactnative;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript. This is used to schedule
9 | * rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "BcryptReactNativeExample";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/example/bcryptreactnative/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.example.bcryptreactnative;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 | import com.facebook.react.PackageList;
6 | import com.facebook.react.ReactApplication;
7 | import com.facebook.react.ReactNativeHost;
8 | import com.facebook.react.ReactPackage;
9 | import com.facebook.react.ReactInstanceManager;
10 | import com.facebook.soloader.SoLoader;
11 | import java.lang.reflect.InvocationTargetException;
12 | import java.util.List;
13 |
14 | import com.bcryptreactnative.BcryptReactNativePackage;
15 |
16 | public class MainApplication extends Application implements ReactApplication {
17 |
18 | private final ReactNativeHost mReactNativeHost =
19 | new ReactNativeHost(this) {
20 | @Override
21 | public boolean getUseDeveloperSupport() {
22 | return BuildConfig.DEBUG;
23 | }
24 |
25 | @Override
26 | protected List getPackages() {
27 | @SuppressWarnings("UnnecessaryLocalVariable")
28 | List packages = new PackageList(this).getPackages();
29 | // Packages that cannot be autolinked yet can be added manually here, for BcryptReactNativeExample:
30 | // packages.add(new MyReactNativePackage());
31 | packages.add(new BcryptReactNativePackage());
32 |
33 | return packages;
34 | }
35 |
36 | @Override
37 | protected String getJSMainModuleName() {
38 | return "index";
39 | }
40 | };
41 |
42 | @Override
43 | public ReactNativeHost getReactNativeHost() {
44 | return mReactNativeHost;
45 | }
46 |
47 | @Override
48 | public void onCreate() {
49 | super.onCreate();
50 | SoLoader.init(this, /* native exopackage */ false);
51 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); // Remove this line if you don't want Flipper enabled
52 | }
53 |
54 | /**
55 | * Loads Flipper in React Native templates.
56 | *
57 | * @param context
58 | */
59 | private static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
60 | if (BuildConfig.DEBUG) {
61 | try {
62 | /*
63 | We use reflection here to pick up the class that initializes Flipper,
64 | since Flipper library is not available in release mode
65 | */
66 | Class> aClass = Class.forName("com.bcryptreactnativeExample.ReactNativeFlipper");
67 | aClass
68 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
69 | .invoke(null, context, reactInstanceManager);
70 | } catch (ClassNotFoundException e) {
71 | e.printStackTrace();
72 | } catch (NoSuchMethodException e) {
73 | e.printStackTrace();
74 | } catch (IllegalAccessException e) {
75 | e.printStackTrace();
76 | } catch (InvocationTargetException e) {
77 | e.printStackTrace();
78 | }
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreshsingh/bcrypt-react-native/f5206a6d18b5e95c8312011167942ed167b4c208/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreshsingh/bcrypt-react-native/f5206a6d18b5e95c8312011167942ed167b4c208/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreshsingh/bcrypt-react-native/f5206a6d18b5e95c8312011167942ed167b4c208/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreshsingh/bcrypt-react-native/f5206a6d18b5e95c8312011167942ed167b4c208/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreshsingh/bcrypt-react-native/f5206a6d18b5e95c8312011167942ed167b4c208/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreshsingh/bcrypt-react-native/f5206a6d18b5e95c8312011167942ed167b4c208/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreshsingh/bcrypt-react-native/f5206a6d18b5e95c8312011167942ed167b4c208/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreshsingh/bcrypt-react-native/f5206a6d18b5e95c8312011167942ed167b4c208/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreshsingh/bcrypt-react-native/f5206a6d18b5e95c8312011167942ed167b4c208/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreshsingh/bcrypt-react-native/f5206a6d18b5e95c8312011167942ed167b4c208/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | BcryptReactNative Example
3 |
4 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "28.0.3"
6 | minSdkVersion = 16
7 | compileSdkVersion = 28
8 | targetSdkVersion = 28
9 | }
10 | repositories {
11 | google()
12 | jcenter()
13 | }
14 | dependencies {
15 | classpath("com.android.tools.build:gradle:3.5.2")
16 |
17 | // NOTE: Do not place your application dependencies here; they belong
18 | // in the individual module build.gradle files
19 | }
20 | }
21 |
22 | allprojects {
23 | repositories {
24 | mavenLocal()
25 | maven {
26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27 | url("$rootDir/../node_modules/react-native/android")
28 | }
29 | maven {
30 | // Android JSC is installed from npm
31 | url("$rootDir/../node_modules/jsc-android/dist")
32 | }
33 |
34 | google()
35 | jcenter()
36 | maven { url 'https://www.jitpack.io' }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useAndroidX=true
21 | android.enableJetifier=true
22 | FLIPPER_VERSION=0.33.1
23 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/andreshsingh/bcrypt-react-native/f5206a6d18b5e95c8312011167942ed167b4c208/example/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin, switch paths to Windows format before running java
129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=$((i+1))
158 | done
159 | case $i in
160 | (0) set -- ;;
161 | (1) set -- "$args0" ;;
162 | (2) set -- "$args0" "$args1" ;;
163 | (3) set -- "$args0" "$args1" "$args2" ;;
164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=$(save "$@")
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185 | cd "$(dirname "$0")"
186 | fi
187 |
188 | exec "$JAVACMD" "$@"
189 |
--------------------------------------------------------------------------------
/example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem http://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 |
35 | @rem Find java.exe
36 | if defined JAVA_HOME goto findJavaFromJavaHome
37 |
38 | set JAVA_EXE=java.exe
39 | %JAVA_EXE% -version >NUL 2>&1
40 | if "%ERRORLEVEL%" == "0" goto init
41 |
42 | echo.
43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44 | echo.
45 | echo Please set the JAVA_HOME variable in your environment to match the
46 | echo location of your Java installation.
47 |
48 | goto fail
49 |
50 | :findJavaFromJavaHome
51 | set JAVA_HOME=%JAVA_HOME:"=%
52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53 |
54 | if exist "%JAVA_EXE%" goto init
55 |
56 | echo.
57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58 | echo.
59 | echo Please set the JAVA_HOME variable in your environment to match the
60 | echo location of your Java installation.
61 |
62 | goto fail
63 |
64 | :init
65 | @rem Get command-line arguments, handling Windows variants
66 |
67 | if not "%OS%" == "Windows_NT" goto win9xME_args
68 |
69 | :win9xME_args
70 | @rem Slurp the command line arguments.
71 | set CMD_LINE_ARGS=
72 | set _SKIP=2
73 |
74 | :win9xME_args_slurp
75 | if "x%~1" == "x" goto execute
76 |
77 | set CMD_LINE_ARGS=%*
78 |
79 | :execute
80 | @rem Setup the command line
81 |
82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83 |
84 | @rem Execute Gradle
85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86 |
87 | :end
88 | @rem End local scope for the variables with windows NT shell
89 | if "%ERRORLEVEL%"=="0" goto mainEnd
90 |
91 | :fail
92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93 | rem the _cmd.exe /c_ return code!
94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95 | exit /b 1
96 |
97 | :mainEnd
98 | if "%OS%"=="Windows_NT" endlocal
99 |
100 | :omega
101 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'BcryptReactNativeExample'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 |
5 | include ':bcryptreactnative'
6 | project(':bcryptreactnative').projectDir = new File(rootProject.projectDir, '../../android')
7 |
--------------------------------------------------------------------------------
/example/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "BcryptReactNativeExample",
3 | "displayName": "BcryptReactNative Example"
4 | }
5 |
--------------------------------------------------------------------------------
/example/babel.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const pak = require('../package.json');
3 |
4 | module.exports = {
5 | presets: ['module:metro-react-native-babel-preset'],
6 | plugins: [
7 | [
8 | 'module-resolver',
9 | {
10 | alias: {
11 | [pak.name]: path.join(__dirname, '..', pak.source),
12 | },
13 | },
14 | ],
15 | ],
16 | };
17 |
--------------------------------------------------------------------------------
/example/index.tsx:
--------------------------------------------------------------------------------
1 | import { AppRegistry } from 'react-native';
2 | import App from './src/App';
3 | import { name as appName } from './app.json';
4 |
5 | AppRegistry.registerComponent(appName, () => App);
6 |
--------------------------------------------------------------------------------
/example/ios/BcryptReactNativeExample-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
--------------------------------------------------------------------------------
/example/ios/BcryptReactNativeExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 0D1336C0461A88D01186E375 /* libPods-BcryptReactNativeExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BCEA90A70F4BEAD7E9FA28B2 /* libPods-BcryptReactNativeExample.a */; };
11 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
12 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
15 | 20F357B024636CDF00C146DC /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20F357AF24636CDF00C146DC /* File.swift */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXFileReference section */
19 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
20 | 13B07F961A680F5B00A75B9A /* BcryptReactNativeExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BcryptReactNativeExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
21 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = BcryptReactNativeExample/AppDelegate.h; sourceTree = ""; };
22 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = BcryptReactNativeExample/AppDelegate.m; sourceTree = ""; };
23 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
24 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = BcryptReactNativeExample/Images.xcassets; sourceTree = ""; };
25 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = BcryptReactNativeExample/Info.plist; sourceTree = ""; };
26 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = BcryptReactNativeExample/main.m; sourceTree = ""; };
27 | 20F357AD24636CDE00C146DC /* BcryptReactNativeExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BcryptReactNativeExample-Bridging-Header.h"; sourceTree = ""; };
28 | 20F357AE24636CDF00C146DC /* BcryptReactNativeExample-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "BcryptReactNativeExample-Bridging-Header.h"; sourceTree = ""; };
29 | 20F357AF24636CDF00C146DC /* File.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; };
30 | 4D7192F03A36A017E887435B /* Pods-BcryptReactNativeExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BcryptReactNativeExample.release.xcconfig"; path = "Target Support Files/Pods-BcryptReactNativeExample/Pods-BcryptReactNativeExample.release.xcconfig"; sourceTree = ""; };
31 | 871719007ECC5EAD276C345C /* Pods-BcryptReactNativeExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BcryptReactNativeExample.debug.xcconfig"; path = "Target Support Files/Pods-BcryptReactNativeExample/Pods-BcryptReactNativeExample.debug.xcconfig"; sourceTree = ""; };
32 | BCEA90A70F4BEAD7E9FA28B2 /* libPods-BcryptReactNativeExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BcryptReactNativeExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
33 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
34 | /* End PBXFileReference section */
35 |
36 | /* Begin PBXFrameworksBuildPhase section */
37 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
38 | isa = PBXFrameworksBuildPhase;
39 | buildActionMask = 2147483647;
40 | files = (
41 | 0D1336C0461A88D01186E375 /* libPods-BcryptReactNativeExample.a in Frameworks */,
42 | );
43 | runOnlyForDeploymentPostprocessing = 0;
44 | };
45 | /* End PBXFrameworksBuildPhase section */
46 |
47 | /* Begin PBXGroup section */
48 | 13B07FAE1A68108700A75B9A /* BcryptReactNativeExample */ = {
49 | isa = PBXGroup;
50 | children = (
51 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
52 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
53 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
54 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
55 | 13B07FB61A68108700A75B9A /* Info.plist */,
56 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
57 | 13B07FB71A68108700A75B9A /* main.m */,
58 | );
59 | name = BcryptReactNativeExample;
60 | sourceTree = "";
61 | };
62 | 1CFFDEF7170271C97B8B7E5A /* Pods */ = {
63 | isa = PBXGroup;
64 | children = (
65 | 871719007ECC5EAD276C345C /* Pods-BcryptReactNativeExample.debug.xcconfig */,
66 | 4D7192F03A36A017E887435B /* Pods-BcryptReactNativeExample.release.xcconfig */,
67 | );
68 | path = Pods;
69 | sourceTree = "";
70 | };
71 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
72 | isa = PBXGroup;
73 | children = (
74 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
75 | BCEA90A70F4BEAD7E9FA28B2 /* libPods-BcryptReactNativeExample.a */,
76 | );
77 | name = Frameworks;
78 | sourceTree = "";
79 | };
80 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
81 | isa = PBXGroup;
82 | children = (
83 | );
84 | name = Libraries;
85 | sourceTree = "";
86 | };
87 | 83CBB9F61A601CBA00E9B192 = {
88 | isa = PBXGroup;
89 | children = (
90 | 20F357AF24636CDF00C146DC /* File.swift */,
91 | 20F357AE24636CDF00C146DC /* BcryptReactNativeExample-Bridging-Header.h */,
92 | 13B07FAE1A68108700A75B9A /* BcryptReactNativeExample */,
93 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
94 | 83CBBA001A601CBA00E9B192 /* Products */,
95 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
96 | 1CFFDEF7170271C97B8B7E5A /* Pods */,
97 | 20F357AD24636CDE00C146DC /* BcryptReactNativeExample-Bridging-Header.h */,
98 | );
99 | indentWidth = 2;
100 | sourceTree = "";
101 | tabWidth = 2;
102 | usesTabs = 0;
103 | };
104 | 83CBBA001A601CBA00E9B192 /* Products */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 13B07F961A680F5B00A75B9A /* BcryptReactNativeExample.app */,
108 | );
109 | name = Products;
110 | sourceTree = "";
111 | };
112 | /* End PBXGroup section */
113 |
114 | /* Begin PBXNativeTarget section */
115 | 13B07F861A680F5B00A75B9A /* BcryptReactNativeExample */ = {
116 | isa = PBXNativeTarget;
117 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "BcryptReactNativeExample" */;
118 | buildPhases = (
119 | CCCC07BCAFDEF1FCADC0D0C9 /* [CP] Check Pods Manifest.lock */,
120 | FD10A7F022414F080027D42C /* Start Packager */,
121 | 13B07F871A680F5B00A75B9A /* Sources */,
122 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
123 | 13B07F8E1A680F5B00A75B9A /* Resources */,
124 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
125 | );
126 | buildRules = (
127 | );
128 | dependencies = (
129 | );
130 | name = BcryptReactNativeExample;
131 | productName = BcryptReactNativeExample;
132 | productReference = 13B07F961A680F5B00A75B9A /* BcryptReactNativeExample.app */;
133 | productType = "com.apple.product-type.application";
134 | };
135 | /* End PBXNativeTarget section */
136 |
137 | /* Begin PBXProject section */
138 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
139 | isa = PBXProject;
140 | attributes = {
141 | LastUpgradeCheck = 0940;
142 | ORGANIZATIONNAME = Facebook;
143 | TargetAttributes = {
144 | 13B07F861A680F5B00A75B9A = {
145 | LastSwiftMigration = 1110;
146 | };
147 | };
148 | };
149 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "BcryptReactNativeExample" */;
150 | compatibilityVersion = "Xcode 3.2";
151 | developmentRegion = English;
152 | hasScannedForEncodings = 0;
153 | knownRegions = (
154 | English,
155 | en,
156 | Base,
157 | );
158 | mainGroup = 83CBB9F61A601CBA00E9B192;
159 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
160 | projectDirPath = "";
161 | projectRoot = "";
162 | targets = (
163 | 13B07F861A680F5B00A75B9A /* BcryptReactNativeExample */,
164 | );
165 | };
166 | /* End PBXProject section */
167 |
168 | /* Begin PBXResourcesBuildPhase section */
169 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
170 | isa = PBXResourcesBuildPhase;
171 | buildActionMask = 2147483647;
172 | files = (
173 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
174 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
175 | );
176 | runOnlyForDeploymentPostprocessing = 0;
177 | };
178 | /* End PBXResourcesBuildPhase section */
179 |
180 | /* Begin PBXShellScriptBuildPhase section */
181 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
182 | isa = PBXShellScriptBuildPhase;
183 | buildActionMask = 2147483647;
184 | files = (
185 | );
186 | inputPaths = (
187 | );
188 | name = "Bundle React Native code and images";
189 | outputPaths = (
190 | );
191 | runOnlyForDeploymentPostprocessing = 0;
192 | shellPath = /bin/sh;
193 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
194 | };
195 | CCCC07BCAFDEF1FCADC0D0C9 /* [CP] Check Pods Manifest.lock */ = {
196 | isa = PBXShellScriptBuildPhase;
197 | buildActionMask = 2147483647;
198 | files = (
199 | );
200 | inputFileListPaths = (
201 | );
202 | inputPaths = (
203 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
204 | "${PODS_ROOT}/Manifest.lock",
205 | );
206 | name = "[CP] Check Pods Manifest.lock";
207 | outputFileListPaths = (
208 | );
209 | outputPaths = (
210 | "$(DERIVED_FILE_DIR)/Pods-BcryptReactNativeExample-checkManifestLockResult.txt",
211 | );
212 | runOnlyForDeploymentPostprocessing = 0;
213 | shellPath = /bin/sh;
214 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
215 | showEnvVarsInLog = 0;
216 | };
217 | FD10A7F022414F080027D42C /* Start Packager */ = {
218 | isa = PBXShellScriptBuildPhase;
219 | buildActionMask = 2147483647;
220 | files = (
221 | );
222 | inputFileListPaths = (
223 | );
224 | inputPaths = (
225 | );
226 | name = "Start Packager";
227 | outputFileListPaths = (
228 | );
229 | outputPaths = (
230 | );
231 | runOnlyForDeploymentPostprocessing = 0;
232 | shellPath = /bin/sh;
233 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
234 | showEnvVarsInLog = 0;
235 | };
236 | /* End PBXShellScriptBuildPhase section */
237 |
238 | /* Begin PBXSourcesBuildPhase section */
239 | 13B07F871A680F5B00A75B9A /* Sources */ = {
240 | isa = PBXSourcesBuildPhase;
241 | buildActionMask = 2147483647;
242 | files = (
243 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
244 | 20F357B024636CDF00C146DC /* File.swift in Sources */,
245 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
246 | );
247 | runOnlyForDeploymentPostprocessing = 0;
248 | };
249 | /* End PBXSourcesBuildPhase section */
250 |
251 | /* Begin PBXVariantGroup section */
252 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
253 | isa = PBXVariantGroup;
254 | children = (
255 | 13B07FB21A68108700A75B9A /* Base */,
256 | );
257 | name = LaunchScreen.xib;
258 | path = BcryptReactNativeExample;
259 | sourceTree = "";
260 | };
261 | /* End PBXVariantGroup section */
262 |
263 | /* Begin XCBuildConfiguration section */
264 | 13B07F941A680F5B00A75B9A /* Debug */ = {
265 | isa = XCBuildConfiguration;
266 | baseConfigurationReference = 871719007ECC5EAD276C345C /* Pods-BcryptReactNativeExample.debug.xcconfig */;
267 | buildSettings = {
268 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
269 | CLANG_ENABLE_MODULES = YES;
270 | CURRENT_PROJECT_VERSION = 1;
271 | DEAD_CODE_STRIPPING = NO;
272 | INFOPLIST_FILE = BcryptReactNativeExample/Info.plist;
273 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
274 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
275 | OTHER_CFLAGS = (
276 | "$(inherited)",
277 | "-DFB_SONARKIT_ENABLED=1",
278 | );
279 | OTHER_LDFLAGS = (
280 | "$(inherited)",
281 | "-ObjC",
282 | "-lc++",
283 | );
284 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.BcryptReactNativeExample.$(PRODUCT_NAME:rfc1034identifier)";
285 | PRODUCT_NAME = BcryptReactNativeExample;
286 | SWIFT_OBJC_BRIDGING_HEADER = "BcryptReactNativeExample-Bridging-Header.h";
287 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
288 | SWIFT_VERSION = 5.0;
289 | VERSIONING_SYSTEM = "apple-generic";
290 | };
291 | name = Debug;
292 | };
293 | 13B07F951A680F5B00A75B9A /* Release */ = {
294 | isa = XCBuildConfiguration;
295 | baseConfigurationReference = 4D7192F03A36A017E887435B /* Pods-BcryptReactNativeExample.release.xcconfig */;
296 | buildSettings = {
297 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
298 | CLANG_ENABLE_MODULES = YES;
299 | CURRENT_PROJECT_VERSION = 1;
300 | INFOPLIST_FILE = BcryptReactNativeExample/Info.plist;
301 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
302 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
303 | OTHER_CFLAGS = (
304 | "$(inherited)",
305 | "-DFB_SONARKIT_ENABLED=1",
306 | );
307 | OTHER_LDFLAGS = (
308 | "$(inherited)",
309 | "-ObjC",
310 | "-lc++",
311 | );
312 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.BcryptReactNativeExample.$(PRODUCT_NAME:rfc1034identifier)";
313 | PRODUCT_NAME = BcryptReactNativeExample;
314 | SWIFT_OBJC_BRIDGING_HEADER = "BcryptReactNativeExample-Bridging-Header.h";
315 | SWIFT_VERSION = 5.0;
316 | VERSIONING_SYSTEM = "apple-generic";
317 | };
318 | name = Release;
319 | };
320 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
321 | isa = XCBuildConfiguration;
322 | buildSettings = {
323 | ALWAYS_SEARCH_USER_PATHS = NO;
324 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
325 | CLANG_CXX_LIBRARY = "libc++";
326 | CLANG_ENABLE_MODULES = YES;
327 | CLANG_ENABLE_OBJC_ARC = YES;
328 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
329 | CLANG_WARN_BOOL_CONVERSION = YES;
330 | CLANG_WARN_COMMA = YES;
331 | CLANG_WARN_CONSTANT_CONVERSION = YES;
332 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
333 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
334 | CLANG_WARN_EMPTY_BODY = YES;
335 | CLANG_WARN_ENUM_CONVERSION = YES;
336 | CLANG_WARN_INFINITE_RECURSION = YES;
337 | CLANG_WARN_INT_CONVERSION = YES;
338 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
339 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
340 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
342 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
343 | CLANG_WARN_STRICT_PROTOTYPES = YES;
344 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
345 | CLANG_WARN_UNREACHABLE_CODE = YES;
346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
348 | COPY_PHASE_STRIP = NO;
349 | ENABLE_STRICT_OBJC_MSGSEND = YES;
350 | ENABLE_TESTABILITY = YES;
351 | GCC_C_LANGUAGE_STANDARD = gnu99;
352 | GCC_DYNAMIC_NO_PIC = NO;
353 | GCC_NO_COMMON_BLOCKS = YES;
354 | GCC_OPTIMIZATION_LEVEL = 0;
355 | GCC_PREPROCESSOR_DEFINITIONS = (
356 | "DEBUG=1",
357 | "$(inherited)",
358 | );
359 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
360 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
361 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
362 | GCC_WARN_UNDECLARED_SELECTOR = YES;
363 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
364 | GCC_WARN_UNUSED_FUNCTION = YES;
365 | GCC_WARN_UNUSED_VARIABLE = YES;
366 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
367 | MTL_ENABLE_DEBUG_INFO = YES;
368 | ONLY_ACTIVE_ARCH = YES;
369 | SDKROOT = iphoneos;
370 | };
371 | name = Debug;
372 | };
373 | 83CBBA211A601CBA00E9B192 /* Release */ = {
374 | isa = XCBuildConfiguration;
375 | buildSettings = {
376 | ALWAYS_SEARCH_USER_PATHS = NO;
377 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
378 | CLANG_CXX_LIBRARY = "libc++";
379 | CLANG_ENABLE_MODULES = YES;
380 | CLANG_ENABLE_OBJC_ARC = YES;
381 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
382 | CLANG_WARN_BOOL_CONVERSION = YES;
383 | CLANG_WARN_COMMA = YES;
384 | CLANG_WARN_CONSTANT_CONVERSION = YES;
385 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
386 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
387 | CLANG_WARN_EMPTY_BODY = YES;
388 | CLANG_WARN_ENUM_CONVERSION = YES;
389 | CLANG_WARN_INFINITE_RECURSION = YES;
390 | CLANG_WARN_INT_CONVERSION = YES;
391 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
392 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
393 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
394 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
395 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
396 | CLANG_WARN_STRICT_PROTOTYPES = YES;
397 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
398 | CLANG_WARN_UNREACHABLE_CODE = YES;
399 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
400 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
401 | COPY_PHASE_STRIP = YES;
402 | ENABLE_NS_ASSERTIONS = NO;
403 | ENABLE_STRICT_OBJC_MSGSEND = YES;
404 | GCC_C_LANGUAGE_STANDARD = gnu99;
405 | GCC_NO_COMMON_BLOCKS = YES;
406 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
407 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
408 | GCC_WARN_UNDECLARED_SELECTOR = YES;
409 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
410 | GCC_WARN_UNUSED_FUNCTION = YES;
411 | GCC_WARN_UNUSED_VARIABLE = YES;
412 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
413 | MTL_ENABLE_DEBUG_INFO = NO;
414 | SDKROOT = iphoneos;
415 | VALIDATE_PRODUCT = YES;
416 | };
417 | name = Release;
418 | };
419 | /* End XCBuildConfiguration section */
420 |
421 | /* Begin XCConfigurationList section */
422 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "BcryptReactNativeExample" */ = {
423 | isa = XCConfigurationList;
424 | buildConfigurations = (
425 | 13B07F941A680F5B00A75B9A /* Debug */,
426 | 13B07F951A680F5B00A75B9A /* Release */,
427 | );
428 | defaultConfigurationIsVisible = 0;
429 | defaultConfigurationName = Release;
430 | };
431 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "BcryptReactNativeExample" */ = {
432 | isa = XCConfigurationList;
433 | buildConfigurations = (
434 | 83CBBA201A601CBA00E9B192 /* Debug */,
435 | 83CBBA211A601CBA00E9B192 /* Release */,
436 | );
437 | defaultConfigurationIsVisible = 0;
438 | defaultConfigurationName = Release;
439 | };
440 | /* End XCConfigurationList section */
441 | };
442 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
443 | }
444 |
--------------------------------------------------------------------------------
/example/ios/BcryptReactNativeExample.xcodeproj/xcshareddata/xcschemes/BcryptReactNativeExample.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
51 |
52 |
53 |
54 |
64 |
66 |
72 |
73 |
74 |
75 |
81 |
83 |
89 |
90 |
91 |
92 |
94 |
95 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/example/ios/BcryptReactNativeExample.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/BcryptReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/BcryptReactNativeExample/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (nonatomic, strong) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/example/ios/BcryptReactNativeExample/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import "AppDelegate.h"
9 |
10 | #import
11 | #import
12 | #import
13 |
14 | #if DEBUG
15 | #import
16 | #import
17 | #import
18 | #import
19 | #import
20 | #import
21 | static void InitializeFlipper(UIApplication *application) {
22 | FlipperClient *client = [FlipperClient sharedClient];
23 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
24 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
25 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
26 | [client addPlugin:[FlipperKitReactPlugin new]];
27 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
28 | [client start];
29 | }
30 | #endif
31 |
32 | @implementation AppDelegate
33 |
34 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
35 | {
36 | #if DEBUG
37 | InitializeFlipper(application);
38 | #endif
39 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
40 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
41 | moduleName:@"BcryptReactNativeExample"
42 | initialProperties:nil];
43 |
44 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
45 |
46 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
47 | UIViewController *rootViewController = [UIViewController new];
48 | rootViewController.view = rootView;
49 | self.window.rootViewController = rootViewController;
50 | [self.window makeKeyAndVisible];
51 | return YES;
52 | }
53 |
54 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
55 | {
56 | #if DEBUG
57 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
58 | #else
59 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
60 | #endif
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/example/ios/BcryptReactNativeExample/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/example/ios/BcryptReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/example/ios/BcryptReactNativeExample/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/example/ios/BcryptReactNativeExample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | BcryptReactNative Example
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSAllowsArbitraryLoads
30 |
31 | NSExceptionDomains
32 |
33 | localhost
34 |
35 | NSExceptionAllowsInsecureHTTPLoads
36 |
37 |
38 |
39 |
40 | NSLocationWhenInUseUsageDescription
41 |
42 | UILaunchStoryboardName
43 | LaunchScreen
44 | UIRequiredDeviceCapabilities
45 |
46 | armv7
47 |
48 | UISupportedInterfaceOrientations
49 |
50 | UIInterfaceOrientationPortrait
51 | UIInterfaceOrientationLandscapeLeft
52 | UIInterfaceOrientationLandscapeRight
53 |
54 | UIViewControllerBasedStatusBarAppearance
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/example/ios/BcryptReactNativeExample/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 |
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/example/ios/File.swift:
--------------------------------------------------------------------------------
1 | //
2 | // File.swift
3 | // BcryptReactNativeExample
4 | //
5 |
6 | import Foundation
7 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '11.0'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | def add_flipper_pods!
5 | version = '~> 0.33.1'
6 | pod 'FlipperKit', version, :configuration => 'Debug'
7 | pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => 'Debug'
8 | pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => 'Debug'
9 | pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => 'Debug'
10 | pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => 'Debug'
11 | end
12 | # Post Install processing for Flipper
13 | def flipper_post_install(installer)
14 | installer.pods_project.targets.each do |target|
15 | if target.name == 'YogaKit'
16 | target.build_configurations.each do |config|
17 | config.build_settings['SWIFT_VERSION'] = '4.1'
18 | end
19 | end
20 | end
21 | end
22 |
23 | target 'BcryptReactNativeExample' do
24 | # Pods for BcryptReactNativeExample
25 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
26 | pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
27 | pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
28 | pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
29 | pod 'React', :path => '../node_modules/react-native/'
30 | pod 'React-Core', :path => '../node_modules/react-native/'
31 | pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
32 | pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
33 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
34 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
35 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
36 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
37 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
38 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
39 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
40 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
41 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
42 | pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
43 |
44 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
45 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
46 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
47 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
48 | pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
49 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
50 | pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
51 |
52 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
53 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
54 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
55 |
56 | pod 'bcrypt-react-native', :path => '../..'
57 |
58 | use_native_modules!
59 |
60 | # Enables Flipper.
61 | #
62 | # Note that if you have use_frameworks! enabled, Flipper will not work and
63 | # you should disable these next few lines.
64 | add_flipper_pods!
65 | post_install do |installer|
66 | flipper_post_install(installer)
67 | end
68 | end
69 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - BCrypt (1.0.0)
3 | - bcrypt-react-native (0.1.0):
4 | - BCrypt
5 | - React
6 | - boost-for-react-native (1.63.0)
7 | - CocoaAsyncSocket (7.6.4)
8 | - CocoaLibEvent (1.0.0)
9 | - DoubleConversion (1.1.6)
10 | - FBLazyVector (0.62.2)
11 | - FBReactNativeSpec (0.62.2):
12 | - Folly (= 2018.10.22.00)
13 | - RCTRequired (= 0.62.2)
14 | - RCTTypeSafety (= 0.62.2)
15 | - React-Core (= 0.62.2)
16 | - React-jsi (= 0.62.2)
17 | - ReactCommon/turbomodule/core (= 0.62.2)
18 | - Flipper (0.33.1):
19 | - Flipper-Folly (~> 2.1)
20 | - Flipper-RSocket (~> 1.0)
21 | - Flipper-DoubleConversion (1.1.7)
22 | - Flipper-Folly (2.2.0):
23 | - boost-for-react-native
24 | - CocoaLibEvent (~> 1.0)
25 | - Flipper-DoubleConversion
26 | - Flipper-Glog
27 | - OpenSSL-Universal (= 1.0.2.19)
28 | - Flipper-Glog (0.3.6)
29 | - Flipper-PeerTalk (0.0.4)
30 | - Flipper-RSocket (1.1.0):
31 | - Flipper-Folly (~> 2.2)
32 | - FlipperKit (0.33.1):
33 | - FlipperKit/Core (= 0.33.1)
34 | - FlipperKit/Core (0.33.1):
35 | - Flipper (~> 0.33.1)
36 | - FlipperKit/CppBridge
37 | - FlipperKit/FBCxxFollyDynamicConvert
38 | - FlipperKit/FBDefines
39 | - FlipperKit/FKPortForwarding
40 | - FlipperKit/CppBridge (0.33.1):
41 | - Flipper (~> 0.33.1)
42 | - FlipperKit/FBCxxFollyDynamicConvert (0.33.1):
43 | - Flipper-Folly (~> 2.1)
44 | - FlipperKit/FBDefines (0.33.1)
45 | - FlipperKit/FKPortForwarding (0.33.1):
46 | - CocoaAsyncSocket (~> 7.6)
47 | - Flipper-PeerTalk (~> 0.0.4)
48 | - FlipperKit/FlipperKitHighlightOverlay (0.33.1)
49 | - FlipperKit/FlipperKitLayoutPlugin (0.33.1):
50 | - FlipperKit/Core
51 | - FlipperKit/FlipperKitHighlightOverlay
52 | - FlipperKit/FlipperKitLayoutTextSearchable
53 | - YogaKit (~> 1.18)
54 | - FlipperKit/FlipperKitLayoutTextSearchable (0.33.1)
55 | - FlipperKit/FlipperKitNetworkPlugin (0.33.1):
56 | - FlipperKit/Core
57 | - FlipperKit/FlipperKitReactPlugin (0.33.1):
58 | - FlipperKit/Core
59 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.33.1):
60 | - FlipperKit/Core
61 | - FlipperKit/SKIOSNetworkPlugin (0.33.1):
62 | - FlipperKit/Core
63 | - FlipperKit/FlipperKitNetworkPlugin
64 | - Folly (2018.10.22.00):
65 | - boost-for-react-native
66 | - DoubleConversion
67 | - Folly/Default (= 2018.10.22.00)
68 | - glog
69 | - Folly/Default (2018.10.22.00):
70 | - boost-for-react-native
71 | - DoubleConversion
72 | - glog
73 | - glog (0.3.5)
74 | - OpenSSL-Universal (1.0.2.19):
75 | - OpenSSL-Universal/Static (= 1.0.2.19)
76 | - OpenSSL-Universal/Static (1.0.2.19)
77 | - RCTRequired (0.62.2)
78 | - RCTTypeSafety (0.62.2):
79 | - FBLazyVector (= 0.62.2)
80 | - Folly (= 2018.10.22.00)
81 | - RCTRequired (= 0.62.2)
82 | - React-Core (= 0.62.2)
83 | - React (0.62.2):
84 | - React-Core (= 0.62.2)
85 | - React-Core/DevSupport (= 0.62.2)
86 | - React-Core/RCTWebSocket (= 0.62.2)
87 | - React-RCTActionSheet (= 0.62.2)
88 | - React-RCTAnimation (= 0.62.2)
89 | - React-RCTBlob (= 0.62.2)
90 | - React-RCTImage (= 0.62.2)
91 | - React-RCTLinking (= 0.62.2)
92 | - React-RCTNetwork (= 0.62.2)
93 | - React-RCTSettings (= 0.62.2)
94 | - React-RCTText (= 0.62.2)
95 | - React-RCTVibration (= 0.62.2)
96 | - React-Core (0.62.2):
97 | - Folly (= 2018.10.22.00)
98 | - glog
99 | - React-Core/Default (= 0.62.2)
100 | - React-cxxreact (= 0.62.2)
101 | - React-jsi (= 0.62.2)
102 | - React-jsiexecutor (= 0.62.2)
103 | - Yoga
104 | - React-Core/CoreModulesHeaders (0.62.2):
105 | - Folly (= 2018.10.22.00)
106 | - glog
107 | - React-Core/Default
108 | - React-cxxreact (= 0.62.2)
109 | - React-jsi (= 0.62.2)
110 | - React-jsiexecutor (= 0.62.2)
111 | - Yoga
112 | - React-Core/Default (0.62.2):
113 | - Folly (= 2018.10.22.00)
114 | - glog
115 | - React-cxxreact (= 0.62.2)
116 | - React-jsi (= 0.62.2)
117 | - React-jsiexecutor (= 0.62.2)
118 | - Yoga
119 | - React-Core/DevSupport (0.62.2):
120 | - Folly (= 2018.10.22.00)
121 | - glog
122 | - React-Core/Default (= 0.62.2)
123 | - React-Core/RCTWebSocket (= 0.62.2)
124 | - React-cxxreact (= 0.62.2)
125 | - React-jsi (= 0.62.2)
126 | - React-jsiexecutor (= 0.62.2)
127 | - React-jsinspector (= 0.62.2)
128 | - Yoga
129 | - React-Core/RCTActionSheetHeaders (0.62.2):
130 | - Folly (= 2018.10.22.00)
131 | - glog
132 | - React-Core/Default
133 | - React-cxxreact (= 0.62.2)
134 | - React-jsi (= 0.62.2)
135 | - React-jsiexecutor (= 0.62.2)
136 | - Yoga
137 | - React-Core/RCTAnimationHeaders (0.62.2):
138 | - Folly (= 2018.10.22.00)
139 | - glog
140 | - React-Core/Default
141 | - React-cxxreact (= 0.62.2)
142 | - React-jsi (= 0.62.2)
143 | - React-jsiexecutor (= 0.62.2)
144 | - Yoga
145 | - React-Core/RCTBlobHeaders (0.62.2):
146 | - Folly (= 2018.10.22.00)
147 | - glog
148 | - React-Core/Default
149 | - React-cxxreact (= 0.62.2)
150 | - React-jsi (= 0.62.2)
151 | - React-jsiexecutor (= 0.62.2)
152 | - Yoga
153 | - React-Core/RCTImageHeaders (0.62.2):
154 | - Folly (= 2018.10.22.00)
155 | - glog
156 | - React-Core/Default
157 | - React-cxxreact (= 0.62.2)
158 | - React-jsi (= 0.62.2)
159 | - React-jsiexecutor (= 0.62.2)
160 | - Yoga
161 | - React-Core/RCTLinkingHeaders (0.62.2):
162 | - Folly (= 2018.10.22.00)
163 | - glog
164 | - React-Core/Default
165 | - React-cxxreact (= 0.62.2)
166 | - React-jsi (= 0.62.2)
167 | - React-jsiexecutor (= 0.62.2)
168 | - Yoga
169 | - React-Core/RCTNetworkHeaders (0.62.2):
170 | - Folly (= 2018.10.22.00)
171 | - glog
172 | - React-Core/Default
173 | - React-cxxreact (= 0.62.2)
174 | - React-jsi (= 0.62.2)
175 | - React-jsiexecutor (= 0.62.2)
176 | - Yoga
177 | - React-Core/RCTSettingsHeaders (0.62.2):
178 | - Folly (= 2018.10.22.00)
179 | - glog
180 | - React-Core/Default
181 | - React-cxxreact (= 0.62.2)
182 | - React-jsi (= 0.62.2)
183 | - React-jsiexecutor (= 0.62.2)
184 | - Yoga
185 | - React-Core/RCTTextHeaders (0.62.2):
186 | - Folly (= 2018.10.22.00)
187 | - glog
188 | - React-Core/Default
189 | - React-cxxreact (= 0.62.2)
190 | - React-jsi (= 0.62.2)
191 | - React-jsiexecutor (= 0.62.2)
192 | - Yoga
193 | - React-Core/RCTVibrationHeaders (0.62.2):
194 | - Folly (= 2018.10.22.00)
195 | - glog
196 | - React-Core/Default
197 | - React-cxxreact (= 0.62.2)
198 | - React-jsi (= 0.62.2)
199 | - React-jsiexecutor (= 0.62.2)
200 | - Yoga
201 | - React-Core/RCTWebSocket (0.62.2):
202 | - Folly (= 2018.10.22.00)
203 | - glog
204 | - React-Core/Default (= 0.62.2)
205 | - React-cxxreact (= 0.62.2)
206 | - React-jsi (= 0.62.2)
207 | - React-jsiexecutor (= 0.62.2)
208 | - Yoga
209 | - React-CoreModules (0.62.2):
210 | - FBReactNativeSpec (= 0.62.2)
211 | - Folly (= 2018.10.22.00)
212 | - RCTTypeSafety (= 0.62.2)
213 | - React-Core/CoreModulesHeaders (= 0.62.2)
214 | - React-RCTImage (= 0.62.2)
215 | - ReactCommon/turbomodule/core (= 0.62.2)
216 | - React-cxxreact (0.62.2):
217 | - boost-for-react-native (= 1.63.0)
218 | - DoubleConversion
219 | - Folly (= 2018.10.22.00)
220 | - glog
221 | - React-jsinspector (= 0.62.2)
222 | - React-jsi (0.62.2):
223 | - boost-for-react-native (= 1.63.0)
224 | - DoubleConversion
225 | - Folly (= 2018.10.22.00)
226 | - glog
227 | - React-jsi/Default (= 0.62.2)
228 | - React-jsi/Default (0.62.2):
229 | - boost-for-react-native (= 1.63.0)
230 | - DoubleConversion
231 | - Folly (= 2018.10.22.00)
232 | - glog
233 | - React-jsiexecutor (0.62.2):
234 | - DoubleConversion
235 | - Folly (= 2018.10.22.00)
236 | - glog
237 | - React-cxxreact (= 0.62.2)
238 | - React-jsi (= 0.62.2)
239 | - React-jsinspector (0.62.2)
240 | - React-RCTActionSheet (0.62.2):
241 | - React-Core/RCTActionSheetHeaders (= 0.62.2)
242 | - React-RCTAnimation (0.62.2):
243 | - FBReactNativeSpec (= 0.62.2)
244 | - Folly (= 2018.10.22.00)
245 | - RCTTypeSafety (= 0.62.2)
246 | - React-Core/RCTAnimationHeaders (= 0.62.2)
247 | - ReactCommon/turbomodule/core (= 0.62.2)
248 | - React-RCTBlob (0.62.2):
249 | - FBReactNativeSpec (= 0.62.2)
250 | - Folly (= 2018.10.22.00)
251 | - React-Core/RCTBlobHeaders (= 0.62.2)
252 | - React-Core/RCTWebSocket (= 0.62.2)
253 | - React-jsi (= 0.62.2)
254 | - React-RCTNetwork (= 0.62.2)
255 | - ReactCommon/turbomodule/core (= 0.62.2)
256 | - React-RCTImage (0.62.2):
257 | - FBReactNativeSpec (= 0.62.2)
258 | - Folly (= 2018.10.22.00)
259 | - RCTTypeSafety (= 0.62.2)
260 | - React-Core/RCTImageHeaders (= 0.62.2)
261 | - React-RCTNetwork (= 0.62.2)
262 | - ReactCommon/turbomodule/core (= 0.62.2)
263 | - React-RCTLinking (0.62.2):
264 | - FBReactNativeSpec (= 0.62.2)
265 | - React-Core/RCTLinkingHeaders (= 0.62.2)
266 | - ReactCommon/turbomodule/core (= 0.62.2)
267 | - React-RCTNetwork (0.62.2):
268 | - FBReactNativeSpec (= 0.62.2)
269 | - Folly (= 2018.10.22.00)
270 | - RCTTypeSafety (= 0.62.2)
271 | - React-Core/RCTNetworkHeaders (= 0.62.2)
272 | - ReactCommon/turbomodule/core (= 0.62.2)
273 | - React-RCTSettings (0.62.2):
274 | - FBReactNativeSpec (= 0.62.2)
275 | - Folly (= 2018.10.22.00)
276 | - RCTTypeSafety (= 0.62.2)
277 | - React-Core/RCTSettingsHeaders (= 0.62.2)
278 | - ReactCommon/turbomodule/core (= 0.62.2)
279 | - React-RCTText (0.62.2):
280 | - React-Core/RCTTextHeaders (= 0.62.2)
281 | - React-RCTVibration (0.62.2):
282 | - FBReactNativeSpec (= 0.62.2)
283 | - Folly (= 2018.10.22.00)
284 | - React-Core/RCTVibrationHeaders (= 0.62.2)
285 | - ReactCommon/turbomodule/core (= 0.62.2)
286 | - ReactCommon/callinvoker (0.62.2):
287 | - DoubleConversion
288 | - Folly (= 2018.10.22.00)
289 | - glog
290 | - React-cxxreact (= 0.62.2)
291 | - ReactCommon/turbomodule/core (0.62.2):
292 | - DoubleConversion
293 | - Folly (= 2018.10.22.00)
294 | - glog
295 | - React-Core (= 0.62.2)
296 | - React-cxxreact (= 0.62.2)
297 | - React-jsi (= 0.62.2)
298 | - ReactCommon/callinvoker (= 0.62.2)
299 | - Yoga (1.14.0)
300 | - YogaKit (1.18.1):
301 | - Yoga (~> 1.14)
302 |
303 | DEPENDENCIES:
304 | - bcrypt-react-native (from `../..`)
305 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
306 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
307 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
308 | - FlipperKit (~> 0.33.1)
309 | - FlipperKit/FlipperKitLayoutPlugin (~> 0.33.1)
310 | - FlipperKit/FlipperKitReactPlugin (~> 0.33.1)
311 | - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.33.1)
312 | - FlipperKit/SKIOSNetworkPlugin (~> 0.33.1)
313 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
314 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
315 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
316 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
317 | - React (from `../node_modules/react-native/`)
318 | - React-Core (from `../node_modules/react-native/`)
319 | - React-Core/DevSupport (from `../node_modules/react-native/`)
320 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
321 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
322 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
323 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
324 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
325 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
326 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
327 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
328 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
329 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
330 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
331 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
332 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
333 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
334 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
335 | - ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`)
336 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
337 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
338 |
339 | SPEC REPOS:
340 | trunk:
341 | - BCrypt
342 | - boost-for-react-native
343 | - CocoaAsyncSocket
344 | - CocoaLibEvent
345 | - Flipper
346 | - Flipper-DoubleConversion
347 | - Flipper-Folly
348 | - Flipper-Glog
349 | - Flipper-PeerTalk
350 | - Flipper-RSocket
351 | - FlipperKit
352 | - OpenSSL-Universal
353 | - YogaKit
354 |
355 | EXTERNAL SOURCES:
356 | bcrypt-react-native:
357 | :path: "../.."
358 | DoubleConversion:
359 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
360 | FBLazyVector:
361 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
362 | FBReactNativeSpec:
363 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec"
364 | Folly:
365 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
366 | glog:
367 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
368 | RCTRequired:
369 | :path: "../node_modules/react-native/Libraries/RCTRequired"
370 | RCTTypeSafety:
371 | :path: "../node_modules/react-native/Libraries/TypeSafety"
372 | React:
373 | :path: "../node_modules/react-native/"
374 | React-Core:
375 | :path: "../node_modules/react-native/"
376 | React-CoreModules:
377 | :path: "../node_modules/react-native/React/CoreModules"
378 | React-cxxreact:
379 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
380 | React-jsi:
381 | :path: "../node_modules/react-native/ReactCommon/jsi"
382 | React-jsiexecutor:
383 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
384 | React-jsinspector:
385 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
386 | React-RCTActionSheet:
387 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
388 | React-RCTAnimation:
389 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
390 | React-RCTBlob:
391 | :path: "../node_modules/react-native/Libraries/Blob"
392 | React-RCTImage:
393 | :path: "../node_modules/react-native/Libraries/Image"
394 | React-RCTLinking:
395 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
396 | React-RCTNetwork:
397 | :path: "../node_modules/react-native/Libraries/Network"
398 | React-RCTSettings:
399 | :path: "../node_modules/react-native/Libraries/Settings"
400 | React-RCTText:
401 | :path: "../node_modules/react-native/Libraries/Text"
402 | React-RCTVibration:
403 | :path: "../node_modules/react-native/Libraries/Vibration"
404 | ReactCommon:
405 | :path: "../node_modules/react-native/ReactCommon"
406 | Yoga:
407 | :path: "../node_modules/react-native/ReactCommon/yoga"
408 |
409 | SPEC CHECKSUMS:
410 | BCrypt: 712b656110e5020d319c547e4d8f3053ded82b2a
411 | bcrypt-react-native: c5468f850df627b769ffefa9086aab0524750d9c
412 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
413 | CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845
414 | CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
415 | DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
416 | FBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245
417 | FBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e
418 | Flipper: 6c1f484f9a88d30ab3e272800d53688439e50f69
419 | Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
420 | Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3
421 | Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6
422 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
423 | Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7
424 | FlipperKit: 6dc9b8f4ef60d9e5ded7f0264db299c91f18832e
425 | Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
426 | glog: 1f3da668190260b06b429bb211bfbee5cd790c28
427 | OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355
428 | RCTRequired: cec6a34b3ac8a9915c37e7e4ad3aa74726ce4035
429 | RCTTypeSafety: 93006131180074cffa227a1075802c89a49dd4ce
430 | React: 29a8b1a02bd764fb7644ef04019270849b9a7ac3
431 | React-Core: b12bffb3f567fdf99510acb716ef1abd426e0e05
432 | React-CoreModules: 4a9b87bbe669d6c3173c0132c3328e3b000783d0
433 | React-cxxreact: e65f9c2ba0ac5be946f53548c1aaaee5873a8103
434 | React-jsi: b6dc94a6a12ff98e8877287a0b7620d365201161
435 | React-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da
436 | React-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493
437 | React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c
438 | React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0
439 | React-RCTBlob: a332773f0ebc413a0ce85942a55b064471587a71
440 | React-RCTImage: e70be9b9c74fe4e42d0005f42cace7981c994ac3
441 | React-RCTLinking: c1b9739a88d56ecbec23b7f63650e44672ab2ad2
442 | React-RCTNetwork: 73138b6f45e5a2768ad93f3d57873c2a18d14b44
443 | React-RCTSettings: 6e3738a87e21b39a8cb08d627e68c44acf1e325a
444 | React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d
445 | React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
446 | ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
447 | Yoga: 3ebccbdd559724312790e7742142d062476b698e
448 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
449 |
450 | PODFILE CHECKSUM: 419883f28c9897919e5b9adfc01e0e6769e16c1d
451 |
452 | COCOAPODS: 1.9.3
453 |
--------------------------------------------------------------------------------
/example/metro.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const blacklist = require('metro-config/src/defaults/blacklist');
3 | const escape = require('escape-string-regexp');
4 | const pak = require('../package.json');
5 |
6 | const root = path.resolve(__dirname, '..');
7 |
8 | const modules = Object.keys({
9 | ...pak.peerDependencies,
10 | });
11 |
12 | module.exports = {
13 | projectRoot: __dirname,
14 | watchFolders: [root],
15 |
16 | // We need to make sure that only one version is loaded for peerDependencies
17 | // So we blacklist them at the root, and alias them to the versions in example's node_modules
18 | resolver: {
19 | blacklistRE: blacklist(
20 | modules.map(
21 | (m) =>
22 | new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
23 | )
24 | ),
25 |
26 | extraNodeModules: modules.reduce((acc, name) => {
27 | acc[name] = path.join(__dirname, 'node_modules', name);
28 | return acc;
29 | }, {}),
30 | },
31 |
32 | transformer: {
33 | getTransformOptions: async () => ({
34 | transform: {
35 | experimentalImportSupport: false,
36 | inlineRequires: true,
37 | },
38 | }),
39 | },
40 | };
41 |
--------------------------------------------------------------------------------
/example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bcrypt-react-native-example",
3 | "description": "Example app for bcrypt-react-native",
4 | "version": "0.0.1",
5 | "private": true,
6 | "scripts": {
7 | "android": "react-native run-android",
8 | "ios": "react-native run-ios",
9 | "start": "react-native start"
10 | },
11 | "dependencies": {
12 | "react": "16.11.0",
13 | "react-native": "0.62.2"
14 | },
15 | "devDependencies": {
16 | "@babel/core": "^7.9.6",
17 | "@babel/runtime": "^7.9.6",
18 | "babel-plugin-module-resolver": "^4.0.0",
19 | "metro-react-native-babel-preset": "^0.59.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/example/src/App.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import BcryptReactNative from 'bcrypt-react-native';
3 | import { StyleSheet, View, Button, Alert } from 'react-native';
4 |
5 | export default function App() {
6 | const _genSalt = async () => {
7 | try {
8 | const salt = await BcryptReactNative.getSalt(10);
9 | console.log({ salt });
10 | Alert.alert('Salt', salt);
11 | } catch (e) {
12 | console.log({ e });
13 | }
14 | };
15 |
16 | const _hash = async () => {
17 | try {
18 | const salt = await BcryptReactNative.getSalt(10);
19 | const hash = await BcryptReactNative.hash(salt, 'password');
20 | console.log({ hash });
21 | Alert.alert('Hash', hash);
22 | } catch (e) {
23 | console.log({ e });
24 | }
25 | };
26 |
27 | return (
28 |
29 |
30 |
31 |
32 | );
33 | }
34 |
35 | const styles = StyleSheet.create({
36 | container: {
37 | flex: 1,
38 | alignItems: 'center',
39 | justifyContent: 'center',
40 | },
41 | });
42 |
--------------------------------------------------------------------------------
/ios/BcryptReactNative-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import
2 |
--------------------------------------------------------------------------------
/ios/BcryptReactNative.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface RCT_EXTERN_MODULE(BcryptReactNative, NSObject)
5 |
6 | RCT_EXTERN_METHOD(getSalt: (NSInteger)rounds
7 | resolver: (RCTPromiseResolveBlock)resolve
8 | rejector: (RCTPromiseRejectBlock)reject)
9 |
10 | RCT_EXTERN_METHOD(hash:(NSString *)salt
11 | item:(NSString *)item
12 | resolver: (RCTPromiseResolveBlock)resolve
13 | rejector: (RCTPromiseRejectBlock)reject)
14 |
15 | RCT_EXTERN_METHOD(compareSync:(NSString *)password
16 | hash:(NSString *)hash
17 | resolver: (RCTPromiseResolveBlock)resolve
18 | rejector: (RCTPromiseRejectBlock)reject)
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ios/BcryptReactNative.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import BCrypt
3 |
4 | @objc(BcryptReactNative)
5 | class BcryptReactNative: NSObject {
6 |
7 | @objc
8 | static func requiresMainQueueSetup() -> Bool {
9 | return true
10 | }
11 |
12 | @objc
13 | func getSalt(
14 | _
15 | rounds: NSInteger,
16 | resolver resolve: RCTPromiseResolveBlock,
17 | rejector reject: RCTPromiseRejectBlock) -> Void {
18 | do {
19 | let salt = try BCrypt.Salt(rounds: rounds)
20 | resolve(salt)
21 | } catch let error {
22 | reject("500","Error Generating Salt",error)
23 | }
24 | }
25 |
26 | @objc
27 | func hash(
28 | _
29 | salt: String,
30 | item: String,
31 | resolver resolve: RCTPromiseResolveBlock,
32 | rejector reject: RCTPromiseRejectBlock
33 | ) -> Void {
34 | do {
35 | let hash = try BCrypt.Hash(item, salt: salt)
36 | resolve(hash)
37 | } catch let error {
38 | reject("500","Error Generating Hash",error)
39 | }
40 | }
41 |
42 | @objc
43 | func compareSync(
44 | _
45 | password: String,
46 | hash: String,
47 | resolver resolve: RCTPromiseResolveBlock,
48 | rejector reject: RCTPromiseRejectBlock
49 | ) -> Void {
50 | let success = BCrypt.Check(password, hashed: hash)
51 | resolve(success)
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/ios/BcryptReactNative.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 |
11 |
12 | F4FF95D7245B92E800C19C63 /* BcryptReactNative.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FF95D6245B92E800C19C63 /* BcryptReactNative.swift */; };
13 |
14 | 5E555C0D2413F4C50049A1A2 /* BcryptReactNative.mm in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* BcryptReactNative.mm */; };
15 | /* End PBXBuildFile section */
16 |
17 | /* Begin PBXCopyFilesBuildPhase section */
18 | 58B511D91A9E6C8500147676 /* 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 | 134814201AA4EA6300B7C361 /* libBcryptReactNative.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libBcryptReactNative.a; sourceTree = BUILT_PRODUCTS_DIR; };
31 |
32 |
33 | B3E7B5891CC2AC0600A0062D /* BcryptReactNative.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BcryptReactNative.m; sourceTree = ""; };
34 | F4FF95D5245B92E700C19C63 /* BcryptReactNative-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BcryptReactNative-Bridging-Header.h"; sourceTree = ""; };
35 | F4FF95D6245B92E800C19C63 /* BcryptReactNative.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BcryptReactNative.swift; sourceTree = ""; };
36 |
37 | /* End PBXFileReference section */
38 |
39 | /* Begin PBXFrameworksBuildPhase section */
40 | 58B511D81A9E6C8500147676 /* Frameworks */ = {
41 | isa = PBXFrameworksBuildPhase;
42 | buildActionMask = 2147483647;
43 | files = (
44 | );
45 | runOnlyForDeploymentPostprocessing = 0;
46 | };
47 | /* End PBXFrameworksBuildPhase section */
48 |
49 | /* Begin PBXGroup section */
50 | 134814211AA4EA7D00B7C361 /* Products */ = {
51 | isa = PBXGroup;
52 | children = (
53 | 134814201AA4EA6300B7C361 /* libBcryptReactNative.a */,
54 | );
55 | name = Products;
56 | sourceTree = "";
57 | };
58 | 58B511D21A9E6C8500147676 = {
59 | isa = PBXGroup;
60 | children = (
61 |
62 |
63 | F4FF95D6245B92E800C19C63 /* BcryptReactNative.swift */,
64 | B3E7B5891CC2AC0600A0062D /* BcryptReactNative.m */,
65 | F4FF95D5245B92E700C19C63 /* BcryptReactNative-Bridging-Header.h */,
66 |
67 | 134814211AA4EA7D00B7C361 /* Products */,
68 | );
69 | sourceTree = "";
70 | };
71 | /* End PBXGroup section */
72 |
73 | /* Begin PBXNativeTarget section */
74 | 58B511DA1A9E6C8500147676 /* BcryptReactNative */ = {
75 | isa = PBXNativeTarget;
76 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "BcryptReactNative" */;
77 | buildPhases = (
78 | 58B511D71A9E6C8500147676 /* Sources */,
79 | 58B511D81A9E6C8500147676 /* Frameworks */,
80 | 58B511D91A9E6C8500147676 /* CopyFiles */,
81 | );
82 | buildRules = (
83 | );
84 | dependencies = (
85 | );
86 | name = BcryptReactNative;
87 | productName = RCTDataManager;
88 | productReference = 134814201AA4EA6300B7C361 /* libBcryptReactNative.a */;
89 | productType = "com.apple.product-type.library.static";
90 | };
91 | /* End PBXNativeTarget section */
92 |
93 | /* Begin PBXProject section */
94 | 58B511D31A9E6C8500147676 /* Project object */ = {
95 | isa = PBXProject;
96 | attributes = {
97 | LastUpgradeCheck = 0920;
98 | ORGANIZATIONNAME = Facebook;
99 | TargetAttributes = {
100 | 58B511DA1A9E6C8500147676 = {
101 | CreatedOnToolsVersion = 6.1.1;
102 | };
103 | };
104 | };
105 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "BcryptReactNative" */;
106 | compatibilityVersion = "Xcode 3.2";
107 | developmentRegion = English;
108 | hasScannedForEncodings = 0;
109 | knownRegions = (
110 | English,
111 | en,
112 | );
113 | mainGroup = 58B511D21A9E6C8500147676;
114 | productRefGroup = 58B511D21A9E6C8500147676;
115 | projectDirPath = "";
116 | projectRoot = "";
117 | targets = (
118 | 58B511DA1A9E6C8500147676 /* BcryptReactNative */,
119 | );
120 | };
121 | /* End PBXProject section */
122 |
123 | /* Begin PBXSourcesBuildPhase section */
124 | 58B511D71A9E6C8500147676 /* Sources */ = {
125 | isa = PBXSourcesBuildPhase;
126 | buildActionMask = 2147483647;
127 | files = (
128 |
129 |
130 | F4FF95D7245B92E800C19C63 /* BcryptReactNative.swift in Sources */,
131 | B3E7B58A1CC2AC0600A0062D /* BcryptReactNative.m in Sources */,
132 |
133 | );
134 | runOnlyForDeploymentPostprocessing = 0;
135 | };
136 | /* End PBXSourcesBuildPhase section */
137 |
138 | /* Begin XCBuildConfiguration section */
139 | 58B511ED1A9E6C8500147676 /* Debug */ = {
140 | isa = XCBuildConfiguration;
141 | buildSettings = {
142 | ALWAYS_SEARCH_USER_PATHS = NO;
143 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
144 | CLANG_CXX_LIBRARY = "libc++";
145 | CLANG_ENABLE_MODULES = YES;
146 | CLANG_ENABLE_OBJC_ARC = YES;
147 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
148 | CLANG_WARN_BOOL_CONVERSION = YES;
149 | CLANG_WARN_COMMA = YES;
150 | CLANG_WARN_CONSTANT_CONVERSION = YES;
151 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
152 | CLANG_WARN_EMPTY_BODY = YES;
153 | CLANG_WARN_ENUM_CONVERSION = YES;
154 | CLANG_WARN_INFINITE_RECURSION = YES;
155 | CLANG_WARN_INT_CONVERSION = YES;
156 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
157 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
158 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
159 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
160 | CLANG_WARN_STRICT_PROTOTYPES = YES;
161 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
162 | CLANG_WARN_UNREACHABLE_CODE = YES;
163 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
164 | COPY_PHASE_STRIP = NO;
165 | ENABLE_STRICT_OBJC_MSGSEND = YES;
166 | ENABLE_TESTABILITY = YES;
167 | GCC_C_LANGUAGE_STANDARD = gnu99;
168 | GCC_DYNAMIC_NO_PIC = NO;
169 | GCC_NO_COMMON_BLOCKS = YES;
170 | GCC_OPTIMIZATION_LEVEL = 0;
171 | GCC_PREPROCESSOR_DEFINITIONS = (
172 | "DEBUG=1",
173 | "$(inherited)",
174 | );
175 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
176 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
177 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
178 | GCC_WARN_UNDECLARED_SELECTOR = YES;
179 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
180 | GCC_WARN_UNUSED_FUNCTION = YES;
181 | GCC_WARN_UNUSED_VARIABLE = YES;
182 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
183 | MTL_ENABLE_DEBUG_INFO = YES;
184 | ONLY_ACTIVE_ARCH = YES;
185 | SDKROOT = iphoneos;
186 | };
187 | name = Debug;
188 | };
189 | 58B511EE1A9E6C8500147676 /* Release */ = {
190 | isa = XCBuildConfiguration;
191 | buildSettings = {
192 | ALWAYS_SEARCH_USER_PATHS = NO;
193 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
194 | CLANG_CXX_LIBRARY = "libc++";
195 | CLANG_ENABLE_MODULES = YES;
196 | CLANG_ENABLE_OBJC_ARC = YES;
197 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
198 | CLANG_WARN_BOOL_CONVERSION = YES;
199 | CLANG_WARN_COMMA = YES;
200 | CLANG_WARN_CONSTANT_CONVERSION = YES;
201 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
202 | CLANG_WARN_EMPTY_BODY = YES;
203 | CLANG_WARN_ENUM_CONVERSION = YES;
204 | CLANG_WARN_INFINITE_RECURSION = YES;
205 | CLANG_WARN_INT_CONVERSION = YES;
206 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
207 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
208 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
209 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
210 | CLANG_WARN_STRICT_PROTOTYPES = YES;
211 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
212 | CLANG_WARN_UNREACHABLE_CODE = YES;
213 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
214 | COPY_PHASE_STRIP = YES;
215 | ENABLE_NS_ASSERTIONS = NO;
216 | ENABLE_STRICT_OBJC_MSGSEND = YES;
217 | GCC_C_LANGUAGE_STANDARD = gnu99;
218 | GCC_NO_COMMON_BLOCKS = YES;
219 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
220 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
221 | GCC_WARN_UNDECLARED_SELECTOR = YES;
222 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
223 | GCC_WARN_UNUSED_FUNCTION = YES;
224 | GCC_WARN_UNUSED_VARIABLE = YES;
225 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
226 | MTL_ENABLE_DEBUG_INFO = NO;
227 | SDKROOT = iphoneos;
228 | VALIDATE_PRODUCT = YES;
229 | };
230 | name = Release;
231 | };
232 | 58B511F01A9E6C8500147676 /* Debug */ = {
233 | isa = XCBuildConfiguration;
234 | buildSettings = {
235 | HEADER_SEARCH_PATHS = (
236 | "$(inherited)",
237 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
238 | "$(SRCROOT)/../../../React/**",
239 | "$(SRCROOT)/../../react-native/React/**",
240 | );
241 | LIBRARY_SEARCH_PATHS = "$(inherited)";
242 | OTHER_LDFLAGS = "-ObjC";
243 | PRODUCT_NAME = BcryptReactNative;
244 | SKIP_INSTALL = YES;
245 |
246 | SWIFT_OBJC_BRIDGING_HEADER = "BcryptReactNative-Bridging-Header.h";
247 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
248 | SWIFT_VERSION = 5.0;
249 |
250 | };
251 | name = Debug;
252 | };
253 | 58B511F11A9E6C8500147676 /* Release */ = {
254 | isa = XCBuildConfiguration;
255 | buildSettings = {
256 | HEADER_SEARCH_PATHS = (
257 | "$(inherited)",
258 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
259 | "$(SRCROOT)/../../../React/**",
260 | "$(SRCROOT)/../../react-native/React/**",
261 | );
262 | LIBRARY_SEARCH_PATHS = "$(inherited)";
263 | OTHER_LDFLAGS = "-ObjC";
264 | PRODUCT_NAME = BcryptReactNative;
265 | SKIP_INSTALL = YES;
266 |
267 | SWIFT_OBJC_BRIDGING_HEADER = "BcryptReactNative-Bridging-Header.h";
268 | SWIFT_VERSION = 5.0;
269 |
270 | };
271 | name = Release;
272 | };
273 | /* End XCBuildConfiguration section */
274 |
275 | /* Begin XCConfigurationList section */
276 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "BcryptReactNative" */ = {
277 | isa = XCConfigurationList;
278 | buildConfigurations = (
279 | 58B511ED1A9E6C8500147676 /* Debug */,
280 | 58B511EE1A9E6C8500147676 /* Release */,
281 | );
282 | defaultConfigurationIsVisible = 0;
283 | defaultConfigurationName = Release;
284 | };
285 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "BcryptReactNative" */ = {
286 | isa = XCConfigurationList;
287 | buildConfigurations = (
288 | 58B511F01A9E6C8500147676 /* Debug */,
289 | 58B511F11A9E6C8500147676 /* Release */,
290 | );
291 | defaultConfigurationIsVisible = 0;
292 | defaultConfigurationName = Release;
293 | };
294 | /* End XCConfigurationList section */
295 | };
296 | rootObject = 58B511D31A9E6C8500147676 /* Project object */;
297 | }
298 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bcrypt-react-native",
3 | "version": "1.1.1",
4 | "description": "Native implementation of bcrypt for react-native",
5 | "main": "lib/commonjs/index",
6 | "module": "lib/module/index",
7 | "types": "lib/typescript/src/index.d.ts",
8 | "react-native": "src/index",
9 | "source": "src/index",
10 | "files": [
11 | "src",
12 | "lib",
13 | "android",
14 | "ios",
15 | "cpp",
16 | "bcrypt-react-native.podspec",
17 | "!lib/typescript/example",
18 | "!**/__tests__",
19 | "!**/__fixtures__",
20 | "!**/__mocks__"
21 | ],
22 | "scripts": {
23 | "test": "jest",
24 | "typescript": "tsc --noEmit",
25 | "lint": "eslint \"**/*.{js,ts,tsx}\"",
26 | "prepare": "bob build",
27 | "release": "release-it",
28 | "example": "yarn --cwd example",
29 | "pods": "cd example && pod-install --quiet",
30 | "bootstrap": "yarn example && yarn && yarn pods"
31 | },
32 | "keywords": [
33 | "react-native",
34 | "ios",
35 | "android"
36 | ],
37 | "repository": "https://github.com/andreshsingh/bcrypt-react-native",
38 | "author": "singhandresh (https://github.com/andreshsingh)",
39 | "license": "MIT",
40 | "bugs": {
41 | "url": "https://github.com/andreshsingh/bcrypt-react-native/issues"
42 | },
43 | "homepage": "https://github.com/andreshsingh/bcrypt-react-native#readme",
44 | "devDependencies": {
45 | "@commitlint/config-conventional": "^8.3.4",
46 | "@react-native-community/bob": "^0.16.2",
47 | "@react-native-community/eslint-config": "^2.0.0",
48 | "@release-it/conventional-changelog": "^1.1.4",
49 | "@types/jest": "^26.0.0",
50 | "@types/react": "^16.9.19",
51 | "@types/react-native": "0.62.13",
52 | "commitlint": "^8.3.5",
53 | "eslint": "^7.2.0",
54 | "eslint-config-prettier": "^6.11.0",
55 | "eslint-plugin-prettier": "^3.1.3",
56 | "husky": "^4.2.5",
57 | "jest": "^26.0.1",
58 | "pod-install": "^0.1.0",
59 | "prettier": "^2.0.5",
60 | "react": "16.11.0",
61 | "react-native": "0.62.2",
62 | "release-it": "^13.5.8",
63 | "typescript": "^3.8.3"
64 | },
65 | "peerDependencies": {
66 | "react": "*",
67 | "react-native": "*"
68 | },
69 | "jest": {
70 | "preset": "react-native",
71 | "modulePathIgnorePatterns": [
72 | "/example/node_modules",
73 | "/lib/"
74 | ]
75 | },
76 | "husky": {
77 | "hooks": {
78 | "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
79 | "pre-commit": "yarn lint && yarn typescript"
80 | }
81 | },
82 | "commitlint": {
83 | "extends": [
84 | "@commitlint/config-conventional"
85 | ]
86 | },
87 | "release-it": {
88 | "git": {
89 | "commitMessage": "chore: release ${version}",
90 | "tagName": "v${version}"
91 | },
92 | "npm": {
93 | "publish": true
94 | },
95 | "github": {
96 | "release": true
97 | },
98 | "plugins": {
99 | "@release-it/conventional-changelog": {
100 | "preset": "angular"
101 | }
102 | }
103 | },
104 | "eslintConfig": {
105 | "extends": [
106 | "@react-native-community",
107 | "prettier"
108 | ],
109 | "rules": {
110 | "prettier/prettier": [
111 | "error",
112 | {
113 | "quoteProps": "consistent",
114 | "singleQuote": true,
115 | "tabWidth": 2,
116 | "trailingComma": "es5",
117 | "useTabs": false
118 | }
119 | ]
120 | }
121 | },
122 | "eslintIgnore": [
123 | "node_modules/",
124 | "lib/"
125 | ],
126 | "prettier": {
127 | "quoteProps": "consistent",
128 | "singleQuote": true,
129 | "tabWidth": 2,
130 | "trailingComma": "es5",
131 | "useTabs": false
132 | },
133 | "@react-native-community/bob": {
134 | "source": "src",
135 | "output": "lib",
136 | "targets": [
137 | "commonjs",
138 | "module",
139 | "typescript"
140 | ]
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/src/__tests__/index.test.tsx:
--------------------------------------------------------------------------------
1 | it.todo('write a test');
2 |
--------------------------------------------------------------------------------
/src/index.tsx:
--------------------------------------------------------------------------------
1 | import { NativeModules } from 'react-native';
2 |
3 | type BcryptReactNativeType = {
4 | getSalt(rounds: number): Promise;
5 | hash(salt: string, rawValue: string): Promise;
6 | compareSync(password: String, hash: string): Promise;
7 | };
8 |
9 | const { BcryptReactNative } = NativeModules;
10 |
11 | export default BcryptReactNative as BcryptReactNativeType;
12 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": ".",
4 | "paths": {
5 | "bcrypt-react-native": ["./src/index"]
6 | },
7 | "allowUnreachableCode": false,
8 | "allowUnusedLabels": false,
9 | "esModuleInterop": true,
10 | "importsNotUsedAsValues": "error",
11 | "forceConsistentCasingInFileNames": true,
12 | "jsx": "react",
13 | "lib": ["esnext"],
14 | "module": "esnext",
15 | "moduleResolution": "node",
16 | "noFallthroughCasesInSwitch": true,
17 | "noImplicitReturns": true,
18 | "noImplicitUseStrict": false,
19 | "noStrictGenericChecks": false,
20 | "noUnusedLocals": true,
21 | "noUnusedParameters": true,
22 | "resolveJsonModule": true,
23 | "skipLibCheck": true,
24 | "strict": true,
25 | "target": "esnext"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------