├── .eslintrc.js ├── .gitignore ├── .npmignore ├── .prettierrc.json ├── README.md ├── android ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── expo │ └── modules │ └── integrity │ └── IntegrityModule.kt ├── eas.json ├── example ├── .gitignore ├── App.tsx ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── expo │ │ │ │ └── modules │ │ │ │ └── integrity │ │ │ │ └── example │ │ │ │ └── ReactNativeFlipper.java │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── expo │ │ │ │ │ └── modules │ │ │ │ │ └── integrity │ │ │ │ │ └── example │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ │ ├── drawable-hdpi │ │ │ │ └── splashscreen_image.png │ │ │ │ ├── drawable-mdpi │ │ │ │ └── splashscreen_image.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ └── splashscreen_image.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ └── splashscreen_image.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ └── splashscreen_image.png │ │ │ │ ├── drawable │ │ │ │ ├── rn_edit_text_material.xml │ │ │ │ └── splashscreen.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── values-night │ │ │ │ └── colors.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ └── release │ │ │ └── java │ │ │ └── expo │ │ │ └── modules │ │ │ └── integrity │ │ │ └── example │ │ │ └── ReactNativeFlipper.java │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── app.json ├── assets │ ├── adaptive-icon.png │ ├── favicon.png │ ├── icon.png │ └── splash.png ├── babel.config.js ├── eas.json ├── index.js ├── ios │ ├── .gitignore │ ├── .xcode.env │ ├── Podfile │ ├── Podfile.lock │ ├── Podfile.properties.json │ ├── integrityexample.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── integrityexample.xcscheme │ ├── integrityexample.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── integrityexample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.mm │ │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── App-Icon-20x20@1x.png │ │ │ ├── App-Icon-20x20@2x.png │ │ │ ├── App-Icon-20x20@3x.png │ │ │ ├── App-Icon-29x29@1x.png │ │ │ ├── App-Icon-29x29@2x.png │ │ │ ├── App-Icon-29x29@3x.png │ │ │ ├── App-Icon-40x40@1x.png │ │ │ ├── App-Icon-40x40@2x.png │ │ │ ├── App-Icon-40x40@3x.png │ │ │ ├── App-Icon-60x60@2x.png │ │ │ ├── App-Icon-60x60@3x.png │ │ │ ├── App-Icon-76x76@1x.png │ │ │ ├── App-Icon-76x76@2x.png │ │ │ ├── App-Icon-83.5x83.5@2x.png │ │ │ ├── Contents.json │ │ │ └── ItunesArtwork@2x.png │ │ ├── Contents.json │ │ ├── SplashScreen.imageset │ │ │ ├── Contents.json │ │ │ └── image.png │ │ └── SplashScreenBackground.imageset │ │ │ ├── Contents.json │ │ │ └── image.png │ │ ├── Info.plist │ │ ├── SplashScreen.storyboard │ │ ├── Supporting │ │ └── Expo.plist │ │ ├── integrityexample.entitlements │ │ ├── main.m │ │ └── noop-file.swift ├── metro.config.js ├── package-lock.json ├── package.json ├── tsconfig.json └── webpack.config.js ├── expo-module.config.json ├── ios ├── Integrity.podspec └── IntegrityModule.swift ├── package-lock.json ├── package.json ├── src ├── IntegrityModule.ts ├── config.ts ├── errors │ ├── Android.ts │ ├── PlatformAgnostic.ts │ ├── iOS.ts │ ├── index.ts │ └── types.ts └── index.ts └── tsconfig.json /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ['universe/native', 'universe/web'], 4 | ignorePatterns: ['build'], 5 | }; 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # VSCode 6 | .vscode/ 7 | jsconfig.json 8 | 9 | # Xcode 10 | # 11 | build/ 12 | *.pbxuser 13 | !default.pbxuser 14 | *.mode1v3 15 | !default.mode1v3 16 | *.mode2v3 17 | !default.mode2v3 18 | *.perspectivev3 19 | !default.perspectivev3 20 | xcuserdata 21 | *.xccheckout 22 | *.moved-aside 23 | DerivedData 24 | *.hmap 25 | *.ipa 26 | *.xcuserstate 27 | project.xcworkspace 28 | 29 | # Android/IJ 30 | # 31 | .classpath 32 | .cxx 33 | .gradle 34 | .idea 35 | .project 36 | .settings 37 | local.properties 38 | android.iml 39 | 40 | # Cocoapods 41 | # 42 | example/ios/Pods 43 | 44 | # Ruby 45 | example/vendor/ 46 | 47 | # node.js 48 | # 49 | node_modules/ 50 | npm-debug.log 51 | yarn-debug.log 52 | yarn-error.log 53 | 54 | # BUCK 55 | buck-out/ 56 | \.buckd/ 57 | android/app/libs 58 | android/keystores/debug.keystore 59 | 60 | # Expo 61 | .expo/* 62 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Exclude all top-level hidden directories by convention 2 | /.*/ 3 | 4 | __mocks__ 5 | __tests__ 6 | 7 | /babel.config.js 8 | /android/src/androidTest/ 9 | /android/src/test/ 10 | /android/build/ 11 | /example/ 12 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "trailingComma": "all", 4 | "singleQuote": true 5 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # expo-app-integrity 2 | 3 | ## Why? 4 | Integrate with Apple's App Attest API and Android's Play Integrity API via a unified JavaScript API for Expo applications without Firebase. 5 | 6 | This library offers a unified API for those that want to roll their own backend services. 7 | 8 | ## Pre-requisites and Introduction 9 | This library requires that you are following the ["bare" Expo workflow](https://docs.expo.dev/archive/managed-vs-bare). 10 | 11 | This library requires a deployment target of iOS `14.0` or higher. 12 | 13 | For iOS, you'll need an Apple Developer account ($100 / year) to create an `eas` development build of your app to work with. **App Attest does not work in the Simulator**. You'll need to configure your development team and enable the App Attest capability for your app in Xcode. 14 | 15 | For Android, you'll need a Google Developer Profile (one-time payment of $25). Play Integrity API does work in emulators with the Play Store installed. 16 | 17 | While this library encapsulates the intricacies of the two app attestation APIs into one library, you'll want to familiarize yourself with the basics for each one: 18 | 19 | [Android Play Integrity API](https://developer.android.com/google/play/integrity/overview) 20 | 21 | [iOS App Attest](https://developer.apple.com/documentation/devicecheck/preparing_to_use_the_app_attest_service) 22 | 23 | **This library only covers the client-side parts of app attestation.** Your server will be responsible for: 24 | 1) generating an unpredictable nonce challenge to ensure attackers cannot replay attestation tokens from Apple and Google, and 25 | 2) verifying the validity of the attestation token by assuring that it is i) from Apple or Google, and ii) that the nonce challenge was the one your server generated for this particular attestation challenge. 26 | 27 | ### Before you start 28 | 29 | #### Have a rollout strategy if you're introducing attestation to an established app with many users 30 | 31 | App Attest and Play Integrity API *are* external services that require a network connection, and like many APIs, are subject to rate-limiting. You will need a rollout strategy if you are implementing attestation and you already have many users. 32 | 33 | #### Consider whether a tiered or zero-tolerance policy for unattested requests is best for your app 34 | 35 | You likely will need a decision strategy in your code and/or organization for handling unattested requests in the event that Apple's / Google's servers are unavailable, or if your app needs broader support than the subset of iOS 14.0+ devices that support App Attest. 36 | 37 | While we side with [this article](https://swiftrocks.com/app-attest-apple-protect-ios-jailbreak) that it's safest to adopt a zero-tolerance policy for unattested requests to your server, `expo-app-integrity` still exposes App Attest's `isSupported` API in JavaScript so that you can choose whether to bypass the service yourself. 38 | 39 | This doesn't account for transient device errors or degradations in the Apple and Google services, either. Generally, you'll want to retry with exponential backoff in those events, but you may simply wish not to penalize users for faults outside of your organization's control. 40 | 41 | Requests can, then, be enumerated into four groups: 42 | 1) **Attested** 43 | 2) **Unattested (outdated)**, such as if your app's access tokens contingent on attestation have a long expiration date 44 | 3) **Unattested (bad actor)**, such as if an attestation token was generated with an outdated / invalid nonce from your server, or if verification from Apple / Google fails 45 | 4) **Unknown** - Google / Apple services are degraded and you are unable to verify the request 46 | 47 | Deciding what outcomes are available for four groups of requests on top of other authorization rules your organization might have might be cumbersome for indie developers or small development teams. 48 | 49 | ***Note:** You may notice that Apple's documentation as far as *which* subset of devices support App Attest / Device Check is especially vague. If you have this information, please create an issue and let us know, so that others can make an informed decision on whether they should adopt a zero-tolerance or tiered policy for unattested requests.* 50 | 51 | ## Installation 52 | ### Install the Expo Module 53 | ``` 54 | npx expo install expo-app-integrity 55 | ``` 56 | 57 | ## Install Peer Dependencies 58 | `expo-app-integrity` requires the following peer dependencies: 59 | ``` 60 | npx expo install expo-secure-store expo-build-properties expo-device 61 | ``` 62 | ### Configure for iOS 63 | 64 | This module uses `expo-secure-store` to encrypt your user's iOS AppAttest `keyIdentifier`, and `expo-build-properties` to ensure that your app's deployment target is iOS 14.0. These require the following configuration in your app's `app.json`: 65 | ``` 66 | { 67 | "expo": { ... }, 68 | "plugins": [ 69 | "expo-secure-store", 70 | [ 71 | "expo-build-properties", 72 | { 73 | "ios": { 74 | "deploymentTarget": "14.0" 75 | } 76 | } 77 | ], 78 | ] 79 | } 80 | ``` 81 | ### Rebuild 82 | After installing these Expo modules, you will need to rebuild the `/ios` and `/android` directories. After creating an initial `eas` development build for each platform, this can be done via the "play" / "build" buttons in Xcode and Android Studio, or `npx expo run:ios` and `npx expo run:android`. 83 | 84 | ## API 85 | ### Import 86 | ```TypeScript 87 | import * as Integrity from 'expo-app-integrity' 88 | ``` 89 | 90 | ### `isSupported()` 91 | Check for iOS device support. 92 | ```TypeScript 93 | Integrity.isSupported(): boolean | never 94 | ``` 95 | **iOS Only** - Wrap in a platform check if adopting a tiered policy for unattested requests and you need to support both platforms. 96 | ```TypeScript 97 | import * as Integrity from 'expo-app-integrity' 98 | import { Platform } from 'react-native' 99 | 100 | // ... 101 | 102 | if (Platform.OS === 'ios' && Integrity.isSupported()) { 103 | // attest key 104 | } 105 | ``` 106 | 107 | ### `attestKey()` 108 | Request an attestation token from Apple or Google servers. 109 | ```TypeScript 110 | /** 111 | * @throws AppIntegrityError | UnhandledException 112 | */ 113 | Integrity.attestKey( 114 | challenge: string, 115 | cloudProjectNumber?: number 116 | ): Promise 117 | ``` 118 | 119 | ### Errors 120 | Errors are enumerations of the `DCError` (Device Check) class (iOS) or the `IntegrityServiceException` class (Android), with a few `expo-app-integrity` additions for handling platform agnosticism. 121 | 122 | All possible errors and their resolutions are laid out here: 123 | 124 | [iOS](./src/errors/iOS.ts) 125 | 126 | [Android](./src/errors/Android.ts) 127 | 128 | [`expo-app-integrity`-specific](./src/errors/PlatformAgnostic.ts) 129 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'maven-publish' 4 | 5 | group = 'expo.modules.integrity' 6 | version = '0.1.0' 7 | 8 | buildscript { 9 | def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle") 10 | if (expoModulesCorePlugin.exists()) { 11 | apply from: expoModulesCorePlugin 12 | applyKotlinExpoModulesCorePlugin() 13 | } 14 | 15 | // Simple helper that allows the root project to override versions declared by this library. 16 | ext.safeExtGet = { prop, fallback -> 17 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback 18 | } 19 | 20 | // Ensures backward compatibility 21 | ext.getKotlinVersion = { 22 | if (ext.has("kotlinVersion")) { 23 | ext.kotlinVersion() 24 | } else { 25 | ext.safeExtGet("kotlinVersion", "1.6.10") 26 | } 27 | } 28 | 29 | repositories { 30 | mavenCentral() 31 | } 32 | 33 | dependencies { 34 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}") 35 | } 36 | } 37 | 38 | // Creating sources with comments 39 | task androidSourcesJar(type: Jar) { 40 | classifier = 'sources' 41 | from android.sourceSets.main.java.srcDirs 42 | } 43 | 44 | afterEvaluate { 45 | publishing { 46 | publications { 47 | release(MavenPublication) { 48 | from components.release 49 | // Add additional sourcesJar to artifacts 50 | artifact(androidSourcesJar) 51 | } 52 | } 53 | repositories { 54 | maven { 55 | url = mavenLocal().url 56 | } 57 | } 58 | } 59 | } 60 | 61 | android { 62 | compileSdkVersion safeExtGet("compileSdkVersion", 31) 63 | 64 | compileOptions { 65 | sourceCompatibility JavaVersion.VERSION_11 66 | targetCompatibility JavaVersion.VERSION_11 67 | } 68 | 69 | kotlinOptions { 70 | jvmTarget = JavaVersion.VERSION_11.majorVersion 71 | } 72 | 73 | defaultConfig { 74 | minSdkVersion safeExtGet("minSdkVersion", 21) 75 | targetSdkVersion safeExtGet("targetSdkVersion", 31) 76 | versionCode 1 77 | versionName "0.1.0" 78 | } 79 | lintOptions { 80 | abortOnError false 81 | } 82 | } 83 | 84 | repositories { 85 | mavenCentral() 86 | } 87 | 88 | dependencies { 89 | implementation project(':expo-modules-core') 90 | implementation("com.google.android.play:integrity:1.1.0") 91 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" 92 | } 93 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /android/src/main/java/expo/modules/integrity/IntegrityModule.kt: -------------------------------------------------------------------------------- 1 | package expo.modules.integrity 2 | 3 | import kotlin.Result 4 | import expo.modules.kotlin.Promise 5 | import expo.modules.kotlin.modules.Module 6 | import expo.modules.kotlin.modules.ModuleDefinition 7 | import com.google.android.play.core.integrity.IntegrityManagerFactory 8 | import com.google.android.play.core.integrity.IntegrityServiceException 9 | import com.google.android.play.core.integrity.IntegrityTokenRequest 10 | import com.google.android.play.core.integrity.model.IntegrityErrorCode 11 | import expo.modules.kotlin.exception.CodedException 12 | 13 | const val UNKNOWN_ERROR_CODE = 26 14 | 15 | class IntegrityModule : Module() { 16 | 17 | class IntegrityTokenException(val code: Int, override val message: String) : Exception(message) 18 | 19 | enum class IntegrityTokenError(val code: Int, val message: String) { 20 | 21 | // Non-actionable errors 22 | APP_NOT_INSTALLED(0, "APP_NOT_INSTALLED"), 23 | APP_UID_MISMATCH(1, "APP_UID_MISMATCH"), 24 | 25 | // Errors that may require end-user resolution 26 | API_NOT_AVAILABLE(2, "API_NOT_AVAILABLE"), 27 | CANNOT_BIND_TO_SERVICE(3, "CANNOT_BIND_TO_SERVICE"), 28 | NETWORK_ERROR(4, "NETWORK_ERROR"), 29 | PLAY_SERVICES_NOT_FOUND(5, "PLAY_SERVICES_NOT_FOUND"), 30 | PLAY_SERVICES_VERSION_OUTDATED(6, "PLAY_SERVICES_VERSION_OUTDATED"), 31 | PLAY_STORE_ACCOUNT_NOT_FOUND(7, "PLAY_STORE_ACCOUNT_NOT_FOUND"), 32 | PLAY_STORE_NOT_FOUND(8, "PLAY_STORE_NOT_FOUND"), 33 | PLAY_STORE_VERSION_OUTDATED(9, "PLAY_STORE_VERSION_OUTDATED"), 34 | 35 | 36 | // Errors recommending retry with an exponential backoff 37 | CLIENT_TRANSIENT_ERROR(10, "CLIENT_TRANSIENT_ERROR"), 38 | GOOGLE_SERVER_UNAVAILABLE(11, "GOOGLE_SERVER_UNAVAILABLE"), 39 | INTERNAL_ERROR(12, "INTERNAL_ERROR"), 40 | 41 | // Library consumer configuration errors 42 | CLOUD_PROJECT_NUMBER_IS_INVALID(13, "CLOUD_PROJECT_NUMBER_IS_INVALID"), 43 | NONCE_IS_NOT_BASE64(14, "NONCE_IS_NOT_BASE64"), 44 | NONCE_TOO_LONG(15, "NONCE_TOO_LONG"), 45 | NONCE_TOO_SHORT(16, "NONCE_TOO_SHORT"), 46 | TOO_MANY_REQUESTS(17, "TOO_MANY_REQUESTS"), 47 | 48 | NO_ERROR(18, "NO_ERROR"), 49 | 50 | // Library-specific errors 51 | INVALID_INTEGRITY_TOKEN_RESPONSE(19, "INVALID_INTEGRITY_TOKEN_RESPONSE"), 52 | INVALID_IS_SUPPORTED_API(20, "INVALID_IS_SUPPORTED_API") 53 | } 54 | 55 | override fun definition() = ModuleDefinition { 56 | Name("Integrity") 57 | 58 | Function("isSupported") { 59 | throw IntegrityTokenException( 60 | IntegrityTokenError.INVALID_IS_SUPPORTED_API.code, 61 | IntegrityTokenError.INVALID_IS_SUPPORTED_API.message 62 | ) 63 | } 64 | 65 | AsyncFunction("requestIntegrityVerdict") { challenge: String, cloudProjectNumber: Long, promise: Promise -> 66 | val integrityManager = IntegrityManagerFactory.create(appContext.reactContext) 67 | 68 | return@AsyncFunction integrityManager.requestIntegrityToken( 69 | IntegrityTokenRequest.builder() 70 | .setCloudProjectNumber(cloudProjectNumber) 71 | .setNonce(challenge) 72 | .build() 73 | ).addOnCompleteListener { task -> 74 | 75 | if (task.isSuccessful) { 76 | val token: String? = task.result?.token() 77 | val result = 78 | if (token != null) Result.success(token) 79 | else Result.failure( 80 | IntegrityTokenException( 81 | IntegrityTokenError.INVALID_INTEGRITY_TOKEN_RESPONSE.code, 82 | IntegrityTokenError.INVALID_INTEGRITY_TOKEN_RESPONSE.message 83 | ) 84 | ) 85 | 86 | promise.resolve(token) 87 | result 88 | } else { 89 | println(task.exception) 90 | val error: Result = when (task.exception) { 91 | is IntegrityServiceException -> { 92 | // Surface descriptive errors and their possible resolutions 93 | when ((task.exception as IntegrityServiceException).errorCode) { 94 | IntegrityErrorCode.API_NOT_AVAILABLE -> Result.failure( 95 | IntegrityTokenException( 96 | IntegrityTokenError.API_NOT_AVAILABLE.code, 97 | IntegrityTokenError.API_NOT_AVAILABLE.message 98 | ) 99 | ) 100 | 101 | IntegrityErrorCode.APP_NOT_INSTALLED -> Result.failure( 102 | IntegrityTokenException( 103 | IntegrityTokenError.APP_NOT_INSTALLED.code, 104 | IntegrityTokenError.APP_NOT_INSTALLED.message 105 | ) 106 | ) 107 | 108 | IntegrityErrorCode.APP_UID_MISMATCH -> Result.failure( 109 | IntegrityTokenException( 110 | IntegrityTokenError.APP_UID_MISMATCH.code, 111 | IntegrityTokenError.APP_UID_MISMATCH.message 112 | ) 113 | ) 114 | 115 | IntegrityErrorCode.CANNOT_BIND_TO_SERVICE -> Result.failure( 116 | IntegrityTokenException( 117 | IntegrityTokenError.CANNOT_BIND_TO_SERVICE.code, 118 | IntegrityTokenError.CANNOT_BIND_TO_SERVICE.message 119 | ) 120 | ) 121 | 122 | IntegrityErrorCode.CLIENT_TRANSIENT_ERROR -> Result.failure( 123 | IntegrityTokenException( 124 | IntegrityTokenError.CLIENT_TRANSIENT_ERROR.code, 125 | IntegrityTokenError.CLIENT_TRANSIENT_ERROR.message 126 | ) 127 | ) 128 | 129 | IntegrityErrorCode.CLOUD_PROJECT_NUMBER_IS_INVALID -> Result.failure( 130 | IntegrityTokenException( 131 | IntegrityTokenError.CLOUD_PROJECT_NUMBER_IS_INVALID.code, 132 | IntegrityTokenError.CLOUD_PROJECT_NUMBER_IS_INVALID.message 133 | ) 134 | ) 135 | 136 | IntegrityErrorCode.GOOGLE_SERVER_UNAVAILABLE -> Result.failure( 137 | IntegrityTokenException( 138 | IntegrityTokenError.GOOGLE_SERVER_UNAVAILABLE.code, 139 | IntegrityTokenError.GOOGLE_SERVER_UNAVAILABLE.message 140 | ) 141 | ) 142 | 143 | IntegrityErrorCode.INTERNAL_ERROR -> Result.failure( 144 | IntegrityTokenException( 145 | IntegrityTokenError.INTERNAL_ERROR.code, 146 | IntegrityTokenError.INTERNAL_ERROR.message 147 | ) 148 | ) 149 | 150 | IntegrityErrorCode.NETWORK_ERROR -> Result.failure( 151 | IntegrityTokenException( 152 | IntegrityTokenError.NETWORK_ERROR.code, 153 | IntegrityTokenError.NETWORK_ERROR.message 154 | ) 155 | ) 156 | 157 | IntegrityErrorCode.NO_ERROR -> Result.failure( 158 | IntegrityTokenException( 159 | IntegrityTokenError.NO_ERROR.code, 160 | IntegrityTokenError.NO_ERROR.message 161 | ) 162 | ) 163 | 164 | IntegrityErrorCode.NONCE_IS_NOT_BASE64 -> Result.failure( 165 | IntegrityTokenException( 166 | IntegrityTokenError.NONCE_IS_NOT_BASE64.code, 167 | IntegrityTokenError.NONCE_IS_NOT_BASE64.message 168 | ) 169 | ) 170 | 171 | IntegrityErrorCode.NONCE_TOO_LONG -> Result.failure( 172 | IntegrityTokenException( 173 | IntegrityTokenError.NONCE_TOO_LONG.code, 174 | IntegrityTokenError.NONCE_TOO_LONG.message 175 | ) 176 | ) 177 | 178 | IntegrityErrorCode.NONCE_TOO_SHORT -> Result.failure( 179 | IntegrityTokenException( 180 | IntegrityTokenError.NONCE_TOO_SHORT.code, 181 | IntegrityTokenError.NONCE_TOO_SHORT.message 182 | ) 183 | ) 184 | 185 | IntegrityErrorCode.PLAY_SERVICES_NOT_FOUND -> Result.failure( 186 | IntegrityTokenException( 187 | IntegrityTokenError.PLAY_SERVICES_NOT_FOUND.code, 188 | IntegrityTokenError.PLAY_SERVICES_NOT_FOUND.message 189 | ) 190 | ) 191 | 192 | IntegrityErrorCode.PLAY_SERVICES_VERSION_OUTDATED -> Result.failure( 193 | IntegrityTokenException( 194 | IntegrityTokenError.PLAY_SERVICES_VERSION_OUTDATED.code, 195 | IntegrityTokenError.PLAY_SERVICES_VERSION_OUTDATED.message 196 | ) 197 | ) 198 | 199 | IntegrityErrorCode.PLAY_STORE_NOT_FOUND -> Result.failure( 200 | IntegrityTokenException( 201 | IntegrityTokenError.PLAY_STORE_NOT_FOUND.code, 202 | IntegrityTokenError.PLAY_STORE_NOT_FOUND.message 203 | ) 204 | ) 205 | 206 | IntegrityErrorCode.PLAY_STORE_ACCOUNT_NOT_FOUND -> Result.failure( 207 | IntegrityTokenException( 208 | IntegrityTokenError.PLAY_STORE_ACCOUNT_NOT_FOUND.code, 209 | IntegrityTokenError.PLAY_STORE_ACCOUNT_NOT_FOUND.message 210 | ) 211 | ) 212 | 213 | IntegrityErrorCode.PLAY_STORE_VERSION_OUTDATED -> Result.failure( 214 | IntegrityTokenException( 215 | IntegrityTokenError.PLAY_STORE_VERSION_OUTDATED.code, 216 | IntegrityTokenError.PLAY_STORE_VERSION_OUTDATED.message 217 | ) 218 | ) 219 | 220 | IntegrityErrorCode.TOO_MANY_REQUESTS -> Result.failure( 221 | IntegrityTokenException( 222 | IntegrityTokenError.TOO_MANY_REQUESTS.code, 223 | IntegrityTokenError.TOO_MANY_REQUESTS.message 224 | ) 225 | ) 226 | 227 | else -> Result.failure( 228 | IntegrityTokenException( 229 | UNKNOWN_ERROR_CODE, 230 | "An unknown error occurred. Original error: " + (task.exception?.message ?: "Unable to retrieve original error message") 231 | ) 232 | ) 233 | } 234 | } 235 | 236 | else -> Result.failure( 237 | IntegrityTokenException( 238 | UNKNOWN_ERROR_CODE, 239 | "An unknown error occurred. Original error: " + (task.exception?.message ?: "Unable to retrieve original error message") 240 | ) 241 | ) 242 | } 243 | 244 | val codedException: CodedException = CodedException(error.toString()) 245 | promise.reject(codedException) 246 | error 247 | } 248 | } 249 | } 250 | } 251 | } 252 | -------------------------------------------------------------------------------- /eas.json: -------------------------------------------------------------------------------- 1 | { 2 | "cli": { 3 | "version": ">= 3.8.1" 4 | }, 5 | "build": { 6 | "development": { 7 | "developmentClient": true, 8 | "distribution": "internal", 9 | "ios": { 10 | "resourceClass": "m-medium" 11 | } 12 | }, 13 | "preview": { 14 | "distribution": "internal", 15 | "ios": { 16 | "resourceClass": "m-medium" 17 | } 18 | }, 19 | "production": { 20 | "ios": { 21 | "resourceClass": "m-medium" 22 | } 23 | } 24 | }, 25 | "submit": { 26 | "production": {} 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .expo/ 3 | dist/ 4 | npm-debug.* 5 | *.jks 6 | *.p8 7 | *.p12 8 | *.key 9 | *.mobileprovision 10 | *.orig.* 11 | web-build/ 12 | 13 | # macOS 14 | .DS_Store 15 | 16 | # Temporary files created by Metro to check the health of the file watcher 17 | .metro-health-check* 18 | -------------------------------------------------------------------------------- /example/App.tsx: -------------------------------------------------------------------------------- 1 | import * as Integrity from 'expo-app-integrity' 2 | import { useEffect, useState } from 'react' 3 | import { StyleSheet, Text, View } from 'react-native' 4 | 5 | const serverAttestationChallenge = 'serverAttestationChallenge' 6 | const cloudProjectNumber = 1066543603178 7 | 8 | export default function App() { 9 | const [attestation, setAttestation] = useState(null) 10 | const [error, setError] = useState(null) 11 | 12 | useEffect(() => { 13 | ;(async () => { 14 | try { 15 | const attestation = await Integrity.attestKey( 16 | serverAttestationChallenge, 17 | cloudProjectNumber, 18 | ) 19 | setAttestation(attestation) 20 | } catch (error: any) { 21 | console.log({ error }) 22 | setError(error.code) 23 | } 24 | })() 25 | }, []) 26 | 27 | return ( 28 | 29 | <> 30 | AppAttest attestation: {attestation ?? 'N/A'} 31 | 32 | {error && ( 33 | <> 34 | AppAttest error: 35 | {error ?? 'N/A'} 36 | 37 | )} 38 | 39 | 40 | ) 41 | } 42 | 43 | const styles = StyleSheet.create({ 44 | container: { 45 | flex: 1, 46 | backgroundColor: '#fff', 47 | alignItems: 'center', 48 | justifyContent: 'center', 49 | }, 50 | }) 51 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Android/IntelliJ 6 | # 7 | build/ 8 | .idea 9 | .gradle 10 | local.properties 11 | *.iml 12 | *.hprof 13 | 14 | # Bundle artifacts 15 | *.jsbundle 16 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | apply plugin: "com.facebook.react" 3 | 4 | import com.android.build.OutputFile 5 | 6 | def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath() 7 | def expoDebuggableVariants = ['debug'] 8 | // Override `debuggableVariants` for expo-updates debugging 9 | if (System.getenv('EX_UPDATES_NATIVE_DEBUG') == "1") { 10 | react { 11 | expoDebuggableVariants = [] 12 | } 13 | } 14 | 15 | 16 | /** 17 | * This is the configuration block to customize your React Native Android app. 18 | * By default you don't need to apply any configuration, just uncomment the lines you need. 19 | */ 20 | react { 21 | entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android", "absolute"].execute(null, rootDir).text.trim()) 22 | reactNativeDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile() 23 | hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc" 24 | debuggableVariants = expoDebuggableVariants 25 | 26 | /* Folders */ 27 | // The root of your project, i.e. where "package.json" lives. Default is '..' 28 | // root = file("../") 29 | // The folder where the react-native NPM package is. Default is ../node_modules/react-native 30 | // reactNativeDir = file("../node_modules/react-native") 31 | // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen 32 | // codegenDir = file("../node_modules/react-native-codegen") 33 | // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js 34 | // cliFile = file("../node_modules/react-native/cli.js") 35 | 36 | /* Variants */ 37 | // The list of variants to that are debuggable. For those we're going to 38 | // skip the bundling of the JS bundle and the assets. By default is just 'debug'. 39 | // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. 40 | // debuggableVariants = ["liteDebug", "prodDebug"] 41 | 42 | /* Bundling */ 43 | // A list containing the node command and its flags. Default is just 'node'. 44 | // nodeExecutableAndArgs = ["node"] 45 | // 46 | // The command to run when bundling. By default is 'bundle' 47 | // bundleCommand = "ram-bundle" 48 | // 49 | // The path to the CLI configuration file. Default is empty. 50 | // bundleConfig = file(../rn-cli.config.js) 51 | // 52 | // The name of the generated asset file containing your JS bundle 53 | // bundleAssetName = "MyApplication.android.bundle" 54 | // 55 | // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' 56 | // entryFile = file("../js/MyApplication.android.js") 57 | // 58 | // A list of extra flags to pass to the 'bundle' commands. 59 | // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle 60 | // extraPackagerArgs = [] 61 | 62 | /* Hermes Commands */ 63 | // The hermes compiler command to run. By default it is 'hermesc' 64 | // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" 65 | // 66 | // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" 67 | // hermesFlags = ["-O", "-output-source-map"] 68 | } 69 | 70 | // Override `hermesEnabled` by `expo.jsEngine` 71 | ext { 72 | hermesEnabled = (findProperty('expo.jsEngine') ?: "hermes") == "hermes" 73 | } 74 | 75 | /** 76 | * Set this to true to create four separate APKs instead of one, 77 | * one for each native architecture. This is useful if you don't 78 | * use App Bundles (https://developer.android.com/guide/app-bundle/) 79 | * and want to have separate APKs to upload to the Play Store. 80 | */ 81 | def enableSeparateBuildPerCPUArchitecture = false 82 | 83 | /** 84 | * Set this to true to Run Proguard on Release builds to minify the Java bytecode. 85 | */ 86 | def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInReleaseBuilds') ?: false).toBoolean() 87 | 88 | /** 89 | * The preferred build flavor of JavaScriptCore (JSC) 90 | * 91 | * For example, to use the international variant, you can use: 92 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 93 | * 94 | * The international variant includes ICU i18n library and necessary data 95 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 96 | * give correct results when using with locales other than en-US. Note that 97 | * this variant is about 6MiB larger per architecture than default. 98 | */ 99 | def jscFlavor = 'org.webkit:android-jsc:+' 100 | 101 | /** 102 | * Private function to get the list of Native Architectures you want to build. 103 | * This reads the value from reactNativeArchitectures in your gradle.properties 104 | * file and works together with the --active-arch-only flag of react-native run-android. 105 | */ 106 | def reactNativeArchitectures() { 107 | def value = project.getProperties().get("reactNativeArchitectures") 108 | return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] 109 | } 110 | 111 | android { 112 | ndkVersion rootProject.ext.ndkVersion 113 | 114 | compileSdkVersion rootProject.ext.compileSdkVersion 115 | 116 | namespace 'expo.modules.integrity.example' 117 | defaultConfig { 118 | applicationId 'expo.modules.integrity.example' 119 | minSdkVersion rootProject.ext.minSdkVersion 120 | targetSdkVersion rootProject.ext.targetSdkVersion 121 | versionCode 1 122 | versionName "1.0.0" 123 | } 124 | 125 | splits { 126 | abi { 127 | reset() 128 | enable enableSeparateBuildPerCPUArchitecture 129 | universalApk false // If true, also generate a universal APK 130 | include (*reactNativeArchitectures()) 131 | } 132 | } 133 | signingConfigs { 134 | debug { 135 | storeFile file('debug.keystore') 136 | storePassword 'android' 137 | keyAlias 'androiddebugkey' 138 | keyPassword 'android' 139 | } 140 | } 141 | buildTypes { 142 | debug { 143 | signingConfig signingConfigs.debug 144 | } 145 | release { 146 | // Caution! In production, you need to generate your own keystore file. 147 | // see https://reactnative.dev/docs/signed-apk-android. 148 | signingConfig signingConfigs.debug 149 | minifyEnabled enableProguardInReleaseBuilds 150 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 151 | } 152 | } 153 | 154 | // applicationVariants are e.g. debug, release 155 | applicationVariants.all { variant -> 156 | variant.outputs.each { output -> 157 | // For each separate APK per architecture, set a unique version code as described here: 158 | // https://developer.android.com/studio/build/configure-apk-splits.html 159 | // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. 160 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 161 | def abi = output.getFilter(OutputFile.ABI) 162 | if (abi != null) { // null for the universal-debug, universal-release variants 163 | output.versionCodeOverride = 164 | defaultConfig.versionCode * 1000 + versionCodes.get(abi) 165 | } 166 | 167 | } 168 | } 169 | } 170 | 171 | // Apply static values from `gradle.properties` to the `android.packagingOptions` 172 | // Accepts values in comma delimited lists, example: 173 | // android.packagingOptions.pickFirsts=/LICENSE,**/picasa.ini 174 | ["pickFirsts", "excludes", "merges", "doNotStrip"].each { prop -> 175 | // Split option: 'foo,bar' -> ['foo', 'bar'] 176 | def options = (findProperty("android.packagingOptions.$prop") ?: "").split(","); 177 | // Trim all elements in place. 178 | for (i in 0.. 0) { 183 | println "android.packagingOptions.$prop += $options ($options.length)" 184 | // Ex: android.packagingOptions.pickFirsts += '**/SCCS/**' 185 | options.each { 186 | android.packagingOptions[prop] += it 187 | } 188 | } 189 | } 190 | 191 | dependencies { 192 | // The version of react-native is set by the React Native Gradle Plugin 193 | implementation("com.facebook.react:react-android") 194 | 195 | def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true"; 196 | def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true"; 197 | def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true"; 198 | def frescoVersion = rootProject.ext.frescoVersion 199 | 200 | // If your app supports Android versions before Ice Cream Sandwich (API level 14) 201 | if (isGifEnabled || isWebpEnabled) { 202 | implementation("com.facebook.fresco:fresco:${frescoVersion}") 203 | implementation("com.facebook.fresco:imagepipeline-okhttp3:${frescoVersion}") 204 | } 205 | 206 | if (isGifEnabled) { 207 | // For animated gif support 208 | implementation("com.facebook.fresco:animated-gif:${frescoVersion}") 209 | } 210 | 211 | if (isWebpEnabled) { 212 | // For webp support 213 | implementation("com.facebook.fresco:webpsupport:${frescoVersion}") 214 | if (isWebpAnimatedEnabled) { 215 | // Animated webp support 216 | implementation("com.facebook.fresco:animated-webp:${frescoVersion}") 217 | } 218 | } 219 | 220 | implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0") 221 | implementation("com.google.android.play:integrity:1.1.0") 222 | 223 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") 224 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 225 | exclude group:'com.squareup.okhttp3', module:'okhttp' 226 | } 227 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") 228 | 229 | if (hermesEnabled.toBoolean()) { 230 | implementation("com.facebook.react:hermes-android") 231 | } else { 232 | implementation jscFlavor 233 | } 234 | } 235 | 236 | apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle"); 237 | applyNativeModulesAppBuildGradle(project) 238 | -------------------------------------------------------------------------------- /example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/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 | # react-native-reanimated 11 | -keep class com.swmansion.reanimated.** { *; } 12 | -keep class com.facebook.react.turbomodule.** { *; } 13 | 14 | # Add any project specific keep options here: 15 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/debug/java/expo/modules/integrity/example/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and 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 expo.modules.integrity.example; 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.sharedpreferences.SharedPreferencesFlipperPlugin; 21 | import com.facebook.react.ReactInstanceEventListener; 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 | /** 28 | * Class responsible of loading Flipper inside your React Native application. This is the debug 29 | * flavor of it. Here you can add your own plugins and customize the Flipper setup. 30 | */ 31 | public class ReactNativeFlipper { 32 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 33 | if (FlipperUtils.shouldEnableFlipper(context)) { 34 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 35 | 36 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 37 | client.addPlugin(new DatabasesFlipperPlugin(context)); 38 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 39 | client.addPlugin(CrashReporterPlugin.getInstance()); 40 | 41 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 42 | NetworkingModule.setCustomClientBuilder( 43 | new NetworkingModule.CustomClientBuilder() { 44 | @Override 45 | public void apply(OkHttpClient.Builder builder) { 46 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 47 | } 48 | }); 49 | client.addPlugin(networkFlipperPlugin); 50 | client.start(); 51 | 52 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 53 | // Hence we run if after all native modules have been initialized 54 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 55 | if (reactContext == null) { 56 | reactInstanceManager.addReactInstanceEventListener( 57 | new ReactInstanceEventListener() { 58 | @Override 59 | public void onReactContextInitialized(ReactContext reactContext) { 60 | reactInstanceManager.removeReactInstanceEventListener(this); 61 | reactContext.runOnNativeModulesQueueThread( 62 | new Runnable() { 63 | @Override 64 | public void run() { 65 | client.addPlugin(new FrescoFlipperPlugin()); 66 | } 67 | }); 68 | } 69 | }); 70 | } else { 71 | client.addPlugin(new FrescoFlipperPlugin()); 72 | } 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/expo/modules/integrity/example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package expo.modules.integrity.example; 2 | 3 | import android.os.Build; 4 | import android.os.Bundle; 5 | 6 | import com.facebook.react.ReactActivity; 7 | import com.facebook.react.ReactActivityDelegate; 8 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; 9 | import com.facebook.react.defaults.DefaultReactActivityDelegate; 10 | 11 | import expo.modules.ReactActivityDelegateWrapper; 12 | 13 | public class MainActivity extends ReactActivity { 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | // Set the theme to AppTheme BEFORE onCreate to support 17 | // coloring the background, status bar, and navigation bar. 18 | // This is required for expo-splash-screen. 19 | setTheme(R.style.AppTheme); 20 | super.onCreate(null); 21 | } 22 | 23 | /** 24 | * Returns the name of the main component registered from JavaScript. 25 | * This is used to schedule rendering of the component. 26 | */ 27 | @Override 28 | protected String getMainComponentName() { 29 | return "main"; 30 | } 31 | 32 | /** 33 | * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link 34 | * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React 35 | * (aka React 18) with two boolean flags. 36 | */ 37 | @Override 38 | protected ReactActivityDelegate createReactActivityDelegate() { 39 | return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, new DefaultReactActivityDelegate( 40 | this, 41 | getMainComponentName(), 42 | // If you opted-in for the New Architecture, we enable the Fabric Renderer. 43 | DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled 44 | // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18). 45 | DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled 46 | )); 47 | } 48 | 49 | /** 50 | * Align the back button behavior with Android S 51 | * where moving root activities to background instead of finishing activities. 52 | * @see onBackPressed 53 | */ 54 | @Override 55 | public void invokeDefaultOnBackPressed() { 56 | if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) { 57 | if (!moveTaskToBack(false)) { 58 | // For non-root activities, use the default implementation to finish them. 59 | super.invokeDefaultOnBackPressed(); 60 | } 61 | return; 62 | } 63 | 64 | // Use the default back button implementation on Android S 65 | // because it's doing more than {@link Activity#moveTaskToBack} in fact. 66 | super.invokeDefaultOnBackPressed(); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/expo/modules/integrity/example/MainApplication.java: -------------------------------------------------------------------------------- 1 | package expo.modules.integrity.example; 2 | 3 | import android.app.Application; 4 | import android.content.res.Configuration; 5 | import androidx.annotation.NonNull; 6 | 7 | import com.facebook.react.PackageList; 8 | import com.facebook.react.ReactApplication; 9 | import com.facebook.react.ReactNativeHost; 10 | import com.facebook.react.ReactPackage; 11 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; 12 | import com.facebook.react.defaults.DefaultReactNativeHost; 13 | import com.facebook.soloader.SoLoader; 14 | 15 | import expo.modules.ApplicationLifecycleDispatcher; 16 | import expo.modules.ReactNativeHostWrapper; 17 | 18 | import java.util.List; 19 | 20 | public class MainApplication extends Application implements ReactApplication { 21 | 22 | private final ReactNativeHost mReactNativeHost = 23 | new ReactNativeHostWrapper(this, new DefaultReactNativeHost(this) { 24 | @Override 25 | public boolean getUseDeveloperSupport() { 26 | return BuildConfig.DEBUG; 27 | } 28 | 29 | @Override 30 | protected List getPackages() { 31 | @SuppressWarnings("UnnecessaryLocalVariable") 32 | List packages = new PackageList(this).getPackages(); 33 | // Packages that cannot be autolinked yet can be added manually here, for example: 34 | // packages.add(new MyReactNativePackage()); 35 | return packages; 36 | } 37 | 38 | @Override 39 | protected String getJSMainModuleName() { 40 | return "index"; 41 | } 42 | 43 | @Override 44 | protected boolean isNewArchEnabled() { 45 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; 46 | } 47 | 48 | @Override 49 | protected Boolean isHermesEnabled() { 50 | return BuildConfig.IS_HERMES_ENABLED; 51 | } 52 | }); 53 | 54 | @Override 55 | public ReactNativeHost getReactNativeHost() { 56 | return mReactNativeHost; 57 | } 58 | 59 | @Override 60 | public void onCreate() { 61 | super.onCreate(); 62 | SoLoader.init(this, /* native exopackage */ false); 63 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { 64 | // If you opted-in for the New Architecture, we load the native entry point for this app. 65 | DefaultNewArchitectureEntryPoint.load(); 66 | } 67 | ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 68 | ApplicationLifecycleDispatcher.onApplicationCreate(this); 69 | } 70 | 71 | @Override 72 | public void onConfigurationChanged(@NonNull Configuration newConfig) { 73 | super.onConfigurationChanged(newConfig); 74 | ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-hdpi/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/drawable-hdpi/splashscreen_image.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-mdpi/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/drawable-mdpi/splashscreen_image.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-xhdpi/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/drawable-xhdpi/splashscreen_image.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-xxhdpi/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/drawable-xxhdpi/splashscreen_image.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-xxxhdpi/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/drawable-xxxhdpi/splashscreen_image.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 22 | 23 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/splashscreen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/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/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/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/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/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/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/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/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | #ffffff 3 | #ffffff 4 | #023c69 5 | #ffffff 6 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | integrity-example 3 | contain 4 | false 5 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 14 | 17 | -------------------------------------------------------------------------------- /example/android/app/src/release/java/expo/modules/integrity/example/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and 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 expo.modules.integrity.example; 8 | 9 | import android.content.Context; 10 | import com.facebook.react.ReactInstanceManager; 11 | 12 | /** 13 | * Class responsible of loading Flipper inside your React Native application. This is the release 14 | * flavor of it so it's empty as we don't want to load Flipper. 15 | */ 16 | public class ReactNativeFlipper { 17 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 18 | // Do nothing as we don't want to initialize Flipper on Release. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /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 = findProperty('android.buildToolsVersion') ?: '33.0.0' 6 | minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '21') 7 | compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '33') 8 | targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '33') 9 | if (findProperty('android.kotlinVersion')) { 10 | kotlinVersion = findProperty('android.kotlinVersion') 11 | } 12 | frescoVersion = findProperty('expo.frescoVersion') ?: '2.5.0' 13 | 14 | // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. 15 | ndkVersion = "23.1.7779620" 16 | } 17 | repositories { 18 | google() 19 | mavenCentral() 20 | } 21 | dependencies { 22 | classpath('com.android.tools.build:gradle:7.4.2') 23 | classpath('com.facebook.react:react-native-gradle-plugin') 24 | } 25 | } 26 | 27 | allprojects { 28 | repositories { 29 | maven { 30 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 31 | url(new File(['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), '../android')) 32 | } 33 | maven { 34 | // Android JSC is installed from npm 35 | url(new File(['node', '--print', "require.resolve('jsc-android/package.json')"].execute(null, rootDir).text.trim(), '../dist')) 36 | } 37 | 38 | google() 39 | mavenCentral() 40 | maven { url 'https://www.jitpack.io' } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /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: -Xmx512m -XX:MaxMetaspaceSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m 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 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | 25 | # Automatically convert third-party libraries to use AndroidX 26 | android.enableJetifier=true 27 | 28 | # Version of flipper SDK to use with React Native 29 | FLIPPER_VERSION=0.125.0 30 | 31 | # Use this property to specify which architecture you want to build. 32 | # You can also override it from the CLI using 33 | # ./gradlew -PreactNativeArchitectures=x86_64 34 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 35 | 36 | # Use this property to enable support to the new architecture. 37 | # This will allow you to use TurboModules and the Fabric render in 38 | # your application. You should enable this flag either if you want 39 | # to write custom TurboModules/Fabric components OR use libraries that 40 | # are providing them. 41 | newArchEnabled=false 42 | 43 | # The hosted JavaScript engine 44 | # Supported values: expo.jsEngine = "hermes" | "jsc" 45 | expo.jsEngine=hermes 46 | 47 | # Enable GIF support in React Native images (~200 B increase) 48 | expo.gif.enabled=true 49 | # Enable webp support in React Native images (~85 KB increase) 50 | expo.webp.enabled=true 51 | # Enable animated webp support (~3.4 MB increase) 52 | # Disabled by default because iOS doesn't support animated webp 53 | expo.webp.animated=false 54 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/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-7.5.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original 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 | # https://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 POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 | 85 | APP_NAME="Gradle" 86 | APP_BASE_NAME=${0##*/} 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | MAX_FD=$( ulimit -H -n ) || 147 | warn "Could not query maximum file descriptor limit" 148 | esac 149 | case $MAX_FD in #( 150 | '' | soft) :;; #( 151 | *) 152 | ulimit -n "$MAX_FD" || 153 | warn "Could not set maximum file descriptor limit to $MAX_FD" 154 | esac 155 | fi 156 | 157 | # Collect all arguments for the java command, stacking in reverse order: 158 | # * args from the command line 159 | # * the main class name 160 | # * -classpath 161 | # * -D...appname settings 162 | # * --module-path (only if needed) 163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 164 | 165 | # For Cygwin or MSYS, switch paths to Windows format before running java 166 | if "$cygwin" || "$msys" ; then 167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 169 | 170 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 171 | 172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 173 | for arg do 174 | if 175 | case $arg in #( 176 | -*) false ;; # don't mess with options #( 177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 178 | [ -e "$t" ] ;; #( 179 | *) false ;; 180 | esac 181 | then 182 | arg=$( cygpath --path --ignore --mixed "$arg" ) 183 | fi 184 | # Roll the args list around exactly as many times as the number of 185 | # args, so each arg winds up back in the position where it started, but 186 | # possibly modified. 187 | # 188 | # NB: a `for` loop captures its iteration list before it begins, so 189 | # changing the positional parameters here affects neither the number of 190 | # iterations, nor the values presented in `arg`. 191 | shift # remove old arg 192 | set -- "$@" "$arg" # push replacement arg 193 | done 194 | fi 195 | 196 | # Collect all arguments for the java command; 197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 | # shell script including quotes and variable substitutions, so put them in 199 | # double quotes to make sure that they get re-expanded; and 200 | # * put everything else in single quotes, so that it's not re-expanded. 201 | 202 | set -- \ 203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 | -classpath "$CLASSPATH" \ 205 | org.gradle.wrapper.GradleWrapperMain \ 206 | "$@" 207 | 208 | # Stop when "xargs" is not available. 209 | if ! command -v xargs >/dev/null 2>&1 210 | then 211 | die "xargs is not available" 212 | fi 213 | 214 | # Use "xargs" to parse quoted args. 215 | # 216 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 217 | # 218 | # In Bash we could simply go: 219 | # 220 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 221 | # set -- "${ARGS[@]}" "$@" 222 | # 223 | # but POSIX shell has neither arrays nor command substitution, so instead we 224 | # post-process each arg (as a line of input to sed) to backslash-escape any 225 | # character that might be a shell metacharacter, then use eval to reverse 226 | # that process (while maintaining the separation between arguments), and wrap 227 | # the whole thing up as a single "set" statement. 228 | # 229 | # This will of course break if any of these variables contains a newline or 230 | # an unmatched quote. 231 | # 232 | 233 | eval "set -- $( 234 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 235 | xargs -n1 | 236 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 237 | tr '\n' ' ' 238 | )" '"$@"' 239 | 240 | exec "$JAVACMD" "$@" 241 | -------------------------------------------------------------------------------- /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 https://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 Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if %ERRORLEVEL% equ 0 goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if %ERRORLEVEL% equ 0 goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | set EXIT_CODE=%ERRORLEVEL% 84 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 85 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 86 | exit /b %EXIT_CODE% 87 | 88 | :mainEnd 89 | if "%OS%"=="Windows_NT" endlocal 90 | 91 | :omega 92 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'integrity-example' 2 | 3 | apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle"); 4 | useExpoModules() 5 | 6 | apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json')"].execute(null, rootDir).text.trim(), "../native_modules.gradle"); 7 | applyNativeModulesSettingsGradle(settings) 8 | 9 | include ':app' 10 | includeBuild(new File(["node", "--print", "require.resolve('react-native-gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile()) 11 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "integrity-example", 4 | "slug": "integrity-example", 5 | "version": "1.0.0", 6 | "orientation": "portrait", 7 | "icon": "./assets/icon.png", 8 | "userInterfaceStyle": "light", 9 | "splash": { 10 | "image": "./assets/splash.png", 11 | "resizeMode": "contain", 12 | "backgroundColor": "#ffffff" 13 | }, 14 | "assetBundlePatterns": [ 15 | "**/*" 16 | ], 17 | "ios": { 18 | "supportsTablet": true, 19 | "bundleIdentifier": "expo.modules.integrity.example" 20 | }, 21 | "android": { 22 | "adaptiveIcon": { 23 | "foregroundImage": "./assets/adaptive-icon.png", 24 | "backgroundColor": "#ffffff" 25 | }, 26 | "package": "expo.modules.integrity.example" 27 | }, 28 | "web": { 29 | "favicon": "./assets/favicon.png" 30 | }, 31 | "extra": { 32 | "eas": { 33 | "projectId": "41024734-d880-4119-af45-185056c90dc8" 34 | } 35 | }, 36 | "plugins": [ 37 | "expo-build-properties" 38 | ] 39 | }, 40 | "plugins": [ 41 | [ 42 | "expo-build-properties", 43 | { 44 | "ios": { 45 | "deploymentTarget": "14.0" 46 | } 47 | } 48 | ], 49 | "expo-secure-store" 50 | ] 51 | } 52 | -------------------------------------------------------------------------------- /example/assets/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/assets/adaptive-icon.png -------------------------------------------------------------------------------- /example/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/assets/favicon.png -------------------------------------------------------------------------------- /example/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/assets/icon.png -------------------------------------------------------------------------------- /example/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/assets/splash.png -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | module.exports = function (api) { 3 | api.cache(true) 4 | return { 5 | presets: ['babel-preset-expo'], 6 | plugins: [ 7 | [ 8 | 'module-resolver', 9 | { 10 | extensions: ['.tsx', '.ts', '.js', '.json'], 11 | alias: { 12 | // For development, we want to alias the library to the source 13 | 'expo-app-integrity': path.join(__dirname, '..', 'src', 'index.ts'), 14 | }, 15 | }, 16 | ], 17 | ], 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /example/eas.json: -------------------------------------------------------------------------------- 1 | { 2 | "cli": { 3 | "version": ">= 3.8.1" 4 | }, 5 | "build": { 6 | "development": { 7 | "distribution": "internal", 8 | "android": { 9 | "gradleCommand": ":app:assembleDebug" 10 | }, 11 | "ios": { 12 | "buildConfiguration": "Debug", 13 | "resourceClass": "m-medium" 14 | } 15 | }, 16 | "preview": { 17 | "distribution": "internal", 18 | "ios": { 19 | "resourceClass": "m-medium" 20 | } 21 | }, 22 | "production": { 23 | "ios": { 24 | "resourceClass": "m-medium" 25 | } 26 | } 27 | }, 28 | "submit": { 29 | "production": {} 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | import { registerRootComponent } from 'expo'; 2 | 3 | import App from './App'; 4 | 5 | // registerRootComponent calls AppRegistry.registerComponent('main', () => App); 6 | // It also ensures that whether you load the app in Expo Go or in a native build, 7 | // the environment is set up appropriately 8 | registerRootComponent(App); 9 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | .xcode.env.local 25 | 26 | # Bundle artifacts 27 | *.jsbundle 28 | 29 | # CocoaPods 30 | /Pods/ 31 | -------------------------------------------------------------------------------- /example/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking") 2 | require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods") 3 | require File.join(File.dirname(`node --print "require.resolve('@react-native-community/cli-platform-ios/package.json')"`), "native_modules") 4 | 5 | require 'json' 6 | podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {} 7 | 8 | ENV['RCT_NEW_ARCH_ENABLED'] = podfile_properties['newArchEnabled'] == 'true' ? '1' : '0' 9 | 10 | platform :ios, podfile_properties['ios.deploymentTarget'] || '14.0' 11 | install! 'cocoapods', 12 | :deterministic_uuids => false 13 | 14 | prepare_react_native_project! 15 | 16 | # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. 17 | # because `react-native-flipper` depends on (FlipperKit,...), which will be excluded. To fix this, 18 | # you can also exclude `react-native-flipper` in `react-native.config.js` 19 | # 20 | # ```js 21 | # module.exports = { 22 | # dependencies: { 23 | # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), 24 | # } 25 | # } 26 | # ``` 27 | flipper_config = FlipperConfiguration.disabled 28 | if ENV['NO_FLIPPER'] == '1' then 29 | # Explicitly disabled through environment variables 30 | flipper_config = FlipperConfiguration.disabled 31 | elsif podfile_properties.key?('ios.flipper') then 32 | # Configure Flipper in Podfile.properties.json 33 | if podfile_properties['ios.flipper'] == 'true' then 34 | flipper_config = FlipperConfiguration.enabled(["Debug", "Release"]) 35 | elsif podfile_properties['ios.flipper'] != 'false' then 36 | flipper_config = FlipperConfiguration.enabled(["Debug", "Release"], { 'Flipper' => podfile_properties['ios.flipper'] }) 37 | end 38 | end 39 | 40 | target 'integrityexample' do 41 | use_expo_modules! 42 | config = use_native_modules! 43 | 44 | use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks'] 45 | use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS'] 46 | 47 | # Flags change depending on the env values. 48 | flags = get_default_flags() 49 | 50 | use_react_native!( 51 | :path => config[:reactNativePath], 52 | :hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes', 53 | :fabric_enabled => flags[:fabric_enabled], 54 | # An absolute path to your application root. 55 | :app_path => "#{Pod::Config.instance.installation_root}/..", 56 | # Note that if you have use_frameworks! enabled, Flipper will not work if enabled 57 | :flipper_configuration => flipper_config 58 | ) 59 | 60 | post_install do |installer| 61 | react_native_post_install( 62 | installer, 63 | config[:reactNativePath], 64 | # Set `mac_catalyst_enabled` to `true` in order to apply patches 65 | # necessary for Mac Catalyst builds 66 | :mac_catalyst_enabled => false 67 | ) 68 | __apply_Xcode_12_5_M1_post_install_workaround(installer) 69 | 70 | # This is necessary for Xcode 14, because it signs resource bundles by default 71 | # when building for devices. 72 | installer.target_installation_results.pod_target_installation_results 73 | .each do |pod_name, target_installation_result| 74 | target_installation_result.resource_bundle_targets.each do |resource_bundle_target| 75 | resource_bundle_target.build_configurations.each do |config| 76 | config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' 77 | end 78 | end 79 | end 80 | end 81 | 82 | post_integrate do |installer| 83 | begin 84 | expo_patch_react_imports!(installer) 85 | rescue => e 86 | Pod::UI.warn e 87 | end 88 | end 89 | end 90 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - boost (1.76.0) 3 | - DoubleConversion (1.1.6) 4 | - EXApplication (5.1.1): 5 | - ExpoModulesCore 6 | - EXConstants (14.2.1): 7 | - ExpoModulesCore 8 | - EXFileSystem (15.2.2): 9 | - ExpoModulesCore 10 | - EXFont (11.1.1): 11 | - ExpoModulesCore 12 | - EXJSONUtils (0.5.1) 13 | - EXManifests (0.5.2): 14 | - EXJSONUtils 15 | - Expo (48.0.9): 16 | - ExpoModulesCore 17 | - expo-dev-client (2.1.6): 18 | - EXManifests 19 | - expo-dev-launcher 20 | - expo-dev-menu 21 | - expo-dev-menu-interface 22 | - EXUpdatesInterface 23 | - expo-dev-launcher (2.1.6): 24 | - EXManifests 25 | - expo-dev-launcher/Main (= 2.1.6) 26 | - expo-dev-menu 27 | - expo-dev-menu-interface 28 | - ExpoModulesCore 29 | - EXUpdatesInterface 30 | - React-Core 31 | - expo-dev-launcher/Main (2.1.6): 32 | - EXManifests 33 | - expo-dev-launcher/Unsafe 34 | - expo-dev-menu 35 | - expo-dev-menu-interface 36 | - ExpoModulesCore 37 | - EXUpdatesInterface 38 | - React-Core 39 | - expo-dev-launcher/Unsafe (2.1.6): 40 | - EXManifests 41 | - expo-dev-menu 42 | - expo-dev-menu-interface 43 | - ExpoModulesCore 44 | - EXUpdatesInterface 45 | - React-Core 46 | - expo-dev-menu (2.1.4): 47 | - expo-dev-menu/Main (= 2.1.4) 48 | - expo-dev-menu-interface (1.1.1) 49 | - expo-dev-menu/GestureHandler (2.1.4) 50 | - expo-dev-menu/Main (2.1.4): 51 | - EXManifests 52 | - expo-dev-menu-interface 53 | - expo-dev-menu/Vendored 54 | - ExpoModulesCore 55 | - React-Core 56 | - expo-dev-menu/Reanimated (2.1.4): 57 | - DoubleConversion 58 | - FBLazyVector 59 | - FBReactNativeSpec 60 | - glog 61 | - RCT-Folly 62 | - RCTRequired 63 | - RCTTypeSafety 64 | - React-callinvoker 65 | - React-Core 66 | - React-Core/DevSupport 67 | - React-Core/RCTWebSocket 68 | - React-CoreModules 69 | - React-cxxreact 70 | - React-jsi 71 | - React-jsiexecutor 72 | - React-jsinspector 73 | - React-RCTActionSheet 74 | - React-RCTAnimation 75 | - React-RCTBlob 76 | - React-RCTImage 77 | - React-RCTLinking 78 | - React-RCTNetwork 79 | - React-RCTSettings 80 | - React-RCTText 81 | - React-RCTVibration 82 | - ReactCommon/turbomodule/core 83 | - Yoga 84 | - expo-dev-menu/SafeAreaView (2.1.4) 85 | - expo-dev-menu/Vendored (2.1.4): 86 | - expo-dev-menu/GestureHandler 87 | - expo-dev-menu/Reanimated 88 | - expo-dev-menu/SafeAreaView 89 | - ExpoDevice (5.2.1): 90 | - ExpoModulesCore 91 | - ExpoKeepAwake (12.0.1): 92 | - ExpoModulesCore 93 | - ExpoModulesCore (1.2.6): 94 | - React-Core 95 | - React-RCTAppDelegate 96 | - ReactCommon/turbomodule/core 97 | - EXSecureStore (12.1.1): 98 | - ExpoModulesCore 99 | - EXUpdatesInterface (0.9.1) 100 | - FBLazyVector (0.71.4) 101 | - FBReactNativeSpec (0.71.4): 102 | - RCT-Folly (= 2021.07.22.00) 103 | - RCTRequired (= 0.71.4) 104 | - RCTTypeSafety (= 0.71.4) 105 | - React-Core (= 0.71.4) 106 | - React-jsi (= 0.71.4) 107 | - ReactCommon/turbomodule/core (= 0.71.4) 108 | - fmt (6.2.1) 109 | - glog (0.3.5) 110 | - hermes-engine (0.71.4): 111 | - hermes-engine/Pre-built (= 0.71.4) 112 | - hermes-engine/Pre-built (0.71.4) 113 | - Integrity (0.1.0): 114 | - ExpoModulesCore 115 | - libevent (2.1.12) 116 | - RCT-Folly (2021.07.22.00): 117 | - boost 118 | - DoubleConversion 119 | - fmt (~> 6.2.1) 120 | - glog 121 | - RCT-Folly/Default (= 2021.07.22.00) 122 | - RCT-Folly/Default (2021.07.22.00): 123 | - boost 124 | - DoubleConversion 125 | - fmt (~> 6.2.1) 126 | - glog 127 | - RCT-Folly/Futures (2021.07.22.00): 128 | - boost 129 | - DoubleConversion 130 | - fmt (~> 6.2.1) 131 | - glog 132 | - libevent 133 | - RCTRequired (0.71.4) 134 | - RCTTypeSafety (0.71.4): 135 | - FBLazyVector (= 0.71.4) 136 | - RCTRequired (= 0.71.4) 137 | - React-Core (= 0.71.4) 138 | - React (0.71.4): 139 | - React-Core (= 0.71.4) 140 | - React-Core/DevSupport (= 0.71.4) 141 | - React-Core/RCTWebSocket (= 0.71.4) 142 | - React-RCTActionSheet (= 0.71.4) 143 | - React-RCTAnimation (= 0.71.4) 144 | - React-RCTBlob (= 0.71.4) 145 | - React-RCTImage (= 0.71.4) 146 | - React-RCTLinking (= 0.71.4) 147 | - React-RCTNetwork (= 0.71.4) 148 | - React-RCTSettings (= 0.71.4) 149 | - React-RCTText (= 0.71.4) 150 | - React-RCTVibration (= 0.71.4) 151 | - React-callinvoker (0.71.4) 152 | - React-Codegen (0.71.4): 153 | - FBReactNativeSpec 154 | - hermes-engine 155 | - RCT-Folly 156 | - RCTRequired 157 | - RCTTypeSafety 158 | - React-Core 159 | - React-jsi 160 | - React-jsiexecutor 161 | - ReactCommon/turbomodule/bridging 162 | - ReactCommon/turbomodule/core 163 | - React-Core (0.71.4): 164 | - glog 165 | - hermes-engine 166 | - RCT-Folly (= 2021.07.22.00) 167 | - React-Core/Default (= 0.71.4) 168 | - React-cxxreact (= 0.71.4) 169 | - React-hermes 170 | - React-jsi (= 0.71.4) 171 | - React-jsiexecutor (= 0.71.4) 172 | - React-perflogger (= 0.71.4) 173 | - Yoga 174 | - React-Core/CoreModulesHeaders (0.71.4): 175 | - glog 176 | - hermes-engine 177 | - RCT-Folly (= 2021.07.22.00) 178 | - React-Core/Default 179 | - React-cxxreact (= 0.71.4) 180 | - React-hermes 181 | - React-jsi (= 0.71.4) 182 | - React-jsiexecutor (= 0.71.4) 183 | - React-perflogger (= 0.71.4) 184 | - Yoga 185 | - React-Core/Default (0.71.4): 186 | - glog 187 | - hermes-engine 188 | - RCT-Folly (= 2021.07.22.00) 189 | - React-cxxreact (= 0.71.4) 190 | - React-hermes 191 | - React-jsi (= 0.71.4) 192 | - React-jsiexecutor (= 0.71.4) 193 | - React-perflogger (= 0.71.4) 194 | - Yoga 195 | - React-Core/DevSupport (0.71.4): 196 | - glog 197 | - hermes-engine 198 | - RCT-Folly (= 2021.07.22.00) 199 | - React-Core/Default (= 0.71.4) 200 | - React-Core/RCTWebSocket (= 0.71.4) 201 | - React-cxxreact (= 0.71.4) 202 | - React-hermes 203 | - React-jsi (= 0.71.4) 204 | - React-jsiexecutor (= 0.71.4) 205 | - React-jsinspector (= 0.71.4) 206 | - React-perflogger (= 0.71.4) 207 | - Yoga 208 | - React-Core/RCTActionSheetHeaders (0.71.4): 209 | - glog 210 | - hermes-engine 211 | - RCT-Folly (= 2021.07.22.00) 212 | - React-Core/Default 213 | - React-cxxreact (= 0.71.4) 214 | - React-hermes 215 | - React-jsi (= 0.71.4) 216 | - React-jsiexecutor (= 0.71.4) 217 | - React-perflogger (= 0.71.4) 218 | - Yoga 219 | - React-Core/RCTAnimationHeaders (0.71.4): 220 | - glog 221 | - hermes-engine 222 | - RCT-Folly (= 2021.07.22.00) 223 | - React-Core/Default 224 | - React-cxxreact (= 0.71.4) 225 | - React-hermes 226 | - React-jsi (= 0.71.4) 227 | - React-jsiexecutor (= 0.71.4) 228 | - React-perflogger (= 0.71.4) 229 | - Yoga 230 | - React-Core/RCTBlobHeaders (0.71.4): 231 | - glog 232 | - hermes-engine 233 | - RCT-Folly (= 2021.07.22.00) 234 | - React-Core/Default 235 | - React-cxxreact (= 0.71.4) 236 | - React-hermes 237 | - React-jsi (= 0.71.4) 238 | - React-jsiexecutor (= 0.71.4) 239 | - React-perflogger (= 0.71.4) 240 | - Yoga 241 | - React-Core/RCTImageHeaders (0.71.4): 242 | - glog 243 | - hermes-engine 244 | - RCT-Folly (= 2021.07.22.00) 245 | - React-Core/Default 246 | - React-cxxreact (= 0.71.4) 247 | - React-hermes 248 | - React-jsi (= 0.71.4) 249 | - React-jsiexecutor (= 0.71.4) 250 | - React-perflogger (= 0.71.4) 251 | - Yoga 252 | - React-Core/RCTLinkingHeaders (0.71.4): 253 | - glog 254 | - hermes-engine 255 | - RCT-Folly (= 2021.07.22.00) 256 | - React-Core/Default 257 | - React-cxxreact (= 0.71.4) 258 | - React-hermes 259 | - React-jsi (= 0.71.4) 260 | - React-jsiexecutor (= 0.71.4) 261 | - React-perflogger (= 0.71.4) 262 | - Yoga 263 | - React-Core/RCTNetworkHeaders (0.71.4): 264 | - glog 265 | - hermes-engine 266 | - RCT-Folly (= 2021.07.22.00) 267 | - React-Core/Default 268 | - React-cxxreact (= 0.71.4) 269 | - React-hermes 270 | - React-jsi (= 0.71.4) 271 | - React-jsiexecutor (= 0.71.4) 272 | - React-perflogger (= 0.71.4) 273 | - Yoga 274 | - React-Core/RCTSettingsHeaders (0.71.4): 275 | - glog 276 | - hermes-engine 277 | - RCT-Folly (= 2021.07.22.00) 278 | - React-Core/Default 279 | - React-cxxreact (= 0.71.4) 280 | - React-hermes 281 | - React-jsi (= 0.71.4) 282 | - React-jsiexecutor (= 0.71.4) 283 | - React-perflogger (= 0.71.4) 284 | - Yoga 285 | - React-Core/RCTTextHeaders (0.71.4): 286 | - glog 287 | - hermes-engine 288 | - RCT-Folly (= 2021.07.22.00) 289 | - React-Core/Default 290 | - React-cxxreact (= 0.71.4) 291 | - React-hermes 292 | - React-jsi (= 0.71.4) 293 | - React-jsiexecutor (= 0.71.4) 294 | - React-perflogger (= 0.71.4) 295 | - Yoga 296 | - React-Core/RCTVibrationHeaders (0.71.4): 297 | - glog 298 | - hermes-engine 299 | - RCT-Folly (= 2021.07.22.00) 300 | - React-Core/Default 301 | - React-cxxreact (= 0.71.4) 302 | - React-hermes 303 | - React-jsi (= 0.71.4) 304 | - React-jsiexecutor (= 0.71.4) 305 | - React-perflogger (= 0.71.4) 306 | - Yoga 307 | - React-Core/RCTWebSocket (0.71.4): 308 | - glog 309 | - hermes-engine 310 | - RCT-Folly (= 2021.07.22.00) 311 | - React-Core/Default (= 0.71.4) 312 | - React-cxxreact (= 0.71.4) 313 | - React-hermes 314 | - React-jsi (= 0.71.4) 315 | - React-jsiexecutor (= 0.71.4) 316 | - React-perflogger (= 0.71.4) 317 | - Yoga 318 | - React-CoreModules (0.71.4): 319 | - RCT-Folly (= 2021.07.22.00) 320 | - RCTTypeSafety (= 0.71.4) 321 | - React-Codegen (= 0.71.4) 322 | - React-Core/CoreModulesHeaders (= 0.71.4) 323 | - React-jsi (= 0.71.4) 324 | - React-RCTBlob 325 | - React-RCTImage (= 0.71.4) 326 | - ReactCommon/turbomodule/core (= 0.71.4) 327 | - React-cxxreact (0.71.4): 328 | - boost (= 1.76.0) 329 | - DoubleConversion 330 | - glog 331 | - hermes-engine 332 | - RCT-Folly (= 2021.07.22.00) 333 | - React-callinvoker (= 0.71.4) 334 | - React-jsi (= 0.71.4) 335 | - React-jsinspector (= 0.71.4) 336 | - React-logger (= 0.71.4) 337 | - React-perflogger (= 0.71.4) 338 | - React-runtimeexecutor (= 0.71.4) 339 | - React-hermes (0.71.4): 340 | - DoubleConversion 341 | - glog 342 | - hermes-engine 343 | - RCT-Folly (= 2021.07.22.00) 344 | - RCT-Folly/Futures (= 2021.07.22.00) 345 | - React-cxxreact (= 0.71.4) 346 | - React-jsi 347 | - React-jsiexecutor (= 0.71.4) 348 | - React-jsinspector (= 0.71.4) 349 | - React-perflogger (= 0.71.4) 350 | - React-jsi (0.71.4): 351 | - boost (= 1.76.0) 352 | - DoubleConversion 353 | - glog 354 | - hermes-engine 355 | - RCT-Folly (= 2021.07.22.00) 356 | - React-jsiexecutor (0.71.4): 357 | - DoubleConversion 358 | - glog 359 | - hermes-engine 360 | - RCT-Folly (= 2021.07.22.00) 361 | - React-cxxreact (= 0.71.4) 362 | - React-jsi (= 0.71.4) 363 | - React-perflogger (= 0.71.4) 364 | - React-jsinspector (0.71.4) 365 | - React-logger (0.71.4): 366 | - glog 367 | - React-perflogger (0.71.4) 368 | - React-RCTActionSheet (0.71.4): 369 | - React-Core/RCTActionSheetHeaders (= 0.71.4) 370 | - React-RCTAnimation (0.71.4): 371 | - RCT-Folly (= 2021.07.22.00) 372 | - RCTTypeSafety (= 0.71.4) 373 | - React-Codegen (= 0.71.4) 374 | - React-Core/RCTAnimationHeaders (= 0.71.4) 375 | - React-jsi (= 0.71.4) 376 | - ReactCommon/turbomodule/core (= 0.71.4) 377 | - React-RCTAppDelegate (0.71.4): 378 | - RCT-Folly 379 | - RCTRequired 380 | - RCTTypeSafety 381 | - React-Core 382 | - ReactCommon/turbomodule/core 383 | - React-RCTBlob (0.71.4): 384 | - hermes-engine 385 | - RCT-Folly (= 2021.07.22.00) 386 | - React-Codegen (= 0.71.4) 387 | - React-Core/RCTBlobHeaders (= 0.71.4) 388 | - React-Core/RCTWebSocket (= 0.71.4) 389 | - React-jsi (= 0.71.4) 390 | - React-RCTNetwork (= 0.71.4) 391 | - ReactCommon/turbomodule/core (= 0.71.4) 392 | - React-RCTImage (0.71.4): 393 | - RCT-Folly (= 2021.07.22.00) 394 | - RCTTypeSafety (= 0.71.4) 395 | - React-Codegen (= 0.71.4) 396 | - React-Core/RCTImageHeaders (= 0.71.4) 397 | - React-jsi (= 0.71.4) 398 | - React-RCTNetwork (= 0.71.4) 399 | - ReactCommon/turbomodule/core (= 0.71.4) 400 | - React-RCTLinking (0.71.4): 401 | - React-Codegen (= 0.71.4) 402 | - React-Core/RCTLinkingHeaders (= 0.71.4) 403 | - React-jsi (= 0.71.4) 404 | - ReactCommon/turbomodule/core (= 0.71.4) 405 | - React-RCTNetwork (0.71.4): 406 | - RCT-Folly (= 2021.07.22.00) 407 | - RCTTypeSafety (= 0.71.4) 408 | - React-Codegen (= 0.71.4) 409 | - React-Core/RCTNetworkHeaders (= 0.71.4) 410 | - React-jsi (= 0.71.4) 411 | - ReactCommon/turbomodule/core (= 0.71.4) 412 | - React-RCTSettings (0.71.4): 413 | - RCT-Folly (= 2021.07.22.00) 414 | - RCTTypeSafety (= 0.71.4) 415 | - React-Codegen (= 0.71.4) 416 | - React-Core/RCTSettingsHeaders (= 0.71.4) 417 | - React-jsi (= 0.71.4) 418 | - ReactCommon/turbomodule/core (= 0.71.4) 419 | - React-RCTText (0.71.4): 420 | - React-Core/RCTTextHeaders (= 0.71.4) 421 | - React-RCTVibration (0.71.4): 422 | - RCT-Folly (= 2021.07.22.00) 423 | - React-Codegen (= 0.71.4) 424 | - React-Core/RCTVibrationHeaders (= 0.71.4) 425 | - React-jsi (= 0.71.4) 426 | - ReactCommon/turbomodule/core (= 0.71.4) 427 | - React-runtimeexecutor (0.71.4): 428 | - React-jsi (= 0.71.4) 429 | - ReactCommon/turbomodule/bridging (0.71.4): 430 | - DoubleConversion 431 | - glog 432 | - hermes-engine 433 | - RCT-Folly (= 2021.07.22.00) 434 | - React-callinvoker (= 0.71.4) 435 | - React-Core (= 0.71.4) 436 | - React-cxxreact (= 0.71.4) 437 | - React-jsi (= 0.71.4) 438 | - React-logger (= 0.71.4) 439 | - React-perflogger (= 0.71.4) 440 | - ReactCommon/turbomodule/core (0.71.4): 441 | - DoubleConversion 442 | - glog 443 | - hermes-engine 444 | - RCT-Folly (= 2021.07.22.00) 445 | - React-callinvoker (= 0.71.4) 446 | - React-Core (= 0.71.4) 447 | - React-cxxreact (= 0.71.4) 448 | - React-jsi (= 0.71.4) 449 | - React-logger (= 0.71.4) 450 | - React-perflogger (= 0.71.4) 451 | - Yoga (1.14.0) 452 | 453 | DEPENDENCIES: 454 | - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) 455 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 456 | - EXApplication (from `../node_modules/expo-application/ios`) 457 | - EXConstants (from `../node_modules/expo-constants/ios`) 458 | - EXFileSystem (from `../node_modules/expo-file-system/ios`) 459 | - EXFont (from `../node_modules/expo-font/ios`) 460 | - EXJSONUtils (from `../node_modules/expo-json-utils/ios`) 461 | - EXManifests (from `../node_modules/expo-manifests/ios`) 462 | - Expo (from `../node_modules/expo`) 463 | - expo-dev-client (from `../node_modules/expo-dev-client/ios`) 464 | - expo-dev-launcher (from `../node_modules/expo-dev-launcher`) 465 | - expo-dev-menu (from `../node_modules/expo-dev-menu`) 466 | - expo-dev-menu-interface (from `../node_modules/expo-dev-menu-interface/ios`) 467 | - ExpoDevice (from `../node_modules/expo-device/ios`) 468 | - ExpoKeepAwake (from `../node_modules/expo-keep-awake/ios`) 469 | - ExpoModulesCore (from `../node_modules/expo-modules-core`) 470 | - EXSecureStore (from `../node_modules/expo-secure-store/ios`) 471 | - EXUpdatesInterface (from `../node_modules/expo-updates-interface/ios`) 472 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 473 | - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) 474 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 475 | - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) 476 | - Integrity (from `../../ios`) 477 | - libevent (~> 2.1.12) 478 | - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) 479 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 480 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 481 | - React (from `../node_modules/react-native/`) 482 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) 483 | - React-Codegen (from `build/generated/ios`) 484 | - React-Core (from `../node_modules/react-native/`) 485 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 486 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 487 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 488 | - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) 489 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 490 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 491 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 492 | - React-logger (from `../node_modules/react-native/ReactCommon/logger`) 493 | - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) 494 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 495 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 496 | - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) 497 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 498 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 499 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 500 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 501 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 502 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 503 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 504 | - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) 505 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 506 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 507 | 508 | SPEC REPOS: 509 | trunk: 510 | - fmt 511 | - libevent 512 | 513 | EXTERNAL SOURCES: 514 | boost: 515 | :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" 516 | DoubleConversion: 517 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 518 | EXApplication: 519 | :path: "../node_modules/expo-application/ios" 520 | EXConstants: 521 | :path: "../node_modules/expo-constants/ios" 522 | EXFileSystem: 523 | :path: "../node_modules/expo-file-system/ios" 524 | EXFont: 525 | :path: "../node_modules/expo-font/ios" 526 | EXJSONUtils: 527 | :path: "../node_modules/expo-json-utils/ios" 528 | EXManifests: 529 | :path: "../node_modules/expo-manifests/ios" 530 | Expo: 531 | :path: "../node_modules/expo" 532 | expo-dev-client: 533 | :path: "../node_modules/expo-dev-client/ios" 534 | expo-dev-launcher: 535 | :path: "../node_modules/expo-dev-launcher" 536 | expo-dev-menu: 537 | :path: "../node_modules/expo-dev-menu" 538 | expo-dev-menu-interface: 539 | :path: "../node_modules/expo-dev-menu-interface/ios" 540 | ExpoDevice: 541 | :path: "../node_modules/expo-device/ios" 542 | ExpoKeepAwake: 543 | :path: "../node_modules/expo-keep-awake/ios" 544 | ExpoModulesCore: 545 | :path: "../node_modules/expo-modules-core" 546 | EXSecureStore: 547 | :path: "../node_modules/expo-secure-store/ios" 548 | EXUpdatesInterface: 549 | :path: "../node_modules/expo-updates-interface/ios" 550 | FBLazyVector: 551 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 552 | FBReactNativeSpec: 553 | :path: "../node_modules/react-native/React/FBReactNativeSpec" 554 | glog: 555 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 556 | hermes-engine: 557 | :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" 558 | Integrity: 559 | :path: "../../ios" 560 | RCT-Folly: 561 | :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" 562 | RCTRequired: 563 | :path: "../node_modules/react-native/Libraries/RCTRequired" 564 | RCTTypeSafety: 565 | :path: "../node_modules/react-native/Libraries/TypeSafety" 566 | React: 567 | :path: "../node_modules/react-native/" 568 | React-callinvoker: 569 | :path: "../node_modules/react-native/ReactCommon/callinvoker" 570 | React-Codegen: 571 | :path: build/generated/ios 572 | React-Core: 573 | :path: "../node_modules/react-native/" 574 | React-CoreModules: 575 | :path: "../node_modules/react-native/React/CoreModules" 576 | React-cxxreact: 577 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 578 | React-hermes: 579 | :path: "../node_modules/react-native/ReactCommon/hermes" 580 | React-jsi: 581 | :path: "../node_modules/react-native/ReactCommon/jsi" 582 | React-jsiexecutor: 583 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 584 | React-jsinspector: 585 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 586 | React-logger: 587 | :path: "../node_modules/react-native/ReactCommon/logger" 588 | React-perflogger: 589 | :path: "../node_modules/react-native/ReactCommon/reactperflogger" 590 | React-RCTActionSheet: 591 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 592 | React-RCTAnimation: 593 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 594 | React-RCTAppDelegate: 595 | :path: "../node_modules/react-native/Libraries/AppDelegate" 596 | React-RCTBlob: 597 | :path: "../node_modules/react-native/Libraries/Blob" 598 | React-RCTImage: 599 | :path: "../node_modules/react-native/Libraries/Image" 600 | React-RCTLinking: 601 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 602 | React-RCTNetwork: 603 | :path: "../node_modules/react-native/Libraries/Network" 604 | React-RCTSettings: 605 | :path: "../node_modules/react-native/Libraries/Settings" 606 | React-RCTText: 607 | :path: "../node_modules/react-native/Libraries/Text" 608 | React-RCTVibration: 609 | :path: "../node_modules/react-native/Libraries/Vibration" 610 | React-runtimeexecutor: 611 | :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" 612 | ReactCommon: 613 | :path: "../node_modules/react-native/ReactCommon" 614 | Yoga: 615 | :path: "../node_modules/react-native/ReactCommon/yoga" 616 | 617 | SPEC CHECKSUMS: 618 | boost: 57d2868c099736d80fcd648bf211b4431e51a558 619 | DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 620 | EXApplication: d8f53a7eee90a870a75656280e8d4b85726ea903 621 | EXConstants: f348da07e21b23d2b085e270d7b74f282df1a7d9 622 | EXFileSystem: 844e86ca9b5375486ecc4ef06d3838d5597d895d 623 | EXFont: 6ea3800df746be7233208d80fe379b8ed74f4272 624 | EXJSONUtils: 48b1e764ac35160e6f54d21ab60d7d9501f3e473 625 | EXManifests: 500666d48e8dd7ca5a482c9e729e4a7a6c34081b 626 | Expo: 863488a600a4565698a79577117c70b170054d08 627 | expo-dev-client: 84792ce20d34fa5c882cdc3ca338ea1b2cde5013 628 | expo-dev-launcher: c50f1b78ea294f5762902b768952898d17739983 629 | expo-dev-menu: 9f454e0353860c80c55a9805e16dfebf4fd2da5e 630 | expo-dev-menu-interface: 6c82ae323c4b8724dead4763ce3ff24a2108bdb1 631 | ExpoDevice: e0bebf68f978b3d353377ce42e73c20c0a070215 632 | ExpoKeepAwake: 69f5f627670d62318410392d03e0b5db0f85759a 633 | ExpoModulesCore: 6e0259511f4c4341b6b8357db393624df2280828 634 | EXSecureStore: e8923258361cc406d0401af380f12bd05b2b720f 635 | EXUpdatesInterface: dd699d1930e28639dcbd70a402caea98e86364ca 636 | FBLazyVector: 446e84642979fff0ba57f3c804c2228a473aeac2 637 | FBReactNativeSpec: 241709e132e3bf1526c1c4f00bc5384dd39dfba9 638 | fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 639 | glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b 640 | hermes-engine: a1f157c49ea579c28b0296bda8530e980c45bdb3 641 | Integrity: 3e7a976402240ea80cb233a2771781a33e3245d7 642 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 643 | RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 644 | RCTRequired: 5a024fdf458fa8c0d82fc262e76f982d4dcdecdd 645 | RCTTypeSafety: b6c253064466411c6810b45f66bc1e43ce0c54ba 646 | React: 715292db5bd46989419445a5547954b25d2090f0 647 | React-callinvoker: 105392d1179058585b564d35b4592fe1c46d6fba 648 | React-Codegen: b75333b93d835afce84b73472927cccaef2c9f8c 649 | React-Core: 88838ed1724c64905fc6c0811d752828a92e395b 650 | React-CoreModules: cd238b4bb8dc8529ccc8b34ceae7267b04ce1882 651 | React-cxxreact: 291bfab79d8098dc5ebab98f62e6bdfe81b3955a 652 | React-hermes: b1e67e9a81c71745704950516f40ee804349641c 653 | React-jsi: c9d5b563a6af6bb57034a82c2b0d39d0a7483bdc 654 | React-jsiexecutor: d6b7fa9260aa3cb40afee0507e3bc1d17ecaa6f2 655 | React-jsinspector: 1f51e775819199d3fe9410e69ee8d4c4161c7b06 656 | React-logger: 0d58569ec51d30d1792c5e86a8e3b78d24b582c6 657 | React-perflogger: 0bb0522a12e058f6eb69d888bc16f40c16c4b907 658 | React-RCTActionSheet: bfd675a10f06a18728ea15d82082d48f228a213a 659 | React-RCTAnimation: 2fa220b2052ec75b733112aca39143d34546a941 660 | React-RCTAppDelegate: 8564f93c1d9274e95e3b0c746d08a87ff5a621b2 661 | React-RCTBlob: d0336111f46301ae8aba2e161817e451aad72dd6 662 | React-RCTImage: fec592c46edb7c12a9cde08780bdb4a688416c62 663 | React-RCTLinking: 14eccac5d2a3b34b89dbfa29e8ef6219a153fe2d 664 | React-RCTNetwork: 1fbce92e772e39ca3687a2ebb854501ff6226dd7 665 | React-RCTSettings: 1abea36c9bb16d9979df6c4b42e2ea281b4bbcc5 666 | React-RCTText: 15355c41561a9f43dfd23616d0a0dd40ba05ed61 667 | React-RCTVibration: ad17efcfb2fa8f6bfd8ac0cf48d96668b8b28e0b 668 | React-runtimeexecutor: 8fa50b38df6b992c76537993a2b0553d3b088004 669 | ReactCommon: b49a4b00ca6d181ff74b17c12b2d59ac4add0bde 670 | Yoga: 79dd7410de6f8ad73a77c868d3d368843f0c93e0 671 | 672 | PODFILE CHECKSUM: 05225e950f472bbc2a74794c5c92e771402b2a2d 673 | 674 | COCOAPODS: 1.11.3 675 | -------------------------------------------------------------------------------- /example/ios/Podfile.properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo.jsEngine": "hermes" 3 | } 4 | -------------------------------------------------------------------------------- /example/ios/integrityexample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 11 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 12 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 13 | 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; }; 14 | 77CD946F2EAB409AB0FFD831 /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2159BC76A28A4B969481AA06 /* noop-file.swift */; }; 15 | 96905EF65AED1B983A6B3ABC /* libPods-integrityexample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-integrityexample.a */; }; 16 | B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; }; 17 | BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 22 | 13B07F961A680F5B00A75B9A /* integrityexample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = integrityexample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = integrityexample/AppDelegate.h; sourceTree = ""; }; 24 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = integrityexample/AppDelegate.mm; sourceTree = ""; }; 25 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = integrityexample/Images.xcassets; sourceTree = ""; }; 26 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = integrityexample/Info.plist; sourceTree = ""; }; 27 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = integrityexample/main.m; sourceTree = ""; }; 28 | 2159BC76A28A4B969481AA06 /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "integrityexample/noop-file.swift"; sourceTree = ""; }; 29 | 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-integrityexample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-integrityexample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | 6C2E3173556A471DD304B334 /* Pods-integrityexample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integrityexample.debug.xcconfig"; path = "Target Support Files/Pods-integrityexample/Pods-integrityexample.debug.xcconfig"; sourceTree = ""; }; 31 | 7A4D352CD337FB3A3BF06240 /* Pods-integrityexample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-integrityexample.release.xcconfig"; path = "Target Support Files/Pods-integrityexample/Pods-integrityexample.release.xcconfig"; sourceTree = ""; }; 32 | AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = integrityexample/SplashScreen.storyboard; sourceTree = ""; }; 33 | BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = ""; }; 34 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 35 | FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-integrityexample/ExpoModulesProvider.swift"; sourceTree = ""; }; 36 | /* End PBXFileReference section */ 37 | 38 | /* Begin PBXFrameworksBuildPhase section */ 39 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | 96905EF65AED1B983A6B3ABC /* libPods-integrityexample.a in Frameworks */, 44 | ); 45 | runOnlyForDeploymentPostprocessing = 0; 46 | }; 47 | /* End PBXFrameworksBuildPhase section */ 48 | 49 | /* Begin PBXGroup section */ 50 | 13B07FAE1A68108700A75B9A /* integrityexample */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | BB2F792B24A3F905000567C9 /* Supporting */, 54 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 55 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 56 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */, 57 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 58 | 13B07FB61A68108700A75B9A /* Info.plist */, 59 | 13B07FB71A68108700A75B9A /* main.m */, 60 | AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */, 61 | 2159BC76A28A4B969481AA06 /* noop-file.swift */, 62 | ); 63 | name = integrityexample; 64 | sourceTree = ""; 65 | }; 66 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 70 | 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-integrityexample.a */, 71 | ); 72 | name = Frameworks; 73 | sourceTree = ""; 74 | }; 75 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | ); 79 | name = Libraries; 80 | sourceTree = ""; 81 | }; 82 | 83CBB9F61A601CBA00E9B192 = { 83 | isa = PBXGroup; 84 | children = ( 85 | 13B07FAE1A68108700A75B9A /* integrityexample */, 86 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 87 | 83CBBA001A601CBA00E9B192 /* Products */, 88 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 89 | D65327D7A22EEC0BE12398D9 /* Pods */, 90 | D7E4C46ADA2E9064B798F356 /* ExpoModulesProviders */, 91 | ); 92 | indentWidth = 2; 93 | sourceTree = ""; 94 | tabWidth = 2; 95 | usesTabs = 0; 96 | }; 97 | 83CBBA001A601CBA00E9B192 /* Products */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 13B07F961A680F5B00A75B9A /* integrityexample.app */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | 92DBD88DE9BF7D494EA9DA96 /* integrityexample */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */, 109 | ); 110 | name = integrityexample; 111 | sourceTree = ""; 112 | }; 113 | BB2F792B24A3F905000567C9 /* Supporting */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | BB2F792C24A3F905000567C9 /* Expo.plist */, 117 | ); 118 | name = Supporting; 119 | path = integrityexample/Supporting; 120 | sourceTree = ""; 121 | }; 122 | D65327D7A22EEC0BE12398D9 /* Pods */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 6C2E3173556A471DD304B334 /* Pods-integrityexample.debug.xcconfig */, 126 | 7A4D352CD337FB3A3BF06240 /* Pods-integrityexample.release.xcconfig */, 127 | ); 128 | path = Pods; 129 | sourceTree = ""; 130 | }; 131 | D7E4C46ADA2E9064B798F356 /* ExpoModulesProviders */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 92DBD88DE9BF7D494EA9DA96 /* integrityexample */, 135 | ); 136 | name = ExpoModulesProviders; 137 | sourceTree = ""; 138 | }; 139 | /* End PBXGroup section */ 140 | 141 | /* Begin PBXNativeTarget section */ 142 | 13B07F861A680F5B00A75B9A /* integrityexample */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "integrityexample" */; 145 | buildPhases = ( 146 | 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */, 147 | FD10A7F022414F080027D42C /* Start Packager */, 148 | 13B07F871A680F5B00A75B9A /* Sources */, 149 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 150 | 13B07F8E1A680F5B00A75B9A /* Resources */, 151 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 152 | 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */, 153 | BAA76AB68C207067CC924EBF /* [CP] Embed Pods Frameworks */, 154 | ); 155 | buildRules = ( 156 | ); 157 | dependencies = ( 158 | ); 159 | name = integrityexample; 160 | productName = integrityexample; 161 | productReference = 13B07F961A680F5B00A75B9A /* integrityexample.app */; 162 | productType = "com.apple.product-type.application"; 163 | }; 164 | /* End PBXNativeTarget section */ 165 | 166 | /* Begin PBXProject section */ 167 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 168 | isa = PBXProject; 169 | attributes = { 170 | LastUpgradeCheck = 1130; 171 | TargetAttributes = { 172 | 13B07F861A680F5B00A75B9A = { 173 | DevelopmentTeam = V2QGQQGD42; 174 | LastSwiftMigration = 1250; 175 | }; 176 | }; 177 | }; 178 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "integrityexample" */; 179 | compatibilityVersion = "Xcode 3.2"; 180 | developmentRegion = en; 181 | hasScannedForEncodings = 0; 182 | knownRegions = ( 183 | en, 184 | Base, 185 | ); 186 | mainGroup = 83CBB9F61A601CBA00E9B192; 187 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 188 | projectDirPath = ""; 189 | projectRoot = ""; 190 | targets = ( 191 | 13B07F861A680F5B00A75B9A /* integrityexample */, 192 | ); 193 | }; 194 | /* End PBXProject section */ 195 | 196 | /* Begin PBXResourcesBuildPhase section */ 197 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 198 | isa = PBXResourcesBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | BB2F792D24A3F905000567C9 /* Expo.plist in Resources */, 202 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 203 | 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */, 204 | ); 205 | runOnlyForDeploymentPostprocessing = 0; 206 | }; 207 | /* End PBXResourcesBuildPhase section */ 208 | 209 | /* Begin PBXShellScriptBuildPhase section */ 210 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 211 | isa = PBXShellScriptBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | ); 215 | inputPaths = ( 216 | ); 217 | name = "Bundle React Native code and images"; 218 | outputPaths = ( 219 | ); 220 | runOnlyForDeploymentPostprocessing = 0; 221 | shellPath = /bin/sh; 222 | shellScript = "if [[ -f \"$PODS_ROOT/../.xcode.env\" ]]; then\n source \"$PODS_ROOT/../.xcode.env\"\nfi\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\n# The project root by default is one level up from the ios directory\nexport PROJECT_ROOT=\"$PROJECT_DIR\"/..\n\nif [[ \"$CONFIGURATION\" = *Debug* ]]; then\n export SKIP_BUNDLING=1\nfi\nif [[ -z \"$ENTRY_FILE\" ]]; then\n # Set the entry JS file using the bundler's entry resolution.\n export ENTRY_FILE=\"$(\"$NODE_BINARY\" -e \"require('expo/scripts/resolveAppEntry')\" $PROJECT_ROOT ios relative | tail -n 1)\"\nfi\n\n`\"$NODE_BINARY\" --print \"require('path').dirname(require.resolve('react-native/package.json')) + '/scripts/react-native-xcode.sh'\"`\n\n"; 223 | }; 224 | 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */ = { 225 | isa = PBXShellScriptBuildPhase; 226 | buildActionMask = 2147483647; 227 | files = ( 228 | ); 229 | inputFileListPaths = ( 230 | ); 231 | inputPaths = ( 232 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 233 | "${PODS_ROOT}/Manifest.lock", 234 | ); 235 | name = "[CP] Check Pods Manifest.lock"; 236 | outputFileListPaths = ( 237 | ); 238 | outputPaths = ( 239 | "$(DERIVED_FILE_DIR)/Pods-integrityexample-checkManifestLockResult.txt", 240 | ); 241 | runOnlyForDeploymentPostprocessing = 0; 242 | shellPath = /bin/sh; 243 | 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"; 244 | showEnvVarsInLog = 0; 245 | }; 246 | 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = { 247 | isa = PBXShellScriptBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | ); 251 | inputPaths = ( 252 | "${PODS_ROOT}/Target Support Files/Pods-integrityexample/Pods-integrityexample-resources.sh", 253 | "${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle", 254 | "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", 255 | "${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-launcher/EXDevLauncher.bundle", 256 | "${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-menu/EXDevMenu.bundle", 257 | ); 258 | name = "[CP] Copy Pods Resources"; 259 | outputPaths = ( 260 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle", 261 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", 262 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXDevLauncher.bundle", 263 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXDevMenu.bundle", 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | shellPath = /bin/sh; 267 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-integrityexample/Pods-integrityexample-resources.sh\"\n"; 268 | showEnvVarsInLog = 0; 269 | }; 270 | BAA76AB68C207067CC924EBF /* [CP] Embed Pods Frameworks */ = { 271 | isa = PBXShellScriptBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | ); 275 | inputPaths = ( 276 | "${PODS_ROOT}/Target Support Files/Pods-integrityexample/Pods-integrityexample-frameworks.sh", 277 | "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes", 278 | ); 279 | name = "[CP] Embed Pods Frameworks"; 280 | outputPaths = ( 281 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | shellPath = /bin/sh; 285 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-integrityexample/Pods-integrityexample-frameworks.sh\"\n"; 286 | showEnvVarsInLog = 0; 287 | }; 288 | FD10A7F022414F080027D42C /* Start Packager */ = { 289 | isa = PBXShellScriptBuildPhase; 290 | buildActionMask = 2147483647; 291 | files = ( 292 | ); 293 | inputFileListPaths = ( 294 | ); 295 | inputPaths = ( 296 | ); 297 | name = "Start Packager"; 298 | outputFileListPaths = ( 299 | ); 300 | outputPaths = ( 301 | ); 302 | runOnlyForDeploymentPostprocessing = 0; 303 | shellPath = /bin/sh; 304 | shellScript = "if [[ -f \"$PODS_ROOT/../.xcode.env\" ]]; then\n source \"$PODS_ROOT/../.xcode.env\"\nfi\nif [[ -f \"$PODS_ROOT/../.xcode.env.local\" ]]; then\n source \"$PODS_ROOT/../.xcode.env.local\"\nfi\n\nexport RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > `$NODE_BINARY --print \"require('path').dirname(require.resolve('react-native/package.json')) + '/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 `$NODE_BINARY --print \"require('path').dirname(require.resolve('react-native/package.json')) + '/scripts/launchPackager.command'\"` || echo \"Can't start packager automatically\"\n fi\nfi\n"; 305 | showEnvVarsInLog = 0; 306 | }; 307 | /* End PBXShellScriptBuildPhase section */ 308 | 309 | /* Begin PBXSourcesBuildPhase section */ 310 | 13B07F871A680F5B00A75B9A /* Sources */ = { 311 | isa = PBXSourcesBuildPhase; 312 | buildActionMask = 2147483647; 313 | files = ( 314 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, 315 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 316 | B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */, 317 | 77CD946F2EAB409AB0FFD831 /* noop-file.swift in Sources */, 318 | ); 319 | runOnlyForDeploymentPostprocessing = 0; 320 | }; 321 | /* End PBXSourcesBuildPhase section */ 322 | 323 | /* Begin XCBuildConfiguration section */ 324 | 13B07F941A680F5B00A75B9A /* Debug */ = { 325 | isa = XCBuildConfiguration; 326 | baseConfigurationReference = 6C2E3173556A471DD304B334 /* Pods-integrityexample.debug.xcconfig */; 327 | buildSettings = { 328 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 329 | CLANG_ENABLE_MODULES = YES; 330 | CODE_SIGN_ENTITLEMENTS = integrityexample/integrityexample.entitlements; 331 | CURRENT_PROJECT_VERSION = 1; 332 | DEVELOPMENT_TEAM = V2QGQQGD42; 333 | ENABLE_BITCODE = NO; 334 | GCC_PREPROCESSOR_DEFINITIONS = ( 335 | "$(inherited)", 336 | "FB_SONARKIT_ENABLED=1", 337 | ); 338 | INFOPLIST_FILE = integrityexample/Info.plist; 339 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 340 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 341 | MARKETING_VERSION = 1.0; 342 | OTHER_LDFLAGS = ( 343 | "$(inherited)", 344 | "-ObjC", 345 | "-lc++", 346 | ); 347 | OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; 348 | PRODUCT_BUNDLE_IDENTIFIER = expo.modules.integrity.example; 349 | PRODUCT_NAME = integrityexample; 350 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 351 | SWIFT_VERSION = 5.0; 352 | TARGETED_DEVICE_FAMILY = "1,2"; 353 | VERSIONING_SYSTEM = "apple-generic"; 354 | }; 355 | name = Debug; 356 | }; 357 | 13B07F951A680F5B00A75B9A /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | baseConfigurationReference = 7A4D352CD337FB3A3BF06240 /* Pods-integrityexample.release.xcconfig */; 360 | buildSettings = { 361 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 362 | CLANG_ENABLE_MODULES = YES; 363 | CODE_SIGN_ENTITLEMENTS = integrityexample/integrityexample.entitlements; 364 | CURRENT_PROJECT_VERSION = 1; 365 | DEVELOPMENT_TEAM = V2QGQQGD42; 366 | INFOPLIST_FILE = integrityexample/Info.plist; 367 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 368 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 369 | MARKETING_VERSION = 1.0; 370 | OTHER_LDFLAGS = ( 371 | "$(inherited)", 372 | "-ObjC", 373 | "-lc++", 374 | ); 375 | OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; 376 | PRODUCT_BUNDLE_IDENTIFIER = expo.modules.integrity.example; 377 | PRODUCT_NAME = integrityexample; 378 | SWIFT_VERSION = 5.0; 379 | TARGETED_DEVICE_FAMILY = "1,2"; 380 | VERSIONING_SYSTEM = "apple-generic"; 381 | }; 382 | name = Release; 383 | }; 384 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 385 | isa = XCBuildConfiguration; 386 | buildSettings = { 387 | ALWAYS_SEARCH_USER_PATHS = NO; 388 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 389 | CLANG_CXX_LANGUAGE_STANDARD = "c++17"; 390 | CLANG_CXX_LIBRARY = "libc++"; 391 | CLANG_ENABLE_MODULES = YES; 392 | CLANG_ENABLE_OBJC_ARC = YES; 393 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 394 | CLANG_WARN_BOOL_CONVERSION = YES; 395 | CLANG_WARN_COMMA = YES; 396 | CLANG_WARN_CONSTANT_CONVERSION = YES; 397 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 398 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 399 | CLANG_WARN_EMPTY_BODY = YES; 400 | CLANG_WARN_ENUM_CONVERSION = YES; 401 | CLANG_WARN_INFINITE_RECURSION = YES; 402 | CLANG_WARN_INT_CONVERSION = YES; 403 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 404 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 405 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 406 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 407 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 408 | CLANG_WARN_STRICT_PROTOTYPES = YES; 409 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 410 | CLANG_WARN_UNREACHABLE_CODE = YES; 411 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 412 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 413 | COPY_PHASE_STRIP = NO; 414 | ENABLE_STRICT_OBJC_MSGSEND = YES; 415 | ENABLE_TESTABILITY = YES; 416 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; 417 | GCC_C_LANGUAGE_STANDARD = gnu99; 418 | GCC_DYNAMIC_NO_PIC = NO; 419 | GCC_NO_COMMON_BLOCKS = YES; 420 | GCC_OPTIMIZATION_LEVEL = 0; 421 | GCC_PREPROCESSOR_DEFINITIONS = ( 422 | "DEBUG=1", 423 | "$(inherited)", 424 | ); 425 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 426 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 427 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 428 | GCC_WARN_UNDECLARED_SELECTOR = YES; 429 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 430 | GCC_WARN_UNUSED_FUNCTION = YES; 431 | GCC_WARN_UNUSED_VARIABLE = YES; 432 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 433 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; 434 | LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\""; 435 | MTL_ENABLE_DEBUG_INFO = YES; 436 | ONLY_ACTIVE_ARCH = YES; 437 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; 438 | SDKROOT = iphoneos; 439 | }; 440 | name = Debug; 441 | }; 442 | 83CBBA211A601CBA00E9B192 /* Release */ = { 443 | isa = XCBuildConfiguration; 444 | buildSettings = { 445 | ALWAYS_SEARCH_USER_PATHS = NO; 446 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 447 | CLANG_CXX_LANGUAGE_STANDARD = "c++17"; 448 | CLANG_CXX_LIBRARY = "libc++"; 449 | CLANG_ENABLE_MODULES = YES; 450 | CLANG_ENABLE_OBJC_ARC = YES; 451 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 452 | CLANG_WARN_BOOL_CONVERSION = YES; 453 | CLANG_WARN_COMMA = YES; 454 | CLANG_WARN_CONSTANT_CONVERSION = YES; 455 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 456 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 457 | CLANG_WARN_EMPTY_BODY = YES; 458 | CLANG_WARN_ENUM_CONVERSION = YES; 459 | CLANG_WARN_INFINITE_RECURSION = YES; 460 | CLANG_WARN_INT_CONVERSION = YES; 461 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 462 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 463 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 464 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 465 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 466 | CLANG_WARN_STRICT_PROTOTYPES = YES; 467 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 468 | CLANG_WARN_UNREACHABLE_CODE = YES; 469 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 470 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 471 | COPY_PHASE_STRIP = YES; 472 | ENABLE_NS_ASSERTIONS = NO; 473 | ENABLE_STRICT_OBJC_MSGSEND = YES; 474 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; 475 | GCC_C_LANGUAGE_STANDARD = gnu99; 476 | GCC_NO_COMMON_BLOCKS = YES; 477 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 478 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 479 | GCC_WARN_UNDECLARED_SELECTOR = YES; 480 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 481 | GCC_WARN_UNUSED_FUNCTION = YES; 482 | GCC_WARN_UNUSED_VARIABLE = YES; 483 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 484 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; 485 | LIBRARY_SEARCH_PATHS = "$(SDKROOT)/usr/lib/swift\"$(inherited)\""; 486 | MTL_ENABLE_DEBUG_INFO = NO; 487 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; 488 | SDKROOT = iphoneos; 489 | VALIDATE_PRODUCT = YES; 490 | }; 491 | name = Release; 492 | }; 493 | /* End XCBuildConfiguration section */ 494 | 495 | /* Begin XCConfigurationList section */ 496 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "integrityexample" */ = { 497 | isa = XCConfigurationList; 498 | buildConfigurations = ( 499 | 13B07F941A680F5B00A75B9A /* Debug */, 500 | 13B07F951A680F5B00A75B9A /* Release */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "integrityexample" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 83CBBA201A601CBA00E9B192 /* Debug */, 509 | 83CBBA211A601CBA00E9B192 /* Release */, 510 | ); 511 | defaultConfigurationIsVisible = 0; 512 | defaultConfigurationName = Release; 513 | }; 514 | /* End XCConfigurationList section */ 515 | }; 516 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 517 | } 518 | -------------------------------------------------------------------------------- /example/ios/integrityexample.xcodeproj/xcshareddata/xcschemes/integrityexample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /example/ios/integrityexample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/integrityexample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/integrityexample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | @interface AppDelegate : EXAppDelegateWrapper 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /example/ios/integrityexample/AppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | #import 5 | 6 | @implementation AppDelegate 7 | 8 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 9 | { 10 | self.moduleName = @"main"; 11 | 12 | // You can add your custom initial props in the dictionary below. 13 | // They will be passed down to the ViewController used by React Native. 14 | self.initialProps = @{}; 15 | 16 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 17 | } 18 | 19 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 20 | { 21 | #if DEBUG 22 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; 23 | #else 24 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 25 | #endif 26 | } 27 | 28 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. 29 | /// 30 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html 31 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). 32 | /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`. 33 | - (BOOL)concurrentRootEnabled 34 | { 35 | return true; 36 | } 37 | 38 | // Linking API 39 | - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *)options { 40 | return [super application:application openURL:url options:options] || [RCTLinkingManager application:application openURL:url options:options]; 41 | } 42 | 43 | // Universal Links 44 | - (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray> * _Nullable))restorationHandler { 45 | BOOL result = [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler]; 46 | return [super application:application continueUserActivity:userActivity restorationHandler:restorationHandler] || result; 47 | } 48 | 49 | // Explicitly define remote notification delegates to ensure compatibility with some third-party libraries 50 | - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken 51 | { 52 | return [super application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; 53 | } 54 | 55 | // Explicitly define remote notification delegates to ensure compatibility with some third-party libraries 56 | - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error 57 | { 58 | return [super application:application didFailToRegisterForRemoteNotificationsWithError:error]; 59 | } 60 | 61 | // Explicitly define remote notification delegates to ensure compatibility with some third-party libraries 62 | - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler 63 | { 64 | return [super application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler]; 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/App-Icon-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "iphone", 5 | "size": "20x20", 6 | "scale": "2x", 7 | "filename": "App-Icon-20x20@2x.png" 8 | }, 9 | { 10 | "idiom": "iphone", 11 | "size": "20x20", 12 | "scale": "3x", 13 | "filename": "App-Icon-20x20@3x.png" 14 | }, 15 | { 16 | "idiom": "iphone", 17 | "size": "29x29", 18 | "scale": "1x", 19 | "filename": "App-Icon-29x29@1x.png" 20 | }, 21 | { 22 | "idiom": "iphone", 23 | "size": "29x29", 24 | "scale": "2x", 25 | "filename": "App-Icon-29x29@2x.png" 26 | }, 27 | { 28 | "idiom": "iphone", 29 | "size": "29x29", 30 | "scale": "3x", 31 | "filename": "App-Icon-29x29@3x.png" 32 | }, 33 | { 34 | "idiom": "iphone", 35 | "size": "40x40", 36 | "scale": "2x", 37 | "filename": "App-Icon-40x40@2x.png" 38 | }, 39 | { 40 | "idiom": "iphone", 41 | "size": "40x40", 42 | "scale": "3x", 43 | "filename": "App-Icon-40x40@3x.png" 44 | }, 45 | { 46 | "idiom": "iphone", 47 | "size": "60x60", 48 | "scale": "2x", 49 | "filename": "App-Icon-60x60@2x.png" 50 | }, 51 | { 52 | "idiom": "iphone", 53 | "size": "60x60", 54 | "scale": "3x", 55 | "filename": "App-Icon-60x60@3x.png" 56 | }, 57 | { 58 | "idiom": "ipad", 59 | "size": "20x20", 60 | "scale": "1x", 61 | "filename": "App-Icon-20x20@1x.png" 62 | }, 63 | { 64 | "idiom": "ipad", 65 | "size": "20x20", 66 | "scale": "2x", 67 | "filename": "App-Icon-20x20@2x.png" 68 | }, 69 | { 70 | "idiom": "ipad", 71 | "size": "29x29", 72 | "scale": "1x", 73 | "filename": "App-Icon-29x29@1x.png" 74 | }, 75 | { 76 | "idiom": "ipad", 77 | "size": "29x29", 78 | "scale": "2x", 79 | "filename": "App-Icon-29x29@2x.png" 80 | }, 81 | { 82 | "idiom": "ipad", 83 | "size": "40x40", 84 | "scale": "1x", 85 | "filename": "App-Icon-40x40@1x.png" 86 | }, 87 | { 88 | "idiom": "ipad", 89 | "size": "40x40", 90 | "scale": "2x", 91 | "filename": "App-Icon-40x40@2x.png" 92 | }, 93 | { 94 | "idiom": "ipad", 95 | "size": "76x76", 96 | "scale": "1x", 97 | "filename": "App-Icon-76x76@1x.png" 98 | }, 99 | { 100 | "idiom": "ipad", 101 | "size": "76x76", 102 | "scale": "2x", 103 | "filename": "App-Icon-76x76@2x.png" 104 | }, 105 | { 106 | "idiom": "ipad", 107 | "size": "83.5x83.5", 108 | "scale": "2x", 109 | "filename": "App-Icon-83.5x83.5@2x.png" 110 | }, 111 | { 112 | "idiom": "ios-marketing", 113 | "size": "1024x1024", 114 | "scale": "1x", 115 | "filename": "ItunesArtwork@2x.png" 116 | } 117 | ], 118 | "info": { 119 | "version": 1, 120 | "author": "expo" 121 | } 122 | } -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "expo" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/SplashScreen.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "filename": "image.png", 6 | "scale": "1x" 7 | }, 8 | { 9 | "idiom": "universal", 10 | "scale": "2x" 11 | }, 12 | { 13 | "idiom": "universal", 14 | "scale": "3x" 15 | } 16 | ], 17 | "info": { 18 | "version": 1, 19 | "author": "expo" 20 | } 21 | } -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/SplashScreen.imageset/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/SplashScreen.imageset/image.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/SplashScreenBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "filename": "image.png", 6 | "scale": "1x" 7 | }, 8 | { 9 | "idiom": "universal", 10 | "scale": "2x" 11 | }, 12 | { 13 | "idiom": "universal", 14 | "scale": "3x" 15 | } 16 | ], 17 | "info": { 18 | "version": 1, 19 | "author": "expo" 20 | } 21 | } -------------------------------------------------------------------------------- /example/ios/integrityexample/Images.xcassets/SplashScreenBackground.imageset/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffDevelops/expo-app-integrity/1b9cf7e6c59120bb6478fd1a55a410dcbb8df699/example/ios/integrityexample/Images.xcassets/SplashScreenBackground.imageset/image.png -------------------------------------------------------------------------------- /example/ios/integrityexample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | integrity-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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 19 | CFBundleShortVersionString 20 | 1.0.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleURLTypes 24 | 25 | 26 | CFBundleURLSchemes 27 | 28 | expo.modules.integrity.example 29 | 30 | 31 | 32 | CFBundleVersion 33 | 1 34 | LSApplicationCategoryType 35 | 36 | LSRequiresIPhoneOS 37 | 38 | NSAppTransportSecurity 39 | 40 | NSAllowsArbitraryLoads 41 | 42 | NSExceptionDomains 43 | 44 | localhost 45 | 46 | NSExceptionAllowsInsecureHTTPLoads 47 | 48 | 49 | 50 | 51 | UIBackgroundModes 52 | 53 | fetch 54 | remote-notification 55 | 56 | UILaunchStoryboardName 57 | SplashScreen 58 | UIRequiredDeviceCapabilities 59 | 60 | armv7 61 | 62 | UIRequiresFullScreen 63 | 64 | UIStatusBarStyle 65 | UIStatusBarStyleDefault 66 | UISupportedInterfaceOrientations 67 | 68 | UIInterfaceOrientationPortrait 69 | UIInterfaceOrientationPortraitUpsideDown 70 | 71 | UISupportedInterfaceOrientations~ipad 72 | 73 | UIInterfaceOrientationPortrait 74 | UIInterfaceOrientationPortraitUpsideDown 75 | UIInterfaceOrientationLandscapeLeft 76 | UIInterfaceOrientationLandscapeRight 77 | 78 | UIUserInterfaceStyle 79 | Light 80 | UIViewControllerBasedStatusBarAppearance 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /example/ios/integrityexample/SplashScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /example/ios/integrityexample/Supporting/Expo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | EXUpdatesCheckOnLaunch 6 | ALWAYS 7 | EXUpdatesEnabled 8 | 9 | EXUpdatesLaunchWaitMs 10 | 0 11 | EXUpdatesSDKVersion 12 | 48.0.0 13 | EXUpdatesURL 14 | https://exp.host/@smlldcknrg/integrity-example 15 | 16 | -------------------------------------------------------------------------------- /example/ios/integrityexample/integrityexample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | com.apple.developer.devicecheck.appattest-environment 8 | development 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/integrityexample/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /example/ios/integrityexample/noop-file.swift: -------------------------------------------------------------------------------- 1 | // 2 | // @generated 3 | // A blank Swift file must be created for native modules with Swift files to work correctly. 4 | // 5 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | // Learn more https://docs.expo.io/guides/customizing-metro 2 | const { getDefaultConfig } = require('expo/metro-config'); 3 | const path = require('path'); 4 | 5 | const config = getDefaultConfig(__dirname); 6 | 7 | // npm v7+ will install ../node_modules/react-native because of peerDependencies. 8 | // To prevent the incompatible react-native bewtween ./node_modules/react-native and ../node_modules/react-native, 9 | // excludes the one from the parent folder when bundling. 10 | config.resolver.blockList = [ 11 | ...Array.from(config.resolver.blockList ?? []), 12 | new RegExp(path.resolve('..', 'node_modules', 'react-native')), 13 | ]; 14 | 15 | config.resolver.nodeModulesPaths = [ 16 | path.resolve(__dirname, './node_modules'), 17 | path.resolve(__dirname, '../node_modules'), 18 | ]; 19 | 20 | config.watchFolders = [path.resolve(__dirname, '..')]; 21 | 22 | config.transformer.getTransformOptions = async () => ({ 23 | transform: { 24 | experimentalImportSupport: false, 25 | inlineRequires: true, 26 | }, 27 | }); 28 | 29 | module.exports = config; -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "integrity-example", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "start": "REACT_NATIVE_PACKAGER_HOSTNAME=192.168.0.24 npx expo start --dev-client --tunnel --clear", 6 | "android": "expo run:android --tunnel", 7 | "ios": "expo run:ios --tunnel", 8 | "web": "expo start --web", 9 | "dev:build": "REACT_NATIVE_PACKAGER_HOSTNAME=192.168.0.24 npx expo start --dev-client --tunnel" 10 | }, 11 | "dependencies": { 12 | "expo": "~48.0.9", 13 | "react": "18.2.0", 14 | "react-native": "0.71.4", 15 | "expo-dev-client": "~2.1.6", 16 | "expo-build-properties": "~0.5.1", 17 | "expo-secure-store": "~12.1.1", 18 | "expo-device": "~5.2.1" 19 | }, 20 | "devDependencies": { 21 | "@babel/core": "^7.20.0", 22 | "@types/react": "~18.0.14", 23 | "typescript": "^4.9.4" 24 | }, 25 | "private": true, 26 | "expo": { 27 | "autolinking": { 28 | "nativeModulesDir": ".." 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /example/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "expo/tsconfig.base", 3 | "compilerOptions": { 4 | "strict": true, 5 | "paths": { 6 | "expo-app-integrity": ["../src/index"], 7 | "expo-app-integrity/*": ["../src/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /example/webpack.config.js: -------------------------------------------------------------------------------- 1 | const createConfigAsync = require('@expo/webpack-config'); 2 | const path = require('path'); 3 | 4 | module.exports = async (env, argv) => { 5 | const config = await createConfigAsync( 6 | { 7 | ...env, 8 | babel: { 9 | dangerouslyAddModulePathsToTranspile: ['integrity'], 10 | }, 11 | }, 12 | argv 13 | ); 14 | config.resolve.modules = [ 15 | path.resolve(__dirname, './node_modules'), 16 | path.resolve(__dirname, '../node_modules'), 17 | ]; 18 | 19 | return config; 20 | }; 21 | -------------------------------------------------------------------------------- /expo-module.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "platforms": ["ios", "android", "web"], 3 | "ios": { 4 | "modules": ["IntegrityModule"] 5 | }, 6 | "android": { 7 | "modules": ["expo.modules.integrity.IntegrityModule"] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ios/Integrity.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 = 'Integrity' 7 | s.version = package['version'] 8 | s.summary = package['description'] 9 | s.description = package['description'] 10 | s.license = package['license'] 11 | s.author = package['author'] 12 | s.homepage = package['homepage'] 13 | s.platform = :ios, '14.0' 14 | s.swift_version = '5.4' 15 | s.source = { git: 'https://github.com/jeffDevelops/integrity' } 16 | s.static_framework = true 17 | 18 | s.dependency 'ExpoModulesCore' 19 | 20 | # Swift/Objective-C compatibility 21 | s.pod_target_xcconfig = { 22 | 'DEFINES_MODULE' => 'YES', 23 | 'SWIFT_COMPILATION_MODE' => 'wholemodule' 24 | } 25 | 26 | s.source_files = "**/*.{h,m,swift}" 27 | end 28 | -------------------------------------------------------------------------------- /ios/IntegrityModule.swift: -------------------------------------------------------------------------------- 1 | import CryptoKit 2 | import DeviceCheck 3 | import ExpoModulesCore 4 | 5 | @available(iOS 14.0, *) 6 | public class IntegrityModule: Module { 7 | 8 | private let service: DCAppAttestService = DCAppAttestService.shared 9 | 10 | enum DeviceCheckError { 11 | case invalidKey, 12 | invalidInput, 13 | serverUnavailable, 14 | featureUnsupported, 15 | unknownSystemFailure, 16 | unhandledException(localizedDescription: String) 17 | 18 | var description : String { 19 | switch self { 20 | case .invalidKey: return "INVALID_KEY" 21 | case .invalidInput: return "INVALID_INPUT" 22 | case .serverUnavailable: return "SERVER_UNAVAILABLE" 23 | case .featureUnsupported: return "FEATURE_UNSUPPORTED" 24 | case .unknownSystemFailure: return "UNKNOWN_SYSTEM_FAILURE" 25 | case .unhandledException(let localizedDescription): 26 | return "An unknown error not enumerated by DCError occurred, and as a result, likely has nothing to do with DeviceCheck or AppAttest. Original error: \(localizedDescription)" 27 | } 28 | } 29 | } 30 | 31 | private class IntegrityModuleException: GenericException { 32 | private var appAttestError: DeviceCheckError 33 | 34 | init(appAttestError: DeviceCheckError) { 35 | self.appAttestError = appAttestError 36 | super.init(OSStatus()) 37 | } 38 | 39 | override var reason: String { 40 | self.appAttestError.description 41 | } 42 | } 43 | 44 | 45 | enum AppAttestRequestResult { 46 | case success(result: String), 47 | error(error: DeviceCheckError) 48 | } 49 | 50 | enum AppAttestSuccessResult { 51 | case assertion(data: Data?), 52 | attestation(data: Data?), 53 | keyIdentifier(string: String?) 54 | } 55 | 56 | private func handleDeviceCheckError( 57 | error: DCError, 58 | continuation: CheckedContinuation 59 | ) -> Void { 60 | switch (error.code) { 61 | case .invalidKey: return continuation.resume(returning: AppAttestRequestResult.error(error: .invalidKey)) 62 | case .invalidInput: return continuation.resume(returning: AppAttestRequestResult.error(error: .invalidInput)) 63 | case .serverUnavailable: return continuation.resume(returning: AppAttestRequestResult.error(error: .serverUnavailable)) 64 | case .featureUnsupported: return continuation.resume(returning: AppAttestRequestResult.error(error: .featureUnsupported)) 65 | case .unknownSystemFailure: return continuation.resume(returning: AppAttestRequestResult.error(error: .unknownSystemFailure)) 66 | default: return continuation.resume(returning: AppAttestRequestResult.error(error: .unhandledException(localizedDescription: error.localizedDescription))) 67 | } 68 | } 69 | 70 | private func appAttestCompletion( 71 | result: AppAttestSuccessResult, 72 | error: (any Error)?, 73 | continuation: CheckedContinuation 74 | ) -> Void { 75 | 76 | if let error = error as? DCError { 77 | return self.handleDeviceCheckError(error: error, continuation: continuation) 78 | } else if error != nil { 79 | return continuation.resume( 80 | returning: AppAttestRequestResult.error( 81 | error: .unhandledException( 82 | localizedDescription: error?.localizedDescription ?? "Localized description not included in error" 83 | ) 84 | ) 85 | ) 86 | } 87 | 88 | switch (result) { 89 | case .attestation(let data): 90 | guard let data = data else { 91 | return continuation.resume( 92 | returning: AppAttestRequestResult.error( 93 | error: DeviceCheckError.unhandledException( 94 | localizedDescription: "AppAttest did not throw an error, but the attestation was nil." 95 | ) 96 | ) 97 | ) 98 | } 99 | 100 | return continuation.resume(returning: .success(result: String(decoding: data, as: UTF8.self))) 101 | 102 | case .keyIdentifier(let string): 103 | guard let string = string else { 104 | return continuation.resume( 105 | returning: AppAttestRequestResult.error( 106 | error: DeviceCheckError.unhandledException( 107 | localizedDescription: "AppAttest did not throw an error, but the key identifier was nil." 108 | ) 109 | ) 110 | ) 111 | } 112 | 113 | return continuation.resume(returning: .success(result: string)) 114 | 115 | case .assertion(let data): 116 | 117 | guard let data = data else { 118 | return continuation.resume( 119 | returning: AppAttestRequestResult.error( 120 | error: DeviceCheckError.unhandledException( 121 | localizedDescription: "AppAttest did not throw an error, but the assertion was nil." 122 | ) 123 | ) 124 | ) 125 | } 126 | 127 | return continuation.resume(returning: .success(result: String(decoding: data, as: UTF8.self))) 128 | } 129 | 130 | } 131 | 132 | public func definition() -> ModuleDefinition { 133 | Name("Integrity") 134 | 135 | Function("isSupported") { () -> Bool in 136 | service.isSupported 137 | } 138 | 139 | AsyncFunction("generateKey") { () async throws -> String in 140 | 141 | 142 | let result = await withCheckedContinuation { continuation in 143 | service.generateKey { result, error in 144 | 145 | return self.appAttestCompletion( 146 | result: AppAttestSuccessResult.keyIdentifier(string: result), 147 | error: error, 148 | continuation: continuation 149 | ) 150 | } 151 | } 152 | 153 | switch (result) { 154 | case .error(let error): throw IntegrityModuleException(appAttestError: error) 155 | case .success(let result): return result 156 | } 157 | } 158 | 159 | AsyncFunction("attestKey") { ( 160 | keyIdentifier: String, 161 | challenge: String 162 | ) async throws -> String in 163 | let hash = Data(SHA256.hash(data: Data(challenge.utf8))) 164 | let result = await withCheckedContinuation { continuation in 165 | service.attestKey(keyIdentifier, clientDataHash: hash) { result, error in 166 | return self.appAttestCompletion( 167 | result: AppAttestSuccessResult.attestation(data: result), 168 | error: error, 169 | continuation: continuation 170 | ) 171 | } 172 | } 173 | 174 | switch (result) { 175 | case .error(let error): throw IntegrityModuleException(appAttestError: error) 176 | case .success(let result): return result 177 | } 178 | 179 | } 180 | 181 | AsyncFunction("generateAssertion") { ( 182 | keyIdentifier: String, 183 | requestJSON: String 184 | ) async throws -> String in 185 | let hash = Data(SHA256.hash(data: Data(requestJSON.utf8))) 186 | let result = await withCheckedContinuation { continuation in 187 | service.generateAssertion(keyIdentifier, clientDataHash: hash) { result, error in 188 | return self.appAttestCompletion( 189 | result: AppAttestSuccessResult.assertion(data: result), 190 | error: error, 191 | continuation: continuation 192 | ) 193 | } 194 | } 195 | 196 | switch (result) { 197 | case .error(let error): throw IntegrityModuleException(appAttestError: error) 198 | case .success(let result): return result 199 | } 200 | } 201 | 202 | } 203 | } 204 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "expo-app-integrity", 3 | "version": "0.2.0", 4 | "description": "App Attest and App Integrity APIs", 5 | "main": "build/index.js", 6 | "types": "build/index.d.ts", 7 | "scripts": { 8 | "build": "expo-module build", 9 | "clean": "expo-module clean", 10 | "lint": "expo-module lint", 11 | "test": "expo-module test", 12 | "prepare": "expo-module prepare", 13 | "prepublishOnly": "expo-module prepublishOnly", 14 | "expo-module": "expo-module", 15 | "open:ios": "open -a \"Xcode\" example/ios", 16 | "open:android": "open -a \"Android Studio\" example/android" 17 | }, 18 | "keywords": [ 19 | "react-native", 20 | "expo", 21 | "integrity", 22 | "Integrity" 23 | ], 24 | "repository": "https://github.com/jeffDevelops/expo-app-integrity", 25 | "bugs": { 26 | "url": "https://github.com/jeffDevelops/expo-app-integrity/issues" 27 | }, 28 | "author": "Jeff Reynolds (https://github.com/jeffDevelops)", 29 | "license": "MIT", 30 | "homepage": "https://github.com/jeffDevelops/expo-app-integrity#readme", 31 | "devDependencies": { 32 | "@types/react": "^18.0.25", 33 | "@types/react-native": "^0.70.6", 34 | "expo-module-scripts": "^3.0.4", 35 | "expo-modules-core": "^1.1.0" 36 | }, 37 | "peerDependencies": { 38 | "expo": "*", 39 | "react": "*", 40 | "react-native": "*", 41 | "expo-secure-store": "~12.1.1", 42 | "expo-build-properties": "~0.5.1", 43 | "expo-device": "~5.2.1" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/IntegrityModule.ts: -------------------------------------------------------------------------------- 1 | import { requireNativeModule } from 'expo-modules-core' 2 | 3 | // It loads the native module object from the JSI or falls back to 4 | // the bridge module (from NativeModulesProxy) if the remote debugger is on. 5 | export default requireNativeModule('Integrity') 6 | -------------------------------------------------------------------------------- /src/config.ts: -------------------------------------------------------------------------------- 1 | export const SECURE_STORAGE_KEYS = { 2 | INTEGRITY_KEY_IDENTIFIER: 'INTEGRITY_KEY_IDENTIFIER', 3 | } 4 | -------------------------------------------------------------------------------- /src/errors/Android.ts: -------------------------------------------------------------------------------- 1 | import { ErrorResolutionTypes, type AppIntegrityError } from './types' 2 | 3 | export const AndroidIntegrityErrors: { [code: string]: AppIntegrityError } = { 4 | /** 5 | * Non-actionable errors 6 | */ 7 | 8 | APP_NOT_INSTALLED: { 9 | code: 'APP_NOT_INSTALLED', 10 | errorCode: 0, 11 | documentation: 12 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#APP_NOT_INSTALLED', 13 | detail: 14 | 'The calling app is not installed. Something is wrong (possibly an attack). Presumably, this indicates that your executable was run without formal installation via Google Play.', 15 | userFriendlyMessage: 16 | 'App integrity verification with the Google Play Store failed. Please try again. Error code: 0', 17 | resolution: 'Non-actionable', 18 | resolutionType: ErrorResolutionTypes.NON_ACTIONABLE, 19 | }, 20 | 21 | API_UID_MISMATCH: { 22 | code: 'API_UID_MISMATCH', 23 | errorCode: 1, 24 | documentation: 25 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#API_UID_MISMATCH', 26 | detail: 27 | 'The calling app UID (user id) does not match the one from Package Manager. Something is wrong (possibly an attack). Non-actionable.', 28 | userFriendlyMessage: 29 | 'App integrity verification with the Google Play Store failed. Please try again. Error code: 1', 30 | resolution: 'Non-actionable', 31 | resolutionType: ErrorResolutionTypes.NON_ACTIONABLE, 32 | }, 33 | 34 | /** 35 | * Errors that may require end-user resolution 36 | */ 37 | 38 | API_NOT_AVAILABLE: { 39 | code: 'API_NOT_AVAILABLE', 40 | errorCode: 2, 41 | documentation: 42 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#API_NOT_AVAILABLE', 43 | detail: 44 | 'Integrity API is not available. Integrity API is not enabled, or the Play Store version might be old.', 45 | userFriendlyMessage: 46 | 'App integrity verification with the Google Play Store failed. Please update Play Store on your device and try again. Error code: 2', 47 | resolution: 48 | 'Make sure that Integrity API is enabled in Google Play Console for your application. Ask the user to update Play Store before trying again.', 49 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 50 | }, 51 | 52 | CANNOT_BIND_TO_SERVICE: { 53 | code: 'CANNOT_BIND_TO_SERVICE', 54 | errorCode: 3, 55 | documentation: 56 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#CANNOT_BIND_TO_SERVICE', 57 | detail: 58 | 'Binding to the service in the Play Store has failed. This can be due to having an old Play Store version installed on the device.', 59 | userFriendlyMessage: 60 | 'App integrity verification with the Google Play Store failed. Please update Play Store on your device and try again. Error code: 3', 61 | resolution: 'Ask the user to update Play Store before trying again.', 62 | resolutionType: ErrorResolutionTypes.USER_ACTION_REQUIRED, 63 | }, 64 | 65 | NETWORK_ERROR: { 66 | code: 'NETWORK_ERROR', 67 | errorCode: 4, 68 | documentation: 69 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#NETWORK_ERROR', 70 | detail: 'No available network is found.', 71 | userFriendlyMessage: 72 | 'App integrity verification with the Google Play Store failed. Please check your internet connection and try again. Error code: 4', 73 | resolution: 'Ask the user to check for a connection before trying again.', 74 | resolutionType: ErrorResolutionTypes.USER_ACTION_REQUIRED, 75 | }, 76 | 77 | PLAY_SERVICES_NOT_FOUND: { 78 | code: 'PLAY_SERVICES_NOT_FOUND', 79 | errorCode: 5, 80 | documentation: 81 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#PLAY_SERVICES_NOT_FOUND', 82 | detail: 'Play Services is not available or version is too old.', 83 | userFriendlyMessage: 84 | 'App integrity verification with the Google Play Store failed. Please ensure Play Services is installed on your device and up-to-date, and try again. Error code: 5', 85 | resolution: 'Ask the user to Install or Update Play Services.', 86 | resolutionType: ErrorResolutionTypes.USER_ACTION_REQUIRED, 87 | }, 88 | 89 | PLAY_SERVICES_VERSION_OUTDATED: { 90 | code: 'PLAY_SERVICES_VERSION_OUTDATED', 91 | errorCode: 6, 92 | documentation: 93 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#PLAY_SERVICES_VERSION_OUTDATED', 94 | detail: 'Play Services needs to be updated.', 95 | userFriendlyMessage: 96 | 'App integrity verification with the Google Play Store failed. Please update Play Services on your device and try again. Error code: 6', 97 | resolution: 'Ask the user to update Play Services before trying again.', 98 | resolutionType: ErrorResolutionTypes.USER_ACTION_REQUIRED, 99 | }, 100 | 101 | PLAY_STORE_ACCOUNT_NOT_FOUND: { 102 | code: 'PLAY_STORE_ACCOUNT_NOT_FOUND', 103 | errorCode: 7, 104 | documentation: 105 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#PLAY_STORE_ACCOUNT_NOT_FOUND', 106 | detail: 107 | 'No Play Store account is found on device. Note that the Play Integrity API now supports unauthenticated requests. This error code is used only for older Play Store versions that lack support.', 108 | userFriendlyMessage: 109 | 'App integrity verification with the Google Play Store failed. Please ensure you are logged into the Play Store on your device and try again. Error code: 7', 110 | resolution: 'Ask the user to authenticate in Play Store.', 111 | resolutionType: ErrorResolutionTypes.USER_ACTION_REQUIRED, 112 | }, 113 | 114 | PLAY_STORE_NOT_FOUND: { 115 | code: 'PLAY_STORE_NOT_FOUND', 116 | errorCode: 8, 117 | documentation: 118 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#PLAY_STORE_NOT_FOUND', 119 | detail: 120 | 'No Play Store app is found on device or unofficial version is installed.', 121 | userFriendlyMessage: 122 | 'App integrity verification with the Google Play Store failed. Please ensure you have the official Play Store app installed on your device and try again. Error code: 8', 123 | resolution: 124 | 'Ask the user to install an official and recent version of Play Store.', 125 | resolutionType: ErrorResolutionTypes.USER_ACTION_REQUIRED, 126 | }, 127 | 128 | PLAY_STORE_VERSION_OUTDATED: { 129 | code: 'PLAY_STORE_VERSION_OUTDATED', 130 | errorCode: 9, 131 | documentation: 132 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#PLAY_STORE_VERSION_OUTDATED', 133 | detail: 'Play Store needs to be updated.', 134 | userFriendlyMessage: 135 | 'App integrity verification with the Google Play Store failed. Please update Play Store on your device and try again. Error code: 9', 136 | resolution: 'Ask the user to update Play Store before trying again.', 137 | resolutionType: ErrorResolutionTypes.USER_ACTION_REQUIRED, 138 | }, 139 | 140 | /** 141 | * Errors recommending retry with an exponential backoff 142 | */ 143 | 144 | CLIENT_TRANSIENT_ERROR: { 145 | code: 'CLIENT_TRANSIENT_ERROR', 146 | errorCode: 10, 147 | documentation: 148 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#CLIENT_TRANSIENT_ERROR', 149 | detail: 150 | 'There was a transient error in the client device. Retry with an exponential backoff. Introduced in Integrity Play Core version 1.1.0 (prior versions returned a token with empty Device Integrity Verdict). If the error persists after a few retries, you should assume that the device has failed integrity checks and act accordingly.', 151 | userFriendlyMessage: 152 | 'App integrity verification with the Google Play Store failed. Please try again. Error code: 10', 153 | resolution: 154 | 'Retry with an exponential backoff. Consider filing a bug if it fails consistently.', 155 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 156 | }, 157 | 158 | GOOGLE_SERVER_UNAVAILABLE: { 159 | code: 'GOOGLE_SERVER_UNAVAILABLE', 160 | errorCode: 11, 161 | documentation: 162 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#GOOGLE_SERVER_UNAVAILABLE', 163 | detail: 'Unknown internal Google server error.', 164 | userFriendlyMessage: 165 | 'App integrity verification with the Google Play Store failed. Google services may be temporarily degraded. Please try again. Error code: 11', 166 | resolution: 167 | 'Retry with an exponential backoff. Consider filing a bug if it fails consistently.', 168 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 169 | }, 170 | 171 | INTERNAL_ERROR: { 172 | code: 'INTERNAL_ERROR', 173 | errorCode: 12, 174 | documentation: 175 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#INTERNAL_ERROR', 176 | detail: 'Unknown internal error.', 177 | userFriendlyMessage: 178 | 'App integrity verification with the Google Play Store failed. Google services may be temporarily degraded. Please try again. Error code: 12', 179 | resolution: 180 | 'Retry with an exponential backoff. Consider filing a bug if it fails consistently.', 181 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 182 | }, 183 | 184 | /** 185 | * Library consumer configuration errors 186 | */ 187 | CLOUD_PROJECT_NUMBER_IS_INVALID: { 188 | code: 'CLOUD_PROJECT_NUMBER_IS_INVALID', 189 | errorCode: 13, 190 | documentation: 191 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#CLOUD_PROJECT_NUMBER_IS_INVALID', 192 | detail: 193 | 'Configuration error: the provided cloud project number is invalid. Use the cloud project number which can be found in Project info in your Google Cloud Console for the cloud project where Play Integrity API is enabled.', 194 | userFriendlyMessage: 195 | 'App integrity verification with the Google Play Store failed. Please try again. Error code: 13', 196 | resolution: 'Ensure the cloud project number is correct.', 197 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 198 | }, 199 | 200 | NONCE_IS_NOT_BASE64: { 201 | code: 'NONCE_IS_NOT_BASE64', 202 | errorCode: 14, 203 | documentation: 204 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#NONCE_IS_NOT_BASE64', 205 | detail: 206 | 'Configuration error: the provided nonce is not encoded as a base64 web-safe no-wrap string. Retry with correct nonce format.', 207 | userFriendlyMessage: 208 | 'App integrity verification with the Google Play Store failed. Please try again. Error code: 14', 209 | resolution: 210 | 'Ensure the nonce is encoded as a base64 web-safe no-wrap string.', 211 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 212 | }, 213 | 214 | NONCE_TOO_LONG: { 215 | code: 'NONCE_TOO_LONG', 216 | errorCode: 15, 217 | documentation: 218 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#NONCE_TOO_LONG', 219 | detail: 220 | 'Configuration error: the provided nonce is too long. The nonce must be less than 500 bytes before base64 encoding. Retry with a shorter nonce.', 221 | userFriendlyMessage: 222 | 'App integrity verification with the Google Play Store failed. Please try again. Error code: 15', 223 | resolution: 224 | 'Ensure the nonce is less than 500 bytes before base64 encoding.', 225 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 226 | }, 227 | 228 | NONCE_TOO_SHORT: { 229 | code: 'NONCE_TOO_SHORT', 230 | errorCode: 16, 231 | documentation: 232 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#NONCE_TOO_SHORT', 233 | detail: 234 | 'Configuration error: the provided nonce is too short. The nonce must be a minimum of 16 bytes (before base64 encoding). Retry with a longer nonce.', 235 | userFriendlyMessage: 236 | 'App integrity verification with the Google Play Store failed. Please try again. Error code: 16', 237 | resolution: 238 | 'Ensure the nonce is a minimum of 16 bytes (before base64 encoding).', 239 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 240 | }, 241 | 242 | TOO_MANY_REQUESTS: { 243 | code: 'TOO_MANY_REQUESTS', 244 | errorCode: 17, 245 | documentation: 246 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#TOO_MANY_REQUESTS', 247 | detail: 248 | 'The calling app is making too many requests to the API and hence is throttled.', 249 | userFriendlyMessage: 250 | 'App integrity verification with the Google Play Store failed. Please try again. Error code: 17', 251 | resolution: 'Retry with an exponential backoff.', 252 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 253 | }, 254 | 255 | /** ??? */ 256 | 257 | NO_ERROR: { 258 | code: 'NO_ERROR', 259 | errorCode: 18, 260 | documentation: 261 | 'https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/model/IntegrityErrorCode.html#NO_ERROR', 262 | detail: 263 | 'No error occurred. This error code was likely included in the App Integrity API for completeness.', 264 | userFriendlyMessage: 'No error occurred. Error code: 18', 265 | resolution: 'No resolution is required.', 266 | resolutionType: ErrorResolutionTypes.NON_ACTIONABLE, 267 | }, 268 | 269 | /** 270 | * Errors created by expo-app-integrity 271 | */ 272 | 273 | INVALID_INTEGRITY_TOKEN_RESPONSE: { 274 | code: 'INVALID_INTEGRITY_TOKEN_RESPONSE', 275 | errorCode: 19, 276 | documentation: 'https://gihub.com/jeffDevelops/expo-app-integrity', 277 | detail: 278 | 'Google Play Integrity API did not return an error, but the integrity token was null', 279 | userFriendlyMessage: 280 | 'App integrity verification with the Google Play Store failed. Please try again. Error code: 19', 281 | resolution: 282 | 'Retry with an exponential backoff. Consider filing a bug with `expo-app-integrity` repository if it fails consistently.', 283 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 284 | }, 285 | INVALID_IS_SUPPORTED_API: { 286 | code: 'INVALID_IS_SUPPORTED_API', 287 | errorCode: 20, 288 | documentation: 'https://gihub.com/jeffDevelops/expo-app-integrity', 289 | detail: 290 | '`AppIntegrity.isSupported()` is only exposed on iOS, but was called on Android.', 291 | userFriendlyMessage: 292 | 'App integrity verification with the Google Play Store failed. Please try again. Error code: 20', 293 | resolution: 294 | "`expo-app-integrity` does not recommend using this part of Apple's API unless you have a strategy for handling unattested requests in your app. If you do elect to use it on iOS, be sure to wrap this call in a check for an `ios` `Platform.OS`.", 295 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 296 | }, 297 | } 298 | -------------------------------------------------------------------------------- /src/errors/PlatformAgnostic.ts: -------------------------------------------------------------------------------- 1 | import { type AppIntegrityError, ErrorResolutionTypes } from './types' 2 | 3 | export const unhandledException = ( 4 | originalMessage: string, 5 | ): AppIntegrityError & { originalMessage: string } => ({ 6 | originalMessage, 7 | code: 'UNKNOWN', 8 | errorCode: 26, 9 | documentation: 'https://gihub.com/jeffDevelops/expo-app-integrity', 10 | detail: `An unknown error occurred. See \`originalMessage\` for more information.`, 11 | userFriendlyMessage: 12 | 'App integrity verification failed. An unknown error occurred. Error code: 26', 13 | resolution: 14 | 'Retry with an exponential backoff. Consider filing an issue with the `expo-app-integrity` repository.', 15 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 16 | }) 17 | 18 | export const PlatformAgnosticErrors = { 19 | UNSUPPORTED_PLATFORM: { 20 | code: 'UNSUPPORTED_PLATFORM', 21 | errorCode: 27, 22 | documentation: 'https://gihub.com/jeffDevelops/expo-app-integrity', 23 | detail: `The current platform is not supported by this library. Only 'ios' and 'android' are supported.`, 24 | userFriendlyMessage: 'App integrity verification failed.', 25 | resolution: 'Use this library only on iOS and Android.', 26 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 27 | }, 28 | } 29 | -------------------------------------------------------------------------------- /src/errors/iOS.ts: -------------------------------------------------------------------------------- 1 | import { ErrorResolutionTypes, type AppIntegrityError } from './types' 2 | 3 | export const iOSAppAttestErrors: { [code: string]: AppIntegrityError } = { 4 | UNKNOWN_SYSTEM_FAILURE: { 5 | code: 'UNKNOWN_SYSTEM_FAILURE', 6 | errorCode: 20, 7 | documentation: 8 | 'https://developer.apple.com/documentation/devicecheck/dcerror/2896947-unknownsystemfailure', 9 | detail: 'A failure has occurred, such as the failure to generate a token.', 10 | userFriendlyMessage: 11 | 'App integrity verification failed. Please try again. Error code: 25', 12 | resolution: 'Retry with an exponential backoff.', 13 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 14 | }, 15 | 16 | INVALID_KEY: { 17 | code: 'INVALID_KEY', 18 | errorCode: 21, 19 | documentation: 20 | 'https://developer.apple.com/documentation/devicecheck/dcerror/3585177-invalidkey', 21 | detail: 'An error caused by a failed attempt to use the App Attest key', 22 | userFriendlyMessage: 23 | 'App integrity verification failed. Please try again. Error code: 21', 24 | resolution: 25 | 'An invalid or non-existent key was used to verify the app. Ensure that peer-dependency `expo-secure-store` is installed in your project to securely store the key identifier, and rebuild the iOS app. Please file an issue with `expo-app-integrity` if this issue persists.', 26 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 27 | }, 28 | 29 | INVALID_INPUT: { 30 | code: 'INVALID_INPUT', 31 | errorCode: 22, 32 | documentation: 33 | 'https://developer.apple.com/documentation/devicecheck/dcerror/3585176-invalidinput', 34 | detail: 35 | "An error code that indicates when your app provides data that isn't formatted correctly.", 36 | userFriendlyMessage: 37 | 'App integrity verification failed. Please try again. Error code: 22', 38 | resolution: 39 | 'The challenge provided to the App Attest API must be utf8 and hashable via SHA256. Assertion request bodies must be JSON strings.', 40 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 41 | }, 42 | 43 | SERVER_UNAVAILABLE: { 44 | code: 'SERVER_UNAVAILABLE', 45 | errorCode: 23, 46 | documentation: 47 | 'https://developer.apple.com/documentation/devicecheck/dcerror/3585178-serverunavailable', 48 | detail: 49 | "An error that indicates a failed attempt to contact the App Attest service during an attestation. You receive this error when you call attestKey(_:clientDataHash:completionHandler:) and the framework isn't able to complete the attestation. If you receive this error, try the attestation again later using the same key and the same value for the clientDataHash parameter. Retrying with the same inputs helps to preserve the risk metric for a given device.", 50 | userFriendlyMessage: 51 | 'App integrity verification failed. Apple App Attest services may be temporarily degraded. Please try again. Error code: 23', 52 | resolution: 'Retry with an exponential backoff.', 53 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 54 | }, 55 | 56 | FEATURE_UNSUPPORTED: { 57 | code: 'FEATURE_UNSUPPORTED', 58 | errorCode: 24, 59 | documentation: 60 | 'https://developer.apple.com/documentation/devicecheck/dcerror/2896943-featureunsupported', 61 | detail: 'DeviceCheck is not available on this device.', 62 | userFriendlyMessage: 63 | 'App integrity verification failed. Please try again on another device. Error code: 24', 64 | resolution: 65 | 'App Attest will always fail on this device. You must test on a physical device and ensure App Attest capabilities are enabled for your app. If you need broader device support, consider adopting a (more complex) tiered approach to app integrity verification and wrapping your call(s) to `Integrity.attestKey()` and `Integrity.generateAssertion()` in `Integrity.isSupported()`. For more information, see the Apple documentation on checking for availability here: https://developer.apple.com/documentation/devicecheck/establishing_your_app_s_integrity#3576028. However, `expo-app-integrity` sides with this article, suggesting not to use `Integrity.isSupported()` to gate your app integrity verification.', 66 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 67 | }, 68 | 69 | EXECUTED_IN_SIMULATOR: { 70 | code: 'EXECUTED_IN_SIMULATOR', 71 | errorCode: 25, 72 | documentation: 73 | 'How to create an iOS development build with EAS: https://docs.expo.dev/build/setup/', 74 | detail: 75 | 'App Attest requires a physical device and will not work in a simulator.', 76 | userFriendlyMessage: 77 | 'App integrity verification failed. Please try again on another device. Error code: 25', 78 | resolution: 79 | 'You will need an Apple Developer Account and an iOS development build of your application to test this functionality.', 80 | resolutionType: ErrorResolutionTypes.DEVELOPER_ACTION_REQUIRED, 81 | }, 82 | } 83 | -------------------------------------------------------------------------------- /src/errors/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Android' 2 | export * from './iOS' 3 | export * from './PlatformAgnostic' 4 | export * from './types' 5 | -------------------------------------------------------------------------------- /src/errors/types.ts: -------------------------------------------------------------------------------- 1 | /** Agent to resolve the error, if possible */ 2 | export enum ErrorResolutionTypes { 3 | NON_ACTIONABLE, 4 | DEVELOPER_ACTION_REQUIRED, 5 | USER_ACTION_REQUIRED, 6 | } 7 | 8 | export type AppIntegrityError = { 9 | /** A unique (to this package) error code */ 10 | code: string 11 | /** A unique (to this package) error code that users can use to communicate issues with the developer without divulging the root cause */ 12 | errorCode: number 13 | /** A link to the documentation pertaining to the error */ 14 | documentation: string 15 | /** A detailed description of the error */ 16 | detail: string 17 | /** An error message that can be displayed to users */ 18 | userFriendlyMessage: string 19 | /** A description of how to resolve the error, if possible */ 20 | resolution: string 21 | /** Agent to resolve the error, if possible */ 22 | resolutionType: ErrorResolutionTypes 23 | } 24 | 25 | export type UnhandledException = AppIntegrityError & { 26 | originalMessage: string 27 | } 28 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import * as Device from 'expo-device' 2 | import * as SecureStore from 'expo-secure-store' 3 | import { Platform } from 'react-native' 4 | 5 | import IntegrityModule from './IntegrityModule' 6 | import { SECURE_STORAGE_KEYS } from './config' 7 | import { 8 | iOSAppAttestErrors, 9 | AndroidIntegrityErrors, 10 | unhandledException, 11 | PlatformAgnosticErrors, 12 | } from './errors' 13 | 14 | /** iOS Only */ 15 | const generateKey = async (): Promise => 16 | await IntegrityModule.generateKey() 17 | 18 | const iOSAttestKey = async (challenge: string): Promise => { 19 | if (!Device.isDevice) throw iOSAppAttestErrors.EXECUTED_IN_SIMULATOR 20 | 21 | try { 22 | // Check secure storage for a key identifier 23 | const secureStorageValue = await SecureStore.getItemAsync( 24 | SECURE_STORAGE_KEYS.INTEGRITY_KEY_IDENTIFIER, 25 | ) 26 | 27 | // Generate a key if one doesn't exist in secure storage 28 | const keyIdentifier = secureStorageValue ?? (await generateKey()) 29 | 30 | // Save the key identifier to secure storage if it didn't originally exist 31 | if (!secureStorageValue) 32 | await SecureStore.setItemAsync( 33 | SECURE_STORAGE_KEYS.INTEGRITY_KEY_IDENTIFIER, 34 | keyIdentifier, 35 | ) 36 | 37 | const attestationResult = await IntegrityModule.attestKey( 38 | keyIdentifier, 39 | challenge, 40 | ) 41 | 42 | return attestationResult 43 | } catch (error) { 44 | const errorCode = 45 | error.message.split(' ')[error.message.split(' ').length - 1] 46 | 47 | if (!iOSAppAttestErrors[errorCode]) throw unhandledException(error.message) 48 | throw iOSAppAttestErrors[errorCode] 49 | } 50 | } 51 | 52 | const androidRequestIntegrityVerdict = async ( 53 | challenge: string, 54 | cloudProjectNumber: number, 55 | ): Promise => { 56 | try { 57 | const verdict = await IntegrityModule.requestIntegrityVerdict( 58 | challenge, 59 | cloudProjectNumber, 60 | ) 61 | return verdict 62 | } catch (error) { 63 | // Remove last paren character from stringified error message (i.e., "Error(...)" -> "Error(1234") 64 | const formattedError = error.message.substring(0, error.message.length - 1) 65 | const errorToArray = formattedError.split(' ') 66 | 67 | // The error code token is the last token in the error message array 68 | const errorCode = errorToArray[errorToArray.length - 1] 69 | 70 | if (!AndroidIntegrityErrors[errorCode]) 71 | throw unhandledException(error.message) 72 | 73 | throw AndroidIntegrityErrors[errorCode] 74 | } 75 | } 76 | 77 | /** 78 | * @description 79 | * iOS Only. Check if the device supports iOS AppAttest. 80 | * 81 | * Attestation support is handled via an extensive system of exceptions after the service is requested. Running this function on Android will throw an error. Wrap in a platform check if you need to support both platforms. 82 | * 83 | * `AppIntegrity.isSupported()` is only exposed on iOS, but `expo-app-integrity` recommends not to use the API at all, in spite of Apple's recommendations. Apple includes the API so as not to 84 | * penalize users if AppAttest isn't supported on the device they're using. `AppIntegrity.isSupported()` is included in this API so that you can adopt Apple's recommended approach in your Expo 85 | * app if you so choose, but you'll need to have a strategy in place to determine the outcomes of unattested requests. 86 | * 87 | * Apple's recommendation for checking for AppAttest support: https://developer.apple.com/documentation/devicecheck/establishing_your_app_s_integrity#3576028 88 | * 89 | * Why you might not want to follow Apple's recommendation: https://swiftrocks.com/app-attest-apple-protect-ios-jailbreak 90 | * 91 | * Android has no such API, so you'll need to wrap this call in a check for an `'ios'` `Platform.OS`. On Android, whether the functionality is supported can be gleaned from simply trying to make 92 | * the request.`try` `AppIntegrity.attestKey` and handle API availability errors based on Google's recommendations for any error message you receive (i.e., project configuration errors, exponential 93 | * backoff)." 94 | **/ 95 | export const isSupported = (): boolean => IntegrityModule.isSupported() 96 | 97 | /** 98 | * 99 | * @param challenge 100 | * @param cloudProjectNumber 101 | * @returns string | never 102 | * 103 | * @description 104 | * This is generally the only function from the module that you'll need to get an app integrity attestation from AppAttest / Google Play Integrity API. 105 | * 106 | * On iOS, this function: 107 | * 108 | * 1) Generates a key if one doesn't exist and store its identifier in secure storage as exposed in peer-dependency `expo-secure-store`. It will use the identifier 109 | * from the secure store if this function was already called on the user's device. 110 | * 111 | * 2) Calls `DCAppAttestService.attestKey` with your persisted key identifier and server-generated challenge to get an attestation from Apple servers. This action IS 112 | * subject to Apple's rate limiting, so you'll need to prepare your app with any / all of the following measures. 113 | * 114 | * - you should implement exponential backoff for failed attestation requests 115 | * - Onboard Users Gradually: if you already have a large user base, you'll need to incrementally introduce your attestation feature to subsets of your user base 116 | * - you may need to implement decision logic that is less stringent than simply rejecting unattested requests, and progressively tighten requirements if unattested traffic increases 117 | * 118 | * On Android, this function calls `GooglePlayIntegrity.requestIntegrityToken` with your server-generated challenge and project's Google Cloud Project Number to get an attestation from 119 | * Google Play servers. 120 | * 121 | * BOTH iOS and Android APIs are subject to rate limiting, so you'll need to prepare your app with any / all of the following measures: 122 | * - you should implement exponential backoff for failed attestation requests 123 | * - Onboard Users Gradually: if you already have a large user base, you'll need to incrementally introduce your attestation feature to subsets of your user base 124 | * - you may need to implement decision logic that is less stringent than simply rejecting unattested requests, and progressively tighten requirements if unattested traffic increases 125 | * 126 | * See Apple's documentation on preparing to use AppAttest for more information: https://developer.apple.com/documentation/devicecheck/preparing_to_use_the_app_attest_service 127 | * See Google's overview on using the Play Integrity API: https://developer.android.com/google/play/integrity/overview 128 | * 129 | * @throws 130 | * On iOS: 131 | * This function can throw errors that extend the `DCError` struct: 132 | * - `'INVALID_KEY'`: The key identifier is incorrect or was not provided. This is likely to be an issue with an implementation detail of `expo-app-integrity`, so file an issue on the repo if you encounter this error. 133 | * - `'INVALID_INPUT'`: An error code that indicates when your app provides data that isn't formatted correctly. Ensure that you're passing a valid challenge string. 134 | * - `'SERVER_UNAVAILABLE'`: An error that indicates a failed attempt to contact the App Attest service during an attestation. Possible resolutions include: 135 | * - implementing exponential backoff for failed attestation requests, 136 | * - reduce the possbility of rate-limiting by onboarding users gradually onto App Attest if you have a large user base 137 | * - ensure that your users have reliable Internet connectivity with modules like `expo-network` or `react-native-netinfo` 138 | * - `'FEATURE_UNSUPPORTED'`: An error that indicates that the device does not support App Attest, such as MacOS. This can be mitigated by using `AppIntegrity.isSupported()` (iOS only) to check for App Attest support before calling this function. 139 | * - `'UNKNOWN_SYSTEM_FAILURE'`: A failure has occurred, such as the failure to generate a token. This is likely analogous to a 500 error on Apple's servers, and should be handled by implementing exponential backoff. 140 | * 141 | * `expo-app-integrity` also may throw its own `'UNHANDLED_EXCEPTION'` with the original error message if it does not match any of the above error codes. 142 | * 143 | * `DCError` struct documentation: https://developer.apple.com/documentation/devicecheck/dcerror 144 | * 145 | * On Android: 146 | * This function can throw errors that extend the `IntegrityServiceException` class: 147 | * 148 | * `IntegrityServiceException` class documentation: https://developer.android.com/google/play/integrity/reference/com/google/android/play/core/integrity/IntegrityServiceException 149 | */ 150 | export async function attestKey( 151 | /** 152 | * A crytographically random value generated on your server, 153 | * and associated with your user object for server-side 154 | * comparison after Apple signs the request 155 | */ 156 | challenge: string, 157 | /** 158 | * Android only (required). The Google Cloud Project Number 159 | * associated with your app. You can find this by: 160 | * 1) Going to the Google Developer Console (https://console.developers.google.com), 161 | * 2) selecting your project in the dropdown on the top left (generally this reads "Google Play Console Developer" for Android apps), 162 | * 3) selecting the kebab menu at top-right (three vertical dots), 163 | * 4) and selecting "Project Settings" 164 | */ 165 | cloudProjectNumber?: number, 166 | ): Promise { 167 | switch (Platform.OS) { 168 | case 'ios': 169 | return await iOSAttestKey(challenge) 170 | case 'android': 171 | if (!cloudProjectNumber) 172 | throw AndroidIntegrityErrors.CLOUD_PROJECT_NUMBER_IS_INVALID 173 | 174 | return await androidRequestIntegrityVerdict(challenge, cloudProjectNumber) 175 | default: 176 | throw PlatformAgnosticErrors.UNSUPPORTED_PLATFORM 177 | } 178 | } 179 | 180 | export async function generateAssertion( 181 | /** The key identifier assigned in Integrity#generateKey */ 182 | keyIdentifier: string, 183 | 184 | /** 185 | * A crytographically random value generated on your server, 186 | * and associated with your user object for server-side 187 | * comparison after Apple signs the request 188 | */ 189 | challenge: string, 190 | 191 | /** The request JSON for Apple to sign */ 192 | requestJSON: Record, 193 | ): Promise { 194 | /** Include the server-issued challenge into the requestJSON */ 195 | const withChallenge = { ...requestJSON, challenge } 196 | 197 | const assertionResult = await IntegrityModule.generateAssertion( 198 | keyIdentifier, 199 | JSON.stringify(withChallenge), 200 | ) 201 | 202 | return assertionResult 203 | } 204 | 205 | export * from './errors' 206 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | // @generated by expo-module-scripts 2 | { 3 | "extends": "expo-module-scripts/tsconfig.base", 4 | "compilerOptions": { 5 | "outDir": "./build" 6 | }, 7 | "include": ["./src"], 8 | "exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__stories__/*"] 9 | } 10 | --------------------------------------------------------------------------------