Danappelxx / SwiftMongoDB

A MongoDB interface for Swift [Not under active development]
MIT License
266 stars 25 forks source link

Can I use SwiftMongoDB for iOS projects? #35

Open chanhyeoni opened 8 years ago

chanhyeoni commented 8 years ago

I pod-installed SwiftMongoDB, but it doesn't seem to be installed, as the build never succeeds. Below is the pod file.

target 'DailyExercise' do source ‘https://github.com/CocoaPods/Specs.git' platform :ios, ‘9.0’ use_frameworks!

pod 'SwiftMongoDB' pod 'OAuthSwift', '~> 0.5.0'

target 'DailyExerciseTests' do inherit! :search_paths end

target 'DailyExerciseUITests' do inherit! :search_paths end

end

The only susceptible thing I want to inform is the result I got after typing 'pod install' command. warning: failed to load toolchain 'swift': Could not find toolchain: swiftIntegrating client project

Danappelxx commented 8 years ago

Yes, it theoretically does support iOS but it is not a good idea to use it in production. If you really want to, you should use carthage, as the version listed in cocoa pods is extremely old.

Danappelxx commented 8 years ago

In fact, I finally deleted the SwiftMongoDB spec from cocoapods-trunk (there were bugs in trunk that were preventing me from doing so earlier).

chanhyeoni commented 8 years ago

Can this also be the version issue? My swift is 2.2.

chanhyeoni commented 8 years ago

And what is SwiftMongoDB's version in Cartfile? I tried to install 0.1.0, but it returned the error saying that it has no shared framework schemes for iOS.

Dependency "SwiftMongoDB" has no shared framework schemes for any of the platforms: iOS

Danappelxx commented 8 years ago

github "Danappelxx/SwiftMongoDB" "master" should work.

lfarah commented 8 years ago

Hey @Danappelxx, why did you decide not to support CocoaPods?

Danappelxx commented 8 years ago

Cocoa pods has weird support for module maps and I was having issues with it a long time ago. Migrating to carthage has fixed all those issues since if I can get it to build in Xcode, it "just works".

Moving forward, though, I'm only going to support SPM since thats really the environment this library was meant to be used in.