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

Package breaks previews on Apple Watch #48

Open
ChristianSko opened this issue Mar 31, 2024 · 2 comments
Open

Package breaks previews on Apple Watch #48

ChristianSko opened this issue Mar 31, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@ChristianSko
Copy link

Description
I am encountering a compilation issue when using the package, specifically using the Apple Watch. Setting up the swift package on the iPhone target disrupts the preview functionality on the Apple Watch.

Steps to Reproduce:
1. Create a new WatchOS project with an iOS companion app.
2. Import the WatchKit package into the iOS phone target.
3. Attempt to load a preview on the Apple Watch simulator or device.
4. The compilation fails with errors error, and the preview does not load.

Expected Behavior:
Importing the package into the phone target should not affect the ability to compile and preview the app on the Apple Watch.

Current Workaround:
Currently, I am bypassing this issue by removing the WatchKit package and commenting out the import statement in the phone target. However, this workaround is cumbersome.

Request:
It seems like this could potentially be resolved with a quick fix, possibly by adjusting @available attribute configurations to ensure compatibility across targets. Any guidance if I'm doing something wrong would be greatly appreciated.

image
@bircni
Copy link

bircni commented May 10, 2024

I have the same issue, there is already a report on Apples Site - the workaround mentioned works:

https://developer.apple.com/forums/thread/743957

@ChristianSko
Copy link
Author

Thanks @bircni, that's a lot better as a workaround.

@martinlasek martinlasek added the enhancement New feature or request label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants