2017-02-07 29 views
1

發生了什麼事情是,我每次點擊我的「登錄按鈕」時,應用程序崩潰,它應該將用戶重定向到不同的視圖他可以用電子郵件和密碼登錄。我在其他帖子中嘗試了很多解決方案,但似乎都沒有工作。 我正在使用Sinch SDK。在獲取響應後登錄過程中我的應用程序崩潰。如果我不使用下面的代碼登錄部分Sinch將無法​​正常工作。所以請幫助我在此登錄錯誤libC++ abi.dylib:終止於類型爲NSException的未捕獲異常

AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; 
[appDelegate.push registerUserNotificationSettings]; 
[appDelegate initSinchClient:[saveDefault objectForKey:@"emailId"]]; 
[appDelegate RegisterPushNotification]; 

感謝你在進階

+0

什麼是重新崩潰端口 –

+0

libC++ abi.dylib:以NSException類型的未捕獲異常終止@Anubu –

+0

顯示完全崩潰 –

回答

0

您可以使用協議委託方法此

在視圖控制器

@protocol LoginVCDelegate <NSObject> 

@required -(void) didFinishLogin; 

@end 
@property (nonatomic,unsafe_unretained) id<LoginVCDelegate>delegate; 

if([self.delegate respondsToSelector:@selector(didFinishLogin)]) 

{ 

    [self.delegate didFinishLogin];     

} 

在應用代理

-(void) didFinishLogin 
{ 
    [self.push registerUserNotificationSettings]; 

    [self initSinchClient:[saveDefault objectForKey:@"emailId"]]; 

    [self RegisterPushNotification]; 
} 
+0

是否正在工作啊 –

+0

是的工作感謝@Prissy –

+1

你可以投我的答案 –

相關問題