Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix macOS build #151

Merged
merged 5 commits into from
Jan 26, 2023
Merged

Fix macOS build #151

merged 5 commits into from
Jan 26, 2023

Conversation

carson-katri
Copy link
Contributor

Disables features unavailable on macOS.

@bcardarella
Copy link
Collaborator

Can we expand this to a larger feature for all platforms?

@carson-katri
Copy link
Contributor Author

Sure, I'll look into doing that. It'll probably require rebuilding liveview-native-core for those platforms.

@bcardarella
Copy link
Collaborator

@carson-katri is that because of Intel?

@carson-katri
Copy link
Contributor Author

carson-katri commented Jan 24, 2023

It looks like it only builds for iOS/macOS in the Makefile: https://github.com/liveviewnative/liveview-native-core/blob/37d7970aaa3e0be32b40bf9ed895416ae17fc79b/Makefile.toml#L117

Should be able to update it for tvOS, etc.

@bcardarella
Copy link
Collaborator

Ah ok I'll check into this

@carson-katri
Copy link
Contributor Author

I added support for watchOS. It depends on liveview-native/liveview-native-core#5 and a new release of the xcframework (@shadowfacts is this automated?)

@shadowfacts
Copy link
Contributor

It is not currently automated. To release a new version you have to:

  1. Run cargo make xcframework in core
  2. Zip the built target/swift/live_view_native_core.xcframework (I just do this with Finder, I don't know how picky SwiftPM is)
  3. Create and push a git tag
  4. Create a GH release and attach the zip
  5. Update the binary target URL and checksum in Package.swift (to generate the checksum, run swift package compute-checksum path/to/xcframework.zip with the liveview-client-swiftui checkout as the working directory)

@carson-katri
Copy link
Contributor Author

Ok, thanks. I'll get that uploaded.

@carson-katri
Copy link
Contributor Author

@shadowfacts The new version is released, so watchOS/macOS builds should be good to go

@shadowfacts
Copy link
Contributor

Awesome, this looks good to me 👍

@carson-katri
Copy link
Contributor Author

I updated the workflow to make sure the package at least builds on macOS/watchOS. No tests run for them atm.

I also changed the saving of failed snapshots, they now are saved to the Report navigator in Xcode instead of writing to a temp directory.

@carson-katri carson-katri merged commit 8db6e44 into main Jan 26, 2023
@carson-katri carson-katri deleted the macos branch January 26, 2023 15:03
@carson-katri carson-katri removed the request for review from shadowfacts January 26, 2023 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants