Commit graph

22 commits

Author SHA1 Message Date
Blake McAnally
58da532d32 Extract the generated protobufs into its own Swift package
This change modifies the process for generating and integrating the Meshtastic protobufs into the client application.

* The generated Swift code is now in a local SPM package `MeshtasticProtobufs`
* An Xcode Workspace file `Meshtastic.xcworkspace` was created to more easily manage the new build targets.
* The code generation script for the protos was modified to generate the Swift code into the new location.
* The README.md was updated to reflect these changes.

NOTE: After merging this PR, do not open the project file `Meshtastic.xcodeproj`. You must use the workspace `Meshtastic.xcworkspace`

Extracting out the generated protobuf code into its own library enables several opportunities for the project. This is just a first step, but with some more modularization, a standalone Apple Watch app or other targets starts to become a little bit more achievable to implement.

After extracting the protobufs into a Swift package, I validate these changes by building and running the Meshtastic app to an iPhone 15 Pro Max, and tried changing some settings on a local node. I then messaged back and forth using two local nodes connected to two different iOS devices.
2024-06-28 11:11:01 -05:00
Blake McAnally
4d547e48db This change fixes several lint errors throughout the project, and moves the SwiftLint build phase to before compilation.
After this change, a developer can now clone the project and run without the build failing due to lint errors! 😃

* I ran `swiftlint --fix` to resolve many auto-correctable issues (mostly whitespace)
* Excluded the `Meshtastic/Protobufs` directory from lint, since that code is automatically generated.
* Converted some single letter method parameters to lowercase.
* Converted several instances `force_cast` to instead use `guard` or `if let` to unwrap optional values. During this change, some of the SwiftUI views became "too complex to be solved in a reasonable time", so I broke up the views into distinct sub-expressions.

I was able to build and run the app on an iOS simulator.
2024-05-31 21:48:50 -05:00
Garth Vander Houwen
08ea85d717 Re order gps mode toggle
add additional position precision options
Updated fixed postion text
2024-05-04 16:03:38 -07:00
Garth Vander Houwen
7c022813a2 Fixed position updates 2024-03-27 16:06:24 -07:00
Garth Vander Houwen
718842bafb Localize new settings 2024-02-06 16:47:12 -08:00
Garth Vander Houwen
8f6e1a2d0d Add app smart position and setting
Update protobufs
Use new GPS tri state on position config
2024-02-05 21:46:16 -08:00
Garth Vander Houwen
616f681eac Delete unused enum 2023-12-12 22:59:09 -08:00
Garth Vander Houwen
67900bfa51 Remove GPS Update interval
Remove GPS Attempt Time options
Don't show positions with empty times in the elevation graph
Hook up ambient lighitng config
2023-11-28 20:03:08 -08:00
Garth Vander Houwen
3b76207247 Improved localization helper for strings 2023-05-05 09:27:24 -07:00
Garth Vander Houwen
6f05bbe7f3 Assorted updates 2023-05-01 10:39:49 -07:00
Garth Vander Houwen
05c00aeb20 Lint! 2023-03-06 13:26:04 -08:00
Garth Vander Houwen
fdade220de SwiftLint Whitespace fixes 2023-03-06 10:33:18 -08:00
Garth Vander Houwen
77ab77e2c7 Localize unset 2022-12-30 17:44:39 -08:00
Garth Vander Houwen
59be21e38c More localization 2022-12-30 13:18:02 -08:00
Garth Vander Houwen
eedbef57fb * More strings
* Add duty cycle error
* Don't log local telemetry in the mesh log
2022-12-13 17:47:23 -08:00
Garth Vander Houwen
8c76e14196 Asks for the channel messages 2022-11-10 22:17:38 -08:00
Garth Vander Houwen
e72d2203d9 Fix position flag save button, hide sats < 0 add two minutes to GpsUpdateIntervals 2022-10-04 18:10:40 -07:00
Garth Vander Houwen
9c1de1cf58 fix enums with default of zero 2022-09-10 18:27:44 -07:00
Garth Vander Houwen
b8ff3cd8c0 Start of protobuf cleanup 2022-09-07 22:33:44 -07:00
Garth Vander Houwen
1898b32cc4 Additional enum times for position 2022-09-01 19:00:41 -07:00
Garth Vander Houwen
a0e83160a2 Add values to config enums 2022-09-01 18:37:41 -07:00
Garth Vander Houwen
8a88b50de5 Remove distance from connected node, clean up spacing 2022-08-21 08:15:27 -07:00