Skip to content

Add iOS In-App Provisioning #59712

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
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
edb5b43
Initialisation
zfurtak Mar 25, 2025
a607ca7
merge
zfurtak Mar 25, 2025
e8bc8a9
Split code to proper files
zfurtak Mar 26, 2025
2242ed9
Merge branch 'main' into @zfurtak/introduce-wallet-to-expensify
Skalakid Mar 26, 2025
4b8c957
Merge branch 'main' into @zfurtak/introduce-wallet-to-expensify
Skalakid Mar 26, 2025
1e75c63
Add expensify-react-native-wallet tgz
Skalakid Mar 27, 2025
0ae96f8
Fix TS errors
Skalakid Mar 27, 2025
104e762
Fix API call arguments
Skalakid Mar 28, 2025
7d42072
Move wallet tgz
Skalakid Apr 3, 2025
067c153
Update wallet module
Skalakid Apr 4, 2025
6a7f9c6
Add In-App Provisioning util functions
Skalakid Apr 4, 2025
34039ea
Enhance 'Add to Apple Wallet' button component
Skalakid Apr 4, 2025
4d40ba3
Merge branch 'main' into @Skalakid/add-to-apple-wallet
Skalakid Apr 4, 2025
a32ea52
Hide in app provisioning behind the beta
Skalakid Apr 4, 2025
f0d53b9
Merge branch 'main' into @Skalakid/add-to-apple-wallet
Skalakid Apr 5, 2025
78f80e4
Fix iOS Card Data
Skalakid Apr 5, 2025
5995fbb
Change cardHolderName to user display name
Skalakid Apr 5, 2025
cf91bae
Clean up AddToWalletButton
Skalakid Apr 5, 2025
7d4d677
Check if card in the Wallet after finishing push provisioning
Skalakid Apr 5, 2025
beb2fc3
Remove text styles
Skalakid Apr 5, 2025
a9e1777
Update package-lock.json
Skalakid Apr 7, 2025
44b073e
Update submodule
Skalakid Apr 7, 2025
a425e28
Refinements
zfurtak Apr 7, 2025
610d0e5
Fix launching web
Skalakid Apr 7, 2025
2d1d3b6
Update module
Skalakid Apr 7, 2025
e18070c
Update package-lock
Skalakid Apr 8, 2025
0cae5a9
Add logs
Skalakid Apr 8, 2025
ed0d5a8
Remove unnecessary comment
Skalakid Apr 8, 2025
5c46124
Rename command key
Skalakid Apr 8, 2025
1ad7e76
Fix tests
zfurtak Apr 8, 2025
45598db
Mobile Expensify
zfurtak Apr 8, 2025
5189b1b
Move wallet tgz to module folder
Skalakid Apr 8, 2025
6602d1e
Update module
Skalakid Apr 8, 2025
d573f05
Unlink Wallet library from Android
Skalakid Apr 8, 2025
3907881
Remove unnecessary comment
Skalakid Apr 8, 2025
46b9f71
Adjust to review comments
zfurtak Apr 8, 2025
3c87542
Add review changes
Skalakid Apr 9, 2025
d7fef51
Update package-lock.json
Skalakid Apr 9, 2025
bbd98cd
Rename component in Card Page
Skalakid Apr 9, 2025
8d07876
Merge branch 'main' into @Skalakid/add-to-apple-wallet
Skalakid Apr 9, 2025
6434667
Update Mobile-Expensify version
zfurtak Apr 9, 2025
ba575dc
Merge branch 'main' into @Skalakid/add-to-apple-wallet
Skalakid Apr 9, 2025
7c2607b
Merge branch 'main' into @Skalakid/add-to-apple-wallet
Skalakid Apr 10, 2025
5a7a38e
Change card description to translated one
Skalakid Apr 10, 2025
9b9b68a
Update submodule
Skalakid Apr 10, 2025
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
2 changes: 2 additions & 0 deletions ios/NewExpensify.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@
"${BUILT_PRODUCTS_DIR}/MapboxMaps/MapboxMaps.framework",
"${BUILT_PRODUCTS_DIR}/Turf/Turf.framework",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/FullStory/FullStory.framework/FullStory",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/JitsiWebRTC/WebRTC.framework/WebRTC",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/MapboxCommon/MapboxCommon.framework/MapboxCommon",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/MapboxCoreMaps/MapboxCoreMaps.framework/MapboxCoreMaps",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/MapboxMobileEvents/MapboxMobileEvents.framework/MapboxMobileEvents",
Expand All @@ -633,6 +634,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxMaps.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Turf.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FullStory.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebRTC.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxCommon.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxCoreMaps.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxMobileEvents.framework",
Expand Down
81 changes: 76 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ PODS:
- hermes-engine (0.77.1):
- hermes-engine/Pre-built (= 0.77.1)
- hermes-engine/Pre-built (0.77.1)
- JitsiWebRTC (124.0.2)
- libavif/core (0.11.1)
- libavif/libdav1d (0.11.1):
- libavif/core
Expand Down Expand Up @@ -397,6 +398,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -414,6 +416,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -430,6 +433,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -448,6 +452,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -465,6 +470,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -482,6 +488,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -499,6 +506,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -516,6 +524,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -533,6 +542,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -550,6 +560,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -567,6 +578,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -584,6 +596,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -601,6 +614,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand All @@ -618,6 +632,7 @@ PODS:
- React-jsiexecutor
- React-jsinspector
- React-perflogger
- React-rendererconsistency
- React-runtimescheduler
- React-utils
- SocketRocket (= 0.7.1)
Expand Down Expand Up @@ -692,6 +707,7 @@ PODS:
- React-Fabric/componentregistry (= 0.77.1)
- React-Fabric/componentregistrynative (= 0.77.1)
- React-Fabric/components (= 0.77.1)
- React-Fabric/consistency (= 0.77.1)
- React-Fabric/core (= 0.77.1)
- React-Fabric/dom (= 0.77.1)
- React-Fabric/imagemanager (= 0.77.1)
Expand Down Expand Up @@ -883,6 +899,27 @@ PODS:
- React-utils
- ReactCommon/turbomodule/core
- Yoga
- React-Fabric/consistency (0.77.1):
- DoubleConversion
- fast_float (= 6.1.4)
- fmt (= 11.0.2)
- glog
- hermes-engine
- RCT-Folly/Fabric (= 2024.11.18.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-cxxreact
- React-debug
- React-featureflags
- React-graphics
- React-jsi
- React-jsiexecutor
- React-logger
- React-rendererdebug
- React-runtimescheduler
- React-utils
- ReactCommon/turbomodule/core
- React-Fabric/core (0.77.1):
- DoubleConversion
- fast_float (= 6.1.4)
Expand Down Expand Up @@ -2041,6 +2078,30 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-wallet (0.1.0):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.11.18.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
- react-native-webrtc (124.0.5):
- JitsiWebRTC (~> 124.0.0)
- React-Core
- react-native-webview (13.13.1):
- DoubleConversion
- glog
Expand Down Expand Up @@ -2945,6 +3006,8 @@ DEPENDENCIES:
- react-native-release-profiler (from `../node_modules/react-native-release-profiler`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-view-shot (from `../node_modules/react-native-view-shot`)
- "react-native-wallet (from `../node_modules/@expensify/react-native-wallet`)"
- react-native-webrtc (from `../node_modules/react-native-webrtc`)
- react-native-webview (from `../node_modules/react-native-webview`)
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
Expand Down Expand Up @@ -3024,6 +3087,7 @@ SPEC REPOS:
- GTMAppAuth
- GTMSessionFetcher
- GzipSwift
- JitsiWebRTC
- libavif
- libdav1d
- libwebp
Expand Down Expand Up @@ -3192,6 +3256,10 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-safe-area-context"
react-native-view-shot:
:path: "../node_modules/react-native-view-shot"
react-native-wallet:
:path: "../node_modules/@expensify/react-native-wallet"
react-native-webrtc:
:path: "../node_modules/react-native-webrtc"
react-native-webview:
:path: "../node_modules/react-native-webview"
React-nativeconfig:
Expand Down Expand Up @@ -3313,7 +3381,7 @@ SPEC CHECKSUMS:
AirshipServiceExtension: 9c73369f426396d9fb9ff222d86d842fac76ba46
AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa
AppLogs: 3bc4e9b141dbf265b9464409caaa40416a9ee0e0
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
boost: 659a89341ea4ab3df8259733813b52f26d8be9a5
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
EXAV: 57ea461614a714b8b8fcc72c6fbc298b8f1ec78b
EXImageLoader: 759063a65ab016b836f73972d3bb25404888713d
Expand Down Expand Up @@ -3348,6 +3416,7 @@ SPEC CHECKSUMS:
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
GzipSwift: 893f3e48e597a1a4f62fafcb6514220fcf8287fa
hermes-engine: ccc24d29d650ea725d582a9a53d57cd417fbdb53
JitsiWebRTC: b47805ab5668be38e7ee60e2258f49badfe8e1d0
libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7
libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
Expand All @@ -3371,13 +3440,13 @@ SPEC CHECKSUMS:
RCTTypeSafety: 031cefa254a1df313a196f105b8fcffdab1c5ab6
React: 8edfc46c315852ec88ea4a29d5e79019af3dc667
React-callinvoker: 4450b01574dfc7a8f074f7e29e6965ac04859c8f
React-Core: 13bdd0a0125fdaecdee747b62e02d2a65b026520
React-Core: 0ac3acde025b10da5ccb9970547ab60a863654ce
React-CoreModules: ebe93fa403bbd4d0909de105ffd34eeaad355083
React-cxxreact: af8a2be3edfed0e1168279eea443f95a7285602e
React-debug: b0f7271aeacc2eb9e34f863397dcfc204ef721c0
React-defaultsnativemodule: 2ad21fff895dabfb7db60ee1c37d0a3866229430
React-domnativemodule: f788e7169988a61ac38a5fc493ac02b5fbda7d6b
React-Fabric: 8b404451db2bb07bcf0e3f6dfebfb26455e4d7ce
React-Fabric: 012ec12475cf941575871fdc006cf934090a9840
React-FabricComponents: 40cecebced128b2aa50c25a5fa6fdcd3b175286d
React-FabricImage: 81787fa643b67f1327b4aa5fa1678dc73a771e34
React-featureflags: 23d3dcdac6c9badeeb631db8a0883c7a3108d580
Expand Down Expand Up @@ -3415,10 +3484,12 @@ SPEC CHECKSUMS:
react-native-release-profiler: dffea1dd7929bf5cf7da5ad4697dea7d9a062377
react-native-safe-area-context: b3edb1da341e5e61f865763d9e0b6d3d34706464
react-native-view-shot: bb169342812ded991a4a0387e7d0b17cb515e62a
react-native-wallet: 46df147c6089b2490dc5f4cbf25c58ce70b0215d
react-native-webrtc: 0f1c94069ff1eb9d8fb1618c2dc71f73542c8cfa
react-native-webview: b375842af66a9f0ab979378bdc8b26eeb5d8e3ee
React-nativeconfig: cb207ebba7cafce30657c7ad9f1587a8f32e4564
React-NativeModulesApple: 82a8bee52df9f5b378195a500f22be3a6ef0f890
React-perflogger: 8152bab3f0eb4b8751f282f9af7caed2c823a9ea
React-perflogger: a8a27aa65a47f740eff65bb38b79baacb38a50d5
React-performancetimeline: 3ef4a640b56f9c7ec5f52bd93217b9b607c37cf4
React-RCTActionSheet: 0fdf55fb8724856d63ca8c63cdb4e2325e15e8ec
React-RCTAnimation: b93f5a1675cc2599e96851fec13c909fdfb1d6bb
Expand All @@ -3432,7 +3503,7 @@ SPEC CHECKSUMS:
React-RCTSettings: 433c9f6a070bcecbe5a44d5009326b4d6f3b0667
React-RCTText: 46249950f8d8738b90a60883d19b5bef09f0a296
React-RCTVibration: 8f41e85ab6d40c7db6111ca9e8c7492c8de374fb
React-rendererconsistency: c766ce7261ab6ed6be7bc155c403e29436d4f156
React-rendererconsistency: d59654ad59217708509d1bb6373358be321613a4
React-rendererdebug: 1f619b295f346242842f3accee23e8394b995d3c
React-rncore: cafe45e14d870bbecbbf4bd89e12ef3b596e1f2d
React-RuntimeApple: 7f27fb75a37e00a8e1efaa6e8f7a5b653871fb1b
Expand Down
Binary file added modules/expensify-react-native-wallet.tgz
Binary file not shown.
18 changes: 18 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"@expensify/react-native-background-task": "file:./modules/background-task",
"@expensify/react-native-hybrid-app": "file:./modules/hybrid-app",
"@expensify/react-native-live-markdown": "0.1.244",
"@expensify/react-native-wallet": "file:modules/expensify-react-native-wallet.tgz",
"@expo/metro-runtime": "^4.0.1",
"@firebase/app": "^0.10.10",
"@firebase/performance": "^0.6.8",
Expand Down Expand Up @@ -242,9 +243,9 @@
"@react-native/metro-config": "0.77.1",
"@react-navigation/devtools": "^6.0.10",
"@rnef/cli": "0.4.1",
"@rnef/plugin-metro": "0.4.1",
"@rnef/platform-android": "0.4.1",
"@rnef/platform-ios": "0.4.1",
"@rnef/plugin-metro": "0.4.1",
"@storybook/addon-a11y": "^8.1.10",
"@storybook/addon-essentials": "^8.1.10",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
Expand Down
10 changes: 10 additions & 0 deletions react-native.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,14 @@ module.exports = {
android: {sourceDir: androidSourceDir},
},
assets: ['./assets/fonts/native'],
dependencies: {
// We need to unlink the react-native-wallet package from the android build
// because it's not supported yet and we want to prevent the build from failing
// due to missing Google TapAndPay SDK
'@expensify/react-native-wallet': {
platforms: {
android: null,
},
},
},
};
1 change: 1 addition & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ const CONST = {
TABLE_REPORT_VIEW: 'tableReportView',
HELP_SIDE_PANEL: 'newDotHelpSidePanel',
RECEIPT_LINE_ITEMS: 'receiptLineItems',
WALLET: 'newdotWallet',
},
BUTTON_STATES: {
DEFAULT: 'default',
Expand Down
1 change: 1 addition & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,7 @@ const translations = {
copyCardNumber: 'Copy card number',
updateAddress: 'Update address',
},
cardAlreadyInWallet: 'Card is already in wallet',
cardDetailsLoadingFailure: 'An error occurred while loading the card details. Please check your internet connection and try again.',
validateCardTitle: "Let's make sure it's you",
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `Please enter the magic code sent to ${contactMethod} to view your card details. It should arrive within a minute or two.`,
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1584,6 +1584,7 @@ const translations = {
copyCardNumber: 'Copiar número de la tarjeta',
updateAddress: 'Actualizar dirección',
},
cardAlreadyInWallet: 'La tarjeta ya está en la billetera',
cardDetailsLoadingFailure: 'Se ha producido un error al cargar los datos de la tarjeta. Comprueba tu conexión a Internet e inténtalo de nuevo.',
validateCardTitle: 'Asegurémonos de que eres tú',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) =>
Expand Down
10 changes: 10 additions & 0 deletions src/libs/API/parameters/CreateAppleDigitalWalletParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type CreateAppleSigitalWalletParams = {
platform: string;
appVersion: string;
// stringified {"certificates": string[]}
certificates: string;
Comment on lines +4 to +5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment indicating it looks like this?

"['cert1', 'cert2']"

Copy link
Contributor Author

@Skalakid Skalakid Apr 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's more like a result of this: JSON.stringify({"certificates": ['cert1', 'cert2']}). That's how it works on the OldDot 😅 I think we can change this later on the backend to just ['cert1', 'cert2']. What do you think about it?

nonce: string;
nonceSignature: string;
};

export default CreateAppleSigitalWalletParams;
1 change: 1 addition & 0 deletions src/libs/API/parameters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,3 +380,4 @@ export type {default as ChangeReportPolicyParams} from './ChangeReportPolicyPara
export type {default as ResetBankAccountSetupParams} from './ResetBankAccountSetupParams';
export type {default as SendRecapInAdminsRoomParams} from './SendRecapInAdminsRoomParams';
export type {default as SetPolicyProhibitedExpensesParams} from './SetPolicyProhibitedExpensesParams';
export type {default as CreateAppleDigitalWalletParams} from './CreateAppleDigitalWalletParams';
Loading
Loading