Merge pull request #3923 from AlphaWallet/add-organize-docs
Add docs and some re-organization of docspull/3926/head
commit
f098defc7e
@ -1,8 +0,0 @@ |
||||
Normally this file should be about update history but since this is an iPhone app, we took the convenience to keep the update procedure to AppStore here. |
||||
|
||||
- Ensure the build is incremented by bundle and build number |
||||
- Backward test against previous builds to ensure that it doesn't break previous versions |
||||
- Ensure travis CI is passing |
||||
- Run through all the major functions - Redeem, transfer, sell, backup and restore key |
||||
- Ensure contract for any placeholder event is correct and working with Payment Server |
||||
- Update the app store description and keywords in each localised langauge. |
@ -0,0 +1,60 @@ |
||||
Refer to [High Level Blocks](high-level-blocks.md) |
||||
|
||||
Flow coordinators |
||||
=== |
||||
The app uses [Flow coordinators](https://khanlou.com/2015/10/coordinators-redux/) 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. |
||||
|
||||
User interface & Storyboard |
||||
=== |
||||
The app UI is built entirely in code. No storyboard/nib/xib is used. |
||||
|
||||
Notable Types |
||||
=== |
||||
* `AppDelegate` and `AppCoordinator` is where the app starts |
||||
* `InCoordinator` is where the bulk of the app branches from |
||||
* `MigrationInitializer` stores Realm migration code |
||||
* `MigrationInitializerForOneChainPerDatabase` should never be modified |
||||
* `Constants` |
||||
* `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()` |
||||
|
||||
TestFlight |
||||
=== |
||||
1. Update the build number and if necessary the version number. Commit this |
||||
2. Make sure `Constants.Credentials` is updated. Do not commit these changes unless you are sure your repo is private |
||||
3. Archive the `AlphaWallet` target for `Any iOS Device (arm64)` |
||||
4. Submit |
||||
|
||||
Submission to the app store |
||||
=== |
||||
Submit the appropriate TestFlight build or repeat the process and submit the new build |
||||
|
||||
Tips |
||||
=== |
||||
Some specific tasks: |
||||
|
||||
Tip: Figure out where to change |
||||
--- |
||||
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. |
||||
|
||||
Tip: Navigating the code base |
||||
--- |
||||
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. |
||||
|
||||
Tip: Add support for a new chain |
||||
--- |
||||
1. Open `RPCServer` |
||||
2. Add a new case to the enum |
||||
3. Build and fix the errors. Do not use `switch-default:` |
@ -1,39 +0,0 @@ |
||||
### Localization |
||||
|
||||
Format for localization keys: |
||||
`feature.section.element.type`, or could be simply as `feature.section.type` |
||||
|
||||
Examples: |
||||
``` |
||||
key: transactions.myAddress.button.title, |
||||
value: My Address |
||||
comment: The title of the my address button on the transactions page |
||||
|
||||
key: deposit.buy.button.coinbase.title, |
||||
value: via Coinbase |
||||
comment: The title of the deposit button in the alert sheet |
||||
|
||||
key: exchange.error.failedToGetRates |
||||
value: Failed to get rates |
||||
comment: Error messesage when failed to update rates on pairs of tokens |
||||
|
||||
|
||||
|
||||
key: welcome.privateAndSecure.label.title |
||||
value: Private & Secure |
||||
comment: |
||||
|
||||
key: welcome.privateAndSecure.label.description |
||||
value: Private keys never leave your device. |
||||
comment: |
||||
|
||||
``` |
||||
|
||||
Generic keys and values: |
||||
``` |
||||
Ok - Ok |
||||
Cancel - Cancel |
||||
Done - Done |
||||
Send - Send |
||||
Refresh - Refresh |
||||
``` |
Loading…
Reference in new issue