Code Monkey home page Code Monkey logo

Comments (7)

 avatar commented on July 28, 2024

In 6.1 as tested, it appears to be a playground bug.

Add an assert(image != nil) after you declare your image constant and it will not throw an exception.

I.e. a passing unit test:

func testCIImageOfSunflower() {
    let url = NSURL(string: "http://tinyurl.com/m74sldb")
    let image = CIImage(contentsOfURL: url)
    XCTAssertNotNil(image)
}

You can also observe the image by setting a breakpoint on XCTAssertNotNil(image) and Quick Look image in the debugger you'll see the sunflower.

from functional-swift.

orionthewake avatar orionthewake commented on July 28, 2024

Seeing the same error in Xcode 6.1.1. image is nil and adding the assert just produces a failed assertion.

from functional-swift.

vietlq avatar vietlq commented on July 28, 2024

I can't get this working. Have you reported to Apple so that they can fix the bug?

from functional-swift.

floriankugler avatar floriankugler commented on July 28, 2024

Yes, this is only a problem in playgrounds. It worked for a while in OS X playgrounds, but not anymore... It works as expected in real projects though. We've filed a radar.

from functional-swift.

pierrem avatar pierrem commented on July 28, 2024

Bad publicity as it is the chapter you offer for free download !
You should add a warning to avoid losing potential customers.

from functional-swift.

floriankugler avatar floriankugler commented on July 28, 2024

@pierrem Yeah, you're totally right about this. We've added a warning in the sample playground now.

from functional-swift.

carlosypunto avatar carlosypunto commented on July 28, 2024

You could include a project running, like this:
https://github.com/carlosypunto/iOS-Funtional-Wrapping-Core-Image-Sample

from functional-swift.

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.