#import "TWGameAPPServ.h"@interface TWGameAPPServ()@endstatic TWGameAPPServ* g_TWGameAPPServ    = nil;@implementation TWGameAPPServ
@synthesize sdk;+ (TWGameAPPServ*) sharedInstance{
    
        if (g_TWGameAPPServ   == nil)
            g_TWGameAPPServ = [[self alloc] init];
    
    return g_TWGameAPPServ;
}
-(void) viewinit{
   // [super viewDidLoad];
    self.sdk = [GameSDK sharedInstance];
    self.sdk.delegate = self;
    
}//初始化
-(void) doShowLoginControl{
    [self.sdk initSDK];    }//初始化回调
-(void) onInit:(BOOL)result{
    if (1 == 1)
    {
        
    }
}void TWGameSDKServ::showiosloginControl()
{
    TWGameAPPServ* tTWGameAPPServ = [TWGameAPPServ sharedInstance];
    [ tTWGameAPPServ viewinit];
    [tTWGameAPPServ doShowLoginControl];
}本来应该是执行Init后,会到回调,然后弹出sdk的登陆界面。
可现在执行到init 之后 还没到回调 就挂了,出现如下错误
2015-05-18 10:47:30.739 LOL[436:129248] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </private/var/mobile/Containers/Bundle/Application/46836ABF-0FF1-469A-A002-EDF9638E53D5/LOL.app> (loaded)' with name 'Login''
*** First throw call stack:
(0x2bc7849f 0x3942ec8b 0x2bc783e5 0x2f4f8229 0x2f417303 0x2f256805 0x2f13aaf9 0x2f13aa7d 0x53b99b 0x263433 0x3e8d0b 0x3c4d9f 0x1967d1 0x77263 0x2f1a54f1 0x2f39a43f 0x2f39c98b 0x2f3a7209 0x2f39b217 0x324090d1 0x2bc3ed7d 0x2bc3e041 0x2bc3cb7b 0x2bb8a3c1 0x2bb8a1d3 0x2f19f1bf 0x2f199fa1 0x7c3bb 0x399aeaaf)
libc++abi.dylib: terminating with uncaught exception of type NSException

解决方案 »

  1.   

    @ReyZhang 
      

  2.   

    补充
    #import "GameSDK.h"
    #import <UIKit/UIKit.h>@interface TWGameAPPServ:NSObject<GameSDKDelegate>
    {
    GameSDK *sdk;

    }@property(nonatomic,strong)GameSDK* sdk;+ (TWGameAPPServ*) sharedInstance;- (IBAction)SubmitTouch:(id)sender;
    -(IBAction) setserverIDTouch:(id)sender;
    -(void)doShowLoginControl;
    -(void)viewinit;
    @end
      

  3.   

    你的 Login.xib 里是不是有没有删干净的 Outlet?
      

  4.   

    断点一下,是不是执行到
     [tTWGameAPPServ doShowLoginControl];
    这段的时候就报错了,再根据错误提示来看,应该是通过xib来创建LoginController 实例的时候没有找到name名称为"Login" 的xib文件而导致的程序异常。