Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d932f49
docs: add agents/roadmap; enable CI tests; add test matrix
WRRicht3r Sep 17, 2025
c001a69
ci: pin Xcode on Jenkins; fix FearlessKeys text resource; revert Code…
WRRicht3r Sep 18, 2025
2f6e4d0
ci: make native gem builds work on Jenkins; pin Xcode; fix FearlessKe…
WRRicht3r Sep 18, 2025
35bac31
ci(jenkins): export SDKROOT/headers and toolchain for native gem builds
WRRicht3r Sep 18, 2025
0a8f59c
ci(jenkins): export SDKROOT/headers and toolchain for native gem builds
WRRicht3r Sep 18, 2025
6d6f546
jenkins patch
WRRicht3r Sep 18, 2025
0ba5ee4
deps: bump FearlessKeys to 0.1.5; ci: scoped GitHub auth for private …
WRRicht3r Sep 18, 2025
bc400c5
ci: fix Bundler native build on Jenkins; bump FearlessKeys to 0.1.5; …
WRRicht3r Sep 19, 2025
7ab1c46
ci(jenkins): escape in BUNDLE_BUILD__JSON to avoid Groovy interpolat…
WRRicht3r Sep 19, 2025
5af2850
ci: roll back Codecov workflow and Jenkinsfile to last known working …
WRRicht3r Sep 19, 2025
bdf1d87
ci: revert to last known working configs; remove failing Podfile post…
WRRicht3r Sep 19, 2025
094a10f
ci: restore Jenkins appTests=false; revert Podfile to stable; keep Co…
WRRicht3r Sep 19, 2025
fe717ed
ci(codecov): add optional scoped auth for private pods (GH_READ_TOKEN)
WRRicht3r Sep 19, 2025
deca084
ci: pin Xcode on Jenkins to 15.4; exclude FearlessKeys text payload f…
WRRicht3r Sep 19, 2025
c23ac4f
ci: conditionally pin Xcode on Jenkins; exclude FearlessKeys text pay…
WRRicht3r Sep 19, 2025
99a6d68
ci(jenkins): auto-pin DEVELOPER_DIR to Xcode 15.x if present; keep Fe…
WRRicht3r Sep 23, 2025
35db258
fix(spm): switch shared-features-spm to main to fix IrohaCrypto modul…
WRRicht3r Sep 23, 2025
d849fbd
fix(spm): point shared-features-spm to master to resolve IrohaCrypto …
WRRicht3r Sep 23, 2025
1c05abc
chore(spm): pin shared-features-spm to last known good revision (2b13…
WRRicht3r Sep 23, 2025
fd0df5f
ci/spm: pin shared-features-spm to 2b13aea and stub IrohaCrypto umbre…
WRRicht3r Sep 23, 2025
afe652d
ci: run SPM resolve + IrohaCrypto umbrella stub inside node('mac-fear…
WRRicht3r Sep 23, 2025
e586a29
ci: patch IrohaCrypto module.modulemap and add umbrella header in inc…
WRRicht3r Sep 23, 2025
73b37e8
ci: robustly patch IrohaCrypto module.modulemap and add umbrella head…
WRRicht3r Sep 23, 2025
8a2eeee
ci: fix sed quoting; patch IrohaCrypto modulemap and add umbrella hea…
WRRicht3r Sep 23, 2025
80cdad3
ci: ensure IrohaCrypto umbrella header exists in both include/ and pa…
WRRicht3r Sep 23, 2025
770dec2
ci(spm): clean SourcePackages caches before resolve; keep IrohaCrypto…
WRRicht3r Sep 23, 2025
fda7a51
fix(ci): unblock builds by bumping shared-features-spm and adding Iro…
WRRicht3r Sep 24, 2025
927ac20
fix(spm): dedupe Web3 by switching to soramitsu/web3-swift (7.7.7)
WRRicht3r Sep 24, 2025
66daa19
fix(signing): use manual signing for app target to avoid Xcode accoun…
WRRicht3r Sep 24, 2025
30af007
fix(signing): set manual signing, identity and ad-hoc profile for Rel…
WRRicht3r Sep 24, 2025
cbf8e57
fix(signing): set Dev config to manual distribution with adhoc profile
WRRicht3r Sep 24, 2025
a587380
fix(ci): make Google keys injection optional and non-fatal for PR builds
WRRicht3r Sep 24, 2025
e74ece5
chore(pods): gate FearlessKeys behind INCLUDE_FEARLESS_KEYS and limit…
WRRicht3r Sep 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Configure GitHub auth for private pods (optional)
env:
GH_READ_TOKEN: ${{ secrets.GH_READ_TOKEN }}
run: |
if [ -n "$GH_READ_TOKEN" ]; then
echo "Using GH_READ_TOKEN for authenticated access to soramitsu/*"
git config --global url."https://${GH_READ_TOKEN}:[email protected]/soramitsu/".insteadOf "https://github.com/soramitsu/"
else
echo "GH_READ_TOKEN not set; proceeding without GitHub auth"
fi

- name: Install Dependencies & Test
run: |
Expand Down
95 changes: 95 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Repository Guidelines

<!-- wallet-context:start -->
> About this codebase
> This repository contains the codebase for a cryptocurrency wallet compatible with the Polkadot ecosystem (and related networks).
> It uses dependencies available in the iOS ecosystem (e.g., SoraFoundation, SoraKeystore, FearlessKeys) and has an Android counterpart in soramitsu/fearless-Android.
<!-- wallet-context:end -->

## Project Structure & Modules
- `fearless/`: App sources, split by features/modules.
- `fearlessTests/`, `fearlessIntegrationTests/`: Unit/integration tests.
- `fearless.xcworkspace`, `fearless.xcodeproj`: Xcode workspace/project files.
- `Pods/`, `Podfile`, `Podfile.lock`: CocoaPods dependencies.
- `Jenkinsfile`: CI pipeline configuration.
- Config files: `.swiftlint.yml`, `.swiftformat`, `.periphery.yml`.

## Build, Test, and Dev Commands
- Install dependencies: `pod install`
- Build (Debug, simulator):
- `xcodebuild -workspace fearless.xcworkspace -scheme fearless -configuration Debug -destination 'platform=iOS Simulator,OS=latest,name=iPhone 15' build`
- Run unit tests (on simulator):
- `xcodebuild -workspace fearless.xcworkspace -scheme fearless -destination 'platform=iOS Simulator,OS=latest,name=iPhone 15' test`
- Lint/format:
- `swiftlint` (uses `.swiftlint.yml`)
- `swiftformat .` (uses `.swiftformat`)
- CI matrix: `bash scripts/test-matrix.sh` runs tests for Debug and Release

Example destinations
- iPhone 15: `-destination 'platform=iOS Simulator,OS=latest,name=iPhone 15'`
- iPhone 14 Pro: `-destination 'platform=iOS Simulator,OS=latest,name=iPhone 14 Pro'`
- iPad Pro (11-inch) 4th gen: `-destination 'platform=iOS Simulator,OS=latest,name=iPad Pro (11-inch) (4th generation)'`

Tip: list available destinations with `xcodebuild -showsdks` and `xcrun simctl list devices`.

CI note
- Jenkins is configured to run tests on each build. For deterministic local parity, use `scripts/test-matrix.sh` before opening a PR.

## Coding Style & Naming
- Language: Swift; follow Swift API design guidelines.
- Formatting: SwiftFormat; linting with SwiftLint.
- Files: one main type per file; names in PascalCase; avoid long files.
- Packages/Modules: keep dependencies explicit; prefer dependency injection to singletons.
- Avoid force‑unwraps; handle errors explicitly with clear user messaging.

## Testing Guidelines
- Framework: XCTest; tests live in `fearlessTests/` and `fearlessIntegrationTests/`.
- Naming: mirror the class under test, e.g., `AccountRepositoryTests.swift`; test methods `testX_whenY_thenZ`.
- Coverage: maintain/raise coverage for changed code.
- New code policy: whenever you add a function, add at least one unit test covering it.

## Commit & Pull Requests
- Commits: concise, imperative subjects; reference issues (`#123`). Conventional Commit prefixes (`feat:`, `fix:`, `refactor:`) encouraged.
- Before PR: ensure build + tests pass locally; `swiftlint`/`swiftformat` are clean.
- PR checklist: clear description, linked issue, screenshots/video for UI, steps to test, risk/rollback notes.
- CI must be green (Jenkins or equivalent).

## Security & Configuration
- Never commit secrets or private keys. Use Keychain/secure storage at runtime; use CI secrets for pipelines.
- Do not alter seed handling, signing, or cryptography without maintainer approval.
- Runtime registries and chain/type sources must be aligned with the current Polkadot SDK release; coordinate updates with maintainers.
- Use `*.xcconfig` and environment variables for private values; avoid hardcoding secrets in `Info.plist`.

## Dependencies & Versioning
- Prefer conservative upgrades (patch/minor). Pin major bumps to separate PRs with clear testing notes.
- Summarize upstream changes (link release notes) and provide a rollback plan.
- If aligning to a Polkadot SDK release, ensure iOS utils/runtime dependencies are pinned accordingly (e.g., fearless-utils‑ios or equivalent).

## Preferred Tasks for Agents
- Keep build green: fix warnings, flaky tests, and broken CI when root cause is clear.
- Code hygiene: remove dead code; improve naming; tighten access control.
- Tooling: enforce SwiftLint/SwiftFormat; update configs when safe.
- Tests: add missing unit tests around changed code; stabilize integration tests.
- Docs: keep README/ROADMAP/this guide accurate; small updates are welcome.

## Out of Scope (without prior approval)
- Feature/UI/UX changes.
- Protocol, staking, or on‑chain logic changes.
- Wallet/account management, seeds, encryption, or secure storage changes.
- Adding telemetry/analytics.

## Communication & Escalation
- Use GitHub issues/PRs for decisions and traceability.
- See `CONTRIBUTING.md` for community channels and expectations.
- When in doubt, open an issue and wait for maintainer guidance.

## Sources of Truth
- Roadmap (Aha!): https://soramitsucoltd.aha.io/shared/97bc3006ee3c1baa0598863615cf8d14
- Dev status board: https://soramitsucoltd.aha.io/shared/343e5db57d53398e3f26d0048158c4a2
- Issues: https://github.com/soramitsu/fearless-iOS/issues
- Contributing: ./CONTRIBUTING.md
- Roadmap (repo): ./ROADMAP.md

---

By following these guidelines, agents help keep Fearless Wallet iOS healthy, predictable, and aligned with the published roadmap while minimizing risk to users.
15 changes: 14 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,17 @@ def appPipeline = new org.ios.AppPipeline(
uploadToNexusFor: ['master','develop','staging']
)

appPipeline.runPipeline('fearless')
def xcode154 = "/Applications/Xcode_15.4.app/Contents/Developer"
def envList = []
try {
if (new File(xcode154).exists()) {
envList << "DEVELOPER_DIR=${xcode154}"
} else {
echo "Xcode 15.4 not found at ${xcode154}; using default Xcode."
}
} catch (Throwable t) {
echo "Skipping Xcode pin check due to: ${t.message}"
}
withEnv(envList) {
appPipeline.runPipeline('fearless')
}
14 changes: 14 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ post_install do |installer|
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
# Ensure text payloads in FearlessKeys are not in Compile Sources
if target.name == 'FearlessKeys'
target.build_phases.each do |phase|
if phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
# iterate over a dup to avoid concurrent modification issues
phase.files.dup.each do |build_file|
ref = build_file.file_ref
if ref && ref.path && ref.path.to_s.end_with?('google-keys.txt')
phase.remove_file_reference(ref)
end
end
end
end
end
if target.name == 'SSFXCM'
target.build_configurations.each do |config|
if config.name == 'Dev'
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ Fearless Wallet is a mobile wallet designed for the decentralized future on the
## Roadmap
Fearless Wallet roadmap is available for everyone: [roadmap link](https://soramitsucoltd.aha.io/shared/97bc3006ee3c1baa0598863615cf8d14)

For repository-specific details, see `ROADMAP.md`.

## Agents Guide
Guidelines for automation and agent contributions: see `AGENTS.md`.

## Dev Status
Track features development: [board link](https://soramitsucoltd.aha.io/shared/343e5db57d53398e3f26d0048158c4a2)

## Testing
- Run tests locally for both configurations:
- `bash scripts/test-matrix.sh` (uses iPhone 15 simulator by default)

## License

Fearless Wallet iOS is available under the Apache 2.0 license. See the LICENSE file for more info.
69 changes: 69 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Roadmap — Fearless Wallet iOS

This document mirrors the structure used in the Android repository’s roadmap and adapts it for iOS. The authoritative product roadmap and delivery plans are maintained in Aha! and on the public dev board.

## Full support for Polkadot SDK release: polkadot-stable2503

Why: Align the wallet with the latest stable Polkadot SDK, ensuring type/metadata compatibility and correct decoding/encoding across chains.

Scope: Substrate runtime alignment across Polkadot/Kusama/Westend/AssetHub and major parachains used by the app (per chain registry).

Acceptance criteria:
- App runs without SCALE decode errors on target chains.
- Balances, transfers, fees, and staking screens load and execute extrinsics successfully on Polkadot and Kusama.
- Chain sync stable: connections establish, runtime providers load, subscriptions update on version bumps.
- No regressions in unit/integration tests; lint/format checks green.
- If APIs changed (e.g., extrinsic names/signatures), code updated or guarded by capability checks.

Suggested steps:
1) Registry alignment:
- Refresh chain/type registries consumed by the app to stable2503.
- If registries are bundled JSONs in the app, replace them with stable2503‑aligned versions and verify diffs in PR.
- If registries are provided by SSF libraries or remote endpoints, coordinate with maintainers to bump the dependency or adjust the configured URLs for Debug/QA builds and verify.
- Capture the exact sources/versions used in the PR description.
2) Utils/runtime integration:
- Pin or update iOS runtime/utils dependencies (e.g., SSFChainRegistry/SSFRuntimeCodingService or equivalents) to versions compatible with stable2503.
- Verify that SCALE encoding/decoding and metadata parsing succeed on target chains in debug logs.
3) Build + checks:
- `pod install`
- `swiftformat . && swiftlint`
- `xcodebuild -workspace fearless.xcworkspace -scheme fearless -configuration Debug -destination 'platform=iOS Simulator,OS=latest,name=iPhone 15' build`
- `xcodebuild -workspace fearless.xcworkspace -scheme fearless -destination 'platform=iOS Simulator,OS=latest,name=iPhone 15' test`
4) Runtime smoke tests (manual):
- Verify initial network connections and metadata load (debug logs).
- Balances show assets and fiat values.
- Send: compute fee and submit a small transfer on Westend/Kusama (test account).
- Staking: validators/nominators decode without crashes.
5) Address API deltas:
- Update runtime‑extrinsic assumptions and storage paths; add capability checks as needed.
6) Update defaults (optional):
- If stable2503 becomes default, update configuration and docs with the new registry sources.
7) Document:
- Add notes on the exact registry sources/versions and verification results in the PR description and update this roadmap if needed.

Verification matrix (execute manually):
- Polkadot: balances load, transfer fee computed, send succeeds on test account.
- Kusama: as above; staking validator list loads.
- AssetHub: asset enumeration works; transfers succeed to another account.
- Westend: basic transfer path for low‑risk checks.

## iOS Backlog (illustrative)
- [ ] WalletConnect: improve session reconnection reliability and error surfacing.
- [ ] EVM chains: handle gas estimation failures gracefully; improve fee UI for L2s.
- [ ] Staking: optimize validators list loading and caching on slow networks.
- [ ] Localization: audit new/changed strings across all `.lproj`; fill gaps.
- [ ] Performance: reduce cold start time; trim excessive logging in Release.

## Xcode & App Store Compliance
- Keep Xcode and Swift toolchain aligned with supported App Store requirements.
- Update deployment targets and signing settings as needed; verify Release builds on CI.
- Ensure third‑party libraries and binary artifacts meet App Store policies.

## Sources of Truth
- Product roadmap (Aha!): https://soramitsucoltd.aha.io/shared/97bc3006ee3c1baa0598863615cf8d14
- Dev status board: https://soramitsucoltd.aha.io/shared/343e5db57d53398e3f26d0048158c4a2
- Issues: https://github.com/soramitsu/fearless-iOS/issues
- README: ./README.md
- Contributing: ./CONTRIBUTING.md

For the most accurate and up‑to‑date details, always refer to the Aha! roadmap and dev board links above.
69 changes: 69 additions & 0 deletions scripts/test-matrix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/usr/bin/env bash
set -euo pipefail

# Runs unit and integration tests across Debug and Release configurations.
#
# Usage:
# scripts/test-matrix.sh [SCHEME] [DESTINATION]
# Defaults:
# SCHEME=fearless
# DESTINATION="platform=iOS Simulator,OS=latest,name=iPhone 15"

SCHEME="${1:-fearless}"
DEST="${2:-platform=iOS Simulator,OS=latest,name=iPhone 15}"
WORKSPACE="fearless.xcworkspace"

echo "==> Using scheme: ${SCHEME}"
echo "==> Destination: ${DEST}"

function run_tests() {
local config=$1
echo "\n==> Running ${config} tests"
local extra=()
if [[ "${config}" == "Release" ]]; then
# Ensure testability for Release builds when running unit tests on simulator
extra+=(ENABLE_TESTABILITY=YES)
fi
xcodebuild \
-workspace "${WORKSPACE}" \
-scheme "${SCHEME}" \
-configuration "${config}" \
-destination "${DEST}" \
-enableCodeCoverage YES \
"${extra[@]}" \
clean test | xcpretty || {
echo "xcodebuild ${config} tests failed" >&2
exit 1
}
}

# Ensure tooling available
if ! command -v xcodebuild >/dev/null 2>&1; then
echo "xcodebuild not found in PATH" >&2
exit 127
fi

# xcpretty is optional; fall back to raw output
if ! command -v xcpretty >/dev/null 2>&1; then
run_tests() {
local config=$1
echo "\n==> Running ${config} tests (no xcpretty)"
local extra=()
if [[ "${config}" == "Release" ]]; then
extra+=(ENABLE_TESTABILITY=YES)
fi
xcodebuild \
-workspace "${WORKSPACE}" \
-scheme "${SCHEME}" \
-configuration "${config}" \
-destination "${DEST}" \
-enableCodeCoverage YES \
"${extra[@]}" \
clean test
}
fi

run_tests Debug
run_tests Release

echo "\n==> All tests passed in Debug and Release"
Loading