feat: ios changes to make app work with new react native version #166
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
I will list here every problem I found and the solutions:
Build in new M1 macOS
I was having many different errors that were fixed when I executed the
pod install
with the CPU prefix.arch -x86_64 pod install
Icon not showing
The icons were not showing in the menubar in the app.
Fix: Add
tabbar.tff
toBuild Phases > Copy Bundle Resources
.Camera error when opening QRCode reader
I was getting a permission error when trying to access the camera.
Fix: Install new package:
npm install react-native-permissions --save
Add the lines below to
ios/Podfile
TabView with a blank space in the bottom (ReceiveScreen):
The same issue described here: satya164/react-native-tab-view#1342
Fix: Downgrade
react-native-pager-view
tov5.4.11
. Before was usingv5.4.15
.Splash screen
There was no splash screen, only the react-native default one.
Fix: copy the previous launch screen file we had in the project and substitute the current launch screen.
Token List
This list was with the wrong padding for some new iPhone screen models.
Fix: consider the correct padding for new iPhone models. See changes in this file
src/components/TokenSelect.js
.Keyboard opened after creating a token
The keyboard from the token name screen opens after the token creation message, i.e. when we open the Token detail screen.
This was the only issue that I didn't fix, the reason is detailed below.
I was receiving a lot of deprecation errors when using the app:
"ERROR currentlyFocusedField is deprecated and will be removed in a future release. Use currentlyFocusedInput"
I noticed that this error was being generated by
react-navigation
package. The second step of the upgrade dependencies project is to upgrade this package. I manually changed the files inside this package that had the deprecated codenode_modules/@react-navigation/native/dist/createKeyboardAwareNavigator.js
and the bug stopped happening.I feel we should leave this issue for the next upgrade step because naturally, we will need to upgrade this package. The only downside of this is that any user that creates a token will see the keyboard opening on a screen without input. This might be a good reason for us to focus in this next step of upgrade soon.
Acceptance Criteria
Security Checklist