2014-01-15 2 views
0

Layar SDK 프레임 워크를 내 앱 (버전 8.0)에 포함하고 있으며 모든 것이 장치에서 제대로 작동합니다.시뮬레이터에서 LayarSDK의 기호가 누락되었습니다.

그러나 시뮬레이터에서이 앱을 더 이상 실행할 수 없습니다. Layar가 작동하지 않아도됩니다. (결국 카메라가 없습니다!) 계속 통합, 자동화 된 테스트 등을 위해 컴파일해야합니다. 직장에서/기차 위에 개발 언급)

링커는 나에게 이러한 오류를 제공합니다!

ld: warning: ignoring file /Users/username/Documents/appname/libs/MPOAuth/libMPOAuthMobile.a, missing required architecture i386 in file /Users/username/Documents/appname/libs/MPOAuth/libMPOAuthMobile.a (2 slices) 
ld: warning: ignoring file local/LayarSDK/LayarSDK.framework/LayarSDK, missing required architecture i386 in file local/LayarSDK/LayarSDK.framework/LayarSDK (2 slices) 
Undefined symbols for architecture i386: 
    "_OBJC_CLASS_$_LayarSDK", referenced from: 
    objc-class-ref in MYAppDelegate.o 
ld: symbol(s) not found for architecture i386 

검사를의 LayarSDK이 i386를 포함하지 않습니다, 그것은 단지 armv7armv7s이 포함되어 있습니다.

답변

1

내 솔루션이 꽤 어색합니다. 누구에게나 더 좋은 아이디어가 있다면 알려주세요!

나는 내 응용 프로그램으로이 파일 (LayarSimulatorStub.m)을 컴파일 :

#if TARGET_IPHONE_SIMULATOR 

#import <Foundation/Foundation.h> 

@interface LayarSDK : NSObject 

@end 

@implementation LayarSDK 

+ (id)layarSDKWithConsumerKey:(id)a andConsumerSecret:(id)b andDelegate:(id)c { return nil; } 
- (id)init { return nil; } 
- (id)initWithConsumerKey:(id)a andConsumerSecret:(id)b andDelegate:(id)c { return nil; } 

@end 

#endif 

지금, i386 기호 LayarSDK있다. 모든 생성자에서 nil을 반환합니다. 이제 Layar가 비활성화 된 상태로 앱이 컴파일됩니다.

조건부 컴파일은 장치 아키텍처에 존재하지 않으므로 링커 오류가 없음을 의미합니다.

+0

+1! 그것은 나에게도 잘 작동, 감사합니다 !!! – Lapinou

관련 문제