Skip to content

Contacts import #51018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 118 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
2df9ba8
init module
perunt Oct 17, 2024
b4f505b
workspaces
perunt Oct 17, 2024
3a42db1
add module to config
perunt Oct 17, 2024
f7905fa
rename
perunt Oct 17, 2024
c51dddc
specs
perunt Oct 17, 2024
516fca0
bring back vision camera
perunt Oct 17, 2024
062746a
use contactsNitroModule directory
perunt Oct 17, 2024
8fda24c
swift HybridContactsModule
perunt Oct 17, 2024
0f9f6bb
kotlin HybridContactsModule
perunt Oct 17, 2024
fdc5ba6
ts spec for ContactsModule
perunt Oct 17, 2024
a27fbc1
generate native specs
perunt Oct 17, 2024
3418bf0
fix typo
perunt Oct 17, 2024
9b1a518
fix rawValue
perunt Oct 17, 2024
72dd226
rename types
perunt Oct 17, 2024
3c37e90
rename ContactData to Contact
perunt Oct 17, 2024
aefad1a
update HybridContactsModule
perunt Oct 18, 2024
4f291ea
add permission to android manifest
perunt Oct 21, 2024
b7d2798
add permission to infoplist
perunt Oct 21, 2024
27f3dfe
setup_permissions
perunt Oct 21, 2024
e9b4116
ContactPermission
perunt Oct 21, 2024
a202982
getAvatarForContact
perunt Oct 22, 2024
f10112d
eslint
perunt Oct 22, 2024
ef0dd64
prettier + babel
perunt Oct 22, 2024
9f10a33
ts config
perunt Oct 22, 2024
98fa0e7
webpack
perunt Oct 22, 2024
5cec2a6
import contacts
perunt Oct 22, 2024
99cf1b5
update getAvatarForContact
perunt Oct 22, 2024
31e9045
fix alternateText
perunt Oct 22, 2024
4b7e1d6
translations
perunt Oct 22, 2024
0906086
add 'go to settings' handler
perunt Oct 22, 2024
b2ae85e
modify ContactUtils
perunt Oct 29, 2024
2a272c8
contactImport for native
perunt Oct 29, 2024
564f7b8
contactImport types
perunt Oct 29, 2024
9eecce9
lint
perunt Oct 29, 2024
2e47a91
getUserToInviteContactOption
perunt Oct 29, 2024
c8dabeb
use new contactImport
perunt Oct 29, 2024
776184f
podfile
perunt Oct 29, 2024
ce34d2f
project.pbxproj
perunt Oct 29, 2024
b33008e
revert bad merge. New merge branch 'main' of https://github.com/Expen…
perunt Oct 30, 2024
702cbd9
del-cli
perunt Nov 1, 2024
856d2f0
rename
perunt Nov 5, 2024
c0565e6
Merge branch 'main' of https://github.com/Expensify/App into @perunt/…
perunt Nov 5, 2024
9bfff0a
clean
perunt Nov 5, 2024
1da5781
change namespace
perunt Nov 8, 2024
1c2b16f
fix release build
hannojg Nov 9, 2024
bdfb7f9
Merge branch '@perunt/contacts-import' of https://github.com/margelo/…
perunt Nov 11, 2024
42eb800
use didScreenTransitionEnd
perunt Nov 11, 2024
f79913d
bump nitro-modules
perunt Nov 11, 2024
8639e63
bump nitro codegen
perunt Nov 11, 2024
e3272a3
generate spec
perunt Nov 11, 2024
784c9bd
sync
perunt Nov 11, 2024
110a71f
Merge branch 'main' of https://github.com/Expensify/App into @perunt/…
perunt Nov 11, 2024
0475d04
clean contactImport
perunt Nov 11, 2024
f64d624
rename
perunt Nov 12, 2024
f7893e5
Merge branch 'main' of https://github.com/Expensify/App into @perunt/…
perunt Nov 12, 2024
5670346
clean after merge
perunt Nov 12, 2024
2353c14
typing
perunt Nov 12, 2024
caf9d7c
pbxproj
perunt Nov 12, 2024
803d590
verifyPodfile
perunt Nov 12, 2024
24d56b7
clean
perunt Nov 12, 2024
8ac1eb2
change import
perunt Nov 15, 2024
ba0dfa5
add more options for getParticipantsOption
perunt Nov 15, 2024
686281d
remove modules folder from config
perunt Nov 15, 2024
09041ff
remove space
perunt Nov 15, 2024
35b8792
typo
perunt Nov 15, 2024
e0a2878
add const
perunt Nov 15, 2024
8a12501
inject participantDetails
perunt Nov 15, 2024
e178bdd
soft input modal
perunt Nov 18, 2024
0fc1749
translations
perunt Nov 18, 2024
1b0f8fe
translations
perunt Nov 19, 2024
4d8afea
fix type
perunt Nov 19, 2024
766d157
add permission state for contactImport
perunt Nov 19, 2024
149539e
redesign
perunt Nov 19, 2024
253d1ec
update textInputAutoFocus
perunt Nov 20, 2024
67e4a61
ContactPermissionModal
perunt Nov 20, 2024
525124e
new translations
perunt Nov 20, 2024
46892e7
info.plist NSContactsUsageDescription
perunt Nov 20, 2024
82665bf
Merge branch 'main' of https://github.com/Expensify/App into @perunt/…
perunt Nov 20, 2024
76cc087
lint
perunt Nov 20, 2024
da5bf6f
fix types
perunt Nov 20, 2024
1d34560
move ContactPermission and contactImport ro lib folder
perunt Nov 20, 2024
c45b6ec
clean ContactUtils
perunt Nov 20, 2024
6ff9a77
tsconfig
perunt Nov 20, 2024
90cc6da
add paths to tsconfig.json
perunt Nov 20, 2024
acc3ef1
add ContactsNitroModule to tsconfig
perunt Nov 20, 2024
364e34d
export Contact interface
perunt Nov 20, 2024
7465092
fix getAll type
perunt Nov 20, 2024
309d674
bump Nitro
perunt Nov 21, 2024
dbb62c0
bump nitro codegen
perunt Nov 21, 2024
4852653
test trigger
perunt Nov 21, 2024
aa2e4e7
podfile update
perunt Nov 22, 2024
318dc76
refactor sortEmailObjects
perunt Nov 27, 2024
b63607e
clean
perunt Nov 27, 2024
cd3dbe0
Merge branch 'main' of https://github.com/Expensify/App into @perunt/…
perunt Nov 27, 2024
ca50ba8
fix after merge branch 'main' of https://github.com/Expensify/App int…
perunt Nov 27, 2024
e664daf
check for UNAVAILABLE status
perunt Nov 27, 2024
adcd640
headerContent
perunt Dec 2, 2024
b684824
merge participantsList
perunt Dec 2, 2024
d643ed6
roll back package-lock
perunt Dec 2, 2024
a6babe3
package-lock
perunt Dec 2, 2024
a1b0cfa
Merge branch 'main' of https://github.com/Expensify/App into @perunt/…
perunt Dec 3, 2024
a7013cc
bump nitro
perunt Dec 3, 2024
10807e5
clean after merge
perunt Dec 3, 2024
aaa93a7
lint
perunt Dec 3, 2024
bd60d35
prettier
perunt Dec 3, 2024
99e9bdf
lint one more time
perunt Dec 3, 2024
9aa91fe
Merge branch 'main' of https://github.com/Expensify/App into @perunt/…
perunt Dec 4, 2024
7ec4988
ignore autogenerated files
perunt Dec 4, 2024
292d8e3
point the definitions
perunt Dec 4, 2024
beee7e7
use local main in module
perunt Dec 4, 2024
31dd754
exclude modules
perunt Dec 4, 2024
c1fa17b
add NVP_LAST_CONTACT_PERMISSION_PROMPT
perunt Dec 9, 2024
560cb80
remove lastContactPermissionPrompt
perunt Dec 9, 2024
5145d8c
Merge branch 'main' of https://github.com/Expensify/App into @perunt/…
perunt Dec 11, 2024
d99556d
Merge branch 'main' of https://github.com/Expensify/App into @perunt/…
perunt Dec 11, 2024
b3b727e
lint
perunt Dec 11, 2024
d2f0f9c
trigger test
perunt Dec 11, 2024
eb863fd
clean
perunt Dec 11, 2024
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ web/gtm.js
src/libs/SearchParser/searchParser.js
src/libs/SearchParser/autocompleteParser.js
help/_scripts/**
modules/**
1 change: 1 addition & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# Add any project specific keep options here:
-keep class com.expensify.chat.BuildConfig { *; }
-keep class com.facebook.** { *; }
-keep class com.margelo.nitro.** { *; }
-keep, allowoptimization, allowobfuscation class expo.modules.** { *; }

# Keep generic signature of Call, Response (R8 full mode strips signatures from non-kept items).
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Expand Down
2 changes: 2 additions & 0 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
</dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>NSContactsUsageDescription</key>
<string>Import contacts from your phone so your favorite people are always a tap away.</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>venmo</string>
Expand Down
1 change: 1 addition & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ prepare_react_native_project!

setup_permissions([
'Camera',
'Contacts',
'LocationAccuracy',
'LocationAlways',
'LocationWhenInUse'
Expand Down
57 changes: 55 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,28 @@ PODS:
- AppAuth/Core
- AppLogs (0.1.0)
- boost (1.84.0)
- ContactsModule (0.0.1):
- DoubleConversion
- glog
- hermes-engine
- NitroModules
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- DoubleConversion (1.1.6)
- EXAV (14.0.7):
- ExpoModulesCore
Expand Down Expand Up @@ -287,6 +309,29 @@ PODS:
- nanopb/encode (= 2.30908.0)
- nanopb/decode (2.30908.0)
- nanopb/encode (2.30908.0)
- NitroModules (0.18.1):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-callinvoker
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-jsi
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- Onfido (29.7.2)
- onfido-react-native-sdk (10.6.0):
- DoubleConversion
Expand Down Expand Up @@ -2729,6 +2774,7 @@ DEPENDENCIES:
- AirshipServiceExtension
- AppLogs (from `../node_modules/react-native-app-logs/AppLogsPod`)
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- ContactsModule (from `../modules/ContactsNitroModule`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- EXAV (from `../node_modules/expo-av/ios`)
- EXImageLoader (from `../node_modules/expo-image-loader/ios`)
Expand All @@ -2744,6 +2790,7 @@ DEPENDENCIES:
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
- lottie-react-native (from `../node_modules/lottie-react-native`)
- NitroModules (from `../node_modules/react-native-nitro-modules`)
- "onfido-react-native-sdk (from `../node_modules/@onfido/react-native-sdk`)"
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
Expand Down Expand Up @@ -2894,6 +2941,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-app-logs/AppLogsPod"
boost:
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
ContactsModule:
:path: "../modules/ContactsNitroModule"
DoubleConversion:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
EXAV:
Expand Down Expand Up @@ -2925,6 +2974,8 @@ EXTERNAL SOURCES:
:tag: hermes-2024-08-15-RNv0.75.1-4b3bf912cc0f705b51b71ce1a5b8bd79b93a451b
lottie-react-native:
:path: "../node_modules/lottie-react-native"
NitroModules:
:path: "../node_modules/react-native-nitro-modules"
onfido-react-native-sdk:
:path: "../node_modules/@onfido/react-native-sdk"
RCT-Folly:
Expand Down Expand Up @@ -3139,6 +3190,7 @@ SPEC CHECKSUMS:
AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa
AppLogs: 3bc4e9b141dbf265b9464409caaa40416a9ee0e0
boost: 26992d1adf73c1c7676360643e687aee6dda994b
ContactsModule: 21671b28654413dc28795d1afc3b12eaffa28ed1
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
EXAV: afa491e598334bbbb92a92a2f4dd33d7149ad37f
EXImageLoader: ab589d67d6c5f2c33572afea9917304418566334
Expand Down Expand Up @@ -3178,6 +3230,7 @@ SPEC CHECKSUMS:
MapboxMaps: e76b14f52c54c40b76ddecd04f40448e6f35a864
MapboxMobileEvents: de50b3a4de180dd129c326e09cd12c8adaaa46d6
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
NitroModules: ebe2ba2d01dc03c1f82441561fe6062b8c3c4366
Onfido: f3af62ea1c9a419589c133e3e511e5d2c4f3f8af
onfido-react-native-sdk: 4ccfdeb10f9ccb4a5799d2555cdbc2a068a42c0d
Plaid: c32f22ffce5ec67c9e6147eaf6c4d7d5f8086d89
Expand Down Expand Up @@ -3274,7 +3327,7 @@ SPEC CHECKSUMS:
RNLiveMarkdown: 8338447b39fcd86596c74b9e0e9509e365a2dd3b
RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81
rnmapbox-maps: 460d6ff97ae49c7d5708c3212c6521697c36a0c4
RNPermissions: 0b1429b55af59d1d08b75a8be2459f65a8ac3f28
RNPermissions: 9e5c26aaa982fe00743281f6f47fbdc050ebc58f
RNReactNativeHapticFeedback: 73756a3477a5a622fa16862a3ab0d0fc5e5edff5
RNReanimated: 03ba2447d5a7789e2843df2ee05108d93b6441d6
RNScreens: de6e57426ba0e6cbc3fb5b4f496e7f08cb2773c2
Expand All @@ -3290,6 +3343,6 @@ SPEC CHECKSUMS:
VisionCamera: c95a8ad535f527562be1fb05fb2fd324578e769c
Yoga: a1d7895431387402a674fd0d1c04ec85e87909b8

PODFILE CHECKSUM: 615266329434ea4a994dccf622008a2197313c88
PODFILE CHECKSUM: e744fa802b4bee097ff8d1977dd8f79d16b21547

COCOAPODS: 1.15.2
78 changes: 78 additions & 0 deletions modules/ContactsNitroModule/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# 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

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Expo
.expo/

# Turborepo
.turbo/

# generated by bob
lib/
1 change: 1 addition & 0 deletions modules/ContactsNitroModule/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
29 changes: 29 additions & 0 deletions modules/ContactsNitroModule/ContactsModule.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
require "json"

package = JSON.parse(File.read(File.join(__dir__, "package.json")))

Pod::Spec.new do |s|
s.name = "ContactsModule"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]

s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/mrousavy/nitro.git", :tag => "#{s.version}" }

s.source_files = [
# Implementation (Swift)
"ios/**/*.{swift}",
# Autolinking/Registration (Objective-C++)
"ios/**/*.{m,mm}",
# Implementation (C++ objects)
"cpp/**/*.{hpp,cpp}",
]

load 'nitrogen/generated/ios/ContactsModule+autolinking.rb'
add_nitrogen_files(s)

install_modules_dependencies(s)
end
29 changes: 29 additions & 0 deletions modules/ContactsNitroModule/android/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
project(ContactsModule)
cmake_minimum_required(VERSION 3.9.0)

set (PACKAGE_NAME ContactsModule)
set (CMAKE_VERBOSE_MAKEFILE ON)
set (CMAKE_CXX_STANDARD 20)

# Define C++ library and add all sources
add_library(${PACKAGE_NAME} SHARED
src/main/cpp/cpp-adapter.cpp
)

# Add Nitrogen specs :)
include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/ContactsModule+autolinking.cmake)

# Set up local includes
include_directories(
"src/main/cpp"
"../cpp"
)

find_library(LOG_LIB log)

# Link all libraries together
target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
android # <-- Android core
)
Loading
Loading