diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 60330a7d..5d56f644 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -15,14 +15,30 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- # Setup .npmrc file to publish to npm
- - uses: actions/setup-node@v4
+
+ - name: Cache Node dependencies
+ uses: actions/cache@v4
+ with:
+ path: ~/.npm
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.os }}-node-
+
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- - run: yarn install
- - run: yarn prepare
- - run: npm publish --access public
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Prepare and publish
+ run: |
+ npm run prepare
+ npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f8806c94..fb570e8c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -24,19 +24,19 @@ jobs:
with:
node-version: 20
- - name: Cache node dependencies
+ - name: Cache Node dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
-
+
- name: Install dependencies
- run: yarn install
-
+ run: npm install
+
- name: Run JS tests
- run: yarn test
+ run: npm test
test_android:
name: Testing Android
@@ -44,17 +44,23 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
- working-directory: testApp
+ working-directory: test
steps:
- name: Checkout
uses: actions/checkout@v4
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- - name: Cache node dependencies
+ - name: Cache Node dependencies
uses: actions/cache@v4
with:
path: ~/.npm
@@ -63,7 +69,7 @@ jobs:
${{ runner.os }}-node-
- name: Install dependencies
- run: yarn install
+ run: npm install
- name: Cache Gradle Wrapper
uses: actions/cache@v4
@@ -84,14 +90,14 @@ jobs:
- name: Build Android App
run: |
- npx react-native bundle --platform android --dev false --entry-file index.tsx --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
+ npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
cd android && ./gradlew assembleDebug --no-daemon
- name: Upload Android App APK
uses: actions/upload-artifact@v4
with:
name: app-debug.apk
- path: testApp/android/app/build/outputs/apk/debug/app-debug.apk
+ path: test/android/app/build/outputs/apk/debug/app-debug.apk
- name: Build Android Test
run: |
@@ -101,7 +107,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: app-debug-androidTest.apk
- path: testApp/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
+ path: test/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
# Authenticate Cloud SDK
- id: 'auth'
@@ -113,23 +119,29 @@ jobs:
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ secrets.FIREBASE_PROJECT_ID }}
+ install_components: 'beta'
- name: Run Instrumentation Tests in Firebase Test Lab
run: |
- gcloud firebase test android run --type instrumentation \
- --app android/app/build/outputs/apk/debug/app-debug.apk \
- --test android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
+ gcloud beta firebase test android run \
+ --type=instrumentation \
+ --app=android/app/build/outputs/apk/debug/app-debug.apk \
+ --test=android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
+ --device="model=MediumPhone.arm,version=34,locale=en,orientation=portrait" \
+ --test-targets="package io.didomi.reactnative.test" \
+ --results-history-name="${{ github.ref_name }}" \
+ --num-flaky-test-attempts=3 \
+ --num-uniform-shards=3 \
--use-orchestrator \
- --device model=MediumPhone.arm,version=33,locale=en,orientation=portrait \
- --num-flaky-test-attempts=3
+ --quiet
test_ios:
name: Testing iOS
needs: test_js
- runs-on: macos-12
+ runs-on: macos-14
defaults:
run:
- working-directory: testApp
+ working-directory: test
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -140,7 +152,7 @@ jobs:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- - name: Cache node dependencies
+ - name: Cache Node dependencies
uses: actions/cache@v4
with:
path: ~/.npm
@@ -149,7 +161,7 @@ jobs:
${{ runner.os }}-node-
- name: Install dependencies
- run: yarn install
+ run: npm install
- name: Install pods
run: cd ios && pod install
@@ -160,10 +172,10 @@ jobs:
npx react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios/assets
rm index.js
cd ios && TEST=1 && RCT_NO_LAUNCH_PACKAGER=1 xcodebuild \
- -workspace DidomiExample.xcworkspace \
- -scheme DidomiExample \
+ -workspace "Didomi Tests.xcworkspace" \
+ -scheme "Didomi Tests" \
-sdk iphonesimulator \
- -destination "platform=iOS Simulator,name=iPhone 11" \
+ -destination "platform=iOS Simulator,name=iPhone 15" \
clean test
release:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index f034083e..30a584a6 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -24,7 +24,7 @@ jobs:
with:
node-version: 20
- - name: Cache node dependencies
+ - name: Cache Node dependencies
uses: actions/cache@v4
with:
path: ~/.npm
@@ -33,135 +33,151 @@ jobs:
${{ runner.os }}-node-
- name: Install dependencies
- run: yarn install
+ run: npm install
- name: Run JS tests
- run: yarn test
+ run: npm test
android:
needs: js
runs-on: ubuntu-latest
defaults:
run:
- working-directory: testApp
+ working-directory: test
steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Setup Node
- uses: actions/setup-node@v4
- with:
- node-version: 20
-
- - name: Cache node dependencies
- uses: actions/cache@v4
- with:
- path: ~/.npm
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-node-
-
- - name: Install dependencies
- run: yarn install
-
- - name: Cache Gradle Wrapper
- uses: actions/cache@v4
- with:
- path: ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
-
- - name: Cache Gradle Dependencies
- uses: actions/cache@v4
- with:
- path: ~/.gradle/caches
- key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- restore-keys: |
- ${{ runner.os }}-gradle-caches-
-
- - name: Make Gradlew Executable
- run: cd android && chmod +x ./gradlew
-
- - name: Build Android App
- run: |
- npx react-native bundle --platform android --dev false --entry-file index.tsx --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
- cd android && ./gradlew assembleDebug --no-daemon
-
- - name: Upload Android App APK
- uses: actions/upload-artifact@v4
- with:
- name: app-debug.apk
- path: testApp/android/app/build/outputs/apk/debug/app-debug.apk
-
- - name: Build Android Test
- run: |
- cd android && ./gradlew :app:assembleDebugAndroidTest --no-daemon
-
- - name: Upload Android Test APK
- uses: actions/upload-artifact@v4
- with:
- name: app-debug-androidTest.apk
- path: testApp/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
-
- # Authenticate Cloud SDK
- - id: 'auth'
- uses: 'google-github-actions/auth@v2'
- with:
- credentials_json: ${{ secrets.GCP_CREDENTIALS }}
-
- - name: Setup Cloud SDK
- uses: google-github-actions/setup-gcloud@v2
- with:
- project_id: ${{ secrets.FIREBASE_PROJECT_ID }}
-
- - name: Run Instrumentation Tests in Firebase Test Lab
- run: |
- gcloud firebase test android run --type instrumentation \
- --app android/app/build/outputs/apk/debug/app-debug.apk \
- --test android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
- --use-orchestrator \
- --device model=MediumPhone.arm,version=33,locale=en,orientation=portrait \
- --num-flaky-test-attempts=3
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+
+ - name: Cache Node dependencies
+ uses: actions/cache@v4
+ with:
+ path: ~/.npm
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.os }}-node-
+
+ - name: Install bob
+ run: npm install -g react-native-builder-bob
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Cache Gradle Wrapper
+ uses: actions/cache@v4
+ with:
+ path: ~/.gradle/wrapper
+ key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
+
+ - name: Cache Gradle Dependencies
+ uses: actions/cache@v4
+ with:
+ path: ~/.gradle/caches
+ key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
+ restore-keys: |
+ ${{ runner.os }}-gradle-caches-
+
+ - name: Make Gradlew Executable
+ run: cd android && chmod +x ./gradlew
+
+ - name: Build Android App
+ run: |
+ npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
+ cd android && ./gradlew assembleDebug --no-daemon
+
+ - name: Upload Android App APK
+ uses: actions/upload-artifact@v4
+ with:
+ name: app-debug.apk
+ path: test/android/app/build/outputs/apk/debug/app-debug.apk
+
+ - name: Build Android Test
+ run: |
+ cd android && ./gradlew :app:assembleDebugAndroidTest --no-daemon
+
+ - name: Upload Android Test APK
+ uses: actions/upload-artifact@v4
+ with:
+ name: app-debug-androidTest.apk
+ path: test/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
+
+ # Authenticate Cloud SDK
+ - id: 'auth'
+ uses: 'google-github-actions/auth@v2'
+ with:
+ credentials_json: ${{ secrets.GCP_CREDENTIALS }}
+
+ - name: Setup Cloud SDK
+ uses: google-github-actions/setup-gcloud@v2
+ with:
+ project_id: ${{ secrets.FIREBASE_PROJECT_ID }}
+ install_components: 'beta'
+
+ - name: Run Instrumentation Tests in Firebase Test Lab
+ run: |
+ gcloud beta firebase test android run \
+ --type=instrumentation \
+ --app=android/app/build/outputs/apk/debug/app-debug.apk \
+ --test=android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
+ --device="model=MediumPhone.arm,version=34,locale=en,orientation=portrait" \
+ --test-targets="package io.didomi.reactnative.test" \
+ --results-history-name="${{ github.ref_name }}" \
+ --num-flaky-test-attempts=3 \
+ --num-uniform-shards=3 \
+ --use-orchestrator \
+ --quiet
ios:
needs: js
- runs-on: macos-12
+ runs-on: macos-14
defaults:
run:
- working-directory: testApp
+ working-directory: test
steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Setup Node
- uses: actions/setup-node@v4
- with:
- node-version: 20
- registry-url: 'https://registry.npmjs.org'
-
- - name: Cache node dependencies
- uses: actions/cache@v4
- with:
- path: ~/.npm
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-node-
-
- - name: Install dependencies
- run: yarn install
-
- - name: Install pods
- run: cd ios && pod install
-
- - name: Run iOS Tests
- run: |
- cp index.tsx index.js
- npx react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios/assets
- rm index.js
- cd ios && TEST=1 && RCT_NO_LAUNCH_PACKAGER=1 xcodebuild \
- -workspace DidomiExample.xcworkspace \
- -scheme DidomiExample \
- -sdk iphonesimulator \
- -destination "platform=iOS Simulator,name=iPhone 14" \
- clean test
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ registry-url: 'https://registry.npmjs.org'
+
+ - name: Cache Node dependencies
+ uses: actions/cache@v4
+ with:
+ path: ~/.npm
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.os }}-node-
+
+ - name: Install bob
+ run: npm install -g react-native-builder-bob
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Install pods
+ run: cd ios && pod install
+
+ - name: Run iOS Tests
+ run: |
+ npx react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios/assets
+ cd ios && TEST=1 && RCT_NO_LAUNCH_PACKAGER=1 xcodebuild \
+ -workspace "Didomi Tests.xcworkspace" \
+ -scheme "Didomi Tests" \
+ -sdk iphonesimulator \
+ -destination "platform=iOS Simulator,name=iPhone 15" \
+ clean test
diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml
index b250e1bb..e5ae0244 100644
--- a/.github/workflows/update.yml
+++ b/.github/workflows/update.yml
@@ -20,7 +20,7 @@ concurrency:
jobs:
update:
name: Update version and dependencies
- runs-on: macos-12 # required for pod info / update
+ runs-on: macos-14 # required for pod info / update
steps:
- name: Checkout
@@ -40,16 +40,16 @@ jobs:
with:
node-version: 20
- - name: Cache node dependencies
+ - name: Cache Node dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
-
+
- name: Install dependencies
- run: yarn install
+ run: npm install
- name: Update React Native SDK
run: |
diff --git a/.gitignore b/.gitignore
index 9394118a..13bc14b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,13 +2,6 @@
#
.DS_Store
-# XDE
-.expo/
-
-# VSCode
-.vscode/
-jsconfig.json
-
# Xcode
#
build/
@@ -27,47 +20,62 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
-project.xcworkspace
-
-# Xcode / tests
-#
-testApp/ios/main.jsbundle
+**/.xcode.env.local
-# Android/IJ
+# Android/IntelliJ
#
+build/
.idea
.gradle
local.properties
*.iml
*.hprof
-
-# Ruby / CocoaPods
-#
-testApp/ios/Pods
-testApp/vendor/bundle/
-sampleApp/ios/Pods
-sampleApp/vendor/bundle/
+.cxx/
+*.keystore
+!debug.keystore
# node.js
#
node_modules/
npm-debug.log
-yarn-debug.log
yarn-error.log
-# BUCK
-buck-out/
-\.buckd/
-android/app/libs
-android/keystores/debug.keystore
+# fastlane
+#
+# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
+# screenshots whenever they are needed.
+# For more information about the recommended setup visit:
+# https://docs.fastlane.tools/best-practices/source-control/
+
+**/fastlane/report.xml
+**/fastlane/Preview.html
+**/fastlane/screenshots
+**/fastlane/test_output
+
+# Bundle artifact
+*.jsbundle
+
+# Ruby / CocoaPods
+**/Pods/
+/vendor/bundle/
+
+# Temporary files created by Metro to check the health of the file watcher
+.metro-health-check*
+
+# testing
+/coverage
-# Expo
-.expo/*
+# Yarn
+.yarn/*
+!.yarn/patches
+!.yarn/plugins
+!.yarn/releases
+!.yarn/sdks
+!.yarn/versions
-# generated by bob
+# generated by sample / test
lib/
package-lock.json
Podfile.lock
yarn.lock
index.android.bundle
-app.json
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 006a45d3..5c5b7617 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,56 +4,58 @@ We want this community to be friendly and respectful to each other. Please follo
## Development workflow
-To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
+To get started with the project, run `npm install` in the root directory to install the required dependencies for each package:
```sh
-yarn
+npm install
```
-> While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development.
-
-While developing, you can run the [testApp app](/testApp/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the testApp app without a rebuild. If you change any native code, then you'll need to rebuild the testApp app.
+While developing, you can run the [test app](/test/) or [sample app](/sample/) to check your changes. Any changes you make in your library's JavaScript code will be reflected in the testApp app without a rebuild. If you change any native code, then you'll need to rebuild the test / sample app.
To start the packager:
```sh
-yarn testApp start
+npm install
```
-To run the testApp app on Android:
+To run the sample app on Android:
```sh
-yarn testApp android
+cd sample
+npx react-native run-android
```
-To run the testApp app on iOS:
+To run the sample app on iOS:
```sh
-yarn testApp ios
+cd sample
+cd ios && pod install
+cd ..
+npx react-native run-ios
```
Make sure your code passes TypeScript and ESLint. Run the following to verify:
```sh
-yarn typescript
-yarn lint
+npm run typescript
+npm run lint
```
To fix formatting errors, run the following:
```sh
-yarn lint --fix
+npm run lint --fix
```
Remember to add tests for your change if possible. Run the unit tests by:
```sh
-yarn test
+npm test
```
-To edit the Objective-C files, open `testApp/ios/DidomiExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-didomi`.
+To edit the Objective-C files, open `test/ios/Didomi Tets.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-didomi`.
-To edit the Kotlin files, open `testApp/android` in Android studio and find the source files at `reactnativedidomi` under `Android`.
+To edit the Kotlin files, open `test/android` in Android studio and find the source files at `reactnativedidomi` under `Android`.
### Commit message convention
@@ -74,30 +76,6 @@ Our pre-commit hooks verify that your commit message matches this format when co
We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing.
-Our pre-commit hooks verify that the linter and tests pass when committing.
-
-### Publishing to npm
-
-We use [release-it](https://github.com/release-it/release-it) to make it easier to publish new versions. It handles common tasks like bumping version based on semver, creating tags and releases etc.
-
-To publish new versions, run the following:
-
-```sh
-yarn release
-```
-
-### Scripts
-
-The `package.json` file contains various scripts for common tasks:
-
-- `yarn bootstrap`: setup project by installing all dependencies and pods.
-- `yarn typescript`: type-check files with TypeScript.
-- `yarn lint`: lint files with ESLint.
-- `yarn test`: run unit tests with Jest.
-- `yarn testApp start`: start the Metro server for the testApp app.
-- `yarn testApp android`: run the testApp app on Android.
-- `yarn testApp ios`: run the testApp app on iOS.
-
### Sending a pull request
> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
diff --git a/README.md b/README.md
index bc8acba0..e3279791 100644
--- a/README.md
+++ b/README.md
@@ -75,19 +75,19 @@ For complete instructions on installing and using the plugin, please read our do
## Example applications
-Sources contain 2 applications: ``/testApp`` (an app designed mostly for UI testing ) and ``/sampleApp`` (more human friendly app).
+Sources contain 2 applications: ``/test`` (an app designed mostly for UI testing ) and ``/sample`` (more human friendly app).
They can be run with:
```bash
-# testApp or sampleApp
-cd testApp
+# test or sample Application
+cd sample
cd ios && pod install
-yarn ios
-# or yarn android
+cd ..
+npx react-native run-ios
+# or npx react-native run-android
```
-
## Suggesting improvements
To file bugs, make feature requests, or to suggest other improvements, please use [Github's issue tracker](https://github.com/didomi/reat-native/issues).
diff --git a/android/build.gradle b/android/build.gradle
index d2b1fa56..db11cdc3 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -5,13 +5,12 @@ buildscript {
def kotlin_version = project.properties["Didomi_kotlinVersion"]
repositories {
- mavenCentral()
google()
+ mavenCentral()
}
dependencies {
- classpath "com.android.tools.build:gradle:7.0.4"
- // noinspection DifferentKotlinGradleVersion
+ classpath "com.android.tools.build:gradle:8.5.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@@ -30,13 +29,12 @@ def getExtOrIntegerDefault(name) {
def parsedPackage = new JsonSlurper().parseText(file("../package.json").text)
android {
- compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
- buildToolsVersion getExtOrDefault("buildToolsVersion")
- namespace "com.reactnativedidomi"
+ compileSdk getExtOrIntegerDefault("compileSdkVersion")
+ namespace "io.didomi.reactnative"
defaultConfig {
- minSdkVersion getExtOrIntegerDefault("minSdkVersion")
- targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
+ minSdk getExtOrIntegerDefault("minSdkVersion")
+ targetSdk getExtOrIntegerDefault("targetSdkVersion")
versionCode 1
versionName "${parsedPackage.version}"
@@ -58,8 +56,9 @@ android {
}
repositories {
- mavenCentral()
google()
+ mavenLocal()
+ mavenCentral()
def found = false
def defaultDir = null
diff --git a/android/gradle.properties b/android/gradle.properties
index 04a6e7f5..bb49d2f6 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,6 +1,6 @@
-Didomi_kotlinVersion=1.8.20
+Didomi_kotlinVersion=1.9.24
-Didomi_buildToolsVersion=33.0.2
-Didomi_compileSdkVersion=33
+Didomi_buildToolsVersion=34.0.0
+Didomi_compileSdkVersion=34
Didomi_minSdkVersion=21
-Didomi_targetSdkVersion=33
+Didomi_targetSdkVersion=34
diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar
index 7454180f..d64cd491 100644
Binary files a/android/gradle/wrapper/gradle-wrapper.jar and b/android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 669386b8..dedd5d1e 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
+networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/android/gradlew b/android/gradlew
index 1b6c7873..1aa94a42 100755
--- a/android/gradlew
+++ b/android/gradlew
@@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,11 @@ do
esac
done
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-APP_NAME="Gradle"
+# This is normally unused
+# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -133,22 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
+ fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi
-# Collect all arguments for the java command;
-# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
-# shell script including quotes and variable substitutions, so put them in
-# double quotes to make sure that they get re-expanded; and
-# * put everything else in single quotes, so that it's not re-expanded.
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
@@ -205,6 +214,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+ die "xargs is not available"
+fi
+
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
diff --git a/android/gradlew.bat b/android/gradlew.bat
index ac1b06f9..7101f8e4 100644
--- a/android/gradlew.bat
+++ b/android/gradlew.bat
@@ -14,7 +14,7 @@
@rem limitations under the License.
@rem
-@if "%DEBUG%" == "" @echo off
+@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -25,7 +25,8 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
+if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@@ -40,13 +41,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
+if %ERRORLEVEL% equ 0 goto execute
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
@@ -56,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end
@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
+if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index 58bf0254..cc947c56 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -1,2 +1 @@
-
+
diff --git a/android/src/main/java/com/reactnativedidomi/DidomiModule.kt b/android/src/main/java/io/didomi/reactnative/DidomiModule.kt
similarity index 99%
rename from android/src/main/java/com/reactnativedidomi/DidomiModule.kt
rename to android/src/main/java/io/didomi/reactnative/DidomiModule.kt
index b748d7e1..7254c895 100644
--- a/android/src/main/java/com/reactnativedidomi/DidomiModule.kt
+++ b/android/src/main/java/io/didomi/reactnative/DidomiModule.kt
@@ -1,6 +1,5 @@
@file:Suppress("unused")
-
-package com.reactnativedidomi
+package io.didomi.reactnative
import android.util.Log
import androidx.fragment.app.FragmentActivity
@@ -309,6 +308,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
map.putArray(entry.key, Arguments.makeNativeArray(listValues))
}
}
+
is Boolean -> map.putBoolean(entry.key, value)
is Int -> map.putInt(entry.key, value)
is Double -> map.putDouble(entry.key, value)
@@ -590,6 +590,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
}
@ReactMethod
+ @Deprecated("Use shouldUserStatusBeCollected instead", replaceWith = ReplaceWith("shouldUserStatusBeCollected()"))
fun isUserConsentStatusPartial(promise: Promise) {
try {
promise.resolve(Didomi.getInstance().isUserConsentStatusPartial)
@@ -1084,7 +1085,7 @@ class DidomiModule(reactContext: ReactApplicationContext) : ReactContextBaseJava
syncAcknowledgedCallbacks.remove(callbackIndex)
if (result != null) {
promise.resolve(result)
- } else {
+ } else {
promise.reject(java.lang.IllegalStateException("SyncAcknowledged: Native callback not found. The method can be called only once."))
}
}
diff --git a/android/src/main/java/com/reactnativedidomi/DidomiPackage.kt b/android/src/main/java/io/didomi/reactnative/DidomiPackage.kt
similarity index 94%
rename from android/src/main/java/com/reactnativedidomi/DidomiPackage.kt
rename to android/src/main/java/io/didomi/reactnative/DidomiPackage.kt
index 161b8296..1daa798e 100644
--- a/android/src/main/java/com/reactnativedidomi/DidomiPackage.kt
+++ b/android/src/main/java/io/didomi/reactnative/DidomiPackage.kt
@@ -1,11 +1,10 @@
-package com.reactnativedidomi
+package io.didomi.reactnative
import com.facebook.react.ReactPackage
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.uimanager.ViewManager
-
class DidomiPackage : ReactPackage {
override fun createNativeModules(reactContext: ReactApplicationContext): List {
return listOf(DidomiModule(reactContext))
diff --git a/android/src/main/java/com/reactnativedidomi/EventTypes.kt b/android/src/main/java/io/didomi/reactnative/EventTypes.kt
similarity index 98%
rename from android/src/main/java/com/reactnativedidomi/EventTypes.kt
rename to android/src/main/java/io/didomi/reactnative/EventTypes.kt
index 3a232e84..47579ccc 100644
--- a/android/src/main/java/com/reactnativedidomi/EventTypes.kt
+++ b/android/src/main/java/io/didomi/reactnative/EventTypes.kt
@@ -1,13 +1,15 @@
-package com.reactnativedidomi
+package io.didomi.reactnative
enum class EventTypes(val event: String) {
// Consent
CONSENT_CHANGED("on_consent_changed"),
+
// SDK lifecycle events
ERROR("on_error"),
ERROR_CALLBACK("on_error_callback"),
READY("on_ready"),
READY_CALLBACK("on_ready_callback"),
+
// Notice
HIDE_NOTICE("on_hide_notice"),
SHOW_NOTICE("on_show_notice"),
@@ -17,13 +19,16 @@ enum class EventTypes(val event: String) {
NOTICE_CLICK_VIEW_SPI_PURPOSES("on_notice_click_view_spi_purposes"),
NOTICE_CLICK_MORE_INFO("on_notice_click_more_info"),
NOTICE_CLICK_PRIVACY_POLICY("on_notice_click_privacy_policy"),
+
// Preferences
HIDE_PREFERENCES("on_hide_preferences"),
SHOW_PREFERENCES("on_show_preferences"),
+
// Preferences - Views
PREFERENCES_CLICK_VIEW_PURPOSES("on_preferences_click_view_purposes"),
PREFERENCES_CLICK_VIEW_VENDORS("on_preferences_click_view_vendors"),
PREFERENCES_CLICK_VIEW_SPI_PURPOSES("on_preferences_click_view_spi_purposes"),
+
// Preferences - Purpose
PREFERENCES_CLICK_AGREE_TO_ALL("on_preferences_click_agree_to_all"),
PREFERENCES_CLICK_DISAGREE_TO_ALL("on_preferences_click_disagree_to_all"),
@@ -35,25 +40,30 @@ enum class EventTypes(val event: String) {
PREFERENCES_CLICK_CATEGORY_AGREE("on_preferences_click_category_agree"),
PREFERENCES_CLICK_CATEGORY_DISAGREE("on_preferences_click_category_disagree"),
PREFERENCES_CLICK_SAVE_CHOICES("on_preferences_click_save_choices"),
+
// Preferences - Vendor
PREFERENCES_CLICK_AGREE_TO_ALL_VENDORS("on_preferences_click_agree_to_all_vendors"),
PREFERENCES_CLICK_DISAGREE_TO_ALL_VENDORS("on_preferences_click_disagree_to_all_vendors"),
PREFERENCES_CLICK_VENDOR_AGREE("on_preferences_click_vendor_agree"),
PREFERENCES_CLICK_VENDOR_DISAGREE("on_preferences_click_vendor_disagree"),
PREFERENCES_CLICK_VENDOR_SAVE_CHOICES("on_preferences_click_vendor_save_choices"),
+
// Preferences - Sensitive Personal Information
PREFERENCES_CLICK_SPI_PURPOSE_AGREE("on_preferences_click_spi_purpose_agree"),
PREFERENCES_CLICK_SPI_PURPOSE_DISAGREE("on_preferences_click_spi_purpose_disagree"),
PREFERENCES_CLICK_SPI_CATEGORY_AGREE("on_preferences_click_spi_category_agree"),
PREFERENCES_CLICK_SPI_CATEGORY_DISAGREE("on_preferences_click_spi_category_disagree"),
PREFERENCES_CLICK_SPI_PURPOSE_SAVE_CHOICES("on_preferences_click_spi_purpose_save_choices"),
+
// Sync
SYNC_DONE("on_sync_done"),
SYNC_READY("on_sync_ready"),
SYNC_ERROR("on_sync_error"),
+
// Language
LANGUAGE_UPDATED("on_language_updated"),
LANGUAGE_UPDATE_FAILED("on_language_update_failed"),
+
// Vendor Status
VENDOR_STATUS_CHANGE_PREFIX("on_vendor_status_change_");
}
diff --git a/babel.config.js b/babel.config.js
index f842b77f..f7b3da3b 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -1,3 +1,3 @@
module.exports = {
- presets: ['module:metro-react-native-babel-preset'],
+ presets: ['module:@react-native/babel-preset'],
};
diff --git a/package.json b/package.json
index cb5269f0..896c8ce7 100644
--- a/package.json
+++ b/package.json
@@ -14,24 +14,24 @@
"ios",
"cpp",
"react-native-didomi.podspec",
- "!lib/typescript/testApp",
- "!lib/typescript/sampleApp",
+ "!lib/typescript/sample",
+ "!lib/typescript/test",
"!android/build",
"!ios/build",
"!**/__tests__",
"!**/__fixtures__",
"!**/__mocks__"
],
+ "workspaces": [
+ ".",
+ "sample",
+ "test"
+ ],
"scripts": {
"test": "jest",
"typescript": "tsc --noEmit",
- "lint": "eslint --quiet \"**/*.{js,ts,tsx}\"",
"prepare": "bob build",
- "release": "release-it",
- "testApp": "yarn --cwd testApp",
- "sampleApp": "yarn --cwd sampleApp",
- "pods": "cd testApp && pod-install --quiet",
- "bootstrap": "yarn testApp && yarn sampleApp && yarn && yarn && yarn pods"
+ "pods": "cd test && pod-install --quiet"
},
"keywords": [
"react-native",
@@ -40,7 +40,7 @@
],
"repository": {
"type": "git",
- "url": "https://github.com/didomi/react-native"
+ "url": "git+https://github.com/didomi/react-native.git"
},
"author": "Didomi",
"license": "BSD-3",
@@ -49,25 +49,17 @@
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
- "@commitlint/config-conventional": "^11.0.0",
- "@react-native-community/eslint-config": "^2.0.0",
- "@release-it/conventional-changelog": "^2.0.0",
+ "@rnx-kit/metro-config": "^1.3.15",
"@types/jest": "^26.0.0",
- "@types/react": "^16.9.19",
- "@types/react-native": "0.62.13",
- "commitlint": "^11.0.0",
- "eslint": "^7.32.0",
- "eslint-config-prettier": "^7.0.0",
- "eslint-plugin-prettier": "^3.1.3",
- "husky": "^4.2.5",
- "jest": "^26.6.3",
- "pod-install": "^0.1.0",
- "prettier": "^2.0.5",
- "react": "17.0.2",
- "react-native": "0.68.5",
- "react-native-builder-bob": "^0.18.0",
- "release-it": "^14.2.2",
- "typescript": "^4.1.3"
+ "@types/react": "^18.3.3",
+ "jest": "^29.7.0",
+ "metro-config": "^0.80.9",
+ "pod-install": "^0.2.2",
+ "react": "18.2.0",
+ "react-native": "0.73.8",
+ "react-native-builder-bob": "^0.29.1",
+ "react-native-monorepo-tools": "^1.2.1",
+ "typescript": "^5.0.4"
},
"peerDependencies": {
"react": "*",
@@ -76,68 +68,11 @@
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
- "/testApp/node_modules",
+ "/sample/node_modules",
+ "/test/node_modules",
"/lib/"
]
},
- "husky": {
- "hooks": {
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
- "pre-commit": "yarn lint && yarn typescript"
- }
- },
- "commitlint": {
- "extends": [
- "@commitlint/config-conventional"
- ]
- },
- "release-it": {
- "git": {
- "commitMessage": "chore: release ${version}",
- "tagName": "v${version}"
- },
- "npm": {
- "publish": true
- },
- "github": {
- "release": true
- },
- "plugins": {
- "@release-it/conventional-changelog": {
- "preset": "angular"
- }
- }
- },
- "eslintConfig": {
- "root": true,
- "extends": [
- "@react-native-community",
- "prettier"
- ],
- "rules": {
- "prettier/prettier": [
- "error",
- {
- "quoteProps": "consistent",
- "singleQuote": true,
- "tabWidth": 2,
- "trailingComma": "es5",
- "useTabs": false
- }
- ]
- }
- },
- "eslintIgnore": [
- "node_modules/",
- "lib/"
- ],
- "prettier": {
- "quoteProps": "consistent",
- "singleQuote": true,
- "tabWidth": 2,
- "trailingComma": "es5",
- "useTabs": false
- },
"react-native-builder-bob": {
"source": "src",
"output": "lib",
diff --git a/sampleApp/.bundle/config b/sample/.bundle/config
similarity index 100%
rename from sampleApp/.bundle/config
rename to sample/.bundle/config
diff --git a/sample/.eslintrc.js b/sample/.eslintrc.js
new file mode 100644
index 00000000..187894b6
--- /dev/null
+++ b/sample/.eslintrc.js
@@ -0,0 +1,4 @@
+module.exports = {
+ root: true,
+ extends: '@react-native',
+};
diff --git a/sample/.gitignore b/sample/.gitignore
new file mode 100644
index 00000000..d5ae4566
--- /dev/null
+++ b/sample/.gitignore
@@ -0,0 +1,74 @@
+# OSX
+#
+.DS_Store
+
+# Xcode
+#
+build/
+*.pbxuser
+!default.pbxuser
+*.mode1v3
+!default.mode1v3
+*.mode2v3
+!default.mode2v3
+*.perspectivev3
+!default.perspectivev3
+xcuserdata
+*.xccheckout
+*.moved-aside
+DerivedData
+*.hmap
+*.ipa
+*.xcuserstate
+**/.xcode.env.local
+
+# Android/IntelliJ
+#
+build/
+.idea
+.gradle
+local.properties
+*.iml
+*.hprof
+.cxx/
+*.keystore
+!debug.keystore
+
+# node.js
+#
+node_modules/
+npm-debug.log
+yarn-error.log
+
+# fastlane
+#
+# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
+# screenshots whenever they are needed.
+# For more information about the recommended setup visit:
+# https://docs.fastlane.tools/best-practices/source-control/
+
+**/fastlane/report.xml
+**/fastlane/Preview.html
+**/fastlane/screenshots
+**/fastlane/test_output
+
+# Bundle artifact
+*.jsbundle
+
+# Ruby / CocoaPods
+**/Pods/
+/vendor/bundle/
+
+# Temporary files created by Metro to check the health of the file watcher
+.metro-health-check*
+
+# testing
+/coverage
+
+# Yarn
+.yarn/*
+!.yarn/patches
+!.yarn/plugins
+!.yarn/releases
+!.yarn/sdks
+!.yarn/versions
diff --git a/sample/.prettierrc.js b/sample/.prettierrc.js
new file mode 100644
index 00000000..2b540746
--- /dev/null
+++ b/sample/.prettierrc.js
@@ -0,0 +1,7 @@
+module.exports = {
+ arrowParens: 'avoid',
+ bracketSameLine: true,
+ bracketSpacing: false,
+ singleQuote: true,
+ trailingComma: 'all',
+};
diff --git a/sample/.watchmanconfig b/sample/.watchmanconfig
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/sample/.watchmanconfig
@@ -0,0 +1 @@
+{}
diff --git a/sample/Gemfile b/sample/Gemfile
new file mode 100644
index 00000000..8d72c37a
--- /dev/null
+++ b/sample/Gemfile
@@ -0,0 +1,9 @@
+source 'https://rubygems.org'
+
+# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
+ruby ">= 2.6.10"
+
+# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
+# bound in the template on Cocoapods with next React Native release.
+gem 'cocoapods', '>= 1.13', '< 1.15'
+gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
diff --git a/sample/Gemfile.lock b/sample/Gemfile.lock
new file mode 100644
index 00000000..704f6715
--- /dev/null
+++ b/sample/Gemfile.lock
@@ -0,0 +1,107 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ CFPropertyList (3.0.7)
+ base64
+ nkf
+ rexml
+ activesupport (6.1.7.8)
+ concurrent-ruby (~> 1.0, >= 1.0.2)
+ i18n (>= 1.6, < 2)
+ minitest (>= 5.1)
+ tzinfo (~> 2.0)
+ zeitwerk (~> 2.3)
+ addressable (2.8.7)
+ public_suffix (>= 2.0.2, < 7.0)
+ algoliasearch (1.27.5)
+ httpclient (~> 2.8, >= 2.8.3)
+ json (>= 1.5.1)
+ atomos (0.1.3)
+ base64 (0.2.0)
+ claide (1.1.0)
+ cocoapods (1.14.3)
+ addressable (~> 2.8)
+ claide (>= 1.0.2, < 2.0)
+ cocoapods-core (= 1.14.3)
+ cocoapods-deintegrate (>= 1.0.3, < 2.0)
+ cocoapods-downloader (>= 2.1, < 3.0)
+ cocoapods-plugins (>= 1.0.0, < 2.0)
+ cocoapods-search (>= 1.0.0, < 2.0)
+ cocoapods-trunk (>= 1.6.0, < 2.0)
+ cocoapods-try (>= 1.1.0, < 2.0)
+ colored2 (~> 3.1)
+ escape (~> 0.0.4)
+ fourflusher (>= 2.3.0, < 3.0)
+ gh_inspector (~> 1.0)
+ molinillo (~> 0.8.0)
+ nap (~> 1.0)
+ ruby-macho (>= 2.3.0, < 3.0)
+ xcodeproj (>= 1.23.0, < 2.0)
+ cocoapods-core (1.14.3)
+ activesupport (>= 5.0, < 8)
+ addressable (~> 2.8)
+ algoliasearch (~> 1.0)
+ concurrent-ruby (~> 1.1)
+ fuzzy_match (~> 2.0.4)
+ nap (~> 1.0)
+ netrc (~> 0.11)
+ public_suffix (~> 4.0)
+ typhoeus (~> 1.0)
+ cocoapods-deintegrate (1.0.5)
+ cocoapods-downloader (2.1)
+ cocoapods-plugins (1.0.0)
+ nap
+ cocoapods-search (1.0.1)
+ cocoapods-trunk (1.6.0)
+ nap (>= 0.8, < 2.0)
+ netrc (~> 0.11)
+ cocoapods-try (1.2.0)
+ colored2 (3.1.2)
+ concurrent-ruby (1.3.3)
+ escape (0.0.4)
+ ethon (0.16.0)
+ ffi (>= 1.15.0)
+ ffi (1.17.0)
+ fourflusher (2.3.1)
+ fuzzy_match (2.0.4)
+ gh_inspector (1.1.3)
+ httpclient (2.8.3)
+ i18n (1.14.5)
+ concurrent-ruby (~> 1.0)
+ json (2.7.2)
+ minitest (5.24.1)
+ molinillo (0.8.0)
+ nanaimo (0.3.0)
+ nap (1.1.0)
+ netrc (0.11.0)
+ nkf (0.2.0)
+ public_suffix (4.0.7)
+ rexml (3.2.9)
+ strscan
+ ruby-macho (2.5.1)
+ strscan (3.1.0)
+ typhoeus (1.4.1)
+ ethon (>= 0.9.0)
+ tzinfo (2.0.6)
+ concurrent-ruby (~> 1.0)
+ xcodeproj (1.24.0)
+ CFPropertyList (>= 2.3.3, < 4.0)
+ atomos (~> 0.1.3)
+ claide (>= 1.0.2, < 2.0)
+ colored2 (~> 3.1)
+ nanaimo (~> 0.3.0)
+ rexml (~> 3.2.4)
+ zeitwerk (2.6.17)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ activesupport (>= 6.1.7.5, < 7.1.0)
+ cocoapods (>= 1.13, < 1.15)
+
+RUBY VERSION
+ ruby 2.6.10p210
+
+BUNDLED WITH
+ 2.4.10
diff --git a/sample/README.md b/sample/README.md
new file mode 100644
index 00000000..12470c30
--- /dev/null
+++ b/sample/README.md
@@ -0,0 +1,79 @@
+This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
+
+# Getting Started
+
+>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
+
+## Step 1: Start the Metro Server
+
+First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.
+
+To start Metro, run the following command from the _root_ of your React Native project:
+
+```bash
+# using npm
+npm start
+
+# OR using Yarn
+yarn start
+```
+
+## Step 2: Start your Application
+
+Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:
+
+### For Android
+
+```bash
+# using npm
+npm run android
+
+# OR using Yarn
+yarn android
+```
+
+### For iOS
+
+```bash
+# using npm
+npm run ios
+
+# OR using Yarn
+yarn ios
+```
+
+If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
+
+This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
+
+## Step 3: Modifying your App
+
+Now that you have successfully run the app, let's modify it.
+
+1. Open `App.tsx` in your text editor of choice and edit some lines.
+2. For **Android**: Press the R key twice or select **"Reload"** from the **Developer Menu** (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes!
+
+ For **iOS**: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes!
+
+## Congratulations! :tada:
+
+You've successfully run and modified your React Native App. :partying_face:
+
+### Now what?
+
+- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
+- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).
+
+# Troubleshooting
+
+If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
+
+# Learn More
+
+To learn more about React Native, take a look at the following resources:
+
+- [React Native Website](https://reactnative.dev) - learn more about React Native.
+- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
+- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
+- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
+- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
diff --git a/sample/android/app/build.gradle b/sample/android/app/build.gradle
new file mode 100644
index 00000000..66ecef7a
--- /dev/null
+++ b/sample/android/app/build.gradle
@@ -0,0 +1,123 @@
+apply plugin: "com.android.application"
+apply plugin: "org.jetbrains.kotlin.android"
+apply plugin: "com.facebook.react"
+
+/**
+ * This is the configuration block to customize your React Native Android app.
+ * By default you don't need to apply any configuration, just uncomment the lines you need.
+ */
+react {
+ /* Folders */
+ // The root of your project, i.e. where "package.json" lives. Default is '..'
+ // root = file("../")
+ // The folder where the react-native NPM package is. Default is ../node_modules/react-native
+ // reactNativeDir = file("../node_modules/react-native")
+ // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
+ // codegenDir = file("../node_modules/@react-native/codegen")
+ // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
+ // cliFile = file("../node_modules/react-native/cli.js")
+
+ /* Variants */
+ // The list of variants to that are debuggable. For those we're going to
+ // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
+ // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
+ // debuggableVariants = ["liteDebug", "prodDebug"]
+
+ /* Bundling */
+ // A list containing the node command and its flags. Default is just 'node'.
+ // nodeExecutableAndArgs = ["node"]
+ //
+ // The command to run when bundling. By default is 'bundle'
+ // bundleCommand = "ram-bundle"
+ //
+ // The path to the CLI configuration file. Default is empty.
+ // bundleConfig = file(../rn-cli.config.js)
+ //
+ // The name of the generated asset file containing your JS bundle
+ // bundleAssetName = "MyApplication.android.bundle"
+ //
+ // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
+ // entryFile = file("../js/MyApplication.android.js")
+ //
+ // A list of extra flags to pass to the 'bundle' commands.
+ // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
+ // extraPackagerArgs = []
+
+ /* Hermes Commands */
+ // The hermes compiler command to run. By default it is 'hermesc'
+ // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
+ //
+ // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
+ // hermesFlags = ["-O", "-output-source-map"]
+}
+
+/**
+ * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
+ */
+def enableProguardInReleaseBuilds = false
+
+/**
+ * The preferred build flavor of JavaScriptCore (JSC)
+ *
+ * For example, to use the international variant, you can use:
+ * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
+ *
+ * The international variant includes ICU i18n library and necessary data
+ * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
+ * give correct results when using with locales other than en-US. Note that
+ * this variant is about 6MiB larger per architecture than default.
+ */
+def jscFlavor = 'org.webkit:android-jsc:+'
+
+android {
+ ndkVersion rootProject.ext.ndkVersion
+ compileSdk rootProject.ext.compileSdkVersion
+
+ namespace "io.didomi.reactnative.sample"
+ defaultConfig {
+ applicationId "io.didomi.reactnative.sample"
+ minSdkVersion rootProject.ext.minSdkVersion
+ targetSdkVersion rootProject.ext.targetSdkVersion
+ versionCode 1
+ versionName "1.0"
+ }
+ signingConfigs {
+ debug {
+ storeFile file('debug.keystore')
+ storePassword 'android'
+ keyAlias 'androiddebugkey'
+ keyPassword 'android'
+ }
+ }
+ buildTypes {
+ debug {
+ signingConfig signingConfigs.debug
+ }
+ release {
+ // Caution! In production, you need to generate your own keystore file.
+ // see https://reactnative.dev/docs/signed-apk-android.
+ signingConfig signingConfigs.debug
+ minifyEnabled enableProguardInReleaseBuilds
+ proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
+ }
+ }
+}
+
+repositories {
+ google()
+ mavenLocal()
+ mavenCentral()
+}
+
+dependencies {
+ // The version of react-native is set by the React Native Gradle Plugin
+ implementation("com.facebook.react:react-android")
+
+ if (hermesEnabled.toBoolean()) {
+ implementation("com.facebook.react:hermes-android")
+ } else {
+ implementation jscFlavor
+ }
+}
+
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
diff --git a/sampleApp/android/app/debug.keystore b/sample/android/app/debug.keystore
similarity index 100%
rename from sampleApp/android/app/debug.keystore
rename to sample/android/app/debug.keystore
diff --git a/sample/android/app/proguard-rules.pro b/sample/android/app/proguard-rules.pro
new file mode 100644
index 00000000..11b02572
--- /dev/null
+++ b/sample/android/app/proguard-rules.pro
@@ -0,0 +1,10 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
diff --git a/sampleApp/android/app/src/debug/AndroidManifest.xml b/sample/android/app/src/debug/AndroidManifest.xml
similarity index 51%
rename from sampleApp/android/app/src/debug/AndroidManifest.xml
rename to sample/android/app/src/debug/AndroidManifest.xml
index b32d4212..12e4b4a5 100644
--- a/sampleApp/android/app/src/debug/AndroidManifest.xml
+++ b/sample/android/app/src/debug/AndroidManifest.xml
@@ -2,14 +2,8 @@
-
-
-
-
+ tools:targetApi="28" />
diff --git a/testApp/android/app/src/main/AndroidManifest.xml b/sample/android/app/src/main/AndroidManifest.xml
similarity index 86%
rename from testApp/android/app/src/main/AndroidManifest.xml
rename to sample/android/app/src/main/AndroidManifest.xml
index 6e9332e1..b69cb2c0 100644
--- a/testApp/android/app/src/main/AndroidManifest.xml
+++ b/sample/android/app/src/main/AndroidManifest.xml
@@ -1,5 +1,6 @@
-
+
+
+
-
-
-
diff --git a/sample/android/app/src/main/assets/didomi_config.json b/sample/android/app/src/main/assets/didomi_config.json
new file mode 100644
index 00000000..f69392ff
--- /dev/null
+++ b/sample/android/app/src/main/assets/didomi_config.json
@@ -0,0 +1,29 @@
+{
+ "app": {
+ "name": "Didomi Sample",
+ "privacyPolicyURL": "http://www.website.com/privacy",
+ "vendors": {
+ "didomi": [
+ "google",
+ "amazon",
+ "facebook",
+ "twitter"
+ ],
+ "iab": {
+ "version": 2,
+ "all": true
+ }
+ },
+ "gdprAppliesGlobally": true,
+ "gdprAppliesWhenUnknown": true,
+ "country": "fr"
+ },
+ "languages": {
+ "enabled": [
+ "fr",
+ "en",
+ "es"
+ ],
+ "default": "fr"
+ }
+}
diff --git a/sample/android/app/src/main/java/io/didomi/reactnative/sample/MainActivity.kt b/sample/android/app/src/main/java/io/didomi/reactnative/sample/MainActivity.kt
new file mode 100644
index 00000000..5f72441e
--- /dev/null
+++ b/sample/android/app/src/main/java/io/didomi/reactnative/sample/MainActivity.kt
@@ -0,0 +1,22 @@
+package io.didomi.reactnative.sample
+
+import com.facebook.react.ReactActivity
+import com.facebook.react.ReactActivityDelegate
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
+import com.facebook.react.defaults.DefaultReactActivityDelegate
+
+class MainActivity : ReactActivity() {
+
+ /**
+ * Returns the name of the main component registered from JavaScript. This is used to schedule
+ * rendering of the component.
+ */
+ override fun getMainComponentName(): String = "sample"
+
+ /**
+ * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
+ * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
+ */
+ override fun createReactActivityDelegate(): ReactActivityDelegate =
+ DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
+}
diff --git a/sample/android/app/src/main/java/io/didomi/reactnative/sample/MainApplication.kt b/sample/android/app/src/main/java/io/didomi/reactnative/sample/MainApplication.kt
new file mode 100644
index 00000000..95986baf
--- /dev/null
+++ b/sample/android/app/src/main/java/io/didomi/reactnative/sample/MainApplication.kt
@@ -0,0 +1,39 @@
+package io.didomi.reactnative.sample
+
+import android.app.Application
+import com.facebook.react.*
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
+import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
+import com.facebook.react.defaults.DefaultReactNativeHost
+import com.facebook.soloader.SoLoader
+
+class MainApplication : Application(), ReactApplication {
+
+ override val reactNativeHost: ReactNativeHost =
+ object : DefaultReactNativeHost(this) {
+ override fun getPackages(): List =
+ PackageList(this).packages.apply {
+ // Packages that cannot be autolinked yet can be added manually here, for example:
+ // add(MyReactNativePackage())
+ }
+
+ override fun getJSMainModuleName(): String = "index"
+
+ override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
+
+ override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
+ override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
+ }
+
+ override val reactHost: ReactHost
+ get() = getDefaultReactHost(applicationContext, reactNativeHost)
+
+ override fun onCreate() {
+ super.onCreate()
+ SoLoader.init(this, false)
+ if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
+ // If you opted-in for the New Architecture, we load the native entry point for this app.
+ load()
+ }
+ }
+}
diff --git a/sampleApp/android/app/src/main/res/drawable/rn_edit_text_material.xml b/sample/android/app/src/main/res/drawable/rn_edit_text_material.xml
similarity index 98%
rename from sampleApp/android/app/src/main/res/drawable/rn_edit_text_material.xml
rename to sample/android/app/src/main/res/drawable/rn_edit_text_material.xml
index f35d9962..5c25e728 100644
--- a/sampleApp/android/app/src/main/res/drawable/rn_edit_text_material.xml
+++ b/sample/android/app/src/main/res/drawable/rn_edit_text_material.xml
@@ -17,10 +17,11 @@
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
android:insetTop="@dimen/abc_edit_text_inset_top_material"
- android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
+ android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
+ >
-
- Reset
- SetupUi
- SetLogLevel
- HideNotice
- HidePreferences
- ShowNotice
- ShowPreferences Purposes
- ShowPreferences Vendors
-
- GetDisabledPurposes
- GetDisabledPurposeIds
- GetDisabledVendors
- GetDisabledVendorIds
- GetEnabledPurposes
- GetEnabledPurposeId
- GetEnabledVendors
- GetEnabledVendorIds
-
-
-
-
diff --git a/sampleApp/android/build.gradle b/sampleApp/android/build.gradle
deleted file mode 100644
index 8b22fcb8..00000000
--- a/sampleApp/android/build.gradle
+++ /dev/null
@@ -1,56 +0,0 @@
-import org.apache.tools.ant.taskdefs.condition.Os
-
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext.kotlin_version = "1.8.20"
- ext {
- buildToolsVersion = "33.0.2"
- minSdkVersion = 21
- compileSdkVersion = 33
- targetSdkVersion = 33
- if (System.properties['os.arch'] == "aarch64") {
- // For M1 Users we need to use the NDK 24 which added support for aarch64
- ndkVersion = "24.0.8215888"
- } else {
- // Otherwise we default to the side-by-side NDK version from AGP.
-// ndkVersion = "25.1.8937393"
- ndkVersion = "21.4.7075529"
- }
- }
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- classpath("com.android.tools.build:gradle:7.4.2")
- classpath("com.facebook.react:react-native-gradle-plugin")
- classpath("de.undercouch:gradle-download-task:4.1.2")
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- classpath("com.google.gms:google-services:4.3.14")
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
- }
-}
-
-allprojects {
- repositories {
- maven {
- // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
- url("$rootDir/../node_modules/react-native/android")
- }
- maven {
- // Android JSC is installed from npm
- url("$rootDir/../node_modules/jsc-android/dist")
- }
- mavenCentral {
- // We don't want to fetch react-native from Maven Central as there are
- // older versions over there.
- content {
- excludeGroup "com.facebook.react"
- }
- }
- google()
- maven { url 'https://www.jitpack.io' }
- }
-}
diff --git a/sampleApp/android/gradle/wrapper/gradle-wrapper.jar b/sampleApp/android/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 249e5832..00000000
Binary files a/sampleApp/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/sampleApp/android/settings.gradle b/sampleApp/android/settings.gradle
deleted file mode 100644
index 57b0deee..00000000
--- a/sampleApp/android/settings.gradle
+++ /dev/null
@@ -1,13 +0,0 @@
-rootProject.name = 'Didomi Sample'
-apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
-include ':app'
-
-includeBuild('../node_modules/react-native-gradle-plugin')
-
-if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
- include(":ReactAndroid")
- project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
-}
-
-include ':reactnativedidomi'
-project(':reactnativedidomi').projectDir = file('../../android')
diff --git a/sampleApp/app.json b/sampleApp/app.json
deleted file mode 100644
index 715fe140..00000000
--- a/sampleApp/app.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "DidomiExample",
- "displayName": "Didomi Sample App"
-}
diff --git a/sampleApp/babel.config.js b/sampleApp/babel.config.js
deleted file mode 100644
index adea77bd..00000000
--- a/sampleApp/babel.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const path = require('path');
-const pak = require('../package.json');
-
-module.exports = {
- presets: ['module:metro-react-native-babel-preset'],
- plugins: [
- [
- 'module-resolver',
- {
- extensions: ['.tsx', '.ts', '.js', '.json'],
- alias: {
- [pak.name]: path.join(__dirname, '..', pak.source),
- },
- },
- ],
- ],
-};
diff --git a/sampleApp/index.tsx b/sampleApp/index.tsx
deleted file mode 100644
index 117ddcae..00000000
--- a/sampleApp/index.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { AppRegistry } from 'react-native';
-import App from './src/App';
-import { name as appName } from './app.json';
-
-AppRegistry.registerComponent(appName, () => App);
diff --git a/sampleApp/ios/DidomiExample-Bridging-Header.h b/sampleApp/ios/DidomiExample-Bridging-Header.h
deleted file mode 100644
index e11d920b..00000000
--- a/sampleApp/ios/DidomiExample-Bridging-Header.h
+++ /dev/null
@@ -1,3 +0,0 @@
-//
-// Use this file to import your target's public headers that you would like to expose to Swift.
-//
diff --git a/sampleApp/ios/DidomiExample.xcodeproj/project.pbxproj b/sampleApp/ios/DidomiExample.xcodeproj/project.pbxproj
deleted file mode 100644
index 6a636be7..00000000
--- a/sampleApp/ios/DidomiExample.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,501 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 54;
- objects = {
-
-/* Begin PBXBuildFile section */
- 0C80B921A6F3F58F76C31292 /* libPods-DidomiExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-DidomiExample.a */; };
- 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
- 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
- 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
- 1416C51B265E47DC00C8B95E /* didomi_config.json in Resources */ = {isa = PBXBuildFile; fileRef = 1416C51A265E47DC00C8B95E /* didomi_config.json */; };
- 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 13B07F961A680F5B00A75B9A /* DidomiExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DidomiExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = DidomiExample/AppDelegate.h; sourceTree = ""; };
- 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = DidomiExample/AppDelegate.mm; sourceTree = ""; };
- 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = DidomiExample/Images.xcassets; sourceTree = ""; };
- 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = DidomiExample/Info.plist; sourceTree = ""; };
- 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = DidomiExample/main.m; sourceTree = ""; };
- 1416C51A265E47DC00C8B95E /* didomi_config.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = didomi_config.json; sourceTree = ""; };
- 3B4392A12AC88292D35C810B /* Pods-DidomiExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DidomiExample.debug.xcconfig"; path = "Target Support Files/Pods-DidomiExample/Pods-DidomiExample.debug.xcconfig"; sourceTree = ""; };
- 5709B34CF0A7D63546082F79 /* Pods-DidomiExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DidomiExample.release.xcconfig"; path = "Target Support Files/Pods-DidomiExample/Pods-DidomiExample.release.xcconfig"; sourceTree = ""; };
- 5DCACB8F33CDC322A6C60F78 /* libPods-DidomiExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-DidomiExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
- 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = DidomiExample/LaunchScreen.storyboard; sourceTree = ""; };
- ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 0C80B921A6F3F58F76C31292 /* libPods-DidomiExample.a in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 13B07FAE1A68108700A75B9A /* DidomiExample */ = {
- isa = PBXGroup;
- children = (
- 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
- 13B07FB01A68108700A75B9A /* AppDelegate.mm */,
- 13B07FB51A68108700A75B9A /* Images.xcassets */,
- 13B07FB61A68108700A75B9A /* Info.plist */,
- 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
- 13B07FB71A68108700A75B9A /* main.m */,
- );
- name = DidomiExample;
- sourceTree = "";
- };
- 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
- 5DCACB8F33CDC322A6C60F78 /* libPods-DidomiExample.a */,
- );
- name = Frameworks;
- sourceTree = "";
- };
- 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
- isa = PBXGroup;
- children = (
- );
- name = Libraries;
- sourceTree = "";
- };
- 83CBB9F61A601CBA00E9B192 = {
- isa = PBXGroup;
- children = (
- 1416C51A265E47DC00C8B95E /* didomi_config.json */,
- 13B07FAE1A68108700A75B9A /* DidomiExample */,
- 832341AE1AAA6A7D00B99B32 /* Libraries */,
- 2D16E6871FA4F8E400B85C8A /* Frameworks */,
- BBD78D7AC51CEA395F1C20DB /* Pods */,
- );
- indentWidth = 2;
- sourceTree = "";
- tabWidth = 2;
- usesTabs = 0;
- };
- 83CBBA001A601CBA00E9B192 /* Products */ = {
- isa = PBXGroup;
- children = (
- 13B07F961A680F5B00A75B9A /* DidomiExample.app */,
- );
- name = Products;
- sourceTree = "";
- };
- BBD78D7AC51CEA395F1C20DB /* Pods */ = {
- isa = PBXGroup;
- children = (
- 3B4392A12AC88292D35C810B /* Pods-DidomiExample.debug.xcconfig */,
- 5709B34CF0A7D63546082F79 /* Pods-DidomiExample.release.xcconfig */,
- );
- path = Pods;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 13B07F861A680F5B00A75B9A /* DidomiExample */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "DidomiExample" */;
- buildPhases = (
- C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
- FD10A7F022414F080027D42C /* Start Packager */,
- 13B07F871A680F5B00A75B9A /* Sources */,
- 13B07F8C1A680F5B00A75B9A /* Frameworks */,
- 13B07F8E1A680F5B00A75B9A /* Resources */,
- 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
- 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */,
- E235C05ADACE081382539298 /* [CP] Copy Pods Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = DidomiExample;
- productName = DidomiExample;
- productReference = 13B07F961A680F5B00A75B9A /* DidomiExample.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 83CBB9F71A601CBA00E9B192 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- BuildIndependentTargetsInParallel = YES;
- LastUpgradeCheck = 1210;
- TargetAttributes = {
- 13B07F861A680F5B00A75B9A = {
- LastSwiftMigration = 1120;
- };
- };
- };
- buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "DidomiExample" */;
- compatibilityVersion = "Xcode 12.0";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 83CBB9F61A601CBA00E9B192;
- productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 13B07F861A680F5B00A75B9A /* DidomiExample */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 13B07F8E1A680F5B00A75B9A /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
- 1416C51B265E47DC00C8B95E /* didomi_config.json in Resources */,
- 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
- isa = PBXShellScriptBuildPhase;
- alwaysOutOfDate = 1;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Bundle React Native code and images";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "set -e\n\nexport NODE_BINARY=node\nexport EXTRA_PACKAGER_ARGS=\"--entry-file index.tsx\"\n\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
- };
- 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-DidomiExample/Pods-DidomiExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Embed Pods Frameworks";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-DidomiExample/Pods-DidomiExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DidomiExample/Pods-DidomiExample-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
- C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-DidomiExample-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- 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";
- showEnvVarsInLog = 0;
- };
- E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-DidomiExample/Pods-DidomiExample-resources-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Copy Pods Resources";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-DidomiExample/Pods-DidomiExample-resources-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DidomiExample/Pods-DidomiExample-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
- FD10A7F022414F080027D42C /* Start Packager */ = {
- isa = PBXShellScriptBuildPhase;
- alwaysOutOfDate = 1;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- );
- name = "Start Packager";
- outputFileListPaths = (
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
- showEnvVarsInLog = 0;
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 13B07F871A680F5B00A75B9A /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
- 13B07FC11A68108700A75B9A /* main.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 13B07F941A680F5B00A75B9A /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-DidomiExample.debug.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CURRENT_PROJECT_VERSION = 1;
- ENABLE_BITCODE = NO;
- INFOPLIST_FILE = DidomiExample/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- OTHER_LDFLAGS = (
- "$(inherited)",
- "-ObjC",
- "-lc++",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativedidomi;
- PRODUCT_NAME = DidomiExample;
- SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
- SUPPORTS_MACCATALYST = NO;
- SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Debug;
- };
- 13B07F951A680F5B00A75B9A /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-DidomiExample.release.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CURRENT_PROJECT_VERSION = 1;
- INFOPLIST_FILE = DidomiExample/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- OTHER_LDFLAGS = (
- "$(inherited)",
- "-ObjC",
- "-lc++",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativedidomi;
- PRODUCT_NAME = DidomiExample;
- SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
- SUPPORTS_MACCATALYST = NO;
- SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Release;
- };
- 83CBBA201A601CBA00E9B192 /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-DidomiExample.debug.xcconfig */;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "c++17";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
- LD_RUNPATH_SEARCH_PATHS = (
- /usr/lib/swift,
- "$(inherited)",
- );
- LIBRARY_SEARCH_PATHS = (
- "\"$(SDKROOT)/usr/lib/swift\"",
- "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
- "\"$(inherited)\"",
- );
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- OTHER_CPLUSPLUSFLAGS = (
- "$(OTHER_CFLAGS)",
- "-DFOLLY_NO_CONFIG",
- "-DFOLLY_MOBILE=1",
- "-DFOLLY_USE_LIBCPP=1",
- );
- SDKROOT = iphoneos;
- };
- name = Debug;
- };
- 83CBBA211A601CBA00E9B192 /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-DidomiExample.release.xcconfig */;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "c++17";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = YES;
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
- LD_RUNPATH_SEARCH_PATHS = (
- /usr/lib/swift,
- "$(inherited)",
- );
- LIBRARY_SEARCH_PATHS = (
- "\"$(SDKROOT)/usr/lib/swift\"",
- "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
- "\"$(inherited)\"",
- );
- MTL_ENABLE_DEBUG_INFO = NO;
- OTHER_CPLUSPLUSFLAGS = (
- "$(OTHER_CFLAGS)",
- "-DFOLLY_NO_CONFIG",
- "-DFOLLY_MOBILE=1",
- "-DFOLLY_USE_LIBCPP=1",
- );
- SDKROOT = iphoneos;
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "DidomiExample" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 13B07F941A680F5B00A75B9A /* Debug */,
- 13B07F951A680F5B00A75B9A /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "DidomiExample" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 83CBBA201A601CBA00E9B192 /* Debug */,
- 83CBBA211A601CBA00E9B192 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
-}
diff --git a/sampleApp/ios/DidomiExample/AppDelegate.h b/sampleApp/ios/DidomiExample/AppDelegate.h
deleted file mode 100644
index 2726d5e1..00000000
--- a/sampleApp/ios/DidomiExample/AppDelegate.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-#import
-#import
-
-@interface AppDelegate : UIResponder
-
-@property (nonatomic, strong) UIWindow *window;
-
-@end
diff --git a/sampleApp/ios/DidomiExample/AppDelegate.mm b/sampleApp/ios/DidomiExample/AppDelegate.mm
deleted file mode 100644
index 19238bdf..00000000
--- a/sampleApp/ios/DidomiExample/AppDelegate.mm
+++ /dev/null
@@ -1,108 +0,0 @@
-#import "AppDelegate.h"
-
-#import
-#import
-#import
-
-#import
-
-#if RCT_NEW_ARCH_ENABLED
-#import
-#import
-#import
-#import
-#import
-#import
-
-#import
-
-@interface AppDelegate () {
- RCTTurboModuleManager *_turboModuleManager;
- RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
- std::shared_ptr _reactNativeConfig;
- facebook::react::ContextContainer::Shared _contextContainer;
-}
-@end
-#endif
-
-@implementation AppDelegate
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{
- RCTAppSetupPrepareApp(application);
-
- RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
-
-#if RCT_NEW_ARCH_ENABLED
- _contextContainer = std::make_shared();
- _reactNativeConfig = std::make_shared();
- _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
- _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
- bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
-#endif
-
- UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"DidomiExample", nil);
-
- if (@available(iOS 13.0, *)) {
- rootView.backgroundColor = [UIColor systemBackgroundColor];
- } else {
- rootView.backgroundColor = [UIColor whiteColor];
- }
-
- self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
- UIViewController *rootViewController = [UIViewController new];
- rootViewController.view = rootView;
- self.window.rootViewController = rootViewController;
- [self.window makeKeyAndVisible];
- return YES;
-}
-
-- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
-{
-#if DEBUG
- return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
-#else
- return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
-#endif
-}
-
-#if RCT_NEW_ARCH_ENABLED
-
-#pragma mark - RCTCxxBridgeDelegate
-
-- (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge
-{
- _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
- delegate:self
- jsInvoker:bridge.jsCallInvoker];
- return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
-}
-
-#pragma mark RCTTurboModuleManagerDelegate
-
-- (Class)getModuleClassFromName:(const char *)name
-{
- return RCTCoreModulesClassProvider(name);
-}
-
-- (std::shared_ptr)getTurboModule:(const std::string &)name
- jsInvoker:(std::shared_ptr)jsInvoker
-{
- return nullptr;
-}
-
-- (std::shared_ptr)getTurboModule:(const std::string &)name
- initParams:
- (const facebook::react::ObjCTurboModule::InitParams &)params
-{
- return nullptr;
-}
-
-- (id)getModuleInstanceFromClass:(Class)moduleClass
-{
- return RCTAppSetupDefaultModuleFromClass(moduleClass);
-}
-
-#endif
-
-@end
diff --git a/sampleApp/ios/DidomiExample/GoogleService-Info.plist b/sampleApp/ios/DidomiExample/GoogleService-Info.plist
deleted file mode 100644
index 0eacfc94..00000000
--- a/sampleApp/ios/DidomiExample/GoogleService-Info.plist
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
- CLIENT_ID
- 109582414482-blg8krjk14dqvfr1rhnauk6mgba8jj4r.apps.googleusercontent.com
- REVERSED_CLIENT_ID
- com.googleusercontent.apps.109582414482-blg8krjk14dqvfr1rhnauk6mgba8jj4r
- API_KEY
- AIzaSyAF5iJm45FfqrQcxubzWNx6uI2Mj1BHnl4
- GCM_SENDER_ID
- 109582414482
- PLIST_VERSION
- 1
- BUNDLE_ID
- com.example.reactnativedidomi
- PROJECT_ID
- didomi-sdk
- STORAGE_BUCKET
- didomi-sdk.appspot.com
- IS_ADS_ENABLED
-
- IS_ANALYTICS_ENABLED
-
- IS_APPINVITE_ENABLED
-
- IS_GCM_ENABLED
-
- IS_SIGNIN_ENABLED
-
- GOOGLE_APP_ID
- 1:109582414482:ios:405928f51ce378779c2c4b
-
-
\ No newline at end of file
diff --git a/sampleApp/ios/File.swift b/sampleApp/ios/File.swift
deleted file mode 100644
index 7328100b..00000000
--- a/sampleApp/ios/File.swift
+++ /dev/null
@@ -1,6 +0,0 @@
-//
-// File.swift
-// DidomiExample
-//
-
-import Foundation
diff --git a/sampleApp/ios/Podfile b/sampleApp/ios/Podfile
deleted file mode 100644
index b669b2dd..00000000
--- a/sampleApp/ios/Podfile
+++ /dev/null
@@ -1,37 +0,0 @@
-require_relative '../node_modules/react-native/scripts/react_native_pods'
-require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
-
-platform :ios, '11.0'
-install! 'cocoapods', :deterministic_uuids => false
-
-target 'DidomiExample' do
- config = use_native_modules!
-
- # Flags change depending on the env values.
- flags = get_default_flags()
-
- use_react_native!(
- :path => config[:reactNativePath],
- # to enable hermes on iOS, change `false` to `true` and then install pods
- :hermes_enabled => flags[:hermes_enabled],
- :fabric_enabled => flags[:fabric_enabled],
- # An absolute path to your application root.
- :app_path => "#{Pod::Config.instance.installation_root}/.."
- )
-
- pod 'react-native-didomi', :path => '../..'
-
- # Enables Flipper.
- #
- # Note that if you have use_frameworks! enabled, Flipper will not work and
- # you should disable these next few lines.
- #use_flipper!()
-
- post_install do |installer|
- react_native_post_install(installer)
- __apply_Xcode_12_5_M1_post_install_workaround(installer)
- end
-end
-
-# add pods for desired Firebase products
-# https://firebase.google.com/docs/ios/setup#available-pods
diff --git a/sampleApp/ios/didomi_config.json b/sampleApp/ios/didomi_config.json
deleted file mode 100644
index d0dacc8a..00000000
--- a/sampleApp/ios/didomi_config.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "app": {
- "name": "Didomi Example",
- "privacyPolicyURL": "http://www.website.com/privacy",
- "vendors": {
- "iab": {
- "all": true
- }
- },
- "gdprAppliesGlobally": true,
- "gdprAppliesWhenUnknown": true,
- "country" : "fr"
- },
- "languages": {
- "enabled": ["fr", "en", "es"],
- "default": "en"
- }
-}
diff --git a/sampleApp/metro.config.js b/sampleApp/metro.config.js
deleted file mode 100644
index 66281248..00000000
--- a/sampleApp/metro.config.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const path = require('path');
-const blacklist = require('metro-config/src/defaults/exclusionList');
-const escape = require('escape-string-regexp');
-const pak = require('../package.json');
-
-const root = path.resolve(__dirname, '..');
-
-const modules = Object.keys({
- ...pak.peerDependencies,
-});
-
-module.exports = {
- projectRoot: __dirname,
- watchFolders: [root],
-
- // We need to make sure that only one version is loaded for peerDependencies
- // So we blacklist them at the root, and alias them to the versions in example's node_modules
- resolver: {
- blacklistRE: blacklist([
- new RegExp(
- `^${escape(path.resolve(__dirname, '..', 'node_modules'))}\\/.*$`
- ),
- ]),
-
- extraNodeModules: modules.reduce((acc, name) => {
- acc[name] = path.join(__dirname, 'node_modules', name);
- return acc;
- }, {}),
- },
-
- transformer: {
- getTransformOptions: async () => ({
- transform: {
- experimentalImportSupport: false,
- inlineRequires: false,
- },
- }),
- },
-};
diff --git a/sampleApp/package.json b/sampleApp/package.json
deleted file mode 100644
index 70b45805..00000000
--- a/sampleApp/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "react-native-didomi-sample-app",
- "description": "Sample app for react-native-didomi",
- "version": "0.0.1",
- "license": "BSD-3",
- "private": true,
- "scripts": {
- "android": "react-native run-android",
- "ios": "react-native run-ios",
- "start": "react-native start"
- },
- "dependencies": {
- "react": "17.0.2",
- "react-native": "0.68.5"
- },
- "devDependencies": {
- "@babel/core": "^7.12.9",
- "@babel/runtime": "^7.12.5",
- "@react-native-community/eslint-config": "^2.0.0",
- "babel-jest": "^26.6.3",
- "eslint": "^7.32.0",
- "jest": "^26.6.3",
- "babel-plugin-module-resolver": "^4.0.0",
- "metro-react-native-babel-preset": "^0.67.0",
- "react-test-renderer": "17.0.2"
- },
- "jest": {
- "preset": "react-native"
- }
-}
diff --git a/src/DidomiListener.ts b/src/DidomiListener.ts
index 050531b4..4c575284 100644
--- a/src/DidomiListener.ts
+++ b/src/DidomiListener.ts
@@ -1,4 +1,4 @@
-import { NativeModules, NativeEventEmitter, EmitterSubscription } from 'react-native';
+import { NativeModules, NativeEventEmitter } from 'react-native';
import { DidomiEventType, VendorStatus } from './DidomiTypes';
const { Didomi: RNDidomi } = NativeModules;
@@ -72,19 +72,11 @@ export const DidomiListener = {
setOnReadyListener: (): Promise => {
return new Promise((resolve) => {
- let subscription: EmitterSubscription;
const listener = (_event: any) => {
resolve();
- if (subscription) {
- subscription.remove();
- } else if ('removeListener' in DidomiListener.eventEmitter) {
- DidomiListener.eventEmitter.removeListener(
- InternalEventType.READY_CALLBACK,
- listener
- );
- }
+ DidomiListener.eventEmitter.removeAllListeners(InternalEventType.READY_CALLBACK);
};
- subscription = DidomiListener.eventEmitter.addListener(
+ DidomiListener.eventEmitter.addListener(
InternalEventType.READY_CALLBACK,
listener
);
@@ -93,19 +85,11 @@ export const DidomiListener = {
setOnErrorListener: (): Promise => {
return new Promise((resolve) => {
- let subscription: EmitterSubscription;
const listener = (_event: any) => {
resolve(_event);
- if (subscription) {
- subscription.remove();
- } else if ('removeListener' in DidomiListener.eventEmitter) {
- DidomiListener.eventEmitter.removeListener(
- InternalEventType.ERROR_CALLBACK,
- listener
- );
- }
+ DidomiListener.eventEmitter.removeAllListeners(InternalEventType.ERROR_CALLBACK);
};
- subscription = DidomiListener.eventEmitter.addListener(
+ DidomiListener.eventEmitter.addListener(
InternalEventType.ERROR_CALLBACK,
listener
);
diff --git a/testApp/.bundle/config b/test/.bundle/config
similarity index 100%
rename from testApp/.bundle/config
rename to test/.bundle/config
diff --git a/test/.eslintrc.js b/test/.eslintrc.js
new file mode 100644
index 00000000..187894b6
--- /dev/null
+++ b/test/.eslintrc.js
@@ -0,0 +1,4 @@
+module.exports = {
+ root: true,
+ extends: '@react-native',
+};
diff --git a/test/.gitignore b/test/.gitignore
new file mode 100644
index 00000000..d5ae4566
--- /dev/null
+++ b/test/.gitignore
@@ -0,0 +1,74 @@
+# OSX
+#
+.DS_Store
+
+# Xcode
+#
+build/
+*.pbxuser
+!default.pbxuser
+*.mode1v3
+!default.mode1v3
+*.mode2v3
+!default.mode2v3
+*.perspectivev3
+!default.perspectivev3
+xcuserdata
+*.xccheckout
+*.moved-aside
+DerivedData
+*.hmap
+*.ipa
+*.xcuserstate
+**/.xcode.env.local
+
+# Android/IntelliJ
+#
+build/
+.idea
+.gradle
+local.properties
+*.iml
+*.hprof
+.cxx/
+*.keystore
+!debug.keystore
+
+# node.js
+#
+node_modules/
+npm-debug.log
+yarn-error.log
+
+# fastlane
+#
+# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
+# screenshots whenever they are needed.
+# For more information about the recommended setup visit:
+# https://docs.fastlane.tools/best-practices/source-control/
+
+**/fastlane/report.xml
+**/fastlane/Preview.html
+**/fastlane/screenshots
+**/fastlane/test_output
+
+# Bundle artifact
+*.jsbundle
+
+# Ruby / CocoaPods
+**/Pods/
+/vendor/bundle/
+
+# Temporary files created by Metro to check the health of the file watcher
+.metro-health-check*
+
+# testing
+/coverage
+
+# Yarn
+.yarn/*
+!.yarn/patches
+!.yarn/plugins
+!.yarn/releases
+!.yarn/sdks
+!.yarn/versions
diff --git a/test/.prettierrc.js b/test/.prettierrc.js
new file mode 100644
index 00000000..2b540746
--- /dev/null
+++ b/test/.prettierrc.js
@@ -0,0 +1,7 @@
+module.exports = {
+ arrowParens: 'avoid',
+ bracketSameLine: true,
+ bracketSpacing: false,
+ singleQuote: true,
+ trailingComma: 'all',
+};
diff --git a/test/.watchmanconfig b/test/.watchmanconfig
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/test/.watchmanconfig
@@ -0,0 +1 @@
+{}
diff --git a/test/Gemfile b/test/Gemfile
new file mode 100644
index 00000000..8d72c37a
--- /dev/null
+++ b/test/Gemfile
@@ -0,0 +1,9 @@
+source 'https://rubygems.org'
+
+# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
+ruby ">= 2.6.10"
+
+# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
+# bound in the template on Cocoapods with next React Native release.
+gem 'cocoapods', '>= 1.13', '< 1.15'
+gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
diff --git a/test/Gemfile.lock b/test/Gemfile.lock
new file mode 100644
index 00000000..704f6715
--- /dev/null
+++ b/test/Gemfile.lock
@@ -0,0 +1,107 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ CFPropertyList (3.0.7)
+ base64
+ nkf
+ rexml
+ activesupport (6.1.7.8)
+ concurrent-ruby (~> 1.0, >= 1.0.2)
+ i18n (>= 1.6, < 2)
+ minitest (>= 5.1)
+ tzinfo (~> 2.0)
+ zeitwerk (~> 2.3)
+ addressable (2.8.7)
+ public_suffix (>= 2.0.2, < 7.0)
+ algoliasearch (1.27.5)
+ httpclient (~> 2.8, >= 2.8.3)
+ json (>= 1.5.1)
+ atomos (0.1.3)
+ base64 (0.2.0)
+ claide (1.1.0)
+ cocoapods (1.14.3)
+ addressable (~> 2.8)
+ claide (>= 1.0.2, < 2.0)
+ cocoapods-core (= 1.14.3)
+ cocoapods-deintegrate (>= 1.0.3, < 2.0)
+ cocoapods-downloader (>= 2.1, < 3.0)
+ cocoapods-plugins (>= 1.0.0, < 2.0)
+ cocoapods-search (>= 1.0.0, < 2.0)
+ cocoapods-trunk (>= 1.6.0, < 2.0)
+ cocoapods-try (>= 1.1.0, < 2.0)
+ colored2 (~> 3.1)
+ escape (~> 0.0.4)
+ fourflusher (>= 2.3.0, < 3.0)
+ gh_inspector (~> 1.0)
+ molinillo (~> 0.8.0)
+ nap (~> 1.0)
+ ruby-macho (>= 2.3.0, < 3.0)
+ xcodeproj (>= 1.23.0, < 2.0)
+ cocoapods-core (1.14.3)
+ activesupport (>= 5.0, < 8)
+ addressable (~> 2.8)
+ algoliasearch (~> 1.0)
+ concurrent-ruby (~> 1.1)
+ fuzzy_match (~> 2.0.4)
+ nap (~> 1.0)
+ netrc (~> 0.11)
+ public_suffix (~> 4.0)
+ typhoeus (~> 1.0)
+ cocoapods-deintegrate (1.0.5)
+ cocoapods-downloader (2.1)
+ cocoapods-plugins (1.0.0)
+ nap
+ cocoapods-search (1.0.1)
+ cocoapods-trunk (1.6.0)
+ nap (>= 0.8, < 2.0)
+ netrc (~> 0.11)
+ cocoapods-try (1.2.0)
+ colored2 (3.1.2)
+ concurrent-ruby (1.3.3)
+ escape (0.0.4)
+ ethon (0.16.0)
+ ffi (>= 1.15.0)
+ ffi (1.17.0)
+ fourflusher (2.3.1)
+ fuzzy_match (2.0.4)
+ gh_inspector (1.1.3)
+ httpclient (2.8.3)
+ i18n (1.14.5)
+ concurrent-ruby (~> 1.0)
+ json (2.7.2)
+ minitest (5.24.1)
+ molinillo (0.8.0)
+ nanaimo (0.3.0)
+ nap (1.1.0)
+ netrc (0.11.0)
+ nkf (0.2.0)
+ public_suffix (4.0.7)
+ rexml (3.2.9)
+ strscan
+ ruby-macho (2.5.1)
+ strscan (3.1.0)
+ typhoeus (1.4.1)
+ ethon (>= 0.9.0)
+ tzinfo (2.0.6)
+ concurrent-ruby (~> 1.0)
+ xcodeproj (1.24.0)
+ CFPropertyList (>= 2.3.3, < 4.0)
+ atomos (~> 0.1.3)
+ claide (>= 1.0.2, < 2.0)
+ colored2 (~> 3.1)
+ nanaimo (~> 0.3.0)
+ rexml (~> 3.2.4)
+ zeitwerk (2.6.17)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ activesupport (>= 6.1.7.5, < 7.1.0)
+ cocoapods (>= 1.13, < 1.15)
+
+RUBY VERSION
+ ruby 2.6.10p210
+
+BUNDLED WITH
+ 2.4.10
diff --git a/test/README.md b/test/README.md
new file mode 100644
index 00000000..12470c30
--- /dev/null
+++ b/test/README.md
@@ -0,0 +1,79 @@
+This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
+
+# Getting Started
+
+>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
+
+## Step 1: Start the Metro Server
+
+First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.
+
+To start Metro, run the following command from the _root_ of your React Native project:
+
+```bash
+# using npm
+npm start
+
+# OR using Yarn
+yarn start
+```
+
+## Step 2: Start your Application
+
+Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:
+
+### For Android
+
+```bash
+# using npm
+npm run android
+
+# OR using Yarn
+yarn android
+```
+
+### For iOS
+
+```bash
+# using npm
+npm run ios
+
+# OR using Yarn
+yarn ios
+```
+
+If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
+
+This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
+
+## Step 3: Modifying your App
+
+Now that you have successfully run the app, let's modify it.
+
+1. Open `App.tsx` in your text editor of choice and edit some lines.
+2. For **Android**: Press the R key twice or select **"Reload"** from the **Developer Menu** (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes!
+
+ For **iOS**: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes!
+
+## Congratulations! :tada:
+
+You've successfully run and modified your React Native App. :partying_face:
+
+### Now what?
+
+- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
+- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).
+
+# Troubleshooting
+
+If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
+
+# Learn More
+
+To learn more about React Native, take a look at the following resources:
+
+- [React Native Website](https://reactnative.dev) - learn more about React Native.
+- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
+- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
+- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
+- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
diff --git a/test/android/app/build.gradle b/test/android/app/build.gradle
new file mode 100644
index 00000000..3d912183
--- /dev/null
+++ b/test/android/app/build.gradle
@@ -0,0 +1,142 @@
+apply plugin: "com.android.application"
+apply plugin: "org.jetbrains.kotlin.android"
+apply plugin: "com.facebook.react"
+
+/**
+ * This is the configuration block to customize your React Native Android app.
+ * By default you don't need to apply any configuration, just uncomment the lines you need.
+ */
+react {
+ /* Folders */
+ // The root of your project, i.e. where "package.json" lives. Default is '..'
+ // root = file("../")
+ // The folder where the react-native NPM package is. Default is ../node_modules/react-native
+ // reactNativeDir = file("../node_modules/react-native")
+ // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
+ // codegenDir = file("../node_modules/@react-native/codegen")
+ // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
+ // cliFile = file("../node_modules/react-native/cli.js")
+
+ /* Variants */
+ // The list of variants to that are debuggable. For those we're going to
+ // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
+ // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
+ // debuggableVariants = ["liteDebug", "prodDebug"]
+
+ /* Bundling */
+ // A list containing the node command and its flags. Default is just 'node'.
+ // nodeExecutableAndArgs = ["node"]
+ //
+ // The command to run when bundling. By default is 'bundle'
+ // bundleCommand = "ram-bundle"
+ //
+ // The path to the CLI configuration file. Default is empty.
+ // bundleConfig = file(../rn-cli.config.js)
+ //
+ // The name of the generated asset file containing your JS bundle
+ // bundleAssetName = "MyApplication.android.bundle"
+ //
+ // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
+ // entryFile = file("../js/MyApplication.android.js")
+ //
+ // A list of extra flags to pass to the 'bundle' commands.
+ // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
+ // extraPackagerArgs = []
+
+ /* Hermes Commands */
+ // The hermes compiler command to run. By default it is 'hermesc'
+ // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
+ //
+ // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
+ // hermesFlags = ["-O", "-output-source-map"]
+}
+
+/**
+ * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
+ */
+def enableProguardInReleaseBuilds = false
+
+/**
+ * The preferred build flavor of JavaScriptCore (JSC)
+ *
+ * For example, to use the international variant, you can use:
+ * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
+ *
+ * The international variant includes ICU i18n library and necessary data
+ * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
+ * give correct results when using with locales other than en-US. Note that
+ * this variant is about 6MiB larger per architecture than default.
+ */
+def jscFlavor = 'org.webkit:android-jsc:+'
+
+android {
+ ndkVersion rootProject.ext.ndkVersion
+ compileSdk rootProject.ext.compileSdkVersion
+
+ namespace "io.didomi.reactnative.test"
+ defaultConfig {
+ applicationId "io.didomi.reactnative.test"
+ minSdkVersion rootProject.ext.minSdkVersion
+ targetSdkVersion rootProject.ext.targetSdkVersion
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunnerArguments(
+ clearPackageData: "true",
+ disableAnimations: "true"
+ )
+ }
+ signingConfigs {
+ debug {
+ storeFile file('debug.keystore')
+ storePassword 'android'
+ keyAlias 'androiddebugkey'
+ keyPassword 'android'
+ }
+ }
+ buildTypes {
+ debug {
+ signingConfig signingConfigs.debug
+ }
+ release {
+ // Caution! In production, you need to generate your own keystore file.
+ // see https://reactnative.dev/docs/signed-apk-android.
+ signingConfig signingConfigs.debug
+ minifyEnabled enableProguardInReleaseBuilds
+ proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
+ }
+ }
+ testOptions {
+ animationsDisabled = true
+ execution = "ANDROIDX_TEST_ORCHESTRATOR"
+ }
+}
+
+repositories {
+ google()
+ mavenLocal()
+ mavenCentral()
+}
+
+dependencies {
+ // The version of react-native is set by the React Native Gradle Plugin
+ implementation("com.facebook.react:react-android")
+
+ if (hermesEnabled.toBoolean()) {
+ implementation("com.facebook.react:hermes-android")
+ } else {
+ implementation jscFlavor
+ }
+
+ // Tests
+ testImplementation("junit:junit:4.13.2")
+ androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
+ androidTestImplementation("androidx.test.ext:junit-ktx:1.2.1")
+ androidTestImplementation("androidx.test:rules:1.6.1")
+ androidTestImplementation("androidx.test:runner:1.6.1")
+
+ androidTestUtil("androidx.test:orchestrator:1.5.0")
+}
+
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
diff --git a/testApp/android/app/debug.keystore b/test/android/app/debug.keystore
similarity index 100%
rename from testApp/android/app/debug.keystore
rename to test/android/app/debug.keystore
diff --git a/test/android/app/proguard-rules.pro b/test/android/app/proguard-rules.pro
new file mode 100644
index 00000000..11b02572
--- /dev/null
+++ b/test/android/app/proguard-rules.pro
@@ -0,0 +1,10 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
diff --git a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/BaseUITest.kt b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/BaseUITest.kt
similarity index 77%
rename from testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/BaseUITest.kt
rename to test/android/app/src/androidTest/java/io/didomi/reactnative/test/BaseUITest.kt
index 943069fa..738eaaa0 100644
--- a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/BaseUITest.kt
+++ b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/BaseUITest.kt
@@ -1,11 +1,11 @@
-package com.example.reactnativedidomi
+package io.didomi.reactnative.test
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ScrollToAction
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.matcher.ViewMatchers.withSubstring
import androidx.test.espresso.matcher.ViewMatchers.withText
-import com.example.reactnativedidomi.EspressoViewFinder.waitForDisplayed
+import io.didomi.reactnative.test.EspressoViewFinder.waitForDisplayed
import org.hamcrest.CoreMatchers.endsWith
import org.hamcrest.CoreMatchers.startsWith
@@ -72,13 +72,4 @@ open class BaseUITest {
protected fun waitForSdkToBeReady() {
waitForDisplayed(withText("SDK STATUS: READY"))
}
-
- companion object {
- // Considering the tests that we do for the bridge SDKs, using simple a configuration with few vendors
- // should be enough. Currently we share the same vendor and purpose configuration across tests classes.
- const val ALL_VENDOR_IDS = "1111,217,272"
- const val ALL_PURPOSE_IDS = "cookies,create_ads_profile,device_characteristics,geolocation_data," +
- "improve_products,market_research,measure_ad_performance,measure_content_performance," +
- "select_basic_ads,select_personalized_ads,use_limited_data_to_select_content"
- }
}
diff --git a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/EspressoViewFinder.kt b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/EspressoViewFinder.kt
similarity index 82%
rename from testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/EspressoViewFinder.kt
rename to test/android/app/src/androidTest/java/io/didomi/reactnative/test/EspressoViewFinder.kt
index 949e13a8..238f465a 100644
--- a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/EspressoViewFinder.kt
+++ b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/EspressoViewFinder.kt
@@ -1,9 +1,9 @@
-package com.example.reactnativedidomi
+package io.didomi.reactnative.test
import android.graphics.Rect
import android.view.View
import android.view.ViewGroup
-import androidx.test.espresso.Espresso
+import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.PerformException
import androidx.test.espresso.UiController
import androidx.test.espresso.ViewAction
@@ -31,19 +31,23 @@ object EspressoViewFinder {
*
* Throws a TimeoutException wrapped in a PerformException when the view is not displayed within [timeOut].
*/
- fun waitForDisplayed(viewMatcher: Matcher,
- timeOut: Long = TIMEOUT_MS,
- onDisplayedHandler: ((Matcher) -> Unit)? = null) {
+ fun waitForDisplayed(
+ viewMatcher: Matcher,
+ timeOut: Long = TIMEOUT_MS,
+ onDisplayedHandler: ((Matcher) -> Unit)? = null
+ ) {
// wait for view
- Espresso.onView(isRoot()).perform(createWaitForDisplayedViewAction(viewMatcher, timeOut))
+ onView(isRoot()).perform(createWaitForDisplayedViewAction(viewMatcher, timeOut))
// call handler
onDisplayedHandler?.invoke(viewMatcher)
}
- private fun createWaitForDisplayedViewAction(viewMatcher: Matcher,
- timeOut: Long = TIMEOUT_MS) = object : ViewAction {
+ private fun createWaitForDisplayedViewAction(
+ viewMatcher: Matcher,
+ timeOut: Long = TIMEOUT_MS
+ ) = object : ViewAction {
override fun getConstraints(): Matcher {
return isRoot()
@@ -82,10 +86,10 @@ object EspressoViewFinder {
}
private fun createPerformException(view: View) = PerformException.Builder()
- .withActionDescription(this.description)
- .withViewDescription(HumanReadables.describe(view))
- .withCause(TimeoutException())
- .build()
+ .withActionDescription(this.description)
+ .withViewDescription(HumanReadables.describe(view))
+ .withCause(TimeoutException())
+ .build()
}
private fun isDisplayed(view: View) = view.getGlobalVisibleRect(Rect()) && withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE).matches(view)
diff --git a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UIGettersParamsTest.kt b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIGettersParamsTest.kt
similarity index 95%
rename from testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UIGettersParamsTest.kt
rename to test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIGettersParamsTest.kt
index 07c09269..c8b61a1b 100644
--- a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UIGettersParamsTest.kt
+++ b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIGettersParamsTest.kt
@@ -1,4 +1,4 @@
-package com.example.reactnativedidomi
+package io.didomi.reactnative.test
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.filters.LargeTest
@@ -10,15 +10,13 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4ClassRunner::class)
@LargeTest
-class UIGettersParamsTest: BaseUITest() {
+class UIGettersParamsTest : BaseUITest() {
@get:Rule
var activityRule: ActivityScenarioRule = ActivityScenarioRule(MainActivity::class.java)
@Before
- fun init() {
- waitForSdkToBeReady()
- }
+ fun init() = waitForSdkToBeReady()
//TODO FIND A WAY TO CHECK WITHOUT THE ID HARD SET
@Test
diff --git a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UIGettersTest.kt b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIGettersTest.kt
similarity index 91%
rename from testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UIGettersTest.kt
rename to test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIGettersTest.kt
index 3b6d44a9..b1dcc969 100644
--- a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UIGettersTest.kt
+++ b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIGettersTest.kt
@@ -1,4 +1,4 @@
-package com.example.reactnativedidomi
+package io.didomi.reactnative.test
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.filters.LargeTest
@@ -10,15 +10,17 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4ClassRunner::class)
@LargeTest
-class UIGettersTest: BaseUITest() {
+class UIGettersTest : BaseUITest() {
+
+ companion object {
+ private const val DELAY = 1_000L
+ }
@get:Rule
var activityRule: ActivityScenarioRule = ActivityScenarioRule(MainActivity::class.java)
@Before
- fun init() {
- waitForSdkToBeReady()
- }
+ fun init() = waitForSdkToBeReady()
@Test
fun test_GetJavaScriptForWebView() {
@@ -28,7 +30,7 @@ class UIGettersTest: BaseUITest() {
val expected = "\"window.didomiOnReady = window.didomiOnReady || [];window.didomiOnReady.push(function (Didomi) {".trim()
// There might be a delay to get this string.
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
assertTextStartsWith(expected)
}
@@ -40,7 +42,7 @@ class UIGettersTest: BaseUITest() {
val expected = "\"didomiConfig.user.externalConsent.value".trim()
// There might be a delay to get this string.
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
assertTextStartsWith(expected)
}
@@ -51,7 +53,7 @@ class UIGettersTest: BaseUITest() {
tapButton("isUserStatusPartial")
// There might be a delay to get this string.
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
assertText("true")
disagreeToAll()
@@ -59,7 +61,7 @@ class UIGettersTest: BaseUITest() {
tapButton("isUserStatusPartial")
// There might be a delay to get this string.
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
assertText("false")
}
@@ -70,7 +72,7 @@ class UIGettersTest: BaseUITest() {
tapButton("shouldUserStatusBeCollected")
// There might be a delay to get this string.
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
assertText("true")
disagreeToAll()
@@ -78,7 +80,7 @@ class UIGettersTest: BaseUITest() {
tapButton("shouldUserStatusBeCollected")
// There might be a delay to get this string.
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
assertText("false")
}
@@ -89,7 +91,7 @@ class UIGettersTest: BaseUITest() {
tapButton("getUserStatus")
// There might be a delay to get this string.
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
// The text might change every time we call the getUserStatus method
// so we'll only assert the first level parameters of the resulting json string.
@@ -109,7 +111,7 @@ class UIGettersTest: BaseUITest() {
tapButton("getUserStatus purposes")
// There might be a delay to get this string.
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
// The text might change every time we call the getUserStatus method
// so we'll only assert the first level parameters of the resulting json string.
@@ -124,7 +126,7 @@ class UIGettersTest: BaseUITest() {
tapButton("getUserStatus vendors")
// There might be a delay to get this string.
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
// The text might change every time we call the getUserStatus method
// so we'll only assert the first level parameters of the resulting json string.
@@ -140,7 +142,7 @@ class UIGettersTest: BaseUITest() {
tapButton("getUserStatus vendors global_consent")
// There might be a delay to get this string.
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
// The text might change every time we call the getUserStatus method
// so we'll only assert the first level parameters of the resulting json string.
@@ -156,7 +158,7 @@ class UIGettersTest: BaseUITest() {
tapButton("getCurrentUserStatus")
// There might be a delay to get this string.
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
// The text might change every time we call the getCurrentUserStatus method
// so we'll only assert the first level parameters of the resulting json string.
@@ -178,7 +180,7 @@ class UIGettersTest: BaseUITest() {
tapButton("Get vendor count")
// There might be a delay to get this string.
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
assertText("\"Total: 3 - IAB: 3 - Non-IAB: 0\"")
}
diff --git a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UIInitializeTest.kt b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIInitializeTest.kt
similarity index 76%
rename from testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UIInitializeTest.kt
rename to test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIInitializeTest.kt
index 5dce6016..d4761c38 100644
--- a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UIInitializeTest.kt
+++ b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIInitializeTest.kt
@@ -1,29 +1,30 @@
-package com.example.reactnativedidomi
+package io.didomi.reactnative.test
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions.click
-import androidx.test.espresso.assertion.ViewAssertions.matches
-import androidx.test.espresso.matcher.ViewMatchers.*
+import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.filters.LargeTest
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
+import io.didomi.reactnative.test.EspressoViewFinder.waitForDisplayed
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
-import com.example.reactnativedidomi.EspressoViewFinder.waitForDisplayed
@RunWith(AndroidJUnit4ClassRunner::class)
@LargeTest
-class UIInitializeTest: BaseUITest() {
+class UIInitializeTest : BaseUITest() {
+
+ companion object {
+ private const val DELAY = 1_000L
+ }
@get:Rule
var activityRule: ActivityScenarioRule = ActivityScenarioRule(MainActivity::class.java)
@Before
- fun init() {
- waitForSdkToBeReady()
- }
+ fun init() = waitForSdkToBeReady()
private fun testMethodCall(method: String) {
waitForDisplayed(withText(method.uppercase()))
@@ -37,7 +38,7 @@ class UIInitializeTest: BaseUITest() {
waitForSdkToBeReady()
tapButton("GetUserStatus Regulation")
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
assertText("\"gdpr\"")
}
@@ -47,7 +48,7 @@ class UIInitializeTest: BaseUITest() {
waitForSdkToBeReady()
tapButton("GetUserStatus Regulation")
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY)
assertText("\"cpra\"")
}
}
diff --git a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UIMethodsTest.kt b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIMethodsTest.kt
similarity index 86%
rename from testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UIMethodsTest.kt
rename to test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIMethodsTest.kt
index e9b84933..d135fac5 100644
--- a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UIMethodsTest.kt
+++ b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UIMethodsTest.kt
@@ -1,21 +1,27 @@
-package com.example.reactnativedidomi
+package io.didomi.reactnative.test
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.assertion.ViewAssertions.matches
-import androidx.test.espresso.matcher.ViewMatchers.*
+import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
+import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.filters.LargeTest
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
+import io.didomi.reactnative.test.EspressoViewFinder.waitForDisplayed
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
-import com.example.reactnativedidomi.EspressoViewFinder.waitForDisplayed
@RunWith(AndroidJUnit4ClassRunner::class)
@LargeTest
-class UIMethodsTest: BaseUITest() {
+class UIMethodsTest : BaseUITest() {
+
+ companion object {
+ private const val DELAY_LONG = 2_000L
+ private const val DELAY_SHORT = 1_000L
+ }
@get:Rule
var activityRule: ActivityScenarioRule = ActivityScenarioRule(MainActivity::class.java)
@@ -53,7 +59,7 @@ class UIMethodsTest: BaseUITest() {
// Check opening of notice
val agreeButtonText = "Agree & Close"
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY_SHORT)
waitForDisplayed(withText(agreeButtonText))
val agreeButton = onView(withText(agreeButtonText))
agreeButton.check(matches(isDisplayed()))
@@ -65,7 +71,7 @@ class UIMethodsTest: BaseUITest() {
waitForDisplayed(withText("setupUI-OK"))
// Let some time after Didomi UI was closed
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY_SHORT)
}
@Test
@@ -101,7 +107,7 @@ class UIMethodsTest: BaseUITest() {
val agreeButtonText = "Agree & Close"
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY_SHORT)
waitForDisplayed(withText(agreeButtonText))
val agreeButton = onView(withText(agreeButtonText))
agreeButton.check(matches(isDisplayed()))
@@ -112,7 +118,7 @@ class UIMethodsTest: BaseUITest() {
testLastEvent("on_hide_notice")
// Let some time after Didomi UI was closed
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY_SHORT)
}
@Test
@@ -122,7 +128,7 @@ class UIMethodsTest: BaseUITest() {
val agreeButtonText = "Agree to all"
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY_SHORT)
waitForDisplayed(withText(agreeButtonText))
val agreeButton = onView(withText(agreeButtonText))
agreeButton.check(matches(isDisplayed()))
@@ -133,7 +139,7 @@ class UIMethodsTest: BaseUITest() {
testLastEvent("on_hide_notice")
// Let some time after Didomi UI was closed
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY_SHORT)
}
@Test
@@ -143,7 +149,7 @@ class UIMethodsTest: BaseUITest() {
var agreeButtonText = "Save"
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY_SHORT)
waitForDisplayed(withText(agreeButtonText))
var agreeButton = onView(withText(agreeButtonText))
agreeButton.check(matches(isDisplayed()))
@@ -161,7 +167,7 @@ class UIMethodsTest: BaseUITest() {
testLastEvent("on_hide_notice")
// Let some time after Didomi UI was closed
- Thread.sleep(1_000L)
+ Thread.sleep(DELAY_SHORT)
}
@Test
@@ -172,7 +178,7 @@ class UIMethodsTest: BaseUITest() {
waitForDisplayed(withText("Listen ipromote Vendor status-OK"))
tapButton("setUserAgreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY_LONG)
assertText("setUserAgreeToAll-OK")
testLastEvent("Vendor status ipromote -> true")
@@ -181,7 +187,7 @@ class UIMethodsTest: BaseUITest() {
waitForDisplayed(withText("Restore event listeners-OK"))
tapButton("setUserDisagreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY_LONG)
assertText("setUserDisagreeToAll-OK")
testLastEvent("on_consent_changed")
diff --git a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UISetUserTest.kt b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UISetUserTest.kt
similarity index 83%
rename from testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UISetUserTest.kt
rename to test/android/app/src/androidTest/java/io/didomi/reactnative/test/UISetUserTest.kt
index 8b049916..1e1552c9 100644
--- a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UISetUserTest.kt
+++ b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UISetUserTest.kt
@@ -1,6 +1,5 @@
-package com.example.reactnativedidomi
+package io.didomi.reactnative.test
-import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.filters.LargeTest
@@ -12,7 +11,11 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4ClassRunner::class)
@LargeTest
-class UISetUserTest: BaseUITest() {
+class UISetUserTest : BaseUITest() {
+
+ companion object {
+ private const val DELAY = 2_000L
+ }
@get:Rule
var activityRule: ActivityScenarioRule = ActivityScenarioRule(MainActivity::class.java)
@@ -27,70 +30,70 @@ class UISetUserTest: BaseUITest() {
@Test
fun test_ClearUser() {
tapButton("clearUser")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("clearUser-OK")
}
@Test
fun test_SetUserWithId() {
tapButton("setUserWithId")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithId-OK")
}
@Test
fun test_SetUserWithIdAndSetupUI() {
tapButton("setUserWithIdAndSetupUI")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithIdAndSetupUI-OK")
}
@Test
fun test_SetUserWithHashAuth() {
tapButton("setUserWithHashAuth")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithHashAuth-OK")
}
@Test
fun test_SetUserWithHashAuthAndSetupUI() {
tapButton("setUserWithHashAuthAndSetupUI")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithHashAuthAndSetupUI-OK")
}
@Test
fun test_SetUserWithHashAuthWithSaltAndExpiration() {
tapButton("setUserWithHashAuthWithSaltAndExpiration")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithHashAuthWithSaltAndExpiration-OK")
}
@Test
fun test_SetUserWithHashAuthWithSaltAndExpirationAndSetupUI() {
tapButton("setUserWithHashAuthWithSaltAndExpirationAndSetupUI")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithHashAuthWithSaltAndExpirationAndSetupUI-OK")
}
@Test
fun test_SetUserWithEncryptionAuth() {
tapButton("setUserWithEncryptionAuth")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithEncryptionAuth-OK")
}
@Test
fun test_SetUserWithEncryptionAuthAndSetupUI() {
tapButton("setUserWithEncryptionAuthAndSetupUI")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithEncryptionAuthAndSetupUI-OK")
}
@Test
fun test_SetUserWithEncryptionAuthWithExpiration() {
tapButton("setUserWithEncryptionAuthWithExpiration")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
// Prevent random test failure
scrollToBottomOfList()
Thread.sleep(1_000L)
@@ -100,35 +103,35 @@ class UISetUserTest: BaseUITest() {
@Test
fun test_SetUserWithEncryptionAuthWithExpirationAndSetupUI() {
tapButton("setUserWithEncryptionAuthWithExpirationAndSetupUI")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithEncryptionAuthWithExpirationAndSetupUI-OK")
}
@Test
fun test_SetUserWithHashAuthWithSynchronizedUsers() {
tapButton("setUserWithHashAuthWithSynchronizedUsers")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithHashAuthWithSynchronizedUsers-OK")
}
@Test
fun test_SetUserWithHashAuthWithSynchronizedUsersAndSetupUI() {
tapButton("setUserWithHashAuthWithSynchronizedUsersAndSetupUI")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithHashAuthWithSynchronizedUsersAndSetupUI-OK")
}
@Test
fun test_SetUserWithEncryptionAuthWithSynchronizedUsers() {
tapButton("setUserWithEncryptionAuthWithSynchronizedUsers")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithEncryptionAuthWithSynchronizedUsers-OK")
}
@Test
fun test_SetUserWithEncryptionAuthWithSynchronizedUsersAndSetupUI() {
tapButton("setUserWithEncryptionAuthWithSynchronizedUsersAndSetupUI")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithEncryptionAuthWithSynchronizedUsersAndSetupUI-OK")
}
@@ -138,11 +141,14 @@ class UISetUserTest: BaseUITest() {
EspressoViewFinder.waitForDisplayed(withText("Listen user sync-OK"))
tapButton("setUserWithId")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserWithId-OK")
- EspressoViewFinder.waitForDisplayed(withText(
- "LAST RECEIVED EVENT: Sync Ready, status applied? true, acknowledged? true"))
+ EspressoViewFinder.waitForDisplayed(
+ withText(
+ "LAST RECEIVED EVENT: Sync Ready, status applied? true, acknowledged? true"
+ )
+ )
tapButton("Restore event listeners")
EspressoViewFinder.waitForDisplayed(withText("Restore event listeners-OK"))
diff --git a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UISettersTest.kt b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UISettersTest.kt
similarity index 82%
rename from testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UISettersTest.kt
rename to test/android/app/src/androidTest/java/io/didomi/reactnative/test/UISettersTest.kt
index 6509dfc2..8c9f9d78 100644
--- a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UISettersTest.kt
+++ b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UISettersTest.kt
@@ -1,4 +1,4 @@
-package com.example.reactnativedidomi
+package io.didomi.reactnative.test
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.filters.LargeTest
@@ -10,48 +10,50 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4ClassRunner::class)
@LargeTest
-class UISettersTest: BaseUITest() {
+class UISettersTest : BaseUITest() {
+
+ companion object {
+ private const val DELAY = 2_000L
+ }
@get:Rule
var activityRule: ActivityScenarioRule = ActivityScenarioRule(MainActivity::class.java)
@Before
- fun init() {
- waitForSdkToBeReady()
- }
+ fun init() = waitForSdkToBeReady()
@Test
fun test_SetCurrentUserStatusFails() {
tapButton("setCurrentUserStatus-Fails")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"setCurrentUserStatus-Fails-false\"")
}
@Test
fun test_SetCurrentUserStatusSucceeds() {
tapButton("setCurrentUserStatus-Succeeds")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"setCurrentUserStatus-Succeeds-true\"")
}
@Test
fun test_SetUserStatusSets() {
tapButton("setUserStatusSets")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserStatusSets-OK")
}
@Test
fun test_SetUserAgreeToAll() {
tapButton("setUserAgreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserAgreeToAll-OK")
}
@Test
fun test_SetUserDisagreeToAll() {
tapButton("setUserDisagreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("setUserDisagreeToAll-OK")
}
@@ -60,9 +62,9 @@ class UISettersTest: BaseUITest() {
fun test_EnablePurposeTransactionWithChange() {
val buttonName = "enablePurpose[cookies]-transaction"
tapButton("setUserDisagreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-true-enabled-true\"")
}
@@ -70,9 +72,9 @@ class UISettersTest: BaseUITest() {
fun test_EnablePurposeTransactionWithoutChange() {
val buttonName = "enablePurpose[cookies]-transaction"
tapButton("setUserAgreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-false-enabled-true\"")
}
@@ -80,9 +82,9 @@ class UISettersTest: BaseUITest() {
fun test_DisablePurposeTransactionWithChange() {
val buttonName = "disablePurpose[cookies]-transaction"
tapButton("setUserAgreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-true-enabled-false\"")
}
@@ -90,9 +92,9 @@ class UISettersTest: BaseUITest() {
fun test_DisablePurposeTransactionWithoutChange() {
val buttonName = "disablePurpose[cookies]-transaction"
tapButton("setUserDisagreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-false-enabled-false\"")
}
@@ -101,9 +103,9 @@ class UISettersTest: BaseUITest() {
fun test_EnablePurposesTransactionWithChange() {
val buttonName = "enablePurposes[cookies]-transaction"
tapButton("setUserDisagreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-true-enabled-true\"")
}
@@ -111,9 +113,9 @@ class UISettersTest: BaseUITest() {
fun test_EnablePurposesTransactionWithoutChange() {
val buttonName = "enablePurposes[cookies]-transaction"
tapButton("setUserAgreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-false-enabled-true\"")
}
@@ -121,9 +123,9 @@ class UISettersTest: BaseUITest() {
fun test_DisablePurposesTransactionWithChange() {
val buttonName = "disablePurposes[cookies]-transaction"
tapButton("setUserAgreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-true-enabled-false\"")
}
@@ -131,9 +133,9 @@ class UISettersTest: BaseUITest() {
fun test_DisablePurposesTransactionWithoutChange() {
val buttonName = "disablePurposes[cookies]-transaction"
tapButton("setUserDisagreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-false-enabled-false\"")
}
@@ -142,9 +144,9 @@ class UISettersTest: BaseUITest() {
fun test_EnableVendorTransactionWithChange() {
val buttonName = "enableVendor[ipromote]-transaction"
tapButton("setUserDisagreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-true-enabled-true\"")
}
@@ -152,9 +154,9 @@ class UISettersTest: BaseUITest() {
fun test_EnableVendorTransactionWithoutChange() {
val buttonName = "enableVendor[ipromote]-transaction"
tapButton("setUserAgreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-false-enabled-true\"")
}
@@ -162,9 +164,9 @@ class UISettersTest: BaseUITest() {
fun test_DisableVendorTransactionWithChange() {
val buttonName = "disableVendor[ipromote]-transaction"
tapButton("setUserAgreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-true-enabled-false\"")
}
@@ -172,9 +174,9 @@ class UISettersTest: BaseUITest() {
fun test_DisableVendorTransactionWithoutChange() {
val buttonName = "disableVendor[ipromote]-transaction"
tapButton("setUserDisagreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-false-enabled-false\"")
}
@@ -183,9 +185,9 @@ class UISettersTest: BaseUITest() {
fun test_EnableVendorsTransactionWithChange() {
val buttonName = "enableVendors[ipromote]-transaction"
tapButton("setUserDisagreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-true-enabled-true\"")
}
@@ -193,9 +195,9 @@ class UISettersTest: BaseUITest() {
fun test_EnableVendorsTransactionWithoutChange() {
val buttonName = "enableVendors[ipromote]-transaction"
tapButton("setUserAgreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-false-enabled-true\"")
}
@@ -203,9 +205,9 @@ class UISettersTest: BaseUITest() {
fun test_DisableVendorsTransactionWithChange() {
val buttonName = "disableVendors[ipromote]-transaction"
tapButton("setUserAgreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-true-enabled-false\"")
}
@@ -213,9 +215,9 @@ class UISettersTest: BaseUITest() {
fun test_DisableVendorsTransactionWithoutChange() {
val buttonName = "disableVendors[ipromote]-transaction"
tapButton("setUserDisagreeToAll")
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
tapButton(buttonName)
- Thread.sleep(2_000L)
+ Thread.sleep(DELAY)
assertText("\"${buttonName}-updated-false-enabled-false\"")
}
}
diff --git a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UITest.kt b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UITest.kt
similarity index 87%
rename from testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UITest.kt
rename to test/android/app/src/androidTest/java/io/didomi/reactnative/test/UITest.kt
index b4aab18b..68d2c32e 100644
--- a/testApp/android/app/src/androidTest/java/com/example/reactnativedidomi/UITest.kt
+++ b/test/android/app/src/androidTest/java/io/didomi/reactnative/test/UITest.kt
@@ -1,4 +1,4 @@
-package com.example.reactnativedidomi
+package io.didomi.reactnative.test
import org.junit.runner.RunWith
import org.junit.runners.Suite
diff --git a/testApp/android/app/src/debug/AndroidManifest.xml b/test/android/app/src/debug/AndroidManifest.xml
similarity index 51%
rename from testApp/android/app/src/debug/AndroidManifest.xml
rename to test/android/app/src/debug/AndroidManifest.xml
index b32d4212..12e4b4a5 100644
--- a/testApp/android/app/src/debug/AndroidManifest.xml
+++ b/test/android/app/src/debug/AndroidManifest.xml
@@ -2,14 +2,8 @@
-
-
-
-
+ tools:targetApi="28" />
diff --git a/sampleApp/android/app/src/main/AndroidManifest.xml b/test/android/app/src/main/AndroidManifest.xml
similarity index 86%
rename from sampleApp/android/app/src/main/AndroidManifest.xml
rename to test/android/app/src/main/AndroidManifest.xml
index 6e9332e1..b69cb2c0 100644
--- a/sampleApp/android/app/src/main/AndroidManifest.xml
+++ b/test/android/app/src/main/AndroidManifest.xml
@@ -1,5 +1,6 @@
-
+
+
+
-
-
-
diff --git a/test/android/app/src/main/assets/didomi_config.json b/test/android/app/src/main/assets/didomi_config.json
new file mode 100644
index 00000000..f71f3cf9
--- /dev/null
+++ b/test/android/app/src/main/assets/didomi_config.json
@@ -0,0 +1,28 @@
+{
+ "app": {
+ "name": "Didomi Tests",
+ "privacyPolicyURL": "http://www.website.com/privacy",
+ "vendors": {
+ "iab": {
+ "version": 2,
+ "include": [
+ 28,
+ 755
+ ],
+ "all": false,
+ "enabled": true
+ }
+ },
+ "gdprAppliesGlobally": true,
+ "gdprAppliesWhenUnknown": true,
+ "country": "fr"
+ },
+ "languages": {
+ "enabled": [
+ "fr",
+ "en",
+ "es"
+ ],
+ "default": "en"
+ }
+}
diff --git a/test/android/app/src/main/java/io/didomi/reactnative/test/MainActivity.kt b/test/android/app/src/main/java/io/didomi/reactnative/test/MainActivity.kt
new file mode 100644
index 00000000..f88c7728
--- /dev/null
+++ b/test/android/app/src/main/java/io/didomi/reactnative/test/MainActivity.kt
@@ -0,0 +1,22 @@
+package io.didomi.reactnative.test
+
+import com.facebook.react.ReactActivity
+import com.facebook.react.ReactActivityDelegate
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
+import com.facebook.react.defaults.DefaultReactActivityDelegate
+
+class MainActivity : ReactActivity() {
+
+ /**
+ * Returns the name of the main component registered from JavaScript. This is used to schedule
+ * rendering of the component.
+ */
+ override fun getMainComponentName(): String = "test"
+
+ /**
+ * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
+ * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
+ */
+ override fun createReactActivityDelegate(): ReactActivityDelegate =
+ DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
+}
diff --git a/test/android/app/src/main/java/io/didomi/reactnative/test/MainApplication.kt b/test/android/app/src/main/java/io/didomi/reactnative/test/MainApplication.kt
new file mode 100644
index 00000000..4c83ed6d
--- /dev/null
+++ b/test/android/app/src/main/java/io/didomi/reactnative/test/MainApplication.kt
@@ -0,0 +1,39 @@
+package io.didomi.reactnative.test
+
+import android.app.Application
+import com.facebook.react.*
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
+import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
+import com.facebook.react.defaults.DefaultReactNativeHost
+import com.facebook.soloader.SoLoader
+
+class MainApplication : Application(), ReactApplication {
+
+ override val reactNativeHost: ReactNativeHost =
+ object : DefaultReactNativeHost(this) {
+ override fun getPackages(): List =
+ PackageList(this).packages.apply {
+ // Packages that cannot be autolinked yet can be added manually here, for example:
+ // add(MyReactNativePackage())
+ }
+
+ override fun getJSMainModuleName(): String = "index"
+
+ override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
+
+ override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
+ override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
+ }
+
+ override val reactHost: ReactHost
+ get() = getDefaultReactHost(applicationContext, reactNativeHost)
+
+ override fun onCreate() {
+ super.onCreate()
+ SoLoader.init(this, false)
+ if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
+ // If you opted-in for the New Architecture, we load the native entry point for this app.
+ load()
+ }
+ }
+}
diff --git a/testApp/android/app/src/main/res/drawable/rn_edit_text_material.xml b/test/android/app/src/main/res/drawable/rn_edit_text_material.xml
similarity index 98%
rename from testApp/android/app/src/main/res/drawable/rn_edit_text_material.xml
rename to test/android/app/src/main/res/drawable/rn_edit_text_material.xml
index f35d9962..5c25e728 100644
--- a/testApp/android/app/src/main/res/drawable/rn_edit_text_material.xml
+++ b/test/android/app/src/main/res/drawable/rn_edit_text_material.xml
@@ -17,10 +17,11 @@
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
android:insetTop="@dimen/abc_edit_text_inset_top_material"
- android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
+ android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
+ >
-
- Reset
- SetupUi
- SetLogLevel
- HideNotice
- HidePreferences
- ShowNotice
- ShowPreferences Purposes
- ShowPreferences Vendors
-
- GetDisabledPurposes
- GetDisabledPurposeIds
- GetDisabledVendors
- GetDisabledVendorIds
- GetEnabledPurposes
- GetEnabledPurposeId
- GetEnabledVendors
- GetEnabledVendorIds
-
-
-
-
diff --git a/testApp/android/build.gradle b/testApp/android/build.gradle
deleted file mode 100644
index 8b22fcb8..00000000
--- a/testApp/android/build.gradle
+++ /dev/null
@@ -1,56 +0,0 @@
-import org.apache.tools.ant.taskdefs.condition.Os
-
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- ext.kotlin_version = "1.8.20"
- ext {
- buildToolsVersion = "33.0.2"
- minSdkVersion = 21
- compileSdkVersion = 33
- targetSdkVersion = 33
- if (System.properties['os.arch'] == "aarch64") {
- // For M1 Users we need to use the NDK 24 which added support for aarch64
- ndkVersion = "24.0.8215888"
- } else {
- // Otherwise we default to the side-by-side NDK version from AGP.
-// ndkVersion = "25.1.8937393"
- ndkVersion = "21.4.7075529"
- }
- }
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- classpath("com.android.tools.build:gradle:7.4.2")
- classpath("com.facebook.react:react-native-gradle-plugin")
- classpath("de.undercouch:gradle-download-task:4.1.2")
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- classpath("com.google.gms:google-services:4.3.14")
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
- }
-}
-
-allprojects {
- repositories {
- maven {
- // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
- url("$rootDir/../node_modules/react-native/android")
- }
- maven {
- // Android JSC is installed from npm
- url("$rootDir/../node_modules/jsc-android/dist")
- }
- mavenCentral {
- // We don't want to fetch react-native from Maven Central as there are
- // older versions over there.
- content {
- excludeGroup "com.facebook.react"
- }
- }
- google()
- maven { url 'https://www.jitpack.io' }
- }
-}
diff --git a/testApp/android/gradle/wrapper/gradle-wrapper.jar b/testApp/android/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 249e5832..00000000
Binary files a/testApp/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/testApp/android/settings.gradle b/testApp/android/settings.gradle
deleted file mode 100644
index 173e474a..00000000
--- a/testApp/android/settings.gradle
+++ /dev/null
@@ -1,13 +0,0 @@
-rootProject.name = 'Didomi Test App'
-apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
-include ':app'
-
-includeBuild('../node_modules/react-native-gradle-plugin')
-
-if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
- include(":ReactAndroid")
- project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
-}
-
-include ':reactnativedidomi'
-project(':reactnativedidomi').projectDir = file('../../android')
diff --git a/testApp/app.json b/testApp/app.json
deleted file mode 100644
index f4d9dcba..00000000
--- a/testApp/app.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "DidomiExample",
- "displayName": "Didomi Example"
-}
diff --git a/testApp/babel.config.js b/testApp/babel.config.js
deleted file mode 100644
index adea77bd..00000000
--- a/testApp/babel.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const path = require('path');
-const pak = require('../package.json');
-
-module.exports = {
- presets: ['module:metro-react-native-babel-preset'],
- plugins: [
- [
- 'module-resolver',
- {
- extensions: ['.tsx', '.ts', '.js', '.json'],
- alias: {
- [pak.name]: path.join(__dirname, '..', pak.source),
- },
- },
- ],
- ],
-};
diff --git a/testApp/ios/DidomiExample-Bridging-Header.h b/testApp/ios/DidomiExample-Bridging-Header.h
deleted file mode 100644
index e11d920b..00000000
--- a/testApp/ios/DidomiExample-Bridging-Header.h
+++ /dev/null
@@ -1,3 +0,0 @@
-//
-// Use this file to import your target's public headers that you would like to expose to Swift.
-//
diff --git a/testApp/ios/DidomiExample.xcodeproj/project.pbxproj b/testApp/ios/DidomiExample.xcodeproj/project.pbxproj
deleted file mode 100644
index e3135360..00000000
--- a/testApp/ios/DidomiExample.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,1051 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 54;
- objects = {
-
-/* Begin PBXBuildFile section */
- 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
- 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
- 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
- 1416C51B265E47DC00C8B95E /* didomi_config.json in Resources */ = {isa = PBXBuildFile; fileRef = 1416C51A265E47DC00C8B95E /* didomi_config.json */; };
- 14DA1BCC26656AFE006D8990 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 14DA1BCB26656AFE006D8990 /* GoogleService-Info.plist */; };
- 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
- 4C39C56BAD484C67AA576FFA /* libPods-DidomiExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CA3E69C5B9553B26FBA2DF04 /* libPods-DidomiExample.a */; };
- 5782FC4E2668DAA9009F822D /* DidomiExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5782FC4D2668DAA9009F822D /* DidomiExampleUITests.swift */; };
- 57881F082680777B0021B71C /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; };
- 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
- 971D32C228DB43F2006D9FAA /* VendorData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 971D32C128DB43F2006D9FAA /* VendorData.swift */; };
- F644BBBA26C5810C004EBE16 /* PurposeData.swift in Sources */ = {isa = PBXBuildFile; fileRef = F644BBB926C5810C004EBE16 /* PurposeData.swift */; };
- F6CEE2E326C3CB4200FB6F6D /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6CEE2E226C3CB4200FB6F6D /* String.swift */; };
- F6CEE2E526C42B8100FB6F6D /* XCUIElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6CEE2E426C42B8100FB6F6D /* XCUIElement.swift */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
- 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
- remoteInfo = DidomiExample;
- };
- 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
- remoteInfo = "DidomiExample-tvOS";
- };
- 5782FC502668DAA9009F822D /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
- remoteInfo = DidomiExample;
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXFileReference section */
- 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
- 00E356EE1AD99517003FC87E /* DidomiExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DidomiExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
- 13B07F961A680F5B00A75B9A /* DidomiExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DidomiExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = DidomiExample/AppDelegate.h; sourceTree = ""; };
- 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.mm; path = DidomiExample/AppDelegate.mm; sourceTree = ""; };
- 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = DidomiExample/Images.xcassets; sourceTree = ""; };
- 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = DidomiExample/Info.plist; sourceTree = ""; };
- 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = DidomiExample/main.m; sourceTree = ""; };
- 1416C51A265E47DC00C8B95E /* didomi_config.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = didomi_config.json; sourceTree = ""; };
- 14DA1BCB26656AFE006D8990 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "DidomiExample/GoogleService-Info.plist"; sourceTree = ""; };
- 2D02E47B1E0B4A5D006451C7 /* DidomiExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DidomiExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
- 2D02E4901E0B4A5D006451C7 /* DidomiExample-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "DidomiExample-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
- 47F7ED3B7971BE374F7B8635 /* Pods-DidomiExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DidomiExample.debug.xcconfig"; path = "Target Support Files/Pods-DidomiExample/Pods-DidomiExample.debug.xcconfig"; sourceTree = ""; };
- 5782FC4B2668DAA9009F822D /* DidomiExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DidomiExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
- 5782FC4D2668DAA9009F822D /* DidomiExampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DidomiExampleUITests.swift; sourceTree = ""; };
- 5782FC4F2668DAA9009F822D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = DidomiExample/LaunchScreen.storyboard; sourceTree = ""; };
- 971D32C128DB43F2006D9FAA /* VendorData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VendorData.swift; sourceTree = ""; };
- CA3E69C5B9553B26FBA2DF04 /* libPods-DidomiExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-DidomiExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
- E00ACF0FDA8BF921659E2F9A /* Pods-DidomiExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DidomiExample.release.xcconfig"; path = "Target Support Files/Pods-DidomiExample/Pods-DidomiExample.release.xcconfig"; sourceTree = ""; };
- ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
- ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
- F644BBB926C5810C004EBE16 /* PurposeData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PurposeData.swift; sourceTree = ""; };
- F6CEE2E226C3CB4200FB6F6D /* String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = String.swift; sourceTree = ""; };
- F6CEE2E426C42B8100FB6F6D /* XCUIElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XCUIElement.swift; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 00E356EB1AD99517003FC87E /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 4C39C56BAD484C67AA576FFA /* libPods-DidomiExample.a in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 5782FC482668DAA9009F822D /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 13B07FAE1A68108700A75B9A /* DidomiExample */ = {
- isa = PBXGroup;
- children = (
- 14DA1BCB26656AFE006D8990 /* GoogleService-Info.plist */,
- 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
- 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
- 13B07FB01A68108700A75B9A /* AppDelegate.mm */,
- 13B07FB51A68108700A75B9A /* Images.xcassets */,
- 13B07FB61A68108700A75B9A /* Info.plist */,
- 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
- 13B07FB71A68108700A75B9A /* main.m */,
- );
- name = DidomiExample;
- sourceTree = "";
- };
- 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
- ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
- CA3E69C5B9553B26FBA2DF04 /* libPods-DidomiExample.a */,
- );
- name = Frameworks;
- sourceTree = "";
- };
- 5782FC4C2668DAA9009F822D /* DidomiExampleUITests */ = {
- isa = PBXGroup;
- children = (
- F644BBB826C580F9004EBE16 /* models */,
- F6CEE2E126C3CB3400FB6F6D /* extensions */,
- 5782FC4D2668DAA9009F822D /* DidomiExampleUITests.swift */,
- 5782FC4F2668DAA9009F822D /* Info.plist */,
- );
- path = DidomiExampleUITests;
- sourceTree = "";
- };
- 6B9684456A2045ADE5A6E47E /* Pods */ = {
- isa = PBXGroup;
- children = (
- 47F7ED3B7971BE374F7B8635 /* Pods-DidomiExample.debug.xcconfig */,
- E00ACF0FDA8BF921659E2F9A /* Pods-DidomiExample.release.xcconfig */,
- );
- path = Pods;
- sourceTree = "";
- };
- 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
- isa = PBXGroup;
- children = (
- );
- name = Libraries;
- sourceTree = "";
- };
- 83CBB9F61A601CBA00E9B192 = {
- isa = PBXGroup;
- children = (
- 1416C51A265E47DC00C8B95E /* didomi_config.json */,
- 13B07FAE1A68108700A75B9A /* DidomiExample */,
- 832341AE1AAA6A7D00B99B32 /* Libraries */,
- 5782FC4C2668DAA9009F822D /* DidomiExampleUITests */,
- 83CBBA001A601CBA00E9B192 /* Products */,
- 2D16E6871FA4F8E400B85C8A /* Frameworks */,
- 6B9684456A2045ADE5A6E47E /* Pods */,
- );
- indentWidth = 2;
- sourceTree = "";
- tabWidth = 2;
- usesTabs = 0;
- };
- 83CBBA001A601CBA00E9B192 /* Products */ = {
- isa = PBXGroup;
- children = (
- 13B07F961A680F5B00A75B9A /* DidomiExample.app */,
- 00E356EE1AD99517003FC87E /* DidomiExampleTests.xctest */,
- 2D02E47B1E0B4A5D006451C7 /* DidomiExample-tvOS.app */,
- 2D02E4901E0B4A5D006451C7 /* DidomiExample-tvOSTests.xctest */,
- 5782FC4B2668DAA9009F822D /* DidomiExampleUITests.xctest */,
- );
- name = Products;
- sourceTree = "";
- };
- F644BBB826C580F9004EBE16 /* models */ = {
- isa = PBXGroup;
- children = (
- F644BBB926C5810C004EBE16 /* PurposeData.swift */,
- 971D32C128DB43F2006D9FAA /* VendorData.swift */,
- );
- path = models;
- sourceTree = "";
- };
- F6CEE2E126C3CB3400FB6F6D /* extensions */ = {
- isa = PBXGroup;
- children = (
- F6CEE2E226C3CB4200FB6F6D /* String.swift */,
- F6CEE2E426C42B8100FB6F6D /* XCUIElement.swift */,
- );
- path = extensions;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 00E356ED1AD99517003FC87E /* DidomiExampleTests */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "DidomiExampleTests" */;
- buildPhases = (
- 00E356EA1AD99517003FC87E /* Sources */,
- 00E356EB1AD99517003FC87E /* Frameworks */,
- 00E356EC1AD99517003FC87E /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- 00E356F51AD99517003FC87E /* PBXTargetDependency */,
- );
- name = DidomiExampleTests;
- productName = DidomiExampleTests;
- productReference = 00E356EE1AD99517003FC87E /* DidomiExampleTests.xctest */;
- productType = "com.apple.product-type.bundle.unit-test";
- };
- 13B07F861A680F5B00A75B9A /* DidomiExample */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "DidomiExample" */;
- buildPhases = (
- 4F0A6FC082772762E3E4C96C /* [CP] Check Pods Manifest.lock */,
- 13B07F871A680F5B00A75B9A /* Sources */,
- 13B07F8C1A680F5B00A75B9A /* Frameworks */,
- 13B07F8E1A680F5B00A75B9A /* Resources */,
- 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
- EF51C99663527296DD49A526 /* [CP] Embed Pods Frameworks */,
- FC89F7812958A72AF73FB5DB /* [CP] Copy Pods Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = DidomiExample;
- productName = DidomiExample;
- productReference = 13B07F961A680F5B00A75B9A /* DidomiExample.app */;
- productType = "com.apple.product-type.application";
- };
- 2D02E47A1E0B4A5D006451C7 /* DidomiExample-tvOS */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "DidomiExample-tvOS" */;
- buildPhases = (
- FD10A7F122414F3F0027D42C /* Start Packager */,
- 2D02E4781E0B4A5D006451C7 /* Frameworks */,
- 2D02E4791E0B4A5D006451C7 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "DidomiExample-tvOS";
- productName = "DidomiExample-tvOS";
- productReference = 2D02E47B1E0B4A5D006451C7 /* DidomiExample-tvOS.app */;
- productType = "com.apple.product-type.application";
- };
- 2D02E48F1E0B4A5D006451C7 /* DidomiExample-tvOSTests */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "DidomiExample-tvOSTests" */;
- buildPhases = (
- 2D02E48D1E0B4A5D006451C7 /* Frameworks */,
- 2D02E48E1E0B4A5D006451C7 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */,
- );
- name = "DidomiExample-tvOSTests";
- productName = "DidomiExample-tvOSTests";
- productReference = 2D02E4901E0B4A5D006451C7 /* DidomiExample-tvOSTests.xctest */;
- productType = "com.apple.product-type.bundle.unit-test";
- };
- 5782FC4A2668DAA9009F822D /* DidomiExampleUITests */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 5782FC522668DAA9009F822D /* Build configuration list for PBXNativeTarget "DidomiExampleUITests" */;
- buildPhases = (
- 5782FC472668DAA9009F822D /* Sources */,
- 5782FC482668DAA9009F822D /* Frameworks */,
- 5782FC492668DAA9009F822D /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- 5782FC512668DAA9009F822D /* PBXTargetDependency */,
- );
- name = DidomiExampleUITests;
- productName = DidomiExampleUITests;
- productReference = 5782FC4B2668DAA9009F822D /* DidomiExampleUITests.xctest */;
- productType = "com.apple.product-type.bundle.ui-testing";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 83CBB9F71A601CBA00E9B192 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- BuildIndependentTargetsInParallel = YES;
- LastUpgradeCheck = 1210;
- TargetAttributes = {
- 13B07F861A680F5B00A75B9A = {
- LastSwiftMigration = 1120;
- };
- };
- };
- buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "DidomiExample" */;
- compatibilityVersion = "Xcode 12.0";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 83CBB9F61A601CBA00E9B192;
- productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 13B07F861A680F5B00A75B9A /* DidomiExample */,
- 00E356ED1AD99517003FC87E /* DidomiExampleTests */,
- 2D02E47A1E0B4A5D006451C7 /* DidomiExample-tvOS */,
- 2D02E48F1E0B4A5D006451C7 /* DidomiExample-tvOSTests */,
- 5782FC4A2668DAA9009F822D /* DidomiExampleUITests */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 00E356EC1AD99517003FC87E /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 13B07F8E1A680F5B00A75B9A /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 57881F082680777B0021B71C /* main.jsbundle in Resources */,
- 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
- 14DA1BCC26656AFE006D8990 /* GoogleService-Info.plist in Resources */,
- 1416C51B265E47DC00C8B95E /* didomi_config.json in Resources */,
- 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 2D02E4791E0B4A5D006451C7 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 2D02E48E1E0B4A5D006451C7 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 5782FC492668DAA9009F822D /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
- isa = PBXShellScriptBuildPhase;
- alwaysOutOfDate = 1;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Bundle React Native code and images";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "set -e\n\nexport NODE_BINARY=node\nexport EXTRA_PACKAGER_ARGS=\"--entry-file index.tsx\"\n\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
- };
- 4F0A6FC082772762E3E4C96C /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-DidomiExample-checkManifestLockResult.txt",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- 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";
- showEnvVarsInLog = 0;
- };
- EF51C99663527296DD49A526 /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-DidomiExample/Pods-DidomiExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Embed Pods Frameworks";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-DidomiExample/Pods-DidomiExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DidomiExample/Pods-DidomiExample-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
- FC89F7812958A72AF73FB5DB /* [CP] Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-DidomiExample/Pods-DidomiExample-resources-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Copy Pods Resources";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-DidomiExample/Pods-DidomiExample-resources-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DidomiExample/Pods-DidomiExample-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
- FD10A7F122414F3F0027D42C /* Start Packager */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- );
- name = "Start Packager";
- outputFileListPaths = (
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
- showEnvVarsInLog = 0;
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 00E356EA1AD99517003FC87E /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 13B07F871A680F5B00A75B9A /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
- 13B07FC11A68108700A75B9A /* main.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 5782FC472668DAA9009F822D /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- F644BBBA26C5810C004EBE16 /* PurposeData.swift in Sources */,
- F6CEE2E326C3CB4200FB6F6D /* String.swift in Sources */,
- F6CEE2E526C42B8100FB6F6D /* XCUIElement.swift in Sources */,
- 971D32C228DB43F2006D9FAA /* VendorData.swift in Sources */,
- 5782FC4E2668DAA9009F822D /* DidomiExampleUITests.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
- 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 13B07F861A680F5B00A75B9A /* DidomiExample */;
- targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
- };
- 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 2D02E47A1E0B4A5D006451C7 /* DidomiExample-tvOS */;
- targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */;
- };
- 5782FC512668DAA9009F822D /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 13B07F861A680F5B00A75B9A /* DidomiExample */;
- targetProxy = 5782FC502668DAA9009F822D /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
-/* Begin XCBuildConfiguration section */
- 00E356F61AD99517003FC87E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- BUNDLE_LOADER = "$(TEST_HOST)";
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- INFOPLIST_FILE = DidomiExampleTests/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- "@loader_path/Frameworks",
- );
- OTHER_LDFLAGS = (
- "-ObjC",
- "-lc++",
- "$(inherited)",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativedidomi;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
- SUPPORTS_MACCATALYST = YES;
- SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
- TARGETED_DEVICE_FAMILY = "1,2";
- TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DidomiExample.app/DidomiExample";
- };
- name = Debug;
- };
- 00E356F71AD99517003FC87E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- BUNDLE_LOADER = "$(TEST_HOST)";
- COPY_PHASE_STRIP = NO;
- INFOPLIST_FILE = DidomiExampleTests/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- "@loader_path/Frameworks",
- );
- OTHER_LDFLAGS = (
- "-ObjC",
- "-lc++",
- "$(inherited)",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativedidomi;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
- SUPPORTS_MACCATALYST = YES;
- SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
- TARGETED_DEVICE_FAMILY = "1,2";
- TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DidomiExample.app/DidomiExample";
- };
- name = Release;
- };
- 13B07F941A680F5B00A75B9A /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 47F7ED3B7971BE374F7B8635 /* Pods-DidomiExample.debug.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 1;
- DEVELOPMENT_TEAM = 9BTUBC86U7;
- ENABLE_BITCODE = NO;
- EXCLUDED_ARCHS = arm64;
- INFOPLIST_FILE = DidomiExample/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- OTHER_LDFLAGS = (
- "$(inherited)",
- "-ObjC",
- "-lc++",
- );
- PRODUCT_BUNDLE_IDENTIFIER = io.didomi.reactnativeapp;
- PRODUCT_NAME = DidomiExample;
- PROVISIONING_PROFILE_SPECIFIER = "Didomi RN dev";
- SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
- SUPPORTS_MACCATALYST = NO;
- SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Debug;
- };
- 13B07F951A680F5B00A75B9A /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = E00ACF0FDA8BF921659E2F9A /* Pods-DidomiExample.release.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 1;
- DEVELOPMENT_TEAM = 9BTUBC86U7;
- EXCLUDED_ARCHS = arm64;
- INFOPLIST_FILE = DidomiExample/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- OTHER_LDFLAGS = (
- "$(inherited)",
- "-ObjC",
- "-lc++",
- );
- PRODUCT_BUNDLE_IDENTIFIER = io.didomi.reactnativeapp;
- PRODUCT_NAME = DidomiExample;
- PROVISIONING_PROFILE_SPECIFIER = "Didomi RN dev";
- SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
- SUPPORTS_MACCATALYST = NO;
- SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Release;
- };
- 2D02E4971E0B4A5E006451C7 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
- ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_TESTABILITY = YES;
- GCC_NO_COMMON_BLOCKS = YES;
- INFOPLIST_FILE = "DidomiExample-tvOS/Info.plist";
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- OTHER_LDFLAGS = (
- "$(inherited)",
- "-ObjC",
- "-lc++",
- );
- PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.DidomiExample-tvOS";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = appletvos;
- TARGETED_DEVICE_FAMILY = 3;
- TVOS_DEPLOYMENT_TARGET = 10.0;
- };
- name = Debug;
- };
- 2D02E4981E0B4A5E006451C7 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
- ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- GCC_NO_COMMON_BLOCKS = YES;
- INFOPLIST_FILE = "DidomiExample-tvOS/Info.plist";
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- OTHER_LDFLAGS = (
- "$(inherited)",
- "-ObjC",
- "-lc++",
- );
- PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.DidomiExample-tvOS";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = appletvos;
- TARGETED_DEVICE_FAMILY = 3;
- TVOS_DEPLOYMENT_TARGET = 10.0;
- };
- name = Release;
- };
- 2D02E4991E0B4A5E006451C7 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- BUNDLE_LOADER = "$(TEST_HOST)";
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_TESTABILITY = YES;
- GCC_NO_COMMON_BLOCKS = YES;
- INFOPLIST_FILE = "DidomiExample-tvOSTests/Info.plist";
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- "@loader_path/Frameworks",
- );
- OTHER_LDFLAGS = (
- "$(inherited)",
- "-ObjC",
- "-lc++",
- );
- PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.DidomiExample-tvOSTests";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = appletvos;
- TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DidomiExample-tvOS.app/DidomiExample-tvOS";
- TVOS_DEPLOYMENT_TARGET = 10.1;
- };
- name = Debug;
- };
- 2D02E49A1E0B4A5E006451C7 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- BUNDLE_LOADER = "$(TEST_HOST)";
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- GCC_NO_COMMON_BLOCKS = YES;
- INFOPLIST_FILE = "DidomiExample-tvOSTests/Info.plist";
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- "@loader_path/Frameworks",
- );
- OTHER_LDFLAGS = (
- "$(inherited)",
- "-ObjC",
- "-lc++",
- );
- PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.DidomiExample-tvOSTests";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = appletvos;
- TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DidomiExample-tvOS.app/DidomiExample-tvOS";
- TVOS_DEPLOYMENT_TARGET = 10.1;
- };
- name = Release;
- };
- 5782FC532668DAA9009F822D /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "c++17";
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_STYLE = Automatic;
- DEBUG_INFORMATION_FORMAT = dwarf;
- DEVELOPMENT_TEAM = 9BTUBC86U7;
- EXCLUDED_ARCHS = arm64;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- INFOPLIST_FILE = DidomiExampleUITests/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 14.3;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- "@loader_path/Frameworks",
- );
- LIBRARY_SEARCH_PATHS = (
- "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
- "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.2/$(PLATFORM_NAME)\"",
- );
- MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
- MTL_FAST_MATH = YES;
- PRODUCT_BUNDLE_IDENTIFIER = didomi.DidomiExampleUITests;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- TEST_TARGET_NAME = DidomiExample;
- };
- name = Debug;
- };
- 5782FC542668DAA9009F822D /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "c++17";
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_STYLE = Automatic;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- DEVELOPMENT_TEAM = 9BTUBC86U7;
- EXCLUDED_ARCHS = arm64;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- INFOPLIST_FILE = DidomiExampleUITests/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 14.3;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- "@loader_path/Frameworks",
- );
- LIBRARY_SEARCH_PATHS = (
- "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
- "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.2/$(PLATFORM_NAME)\"",
- );
- MTL_FAST_MATH = YES;
- PRODUCT_BUNDLE_IDENTIFIER = didomi.DidomiExampleUITests;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_COMPILATION_MODE = wholemodule;
- SWIFT_OPTIMIZATION_LEVEL = "-O";
- SWIFT_VERSION = 5.0;
- TARGETED_DEVICE_FAMILY = "1,2";
- TEST_TARGET_NAME = DidomiExample;
- };
- name = Release;
- };
- 83CBBA201A601CBA00E9B192 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "c++17";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- EXCLUDED_ARCHS = arm64;
- "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "$(inherited)",
- "DEBUG=1",
- );
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
- LD_RUNPATH_SEARCH_PATHS = (
- /usr/lib/swift,
- "$(inherited)",
- );
- LIBRARY_SEARCH_PATHS = (
- "\"$(SDKROOT)/usr/lib/swift\"",
- "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
- "\"$(inherited)\"",
- );
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- OTHER_CPLUSPLUSFLAGS = (
- "$(OTHER_CFLAGS)",
- "-DFOLLY_NO_CONFIG",
- "-DFOLLY_MOBILE=1",
- "-DFOLLY_USE_LIBCPP=1",
- );
- SDKROOT = iphoneos;
- };
- name = Debug;
- };
- 83CBBA211A601CBA00E9B192 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "c++17";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = YES;
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- EXCLUDED_ARCHS = arm64;
- "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_PREPROCESSOR_DEFINITIONS = "";
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 12.0;
- LD_RUNPATH_SEARCH_PATHS = (
- /usr/lib/swift,
- "$(inherited)",
- );
- LIBRARY_SEARCH_PATHS = (
- "\"$(SDKROOT)/usr/lib/swift\"",
- "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
- "\"$(inherited)\"",
- );
- MTL_ENABLE_DEBUG_INFO = NO;
- OTHER_CPLUSPLUSFLAGS = (
- "$(OTHER_CFLAGS)",
- "-DFOLLY_NO_CONFIG",
- "-DFOLLY_MOBILE=1",
- "-DFOLLY_USE_LIBCPP=1",
- );
- SDKROOT = iphoneos;
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "DidomiExampleTests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 00E356F61AD99517003FC87E /* Debug */,
- 00E356F71AD99517003FC87E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "DidomiExample" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 13B07F941A680F5B00A75B9A /* Debug */,
- 13B07F951A680F5B00A75B9A /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "DidomiExample-tvOS" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 2D02E4971E0B4A5E006451C7 /* Debug */,
- 2D02E4981E0B4A5E006451C7 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "DidomiExample-tvOSTests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 2D02E4991E0B4A5E006451C7 /* Debug */,
- 2D02E49A1E0B4A5E006451C7 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 5782FC522668DAA9009F822D /* Build configuration list for PBXNativeTarget "DidomiExampleUITests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 5782FC532668DAA9009F822D /* Debug */,
- 5782FC542668DAA9009F822D /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "DidomiExample" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 83CBBA201A601CBA00E9B192 /* Debug */,
- 83CBBA211A601CBA00E9B192 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
-}
diff --git a/testApp/ios/DidomiExample.xcodeproj/xcshareddata/xcschemes/DidomiExampleUITests.xcscheme b/testApp/ios/DidomiExample.xcodeproj/xcshareddata/xcschemes/DidomiExampleUITests.xcscheme
deleted file mode 100644
index d11f21e2..00000000
--- a/testApp/ios/DidomiExample.xcodeproj/xcshareddata/xcschemes/DidomiExampleUITests.xcscheme
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/testApp/ios/DidomiExample/AppDelegate.h b/testApp/ios/DidomiExample/AppDelegate.h
deleted file mode 100644
index 2726d5e1..00000000
--- a/testApp/ios/DidomiExample/AppDelegate.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-#import
-#import
-
-@interface AppDelegate : UIResponder
-
-@property (nonatomic, strong) UIWindow *window;
-
-@end
diff --git a/testApp/ios/DidomiExample/AppDelegate.mm b/testApp/ios/DidomiExample/AppDelegate.mm
deleted file mode 100644
index 19238bdf..00000000
--- a/testApp/ios/DidomiExample/AppDelegate.mm
+++ /dev/null
@@ -1,108 +0,0 @@
-#import "AppDelegate.h"
-
-#import
-#import
-#import
-
-#import
-
-#if RCT_NEW_ARCH_ENABLED
-#import
-#import
-#import
-#import
-#import
-#import
-
-#import
-
-@interface AppDelegate () {
- RCTTurboModuleManager *_turboModuleManager;
- RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
- std::shared_ptr _reactNativeConfig;
- facebook::react::ContextContainer::Shared _contextContainer;
-}
-@end
-#endif
-
-@implementation AppDelegate
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{
- RCTAppSetupPrepareApp(application);
-
- RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
-
-#if RCT_NEW_ARCH_ENABLED
- _contextContainer = std::make_shared();
- _reactNativeConfig = std::make_shared();
- _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
- _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
- bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
-#endif
-
- UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"DidomiExample", nil);
-
- if (@available(iOS 13.0, *)) {
- rootView.backgroundColor = [UIColor systemBackgroundColor];
- } else {
- rootView.backgroundColor = [UIColor whiteColor];
- }
-
- self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
- UIViewController *rootViewController = [UIViewController new];
- rootViewController.view = rootView;
- self.window.rootViewController = rootViewController;
- [self.window makeKeyAndVisible];
- return YES;
-}
-
-- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
-{
-#if DEBUG
- return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
-#else
- return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
-#endif
-}
-
-#if RCT_NEW_ARCH_ENABLED
-
-#pragma mark - RCTCxxBridgeDelegate
-
-- (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge
-{
- _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
- delegate:self
- jsInvoker:bridge.jsCallInvoker];
- return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
-}
-
-#pragma mark RCTTurboModuleManagerDelegate
-
-- (Class)getModuleClassFromName:(const char *)name
-{
- return RCTCoreModulesClassProvider(name);
-}
-
-- (std::shared_ptr)getTurboModule:(const std::string &)name
- jsInvoker:(std::shared_ptr)jsInvoker
-{
- return nullptr;
-}
-
-- (std::shared_ptr)getTurboModule:(const std::string &)name
- initParams:
- (const facebook::react::ObjCTurboModule::InitParams &)params
-{
- return nullptr;
-}
-
-- (id)getModuleInstanceFromClass:(Class)moduleClass
-{
- return RCTAppSetupDefaultModuleFromClass(moduleClass);
-}
-
-#endif
-
-@end
diff --git a/testApp/ios/DidomiExample/GoogleService-Info.plist b/testApp/ios/DidomiExample/GoogleService-Info.plist
deleted file mode 100644
index 0eacfc94..00000000
--- a/testApp/ios/DidomiExample/GoogleService-Info.plist
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
- CLIENT_ID
- 109582414482-blg8krjk14dqvfr1rhnauk6mgba8jj4r.apps.googleusercontent.com
- REVERSED_CLIENT_ID
- com.googleusercontent.apps.109582414482-blg8krjk14dqvfr1rhnauk6mgba8jj4r
- API_KEY
- AIzaSyAF5iJm45FfqrQcxubzWNx6uI2Mj1BHnl4
- GCM_SENDER_ID
- 109582414482
- PLIST_VERSION
- 1
- BUNDLE_ID
- com.example.reactnativedidomi
- PROJECT_ID
- didomi-sdk
- STORAGE_BUCKET
- didomi-sdk.appspot.com
- IS_ADS_ENABLED
-
- IS_ANALYTICS_ENABLED
-
- IS_APPINVITE_ENABLED
-
- IS_GCM_ENABLED
-
- IS_SIGNIN_ENABLED
-
- GOOGLE_APP_ID
- 1:109582414482:ios:405928f51ce378779c2c4b
-
-
\ No newline at end of file
diff --git a/testApp/ios/File.swift b/testApp/ios/File.swift
deleted file mode 100644
index 7328100b..00000000
--- a/testApp/ios/File.swift
+++ /dev/null
@@ -1,6 +0,0 @@
-//
-// File.swift
-// DidomiExample
-//
-
-import Foundation
diff --git a/testApp/ios/Podfile b/testApp/ios/Podfile
deleted file mode 100644
index f4769385..00000000
--- a/testApp/ios/Podfile
+++ /dev/null
@@ -1,42 +0,0 @@
-require_relative '../node_modules/react-native/scripts/react_native_pods'
-require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
-
-platform :ios, '12.0'
-install! 'cocoapods', :deterministic_uuids => false
-
-target 'DidomiExample' do
- config = use_native_modules!
-
- # Flags change depending on the env values.
- flags = get_default_flags()
-
- use_react_native!(
- :path => config[:reactNativePath],
- # to enable hermes on iOS, change `false` to `true` and then install pods
- :hermes_enabled => flags[:hermes_enabled],
- :fabric_enabled => flags[:fabric_enabled],
- # An absolute path to your application root.
- :app_path => "#{Pod::Config.instance.installation_root}/.."
- )
-
- pod 'react-native-didomi', :path => '../..'
-
- # Enables Flipper.
- #
- # Note that if you have use_frameworks! enabled, Flipper will not work and
- # you should disable these next few lines.
- #use_flipper!()
-
- post_install do |installer|
- react_native_post_install(installer)
- __apply_Xcode_12_5_M1_post_install_workaround(installer)
- installer.pods_project.targets.each do |target|
- target.build_configurations.each do |config|
- config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
- end
- end
- end
-end
-
-# add pods for desired Firebase products
-# https://firebase.google.com/docs/ios/setup#available-pods
diff --git a/testApp/ios/didomi_config.json b/testApp/ios/didomi_config.json
deleted file mode 100644
index e9763f5e..00000000
--- a/testApp/ios/didomi_config.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "app": {
- "name": "Didomi Test App",
- "privacyPolicyURL": "http://www.website.com/privacy",
- "vendors": {
- "iab": {
- "version": 2,
- "include": [28,755],
- "all": false,
- "enabled": true
- }
- },
- "gdprAppliesGlobally": true,
- "gdprAppliesWhenUnknown": true,
- "country" : "fr"
- },
- "languages": {
- "enabled": ["fr", "en", "es"],
- "default": "en"
- }
-}
diff --git a/testApp/metro.config.js b/testApp/metro.config.js
deleted file mode 100644
index 66281248..00000000
--- a/testApp/metro.config.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const path = require('path');
-const blacklist = require('metro-config/src/defaults/exclusionList');
-const escape = require('escape-string-regexp');
-const pak = require('../package.json');
-
-const root = path.resolve(__dirname, '..');
-
-const modules = Object.keys({
- ...pak.peerDependencies,
-});
-
-module.exports = {
- projectRoot: __dirname,
- watchFolders: [root],
-
- // We need to make sure that only one version is loaded for peerDependencies
- // So we blacklist them at the root, and alias them to the versions in example's node_modules
- resolver: {
- blacklistRE: blacklist([
- new RegExp(
- `^${escape(path.resolve(__dirname, '..', 'node_modules'))}\\/.*$`
- ),
- ]),
-
- extraNodeModules: modules.reduce((acc, name) => {
- acc[name] = path.join(__dirname, 'node_modules', name);
- return acc;
- }, {}),
- },
-
- transformer: {
- getTransformOptions: async () => ({
- transform: {
- experimentalImportSupport: false,
- inlineRequires: false,
- },
- }),
- },
-};
diff --git a/testApp/package.json b/testApp/package.json
deleted file mode 100644
index ab684f27..00000000
--- a/testApp/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "react-native-didomi-test-app",
- "description": "Test App for react-native-didomi",
- "version": "0.0.1",
- "license": "BSD-3",
- "private": true,
- "scripts": {
- "android": "react-native run-android",
- "ios": "react-native run-ios",
- "start": "react-native start"
- },
- "dependencies": {
- "react": "17.0.2",
- "react-native": "0.68.5"
- },
- "devDependencies": {
- "@babel/core": "^7.12.9",
- "@babel/runtime": "^7.12.5",
- "@react-native-community/eslint-config": "^2.0.0",
- "babel-jest": "^26.6.3",
- "eslint": "^7.32.0",
- "jest": "^26.6.3",
- "babel-plugin-module-resolver": "^4.0.0",
- "metro-react-native-babel-preset": "^0.67.0",
- "react-test-renderer": "17.0.2"
- },
- "jest": {
- "preset": "react-native"
- }
-}
diff --git a/tsconfig.build.json b/tsconfig.build.json
index 65188c6c..ab66730e 100644
--- a/tsconfig.build.json
+++ b/tsconfig.build.json
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig",
- "exclude": ["testApp", "sampleApp"]
+ "exclude": ["test", "sample"]
}