Refer to High Level Blocks
The app uses Flow coordinators to avoid coupling between view controllers.
One unfortunate thing with the codebase is that a lot of the logic ends up being in the coordinators. Those should and can be moved into separate logic types.
Almost every view controller has an auxiliary protocol defined in the same file, at the top of the file. Never open another view controller from each view controller. Go through the protocol which will be implemented by a coordinator.
The app UI is built entirely in code. No storyboard/nib/xib is used.
AppDelegate
andAppCoordinator
is where the app startsInCoordinator
is where the bulk of the app branches fromMigrationInitializer
stores Realm migration codeMigrationInitializerForOneChainPerDatabase
should never be modifiedConstants
Config
Features
holds flags to toggle features. This is usually meant to be for WIP features that would be good to merge (big changes, or we want to test them) yet not ready yet- Always use
R
to access strings, image files, colors and other files bundled with the app. eg.R.string.localizable.addrpcServerNavigationTitle()
. This avoids runtime errors and crashes Constants.Credentials
is where API keys are stored. Replace them when making production builds- Use the logging functions to generate logs to help development. Beware of performance and too much noise
debugLog()
infoLog()
warnLog()
verboseLog()
errorLog()
- Update the build number and if necessary the version number. Commit this
- Make sure
Constants.Credentials
is updated. Do not commit these changes unless you are sure your repo is private - Archive the
AlphaWallet
target forAny iOS Device (arm64)
- Submit
Submit the appropriate TestFlight build or repeat the process and submit the new build
Some specific tasks:
An easy way to figure out which part of the code makes a change is to look for text in the UI like the title of the current screen or a button. Look for it in R.generated.swift
(this file is automatically generated and updated based on the localization strings files while building the project). Look for the function returning the string you want and then find callers for that function.
Look for implementors and callers of protocols is a very important part of working with the code base. As of writing, AppCode provides better code navigation functionality than Xcode.
- Open
RPCServer
- Add a new case to the enum
- Build and fix the errors. Do not use
switch-default:
There's a very good chance you do not need to add a new enum-case to RPCServerWithEnhancedSupport
.
- Open
Constants.swift
- Modify
defaultEnabledServers