Closed perlmunger closed 8 years ago
How did you create your project? And what kind of project is it?
It's just a Swift project for iOS I created from scratch in Xcode 8.0 (8A218a). When I say I ran swift build
, I meant inside the BSON root directory--not my project directory.
I guessed so. BSON supports SPM because it's almost entirely meant for Server Side Swift. You can use it for macOS and iOS projects but it'll require you to create an xcodeproj using swift package generate-xcodeproj
and then modifying the xcode project to output a .framework or link the xcode project to your own project.
Ok. I tried the swift package generate-xcodeproj
and the resulting Xcode project will generate a .framework file, however, it doesn't work when I switch the build target to an iOS device--again giving me the same warning about RegularExpression being an undeclared type. Is that because RegularExpression is only available on macOS? Is it a Foundation class?
RegularExpression is Foundation. Isn't that available on iOS? I can add a compiler flag that'll not compile that code on iOS of you'd prefer that
I went ahead and added iOS regardless. Try to fetch BSON 3.8.2
Perfect! Thanks for doing that.
The README says to use the Swift package manager, but it's unclear as to how to do so. Running the command
swift build
from the command line finishes without an error, but now what? What can I do with the build product. If it's just importing the frameworks, that's fine, but next steps are unclear. Where do I get the .framework file?Can I simply add the sources to my project and build that way? That would be my preference. I've tried that, but I get the error:
Thanks in advance.