analytics-swift icon indicating copy to clipboard operation
analytics-swift copied to clipboard

Add Experimental Windows Support

Open brianmichel opened this issue 2 years ago • 3 comments

This should build (but not completely test) on Windows. I would label it as experimental since it does run, but will likely have issues that need to be ironed out. As mentioned in https://github.com/segmentio/analytics-swift/issues/279 a pluggable networking stack will help us work around the problems with URLSession but I figured I'd post this as a mergable artifact.

Changes

  • This adds an .editorconfig so that style can be kept consistent across those who are using Xcode and other editors (I don't know if theseis the right settings, but I tried to match what was there)
  • Add a new WindowsVendorSystem with system calls to populate various bits of information where possible.
  • Update #if blocks around the codebase to allow for building on Windows
  • Add entry for Windows CI to ensure that the codebase stays buildable on Windows.

I apologize for the trimming of the whitespace, I can try to rebuild this PR if it's an annoyance, but it seems that VS Code trims whitespace by default and this is where I ended up.

brianmichel avatar Nov 29 '23 02:11 brianmichel

~~Rebasing is blocked until https://github.com/segmentio/JSONSafeEncoder-Swift/pull/1 (or some variant of this) lands~~

brianmichel avatar Nov 29 '23 03:11 brianmichel

@bsneed this should be ready for review if you'd like

brianmichel avatar Dec 01 '23 01:12 brianmichel

cc @alanjcharles

bsneed avatar Feb 12 '24 16:02 bsneed

Closing this in lieu of the merged/updated PR #348

bsneed avatar May 16 '24 14:05 bsneed