1
votes

I'v created a new target for the lite version of the iphone game I'm working on. I'v added new images to the resources, and created a sprite with them. The images have two version - regular sized image, and another one for the retina display. This is how I added the sprite:

    CCSprite * liteLabel = [CCSprite spriteWithFile:@"buyAlert1.png"];        
    liteLabel.position = ccp(240.0,160.0);
    [self addChild:liteLabel z:1];
    liteLabel.opacity = 30;

When creating a sprite with the new added image the game crashes. This is what it says in the logs:

2011-12-03 17:07:02.666 Jungle Monkey Lite[13467:10a03] cocos2d: Frame interval: 1 2011-12-03 17:07:02.668 Jungle Monkey Lite[13467:10a03] cocos2d: surface size: 480x320 2011-12-03 17:07:15.472 Jungle Monkey Lite[13467:10a03] cocos2d: CCTexture2D. Can't create Texture. UIImage is nil 2011-12-03 17:07:15.472 Jungle Monkey Lite[13467:10a03] cocos2d: Couldn't add image:buyAlert1.png in CCTextureCache 2011-12-03 17:07:15.473 Jungle Monkey Lite[13467:10a03] * Assertion failure in -[GameLayer addChild:z:], /Users/odedharth/Dropbox/bibijida/Evil Monkeys/Evil Monkeys/Evil Monkeys/libs/cocos2d/CCNode.m:407

Also at the beginning of the log it says: Retina Display Not supported Though it supposed to be supported.

The weird thing is that it works on the full game target, in spite there is no difference at the code between the full game target and the lite game target.

How can I fix this?

Thanks

2
Are you running on the actual iPhone or on the simulator? Did you uncomment the Retina stupport thing in the app delegate? Because it doesn't seem you are running on an iPhone 4. - Voldemort

2 Answers

0
votes

"Retina Display Not supported" used to come up when you try to activate retina support on a device other the iPhone4 or on the simulator when you have not explicitly selected the "iPhone (retina)" in the Hardware/Device menu of iPhone Simulator. See also here.

0
votes

Ok I found out what was the problem. When adding the new images I didn't added them also to the lite version target.