I have:
1. Class GameScene that extends SKSCene:
#import <SpriteKit/SpriteKit.h>
#import "GameLogic.h"
#import "Hero.h"
@interface GameScene : SKScene
-(void) addHeroMovementLineSegmentTo:(CGPoint)newTrajectoryPoint;
@property (nonatomic) Hero * hero;
And class Hero that extends SKSpriteNode:
#import <SpriteKit/SpriteKit.h>
#import "GameScene.h"
@interface Hero : SKSpriteNode
-(void) initHero:(CGPoint) position onScene:(SKScene *) currentScene;
@property (nonatomic) GameScene * currentScene;
I want these two classes (Hero and GameScene) to know about each other and use each other's methods (not to mention the XCode's autocomplete functionality for methods writing for both classes. Somehow, this is not allowed in XCode SpriteKit, because of the cyclic dependency, which I can understand, but wish it wasn't there. Any suggestions?
I know it is kind of late to answer on this, but using forward declarations in your interface declaration solves the problem for me.