How do I make sure I'm able to consistently access shared module code from swift code on Xcode? Sometimes I see the classes, other times I can't see it and opening the shared module (on xcode) it's just empty. This is very confusing and frustrating
01/21/2021, 5:20 PM
Do you "Make" in AS / IDEA before trying to access the code from xcode and still get those issues?
In general you need to make sure that the shared.framework is built (which means that packForXcode needs to be run) before it's accessible. If you're sure it's built and still have issues with access then I never had this problem.
01/21/2021, 5:24 PM
I don't use the packForXcode task because I'm using cocoapods local podspec to provide the shared module framework for the ios project.
Even after I build the project on AS which completes successfully, sometimes I can see the classes from Xcode, other times I can't.
01/21/2021, 5:29 PM
The same principle applies. Either the pod is generated and xcode has issues accessing it or it's not generated in a specific case. I doubt it's the former. And if its the latter then there's some issue where you expect the build process (wherever it originates, xcode or as or some additional script) to produce the pod and it doesn't.