Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,22 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_CALL_LOG"/>

<!-- android:hardwareAccelerated is essential for Android performance: https://developer.android.com/topic/performance/hardware-accel -->
<application
android:name=".MainApplication"
android:allowBackup="false"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:resizeableActivity="false"
android:supportsRtl="false"
android:theme="@style/AppTheme"
tools:replace="android:supportsRtl">
tools:replace="android:supportsRtl"
android:backupAgent="com.group_ib.react.BackupAgentHelper"
tools:ignore="AllowBackup,GoogleAppIndexingWarning">

<service
android:name="com.expensify.reactnativebackgroundtask.BackgroundJobService"
Expand Down Expand Up @@ -167,5 +171,12 @@
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/bootsplash_background" />

<provider
android:name="com.group_ib.react.GibProvider"
android:exported="true"
android:authorities="com.expensify.chat.gib"
android:process=":gib"
android:writePermission="com.expensify.chat.permission.WRITE" />

</application>
</manifest>
4 changes: 4 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ include ':react-native-config'
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
include ':react-native-plaid-link-sdk'
project(':react-native-plaid-link-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-plaid-link-sdk/android')
include ':gibsdk'
project(':gibsdk').projectDir = new File(rootProject.projectDir, '../node_modules/group-ib-fp/android/gibsdk')
include ':package'
project(':package').projectDir = new File(rootProject.projectDir, '../node_modules/group-ib-fp/android/package')
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')

Expand Down
1 change: 1 addition & 0 deletions config/webpack/webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
// These files are copied over as per instructions here
// https://github.com/wojtekmaj/react-pdf#copying-cmaps
{from: 'node_modules/pdfjs-dist/cmaps/', to: 'cmaps/'},
{from: 'web/gib.js', to: 'js/gib.js'},
],
}),
new EnvironmentPlugin({JEST_WORKER_ID: ''}),
Expand Down
2 changes: 2 additions & 0 deletions ios/NewExpensify.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@
"${PODS_CONFIGURATION_BUILD_DIR}/GoogleUtilities/GoogleUtilities_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly/RCT-Folly_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNPermissions/RNPermissionsPrivacyInfo.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNSVG/RNSVGFilters.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/React-Core_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact/React-cxxreact_privacy.bundle",
Expand All @@ -707,6 +708,7 @@
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleUtilities_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FBLPromises_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCT-Folly_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNPermissionsPrivacyInfo.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNSVGFilters.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-Core_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-cxxreact_privacy.bundle",
Expand Down
2 changes: 2 additions & 0 deletions ios/NewExpensify/Chat.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<string>applinks:staging.new.expensify.com</string>
<string>webcredentials:new.expensify.com</string>
</array>
<key>com.apple.developer.networking.wifi-info</key>
<true/>
<key>com.apple.developer.usernotifications.communication</key>
<true/>
<key>com.apple.security.application-groups</key>
Expand Down
2 changes: 2 additions & 0 deletions ios/NewExpensify/NewExpensifyDebugAdHoc.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<string>applinks:staging.new.expensify.com</string>
<string>webcredentials:new.expensify.com</string>
</array>
<key>com.apple.developer.networking.wifi-info</key>
<true/>
<key>com.apple.developer.usernotifications.communication</key>
<true/>
<key>com.apple.security.application-groups</key>
Expand Down
2 changes: 2 additions & 0 deletions ios/NewExpensify/NewExpensifyDebugDevelopment.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<string>applinks:staging.new.expensify.com</string>
<string>webcredentials:new.expensify.com</string>
</array>
<key>com.apple.developer.networking.wifi-info</key>
<true/>
<key>com.apple.developer.usernotifications.communication</key>
<true/>
<key>com.apple.security.application-groups</key>
Expand Down
2 changes: 2 additions & 0 deletions ios/NewExpensify/NewExpensifyDebugProduction.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<string>applinks:staging.new.expensify.com</string>
<string>webcredentials:new.expensify.com</string>
</array>
<key>com.apple.developer.networking.wifi-info</key>
<true/>
<key>com.apple.developer.usernotifications.communication</key>
<true/>
<key>com.apple.security.application-groups</key>
Expand Down
2 changes: 2 additions & 0 deletions ios/NewExpensify/NewExpensifyReleaseAdHoc.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<string>applinks:staging.new.expensify.com</string>
<string>webcredentials:new.expensify.com</string>
</array>
<key>com.apple.developer.networking.wifi-info</key>
<true/>
<key>com.apple.developer.usernotifications.communication</key>
<true/>
<key>com.apple.security.application-groups</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<string>applinks:staging.new.expensify.com</string>
<string>webcredentials:new.expensify.com</string>
</array>
<key>com.apple.developer.networking.wifi-info</key>
<true/>
<key>com.apple.developer.usernotifications.communication</key>
<true/>
<key>com.apple.security.application-groups</key>
Expand Down
2 changes: 2 additions & 0 deletions ios/NewExpensify/NewExpensifyReleaseProduction.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<string>applinks:staging.new.expensify.com</string>
<string>webcredentials:new.expensify.com</string>
</array>
<key>com.apple.developer.networking.wifi-info</key>
<true/>
<key>com.apple.developer.usernotifications.communication</key>
<true/>
<key>com.apple.security.application-groups</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2615,7 +2615,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNPermissions (3.10.1):
- RNPermissions (5.4.0):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -3517,7 +3517,7 @@ SPEC CHECKSUMS:
RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81
rnmapbox-maps: 1d313fe5d7d18845b3015ffd6994e0c81afbffcd
RNNitroSQLite: 0243d91c6662d8a334fb4953c969b82884ac6c68
RNPermissions: ae4949b7250af8edc4791e440490c0f96237b329
RNPermissions: 2bd29bcb1b2b1c6f8169f543db9d37680b9af9d8
RNReactNativeHapticFeedback: 5fdbbaedabc1698dc3bb2a72105fadf63136a451
RNReanimated: 67d8eda35002543abb656f25fa1a457ceeab6807
RNScreens: 9b9bb7f9dc3eb218d79d84e0ac15df65d0e349f2
Expand Down
15 changes: 15 additions & 0 deletions modules/react-native-module-fhp/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]

indent_style = space
indent_size = 2

end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
3 changes: 3 additions & 0 deletions modules/react-native-module-fhp/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.pbxproj -text
# specific for windows script files
*.bat text eol=crlf
67 changes: 67 additions & 0 deletions modules/react-native-module-fhp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# OSX
#
.DS_Store

# XDE
.expo/

# VSCode
.vscode/
jsconfig.json

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IJ
#
.classpath
.cxx
.gradle
.idea
.project
.settings
local.properties
android.iml

# Cocoapods
#
example/ios/Pods

# Ruby
example/vendor/

# node.js
#
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
android/app/libs
android/keystores/debug.keystore

# Expo
.expo/*

# generated by bob
lib/
1 change: 1 addition & 0 deletions modules/react-native-module-fhp/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions modules/react-native-module-fhp/.yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Override Yarn command so we can automatically setup the repo on running `yarn`

yarn-path "scripts/bootstrap.js"
140 changes: 140 additions & 0 deletions modules/react-native-module-fhp/android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
}
}

def isNewArchitectureEnabled() {
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
}

apply plugin: 'com.android.library'

if (isNewArchitectureEnabled()) {
apply plugin: 'com.facebook.react'
}

def getExtOrDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['ModuleFhpIos_' + name]
}

def getExtOrIntegerDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['ModuleFhpIos_' + name]).toInteger()
}

android {
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')

defaultConfig {
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
}
buildTypes {
release {
minifyEnabled false
}
}

lintOptions {
disable 'GradleCompatible'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

repositories {
mavenCentral()
google()

def found = false
def defaultDir = null
def androidSourcesName = 'React Native sources'

if (rootProject.ext.has('reactNativeAndroidRoot')) {
defaultDir = rootProject.ext.get('reactNativeAndroidRoot')
} else {
defaultDir = new File(
projectDir,
'/../../../node_modules/react-native/android'
)
}

if (defaultDir.exists()) {
maven {
url defaultDir.toString()
name androidSourcesName
}

logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}")
found = true
} else {
def parentDir = rootProject.projectDir

1.upto(5, {
if (found) return true
parentDir = parentDir.parentFile

def androidSourcesDir = new File(
parentDir,
'node_modules/react-native'
)

def androidPrebuiltBinaryDir = new File(
parentDir,
'node_modules/react-native/android'
)

if (androidPrebuiltBinaryDir.exists()) {
maven {
url androidPrebuiltBinaryDir.toString()
name androidSourcesName
}

logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}")
found = true
} else if (androidSourcesDir.exists()) {
maven {
url androidSourcesDir.toString()
name androidSourcesName
}

logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}")
found = true
}
})
}

if (!found) {
throw new GradleException(
"${project.name}: unable to locate React Native android sources. " +
"Ensure you have you installed React Native as a dependency in your project and try again."
)
}
}

dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation(project(':gibsdk'))
implementation(project(':package'))
// From node_modules
}

if (isNewArchitectureEnabled()) {
react {
jsRootDir = file("../src/")
libraryName = "ModuleFhpIos"
codegenJavaPackageName = "com.group_ib.react"
}
}
1 change: 1 addition & 0 deletions modules/react-native-module-fhp/android/fhp.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// empty config
2 changes: 2 additions & 0 deletions modules/react-native-module-fhp/android/gibsdk/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
configurations.maybeCreate("default")
artifacts.add("default", file('gibsdk-androidx-2.0.1335201224.aar'))
Binary file not shown.
Loading
Loading