我正在嘗試編寫NSPredicate
來提取用戶ID和claimID,我得到下面的錯誤。'無法解析格式字符串'claimID!=''&userID =%@「'
Terminating app due to uncaught exception NSInvalidArgumentException', reason: 'Unable to parse the format string "claimID != '' & userID = %@"'
我的代碼是 -
+(NSArray*)fetchNotificationsWithPredicate {
NSPredicate *predicate=[NSPredicate predicateWithFormat:@"claimID != '' & userID = %@",[[NSUserDefaults standardUserDefaults] objectForKey:@"usernmae"]];
NSLog(@"%@",[self fetchNotifications]);
NSArray *loginUsers = [DBUtils createAndExecuteFetchRequestWithPredicate:@"Notification" predicate:predicate];
return loginUsers;
}
檢查...什麼革命性的新概念!這永遠不會流行。 – gnasher729