2012-01-11 2 views
2

내 응용 프로그램이 잘 시뮬레이터 및 다른 장치에서 작동합니다. 최신 iOS 업데이트가있는 iPhone 4가 있으며 앱이 내 기기에서 실행을 거부합니다.목표 C - 애플 리케이션 시뮬레이터 및 기타 아이폰에서 작동하지만 내 자신의 아이폰 4에서 실행되지 않습니다

망막 디스플레이 이미지를 둘러싼 문제인 것 같습니다. 전화에서 실행하려고 할 때 오류가 나는 얻을 분출입니다 :

2012-01-11 09:27:47.404 rr_game1[1569:707] cocos2d: cocos2d v1.0.1 
2012-01-11 09:27:47.413 rr_game1[1569:707] cocos2d: Using Director Type:CCDirectorDisplayLink 
2012-01-11 09:27:47.845 rr_game1[1569:707] cocos2d: OS version: 5.0.1 (0x05000100) 
2012-01-11 09:27:47.849 rr_game1[1569:707] cocos2d: GL_VENDOR: Imagination Technologies 
2012-01-11 09:27:47.853 rr_game1[1569:707] cocos2d: GL_RENDERER: PowerVR SGX 535 
2012-01-11 09:27:47.856 rr_game1[1569:707] cocos2d: GL_VERSION: OpenGL ES-CM 1.1 IMGSGX535-63.14.2 
2012-01-11 09:27:47.861 rr_game1[1569:707] cocos2d: GL_MAX_TEXTURE_SIZE: 2048 
2012-01-11 09:27:47.864 rr_game1[1569:707] cocos2d: GL_MAX_MODELVIEW_STACK_DEPTH: 16 
2012-01-11 09:27:47.867 rr_game1[1569:707] cocos2d: GL_MAX_SAMPLES: 4 
2012-01-11 09:27:47.871 rr_game1[1569:707] cocos2d: GL supports PVRTC: YES 
2012-01-11 09:27:47.874 rr_game1[1569:707] cocos2d: GL supports BGRA8888 textures: YES 
2012-01-11 09:27:47.877 rr_game1[1569:707] cocos2d: GL supports NPOT textures: YES 
2012-01-11 09:27:47.880 rr_game1[1569:707] cocos2d: GL supports discard_framebuffer: YES 
2012-01-11 09:27:47.883 rr_game1[1569:707] cocos2d: compiled with NPOT support: NO 
2012-01-11 09:27:47.886 rr_game1[1569:707] cocos2d: compiled with VBO support in TextureAtlas : YES 
2012-01-11 09:27:47.889 rr_game1[1569:707] cocos2d: compiled with Affine Matrix transformation in CCNode : YES 
2012-01-11 09:27:47.892 rr_game1[1569:707] cocos2d: compiled with Profiling Support: NO 
2012-01-11 09:27:48.012 rr_game1[1569:707] Game manager singleton, init 
2012-01-11 09:27:48.031 rr_game1[1569:707] cocos2d: WARNING: Image (1024 x 4096) is bigger than the supported 2048 x 2048 
2012-01-11 09:27:48.035 rr_game1[1569:707] cocos2d: Couldn't add image:grid.png in CCTextureCache 
2012-01-11 09:27:48.047 rr_game1[1569:707] cocos2d: WARNING: Image (1024 x 4096) is bigger than the supported 2048 x 2048 
2012-01-11 09:27:48.050 rr_game1[1569:707] cocos2d: Couldn't add image:bg-circuits.png in CCTextureCache 
2012-01-11 09:27:48.054 rr_game1[1569:707] *** Assertion failure in -[CCParallaxNode addChild:z:parallaxRatio:positionOffset:], /Users/kevin/code/rr_game1/rr_game1/libs/cocos2d/CCParallaxNode.m:91 
2012-01-11 09:27:48.058 rr_game1[1569:707] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Argument must be non-nil' 

이상한 일이가 토하고있는 이미지가 응용 프로그램에있는 것입니다.

Screenshot of resources dir

다시, 응용 프로그램은 다른 장치와 시뮬레이터에서 작동합니다.

내 휴대 전화에서 응용 프로그램을 삭제 한
backgroundNode = [CCParallaxNode node]; 
[self addChild:_backgroundNode z:-1]; 

_backgroundGrid1 = [CCSprite spriteWithFile:@"grid.png"]; 
_backgroundCircuits1 = [CCSprite spriteWithFile:@"bg-circuits.png"]; 

_backgroundGrid1.anchorPoint = CGPointMake(0,0); 
_backgroundCircuits1.anchorPoint = CGPointMake(0,0); 
CGPoint gridSpeed = ccp(0.05, 0.05); 
CGPoint circuitSpeed = ccp(0.1, 0.1); 

[_backgroundNode addChild:_backgroundGrid1 z:1 parallaxRatio:gridSpeed positionOffset:ccp(0,-winSize.height)]; 
[_backgroundNode addChild:_backgroundCircuits1 z:0 parallaxRatio:circuitSpeed positionOffset:ccp(0,-winSize.height)]; 

는, "깨끗한"Xcode를 다시 시작, 내 컴퓨터를 다시 시작 실행 여기에 이미지를로드하는 코드입니다. 아직도 운이 없다. 나는 또한 내 전화기를 다시 프로비저닝했습니다. 또한 자산을 삭제하고 프로젝트에 다시 추가했습니다.

+0

을 확인 만드는 어떤 도움이 필요하면이

for (int i = 0; i < amountOfSprites; i++){ CCSprite *sprite = [CCSprite spriteWithSpriteFrameName:spriteName]; sprite.anchorPoint = ccp(0,0); sprite.position = ccp((i * sprite.contentSize.width),0); [yourBatchNode addChild:sprite]; } 

같은 사용하여 서로 뭔가 이미지 조각을 추가 할 수 있습니다. 그것은 이상한 일이며 iPhone 4에서만 발생합니다 ... – evotopid

+0

@ 2x 확장 프로그램을 cocos2d와 함께 사용하지 마십시오. 대신 -hd 접미어를 사용하십시오. 참조 : http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:how_to_develop_retinadisplay_games_in_cocos2d – LearnCocos2D

답변

2

솔직히 말해서, 그것은 X 4096 1024의 이미지 크기보다 훨씬 큰 로그 파일 내에서 말하는가 X 2048 2048 지원 : 당신은 다른 장치하지만 장치에서 실행되는 말을

2012-01-11 09:27:48.031 rr_game1[1569:707] cocos2d: WARNING: Image (1024 x 4096) is bigger than the supported 2048 x 2048 
2012-01-11 09:27:48.035 rr_game1[1569:707] cocos2d: Couldn't add image:grid.png in CCTextureCache 
2012-01-11 09:27:48.047 rr_game1[1569:707] cocos2d: WARNING: Image (1024 x 4096) is bigger than the supported 2048 x 2048 
2012-01-11 09:27:48.050 rr_game1[1569:707] cocos2d: Couldn't add image:bg-circuits.png in CCTextureCache 

그들? 그들이 망막이 가능하지 않다면, 나는 각각의 이미지 크기가 512x2048이므로 2048x2048 최대 크기에 맞을 것이라고 상상한다.

망막 디스플레이 이미지가 이러한 크기를 벗어나면 단순히 작동하지 않습니다. 2048x2048은 이미 망막 크기의 이미지를 포함해야합니다. 더 작은 크기를 사용하려면 게임을 수정해야 할 수도 있습니다.

+0

아니면 다른 기기가 iPhone 4S 일 수 있습니까? 최대 텍스처 크기는 4096x4096까지 증가했습니다. 또한 하위 호환성이 문제라면 모든 PowerVR MBX 장치 (예 : iPhone, iPhone 3G 및 관련 iPod)에서 1024x1024라는 사실을 알고 있어야합니다. – Tommy

+0

다른 장치 중 하나는 iPhone 4뿐 아니라 일반 iPhone 4입니다. –

+0

그냥 파기를 더 했어요. 문제가있는 파일은 1024x4096이 아니예요. 640x2292입니다. –

관련 문제