0

I've been here a few times in the past and was hoping to get some help from you guys.

I have experience in Xcode and iOS but I have just come a cross cocoapods.

I want to use AsyncDisplayKit and I've added it in my podfile like they explain on their website:

platform :ios, '8.0'
pod 'AsyncDisplayKit'

I'm using Swift, so I also have the bridging file where I have imported the files like so:

#import <AsyncDisplayKit/AsyncDisplayKit.h>
#import <AsyncDisplayKit/_ASDisplayLayer.h>

Everything is fine until I try to create a new class that uses 'ASDisplayNode':

class GradientNode: ASDisplayNode
{
  class func drawRect(bounds: CGRect, withParameters parameters: NSObjectProtocol!,
      isCancelled isCancelledBlock: asdisplaynode_iscancelled_block_t!, isRasterizing: Bool) {

      // Drawing gradient ...

   }
}

The class compiles fine but I get a few errors any way:

xcode compiler error

I have tried to delete derived data and cleaning the project. I also ran the 'pod install' command again. Is it something I'm missing in the projects Build Phase or Build Settings. I also included the frameworks that ASyncDisplayKit requires. Must I include any other files or frameworks or why is Xcode giving me these errors?

I have Xcode 6.1.1. Thanks.

viktorg
  • 115
  • 1
  • 9
  • did you make sure to quit and restart xcode after installing the pod? – user3781236 Feb 18 '15 at 21:59
  • Yes I did, but the problem seemed to be that I hadn't set my 'other linker flag' value to `-lc++` and `-ObjC`. And I also added the Facebook SDK and that sovled it. Thanks! (Y) :) – viktorg Feb 23 '15 at 12:24
  • After update the cocoapods,you should open the xcworkspace instead of xcodeproj file. – liaogang Jan 08 '16 at 07:41

0 Answers0