Commit Graph
61 Commits
Author SHA1 Message Date
jack f2031f3973 Update project configuration and generate Xcode project
- Removed test targets from project.yml (causing dependency issues)
- Generated fresh Xcode project with xcodegen
- Project now includes proper Assets.xcassets configuration
- Ready for App Store build and submission
2025-07-04 16:45:42 +02:00
jack 31abe1a1ce Fix remaining Bluetooth write errors
- Check characteristic write properties before all writes
- Add proper error handling for specific BLE error codes
- Rediscover services on invalid handle errors
- Increase delay between key exchange and announce
- Reduce connection flooding by spacing out initial messages

The ATT Error 242 was caused by writing too quickly after
connection establishment. Adding delays gives the connection
time to stabilize.
2025-07-04 14:36:15 +02:00
jack 7b3cfb6227 Fix Bluetooth errors and improve store-and-forward
- Add peripheral state checks before all write operations
- Fix 'can only accept commands while connected' errors
- Check characteristic write properties to avoid ATT errors
- Preserve original timestamps in store-and-forward messages
- Only log crypto errors once per peer to reduce noise
- Store-and-forward now correctly maintains message ordering

The timestamp preservation ensures messages appear in the correct
chronological order even when delivered later via store-and-forward.
2025-07-04 14:30:00 +02:00
jack 2cd8443292 Remove grey overlay and reduce logging noise
- Removed grey background overlay during sidebar slide-over for cleaner UI
- Removed excessive logging while keeping critical error/security logs
- Kept only: error conditions, connection events, panic mode, security events
- Significantly reduced console noise for better production readiness
2025-07-04 12:28:00 +02:00
jack cce43fcfc7 Add interactive logo with info/panic modes and battery optimization
- Single tap logo shows comprehensive app info and features
- Triple tap logo triggers panic mode (instant data wipe)
- Implement adaptive Bluetooth scanning based on battery level
- Remove hardcoded development team ID for security
- Fix store-and-forward description (12h for all, indefinite for favorites)
- Add technical debt remediation plan
- Fix macOS compatibility issues with navigation
2025-07-04 02:21:59 +02:00
jack fe986ed397 Fix encryption key exchange and add persistent identity for favorites
- Implement three-tier key system: ephemeral encryption, ephemeral signing, persistent identity
- Fix signature verification by properly separating KeyAgreement and Signing keys
- Add persistent identity key for favorites that survives app restarts
- Fix Data subscript crashes by converting to byte arrays
- Add proper error handling for key exchange
- Private messages remain fully encrypted with ephemeral keys
2025-07-04 01:43:16 +02:00
jack 6652d1f429 Fix voice recording and notification issues
- Fix mic button gesture handling by removing Button wrapper
  - Use direct gesture on ZStack for more reliable touch detection
  - Add debug logging for recording start/stop

- Fix notification delivery on iOS
  - Change from checking .background to checking != .active
  - Notifications now work when app is inactive or background
  - Add NSUserNotificationsUsageDescription to Info.plist

- Improve voice note fragment transmission
  - Reduce fragment size from 400 to 200 bytes for better reliability
  - Simplify fragment timing from batch-based to linear 100ms delays
  - Lower packet size threshold from 512 to 400 bytes for fragmentation
  - Add peripheral connection state checking before writes
  - Better error logging throughout transmission pipeline

- Add comprehensive debug logging for troubleshooting
  - Log audio file size and duration
  - Log peripheral connection states during broadcast
  - Log fragment send progress with timing info
2025-07-03 23:14:42 +02:00
jack 2993fc3e06 Implement favorites, notifications, and improve fragment handling
- Add favorites functionality for peers with persistent storage
  - Star icon to toggle favorites in sidebar
  - Favorites appear at top of peer list
  - Storage persists across app launches using peer ID

- Add local notifications for mentions and private messages
  - Notifications appear when app is in background
  - Separate notification types for mentions vs private messages
  - Request notification permissions on app launch

- Fix sidebar header alignment to match main toolbar (44pt)
  - Add background color to sidebar header for visual consistency

- Improve voice note fragment transmission
  - Send fragments in batches of 5 with delays to prevent congestion
  - Better logging to debug fragment transmission issues
  - Reduce delay between fragments from 50ms to batch-based timing

- Fix other UI issues
  - Ensure mic recording ripples originate from mic button
  - Update sidebar to swipe from right edge smoothly
2025-07-03 22:13:28 +02:00
jack 4b98aa7918 Fix iOS background BLE, RSSI tracking, and peer nickname display
- Add UIBackgroundModes for bluetooth-central/peripheral to restore background messaging
- Implement RSSI tracking with proper peer ID mapping and UI updates
- Fix announce packet delivery for immediate nickname display
- Convert to binary protocol for 62-69% size reduction
- Fix peer count to exclude self from display
- Add platform-specific UI improvements (font sizes, dropdown styling)
2025-07-03 00:51:59 +02:00
jack 20ebaa109c Convert JSON protocol to efficient binary format
- Implemented compact binary encoding for packets and messages
- Reduced packet size significantly (13-byte fixed header + variable payload)
- Optimized for BLE's limited MTU with smaller message sizes
- Added BinaryProtocol.swift with encode/decode functions
- Updated all message types to use binary serialization
- Maintains all existing functionality with better performance
2025-07-02 22:09:02 +02:00
jack 7e90bf6369 Initial commit: Bluetooth mesh chat app with end-to-end encryption 2025-07-02 19:18:35 +02:00