Comments (7)
Are you using the Swift Development Snapshot 2016-03-24-a?
We (me and @Joannis) haven't used MongoKitten with a 'normal' OS X app project, we just swift build --init
and then swift build -X
. How did you set up your Xcode project to use MongoKitten?
from mongokitten.
- Yes, I am using Swift Development Snapshot 2016-03-24-a?
- I did the same initialization swift build βinit and swift build -X
- Opened the project file and added to Build Settings -> Swift compiler - Search -> Import Path the path to .build/debug
- Then I added just ten #iport MongoKitten to main.swift and built. It was OK.
- After that I added the example code to the main.swift (connect to local mongo etc). Then the build failed. but the code complete did show the functions etc in the editor.
Eddy
On Apr 6, 2016, at 1:56 AM, Robbert Brandsma [email protected] wrote:
Are you using the Swift Development Snapshot 2016-03-24-a?
We (me and @Joannis https://github.com/Joannis) haven't used MongoKitten with a 'normal' OS X app project, we just swift build --init and then swift build -X. How did you set up your Xcode project to use MongoKitten?
β
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #13 (comment)
from mongokitten.
Could you post your Package.swift
?
from mongokitten.
On another note: Why are you adding an import path?
swift build -X
should take care of that.
from mongokitten.
@EddyHahn I've managed to reproduce the error. Tell me if I'm incorrect:
You've created a project in XCode. Added a package.swift with the required information. Then you've linked the .build/debug
directory in the import path
. Ran swift build
and then you got the error, correct?
Currently XCode does not support SPM (Swift Package Manager) projects by default. So to solve this you'll have to generate the project differently.
Create a directory with the name of your project:
mkdir MyAwesomeProject
Go in the direcotry:
cd MyAwesomeProject
Initialize the project:
swift build --init
Edit the Package.swift file to contain your dependencies:
open Package.swift
Save it (of course) and go back to the terminal
Create the XCode project using the Command Line tools
swift build -X
Enter the directory using finder
open .
and open the XCode project by double-clicking it
This is not a bug in MongoKitten
or any similar project. It's a missing feature in XCode that everyone is still waiting for. So I'll also write some instructions for when you're adding more dependencies:
Open the Package.swift
using your editor and add the dependencies like above.
Open the terminal and enter your root-directory of the project again (same level as Package.swift
)
Clean all build-directories:
swift build --clean dist
And remake the project:
swift build -X
Now you can open the project again with XCode and you'll be set with your new dependencies.
If you're having issues for any reason within the XCode project at this point it's best to clean your XCode project. (CMD + K)
I hope this helps!
from mongokitten.
Thanks!
I do not know what happened but this time around the swift build -X worked and all the packages now show up in Xcode. Build did work swell and I can debug too!
Thank you Again!
Eddy
On Apr 6, 2016, at 8:47 AM, Joannis Orlandos [email protected] wrote:
@EddyHahn https://github.com/EddyHahn I've managed to reproduce the error. Tell me if I'm incorrect:
You've created a project in XCode. Added a package.swift with the required information. Then you've linked the .build/debug directory in the import path. Ran swift build and then you got the error, correct?
Currently XCode does not support SPM (Swift Package Manager) projects by default. So to solve this you'll have to generate the project differently.
Create a directory with the name of your project:
mkdir MyAwesomeProject
Go in the direcotry:
cd MyAwesomeProject
Initialize the project:
swift build --init
Edit the Package.swift file to contain your dependencies:
open Package.swift
Save it (of course) and go back to the terminal
Create the XCode project using the Command Line tools
swift build -X
Enter the directory using finder
open .
and open the XCode project by double-clicking itThis is not a bug in MongoKitten or any similar project. It's a missing feature in XCode that everyone is still waiting for. So I'll also write some instructions for when you're adding more dependencies:
Open the Package.swift using your editor and add the dependencies like above.
Open the terminal and enter your root-directory of the project again (same level as Package.swift)
Clean all build-directories:
swift build --clean dist
And remake the project:
swift build -XNow you can open the project again with XCode and you'll be set with your new dependencies.
If you're having issues for any reason within the XCode project at this point it's best to clean your XCode project. (CMD + K)I hope this helps!
β
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub #13 (comment)
from mongokitten.
No problem! Good luck with MongoKitten! Just enter another ticket if you need additional assistance.
from mongokitten.
Related Issues (20)
- Upgrade default message protocol for MK6 & MK7
- Support and test Casual Consistency
- Support Server API Versions
- Guarantee command errors (ok = 0) are emitted as a MongoDB Server Error.
- $match in ChangeStream does not work properly HOT 8
- Improve Meow and MongoKitten debugability
- tag a v7.2.1 release
- MongoDB transactions not working in Mongo 4.2 on linux HOT 1
- Setup macOS CI for unit tests
- Cannot decode `[Date]` from Codable model HOT 5
- Allow MongoKitten to accept a custom logger, or custom logging metadata, for a single query
- Create unique index with multiple fields HOT 3
- Support swift-service-discovery for SDAM
- Race condition in MongoCluster when using lazy connection to SRV hostname
- Add a test case for SRV query race conditions
- Distinct query in Meow
- Cannot connect to MongoAtlas DB Error: FluentMongoError.noTargetDatabaseSpecified HOT 6
- MongoKitten + HummingBird HOT 7
- unpin DNSClient dependency version HOT 1
- Whether to support native query HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongokitten.