SwiftMongoDB icon indicating copy to clipboard operation
SwiftMongoDB copied to clipboard

Can I use SwiftMongoDB for iOS projects?

Open chlee0216 opened this issue 9 years ago • 7 comments

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

chlee0216 avatar Jul 16 '16 19:07 chlee0216

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 avatar Jul 16 '16 19:07 Danappelxx

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

Danappelxx avatar Jul 16 '16 19:07 Danappelxx

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

chlee0216 avatar Jul 16 '16 19:07 chlee0216

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

chlee0216 avatar Jul 16 '16 19:07 chlee0216

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

Danappelxx avatar Jul 16 '16 19:07 Danappelxx

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

lfarah avatar Jul 17 '16 01:07 lfarah

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.

Danappelxx avatar Jul 17 '16 05:07 Danappelxx