Commit graph

95 commits

Author SHA1 Message Date
Christopher Willis-Ford
61d3e2914d build(mac): calculate CFBundleVersion from commit date and time 2023-05-25 14:05:34 -07:00
Christopher Willis-Ford
07c035dea8 fix(mac): even more versioning fixes 2023-05-25 09:12:54 -07:00
Christopher Willis-Ford
e5842a560b build(mac): fix CFBundleVersion 2023-05-25 08:48:25 -07:00
Christopher Willis-Ford
7a67ea1802 fix(build): fix missing CFBundleVersion in Safari extension 2023-05-24 09:48:28 -07:00
Christopher Willis-Ford
798c92166e refactor(macbt): add more logging to MacBT discovery 2023-04-06 13:26:01 -07:00
Christopher Willis-Ford
6005a5bf54 chore: minor cleanup in MacBTSession 2023-04-06 12:51:50 -07:00
Christopher Willis-Ford
f3cf1d7d89 chore: share ScratchVersion target across Mac+Win 2023-04-06 09:44:39 -07:00
Christopher Willis-Ford
5cd7e4a526 Merge branch 'develop' into scratch-link-2.0-windows 2023-04-06 09:21:59 -07:00
Christopher Willis-Ford
2eb8015d45 fix: calculate build number from label 2023-04-06 08:39:12 -07:00
Christopher Willis-Ford
17709dd709 fix: use semantic-release version for build 2023-04-05 19:40:33 -07:00
renovate[bot]
3e96b4aed5 chore(deps): update dotnet monorepo 2023-04-05 22:01:21 +00:00
Christopher Willis-Ford
539d0ae24a chore: fix issues identified in code review
- Fixed an error in an XML comment
- Some `ServerError` objects were being created with error code -32500,
  which is the code for `ApplicationError` and is not in the
  `ServerError` range. I changed those to use `ApplicationError` which
  is also more consistent with the rest of the codebase.
2023-03-06 09:03:12 -08:00
Christopher Willis-Ford
bda1796d06
Merge pull request from LLK/generate-better-icons
fix: generate icons directly from SVGs for better quality
2023-02-15 15:47:34 -08:00
Christopher Willis-Ford
8d3b8ce38a fix: generate icons directly from SVGs for better quality
This is really prep for MSIX image assets for the Windows build, but I
figured I might as well do the macOS icons as a first step so that this
can be its own separate change.
2023-02-02 13:42:43 -08:00
Christopher Willis-Ford
224e694874 feat(windows): BLE session first draft 2023-01-31 08:48:49 -08:00
Christopher Willis-Ford
69e626b30c chore: add project file for Windows build 2023-01-23 15:04:44 -08:00
Christopher Willis-Ford
636e0cd605 chore(build): use FullSemVer for installer filename 2023-01-13 16:35:33 -08:00
Christopher Willis-Ford
6501e49073 fix(version): embed GitVersion info correctly and document version scheme 2023-01-13 15:30:13 -08:00
Christopher Willis-Ford
4dd28eebec chore: sign only in main+develop, build installer for Debug 2023-01-13 15:30:13 -08:00
Christopher Willis-Ford
68e7efc069 fix: work around macOS 12 OpenRfcommChannelSync timeout 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
159ca00678 fix: implement a BT connection dance that works on macOS 10 and 12 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
8d76f03b20 build: copy Xcode and SDK info from extension into app 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
afd2ec197a chore: tell Info.plist that we don't use non-exempt encryption 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
9aeaac5bbd chore: add app and team IDs to Entitlements.plist 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
005fddd8eb ci: use fastlane match 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
f79b609295 chore: use GitVersion, embed result into app and extension 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
563070d67e fix: don't embed IOBluetooth.framework
This actually removes the framework after the build system embeds it,
which isn't a very satisfying hack but it works. It needs to be removed
before the codesigning step, otherwise the signature would be
invalidated.
There's probably a linker setting or a csproj setting that would prevent
the framework from being embedded in the first place, but I haven't been
able to find it yet. Note for the future: the framework gets embedded
during the `_CompileToNative` step.
2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
149076c07a fix: fix minor MAS compliance issues
* Add `LSApplicationCategoryType` key to the app's `Info.plist`
* Fix capitalization of `PlugIns` directory for embedding the extension
  into the app
* Fix helper & extension bundle IDs to start with the app's bundle ID

Note that the helper now uses the same product bundle ID as the Scratch
Link app. This is necessary to successfully build the extension with the
helper. The "Scratch Link Safari Helper" can now be thought of as the
"Scratch Link Safari Extension build helper"... hopefully I can find a
more elegant solution in the future.
2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
482dcf6bc4 chore: rename 'Scratch Link Safari Helper Extension' to 'Scratch Link Safari Extension' 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
32f8981487 fix: resolve crash on session close while connecting 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
8fdc3d166e fix: disable BLE restore to fix 'Bluetooth unavailable' issue
Restore wasn't fully implemented anyway, and having it enabled would
occasionally cause macOS to report "Bluetooth unavailable" after
reconnecting BLE sessions several times.

After turning that off, macOS treats implementing
`WillRestoreStateEvent` as an error, so I removed that.
2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
5423e7800b fix: dispose of cbManager on session shutdown 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
4d42d91c05 chore: log to subsystem 'org.scratch.link' 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
616ed440cc chore: move StyleCop settings to a shared props file 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
7a1e0d014a fix: more BT connection tweaks
Two changes:
- ignore a BT device if it's already connected to something else
- use `OpenRfcommChannelAsync` to try to start checking for an open
  channel more quickly. It's unclear whether or not this is strictly
  better but in my testing it seems better.
2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
dc5c481278 fix(menu): 'Manage Safari Extensions' => 'Manage Safari Extensions...' 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
d58f5d243a fix(macBT): add 'Options' / PIN instructions to pairing dialog 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
d42cfdb637 fix(macBT): poll to reliably detect RFCOMM channel open
The other methods are still present, but disabled, in case we can later
find a way to make them more reliable. Note that the behavior differs by
macOS version, so testing against just one version of macOS is not
enough!
2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
f59d16112d chore: convert remaining Debug logging to Trace 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
d2df409958 fix(macBLE): handle UpdatedState even if it fires during CBCentralManager ctor 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
b46f4359f6 fix(macBLE): fix 'API MISUSE' log message 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
907ea9158e chore: add logging to help debug macOS 10/11 issues 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
53bbe3b6e3 fix(MacBT): make BT disconnect/reconnect more reliable, especially after pairing 2023-01-13 08:21:38 -08:00
Christopher Willis-Ford
bdfc8c08a6 fix(mac): fix tccd error message about kTCCServiceAppleEvents
The error message included:
```
kTCCServiceAppleEvents requires entitlement com.apple.security.automation.apple-events
```
2023-01-13 08:21:37 -08:00
Christopher Willis-Ford
feb100e3c0 feat(MacBT): display pairing help when connecting to unpaired peripheral 2023-01-13 08:21:37 -08:00
Christopher Willis-Ford
a55075b81d refactor(bt): support PIN code argument for Connect 2023-01-13 08:21:37 -08:00
Christopher Willis-Ford
124b6a0cef fix(Mac): make sure GetSettledBluetoothState() doesn't miss an event 2023-01-13 08:21:37 -08:00
Christopher Willis-Ford
4cb46b5658 fix(Mac): properly Dispose() of the status bar item 2023-01-13 08:21:37 -08:00
Christopher Willis-Ford
b3c48ef166 fix(MacBT): dispose of inquiry & channel properly
The absence of this was causing native code to sometimes issue a
callback to a managed object that the GC had already collected, leading
to a crash.
2023-01-13 08:21:37 -08:00
Christopher Willis-Ford
d2c1cf9784 fix(MacBLE): allow more time for the Bluetooth state to settle 2023-01-13 08:21:37 -08:00