Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Tests fail in Xcode6-Beta5 #1

Closed
gavinbunney opened this issue Aug 12, 2014 · 4 comments · Fixed by #2
Closed

Tests fail in Xcode6-Beta5 #1

gavinbunney opened this issue Aug 12, 2014 · 4 comments · Fixed by #2
Labels

Comments

@gavinbunney
Copy link
Contributor

When running the tests in Xcode6-Beta5, they fail when trying to load the test gif:

let cfImageData = imageData! as CFDataRef

Throws fatal error: unexpectedly found nil while unwrapping an Optional value; this looks to be caused by

imageData = NSData(contentsOfURL: NSBundle.mainBundle().URLForResource("test", withExtension: "gif"))

Returning nil. I've tried various ways of loading images, but can't seem to get the resources to load (UIImage named etc all fail).

Thanks for the awesome library!

@bahlo
Copy link
Member

bahlo commented Aug 12, 2014

Thank you very much for your message, I will dig into this when I get home.

In the meantime:

  • Did you change anything? Or did you just clone and run the tests?
  • Can you check if the image is added to the test target?

@gavinbunney
Copy link
Contributor Author

Just a straight clone & run of the tests.
Yep the image is in the test target & in the copy bundle resources; definitely a strange one.. could just be a bug in Beta5; the demo app works ok using a similar loading method!

@bahlo
Copy link
Member

bahlo commented Aug 12, 2014

Checked again, all tests pass for me (Xcode6-Beta 5 on clean master). Are you running Yosemite or Mavericks?

Like you said, this must be an issue with Xcode or Swift, the cfImageData should definitely not be nil.

I suggest, we wait for the next update and try this again.

@gavinbunney
Copy link
Contributor Author

I'm still running Mavericks - beta Xcode and beta OS are a bit too far! Thanks for checking it out...

I've filed a radar (can reproduce it with a fresh project) and I'm sure it'll be fixed and not just closed 👍

ozpp

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

2 participants