Code Monkey home page Code Monkey logo

Comments (15)

pNre avatar pNre commented on August 24, 2024

Hi,
this is a known problem with Xcode <= 6.3 where Swift frameworks cannot declare public extensions.

from exswift.

prbaron avatar prbaron commented on August 24, 2024

I thought I followed the steps for Xcode 6.1.

Where do I should write this ?

components.takeFirst() { $0.completed }

from exswift.

pNre avatar pNre commented on August 24, 2024

It's just an example, you don't have to write it anywhere.

from exswift.

prbaron avatar prbaron commented on August 24, 2024

Ok, then I made the point 2. Should I make the point 1 two ? i do not see why it should be needed.

from exswift.

prbaron avatar prbaron commented on August 24, 2024

Do I have to import ExSwift in the embedded libraries in the project manager ?

from exswift.

pNre avatar pNre commented on August 24, 2024

Nope, you have to add the source files from ExSwift to your project (the second point in the list from the readme).

from exswift.

prbaron avatar prbaron commented on August 24, 2024

OK so do you know why do I have the error ? I am using Xcode 6.1.1

from exswift.

pNre avatar pNre commented on August 24, 2024

You're probably still linking the framework.
Remove any reference to ExSwift from your project and just add the source files.

from exswift.

prbaron avatar prbaron commented on August 24, 2024

Still the same problem ...

from exswift.

finestructure avatar finestructure commented on August 24, 2024

"1. Use Xcode 6.3 to compile the project (but in that case you won't be able to publish anything on the App Store until 6.3 is released to the public)"

@pNre Does this work for you with 6.3b? I'm using Version 6.3 (6D554n) (beta4) and I can't manage to avoid this error. I must be holding it wrong - is there a way to make these declarations public so it can be built und used as a framework?

from exswift.

pNre avatar pNre commented on August 24, 2024

Can you please link an example project?

from exswift.

vmanot avatar vmanot commented on August 24, 2024

What dark magic do you speak of @pNre? It is currently impossible to provide public extensions to generic classes from foreign modules. To till this date, no workaround has been found. I hope you've got a "... yet" stored in there for me.

from exswift.

finestructure avatar finestructure commented on August 24, 2024

Just add 'public' to an Array extension method like 'each' and you'll get the error, no sample project required :)

from exswift.

pNre avatar pNre commented on August 24, 2024

You're both right, this cannot be done (yet), I must have been drunk when I tried using it as module in beta 3.

from exswift.

vmanot avatar vmanot commented on August 24, 2024

Swift 2.0 now allows extensions to generic types. Hooray!

from exswift.

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.