payfrit-beacon-ios/PayfritBeacon/Utils/BeaconShardPool.swift
Schwifty cfa78679be feat: complete rebuild of PayfritBeacon iOS from scratch
100% fresh codebase — no legacy code carried over. Built against
the Android beacon app as the behavioral spec.

Architecture:
- App: SwiftUI @main, AppState-driven navigation, Keychain storage
- Views: LoginView (OTP + biometric), BusinessListView, ScanView (provisioning hub)
- Models: Business, ServicePoint, BeaconConfig, BeaconType, DiscoveredBeacon
- Services: APIClient (actor, async/await), BLEManager (CoreBluetooth scanner)
- Provisioners: KBeacon, DXSmart (2-step auth + flashing), BlueCharm
- Utils: UUIDFormatting, BeaconBanList, BeaconShardPool (64 shards)

Matches Android feature parity:
- 4-screen flow: Login → Business Select → Scan/Provision
- 3 beacon types with correct GATT protocols and timeouts
- Namespace allocation via beacon-sharding API
- Smart service point naming (Table N auto-increment)
- DXSmart special flow (connect → flash → user confirms → write)
- Biometric auth, dev/prod build configs, DEV banner overlay

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:13:36 +00:00

73 lines
3.2 KiB
Swift

import Foundation
/// Pre-allocated Payfrit shard UUIDs for business namespace allocation
/// Matches Android's BeaconShardPool.kt
enum BeaconShardPool {
static let shardUUIDs: [String] = [
"f7826da6-4fa2-4e98-8024-bc5b71e0893e",
"2f234454-cf6d-4a0f-adf2-f4911ba9ffa6",
"deadbeef-cafe-4bab-dead-beefcafebabe",
"a495ff10-c5b1-4b44-b512-1370f02d74de",
"a495ff20-c5b1-4b44-b512-1370f02d74de",
"a495ff30-c5b1-4b44-b512-1370f02d74de",
"a495ff40-c5b1-4b44-b512-1370f02d74de",
"a495ff50-c5b1-4b44-b512-1370f02d74de",
"a495ff60-c5b1-4b44-b512-1370f02d74de",
"a495ff70-c5b1-4b44-b512-1370f02d74de",
"a495ff80-c5b1-4b44-b512-1370f02d74de",
"a495ff90-c5b1-4b44-b512-1370f02d74de",
"b0702880-a295-a8ab-f734-031a98a51266",
"b0702881-a295-a8ab-f734-031a98a51266",
"b0702882-a295-a8ab-f734-031a98a51266",
"b0702883-a295-a8ab-f734-031a98a51266",
"b0702884-a295-a8ab-f734-031a98a51266",
"b0702885-a295-a8ab-f734-031a98a51266",
"b0702886-a295-a8ab-f734-031a98a51266",
"b0702887-a295-a8ab-f734-031a98a51266",
"b0702888-a295-a8ab-f734-031a98a51266",
"b0702889-a295-a8ab-f734-031a98a51266",
"b070288a-a295-a8ab-f734-031a98a51266",
"b070288b-a295-a8ab-f734-031a98a51266",
"c0ffeec0-ffee-c0ff-eec0-ffeec0ffeec0",
"d1d1d1d1-d1d1-d1d1-d1d1-d1d1d1d1d1d1",
"e1e1e1e1-e1e1-e1e1-e1e1-e1e1e1e1e1e1",
"f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1f1",
"01010101-0101-0101-0101-010101010101",
"02020202-0202-0202-0202-020202020202",
"03030303-0303-0303-0303-030303030303",
"04040404-0404-0404-0404-040404040404",
"05050505-0505-0505-0505-050505050505",
"06060606-0606-0606-0606-060606060606",
"07070707-0707-0707-0707-070707070707",
"08080808-0808-0808-0808-080808080808",
"09090909-0909-0909-0909-090909090909",
"0a0a0a0a-0a0a-0a0a-0a0a-0a0a0a0a0a0a",
"0b0b0b0b-0b0b-0b0b-0b0b-0b0b0b0b0b0b",
"0c0c0c0c-0c0c-0c0c-0c0c-0c0c0c0c0c0c",
"10101010-1010-1010-1010-101010101010",
"11111111-1111-1111-1111-111111111111",
"12121212-1212-1212-1212-121212121212",
"13131313-1313-1313-1313-131313131313",
"14141414-1414-1414-1414-141414141414",
"15151515-1515-1515-1515-151515151515",
"16161616-1616-1616-1616-161616161616",
"17171717-1717-1717-1717-171717171717",
"18181818-1818-1818-1818-181818181818",
"19191919-1919-1919-1919-191919191919",
"1a1a1a1a-1a1a-1a1a-1a1a-1a1a1a1a1a1a",
"1b1b1b1b-1b1b-1b1b-1b1b-1b1b1b1b1b1b",
"1c1c1c1c-1c1c-1c1c-1c1c-1c1c1c1c1c1c",
"1d1d1d1d-1d1d-1d1d-1d1d-1d1d1d1d1d1d",
"1e1e1e1e-1e1e-1e1e-1e1e-1e1e1e1e1e1e",
"1f1f1f1f-1f1f-1f1f-1f1f-1f1f1f1f1f1f",
"20202020-2020-2020-2020-202020202020",
"21212121-2121-2121-2121-212121212121",
"22222222-2222-2222-2222-222222222222",
"23232323-2323-2323-2323-232323232323",
"24242424-2424-2424-2424-242424242424",
"25252525-2525-2525-2525-252525252525",
"26262626-2626-2626-2626-262626262626",
"27272727-2727-2727-2727-272727272727",
]
}