Breaks SwiftUI previews in a project with "Use Legacy Previews Execution" #57
Closed
gerchicov-vg
started this conversation in
General
Replies: 1 comment 11 replies
-
|
Hi @gerchicov-vg, I'm sorry but we do not use cocoapods, and I do not believe that there is anything we can do in SharingGRDB to fix this. I'm willing to bet that this would happen with any SPM package integrated into your project. There may be tricks to fix this, but because it's not an issue with the library I am going to convert it to a discussion. Please feel free to continue the conversation over there. |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I added this library via SPM. Then I added cocoapods (most of these libraries are not available via SPM):
Result - previews are broken because of a lot of errors with sharing-grdb:

I don't know how to fix it but I tried different combinations:
1)project + SharingGRDB only
2)then added cocoapods
3)then removed SharingGRDB
4)another project + cocoapods only (the same cocoapods)
5)examples from this repo
Previews work in every project except of the case I add SharingGRDB and cocoapods simultaneously. SharingGRDB also sometimes fails to compile with random errors so it seems to be a reason of all the problems.
I can't reproduce it with examples from this repo because they already contain workspace file and so I don't know how to add cocoapods there.
I have also tried to add GRDB separately - it works.
NOTE: Previews don't work even in screens where I didn't import SharingGRDB. And in the main project I intentionally moved SharingGRDB into a separate file and didn't use its features like
@Dependencydirectly in screens to prevent additional problems.Checklist
mainbranch of this package.Expected behavior
SwiftUI previews work with SharingGRDB and cocoapods added to the same project. Or at least SharingGRDB is disabled for previews to avoid these problems
Actual behavior
Each preview fails to render
Reproducing project
test-sharingGRDB.zip
SharingGRDB version information
0.2.2
Sharing version information
2.5.2
GRDB version information
7.5.0
Destination operating system
and iOS simulator
Xcode version information
16.2
Swift Compiler version information
Beta Was this translation helpful? Give feedback.
All reactions