Key App wallet on Solana blockchain
- Create new wallet
- Restore existing wallet using seed phrases
- Decentralized identification (name service)
- Send SOL, SPL tokens and renBTC via name or address
- Receive SOL, SPL tokens and renBTC
- Swap SOL and SPL tokens (powered by Orca)
- Buy tokens (moonpay)
- iOS 13.0+
- Xcode 12
- SwiftFormat
- Clone project and move to folder
git clone [email protected]:p2p-org/p2p-wallet-ios.git && cd p2p-wallet-ios
- Set git hooks (Optional)
git config core.hooksPath .githooks
chmod -R +x .githooks
- Add
Config.xcconfig
top2p-wallet-ios/p2p-wallet
contains following content
// MARK: - Transak
TRANSAK_STAGING_API_KEY = fake_api_key
TRANSAK_PRODUCTION_API_KEY = fake_api_key
TRANSAK_HOST_URL = p2p.org
// Mark: - Moonpay
MOONPAY_STAGING_API_KEY = fake_api_key
MOONPAY_PRODUCTION_API_KEY = fake_api_key
// MARK: - Amplitude
AMPLITUDE_API_KEY = fake_api_key
// MARK: - FeeRelayer
FEE_RELAYER_STAGING_ENDPOINT = test-solana-fee-relayer.wallet.p2p.org
FEE_RELAYER_ENDPOINT = fee-relayer.solana.p2p.org
TEST_ACCOUNT_SEED_PHRASE = account-test-seed-phrase-separated-by-hyphens
// MARK: - NameService
NAME_SERVICE_ENDPOINT = name_service.org
- Run install.sh
chmod u+x Scripts/install.sh && Scripts/install.sh
- Select target
p2p_wallet
(ifDetect Unused Code
is selected by default after xcodegen)
- Download LocalizationHelper app
- Copy
LocalizationHelper
toApplications
- After xcodegen, the LocalizationHelper stopped working, so here is the solution:
- Click "Open..."
- Choose
Tuist project
instead ofDefault project
- Choose project root folder (p2p-wallet-ios)
- Resouces folder must be p2p-wallet-ios/p2p_wallet
- Click open project.
Swiftgen
for automatically generating strings, assets.Swiftlint
, SwiftFormat for linting, automatically formating codePeriphery
for detecting dead code (use Detect Unused Code target and run)CircleCI
orGithubAction
: implementing...
Add .env
file contains following content (ask teamate):
DEVELOPER_APP_IDENTIFIER=""
APP_STORE_CONNECT_TEAM_ID=""
DEVELOPER_PORTAL_TEAM_ID=""
DEVELOPER_APP_ID=""
PROVISIONING_PROFILE_SPECIFIER_ADHOC=""
PROVISIONING_PROFILE_SPECIFIER_APPSTORE=""
APPLE_ISSUER_ID=""
PROVISIONING_REPO=""
FIREBASE_APP_ID=""
FIREBASE_CLI_TOKEN=""
BROWSERSTACK_USERNAME=""
BROWSERSTACK_ACCESS_KEY=""
FASTLANE_APPLE_ID=""
TEMP_KEYCHAIN_USER=""
TEMP_KEYCHAIN_PASSWORD=""
APPLE_KEY_ID=""
APPLE_KEY_CONTENT=""
GIT_AUTHORIZATION=""
MATCH_PASSWORD=""
IS_CI=false
XCCONFIG_URL=""
- Space indent: 4
- NSAttributedString Example:
label.attributedText =
NSMutableAttributedString()
.text(
"0.00203928 SOL",
size: 15,
color: .textBlack
)
.text(
" (~$0.93)",
size: 15,
color: .textSecondary
)
- Copy template
MVVM-C.xctemplate
that is located underTemplates
folder to~/Library/Developer/Xcode/Templates/
mkdir -p ~/Library/Developer/Xcode/Templates/MVVM-C.xctemplate
cp -R Templates/MVVM-C.xctemplate ~/Library/Developer/Xcode/Templates
- Resolver
We would love you for the contribution to Key App, check the LICENSE
file for more info.
- Add feature flag to Firebase Remote Config with style:
settingsFeature
- Add feature flag with the same title to
public extension Feature
struct
public extension Feature {
static let settingsFeature = Feature(rawValue: "settingsFeature")
}
- Add feature flag to DebugMenuViewModel
extension DebugMenuViewModel {
enum Menu: Int, CaseIterable {
case newSettings
var title: String {
switch self {
case .newSettings:
return "New Settings"
}
}
var feature: Feature {
switch self {
case .newSettings:
return .settingsFeature
}
}
}
}
if available(.settingsFeature) {
showNewSettingsScreen(
input: input,
state: status.creditState
)
} else {
showOldSettingsScreen(
input: input,
status: status
)
}