Giter Club home page Giter Club logo

Comments (7)

Obbut avatar Obbut commented on May 11, 2024

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.

EddyHahn avatar EddyHahn commented on May 11, 2024
  1. Yes, I am using Swift Development Snapshot 2016-03-24-a?
  2. I did the same initialization swift build β€”init and swift build -X
  3. Opened the project file and added to Build Settings -> Swift compiler - Search -> Import Path the path to .build/debug
  4. Then I added just ten #iport MongoKitten to main.swift and built. It was OK.
  5. 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.

Joannis avatar Joannis commented on May 11, 2024

Could you post your Package.swift?

from mongokitten.

Joannis avatar Joannis commented on May 11, 2024

On another note: Why are you adding an import path?
swift build -X should take care of that.

from mongokitten.

Joannis avatar Joannis commented on May 11, 2024

@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.

EddyHahn avatar EddyHahn commented on May 11, 2024

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 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!

β€”
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub #13 (comment)

from mongokitten.

Joannis avatar Joannis commented on May 11, 2024

No problem! Good luck with MongoKitten! Just enter another ticket if you need additional assistance.

from mongokitten.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.