-
Notifications
You must be signed in to change notification settings - Fork 375
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
[Wallet] Preliminary iOS support #1098
Conversation
See lugg/react-native-config#349 We still need to clean rebuild when changing values in .env though
Will address typo in another PR
react-native-secure-keystore supports it ouf of the box 🎉
- It now uses the same native module name for both iOS and Android. - It already has our custom patch.
post_install do |installer| | ||
installer.pods_project.targets.each do |target| | ||
target.build_configurations.each do |config| | ||
config.build_settings['ENABLE_BITCODE'] = 'NO' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Geth framework doesn't support bitcode. Not really a deal breaker, I tend to disable bitcode usually as it complicates crash reporting a little bit (you have to download the symbols after uploading the app to App Store Connect to be able to symbolicate stacktraces, It can (should) be automated anyway but takes longer in the CI pipeline).
Codecov Report
@@ Coverage Diff @@
## master #1098 +/- ##
==========================================
+ Coverage 66.45% 66.45% +<.01%
==========================================
Files 256 256
Lines 7349 7367 +18
Branches 488 491 +3
==========================================
+ Hits 4884 4896 +12
- Misses 2375 2379 +4
- Partials 90 92 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks great! Just a few small comments
packages/mobile/ios/Dummy.swift
Outdated
@@ -0,0 +1,8 @@ | |||
// | |||
// Dummy.swift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really. Removing it.
@@ -0,0 +1,7 @@ | |||
export const setPin = async (pin: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the PincodeViaAndroidKeystore file in my pincode PR. I don't think you need this file, it should be using PincodeUtils.ios.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed 👍
@@ -30,16 +30,21 @@ export default class ReactNativeLogger { | |||
} | |||
} | |||
|
|||
// TODO: remove this method from here and use our alert banner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, there are a few cases when the design calls for a toast message instead of the blue banner. If iOS doesn't have an equivalent, maybe we'll need to make a generic toast component (or change the designs, which I'm personally open to)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iOS doesn't have a native equivalent. I'll update the comment and will check with Corey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 ☎️ 💯
* master: (61 commits) Remove locales as website is now just in English (#1050) Add MetadataURL to account struct (#1103) Allow validators to use any valid combination of gold commitments as stake (#885) Fix blockscout websocket jsonrpc url (#1096) [Wallet] Preliminary iOS support (#1098) [Wallet] Set security fee description translation in Spanish (#1097) Exclude generated in vscode file watcher setting (#1082) Update .env and .env.integration files (#1087) Allow a testnet to run without ethstats (#1085) Collect exchange rate time series using notification service (#1020) Return to preview view when Fee Education is closed (#1068) [Wallet] Pin Setup Flow v2 (#1054) Added a variable for electoral threshold (#1023) [celotool]Store .env config on GCS after deployment (#1086) Group size limit (#1035) Fix governance unit tests (#1084) Add getExchangeRate to ContractKit (#1083) [CLI]Unlock till the geth exits (#1070) Add Quorum and Refactor Governance (#430) Shuffle elected validators using block randomness (#1033) ...
Description
This is the preliminary support for iOS 🍏📱🎉
Special thanks to @cmcewen and @tkporter who made geth work on iOS and paved the way for this!
Though the UI is "usable" it's relatively broken and needs fixing. Especially around keyboard handling and taking the notch/status bar into account.
Remaining work is tracked in https://docs.google.com/document/d/1n84U4Mgvut5V7VHlvKB2LfJSQ8RZkrTbUir04_PP0Zw/edit#
I will open individual issues for them.
To run on iOS:
cd packages/mobile
bundle install
cd ios; bundle exec pod install
react-native run-ios
or manually opencelo.xcworkspace
and build and run.Note: reloading RN breaks geth. You'll have to kill the app and relaunch for now. See valora-inc/react-native-geth@0713313
Tested
Ran the app on iOS and Android. Tested invite flow, sms verification, send money.
Other changes
@celo/client
built from https://github.com/celo-org/celo-blockchain/tree/cmcewen/ios. More work is needed there before we can merge it back. Mainly switch back to IPC. For now the built client on iOS uses the http provider and the Android client continues to use IPC.Related issues
Backwards compatibility
Yes.