gdombiak / OctoPod

Free open source client for OctoPrint
Apache License 2.0
225 stars 42 forks source link

upload a gcode file received via iOS/iPadOS share feature #598

Open p3d-dev opened 1 year ago

p3d-dev commented 1 year ago

In reference to #597: This PR presents a quick implementation for the share feature to quickly upload a gcode file. This works in these steps:

  1. access in iOS file manager a gcode file
  2. open the share menu in file manager
  3. In share menu select octopod, this transitions to octopod
  4. in octopod select upload file popover menu item

From the slicer, it does not work yet, but this may be slicer related or still some wrong definitions. For sure the whole UTTypeIdentifier/Document/Imported Type Identifiers is not self-explaining. So there may be issues on either side.

Two additional notes:

Please comment

p3d-dev commented 1 year ago

In the meantime the share issue on slicer side is fixed. Sharing to octopod works like a breeze now.

p3d-dev commented 1 year ago

Apparently all the issues are due to coding styles. If a format ing tool is used, then endless discussions about different flavors can be avoided.

SwiftFormat is nicely integrated in Xcode, that‘s why it was applied to the changed files. On Linux, swift-format is an alternative. If you prefer to have explicit parameter names, then how to get rid of the compiler warnings ? Just keep explicit parameter names and tolerating compiler warnings, appears not to be a good solution.

Anyway, whatever coding style you like to apply in your project is up to you. So all those changes proposed can be applied.

p3d-dev commented 1 year ago

Thanks for taking the time to review the PR.