Post

Replies

Boosts

Views

Activity

[MyClass initWithCoder:]: unrecognized selector sent to instance - On iOS16
am using the [NSKeyedUnarchiver unarchiveObjectWithData:result] methode for unarchiving NSData in my objective c bases app. `NSMutableArray *array = (NSMutableArray *)[NSKeyedUnarchiver unarchiveObjectWithData:result]; This is working pretty fine upto iOS15. But since iOS16 I am getting a crash that [MyClass initWithCoder:]: unrecognized selector sent to instance 0x281069760. I can see that unarchiveObjectWithData methods is deprecated. So as suggested in xcode, now I have tried `NSError *err; @try { NSMutableArray *array = (NSMutableArray *)[NSKeyedUnarchiver unarchivedObjectOfClass:[NSMutableArray class] fromData:result error:&err]; } @catch (NSException *exception) { NSLog(@"Exception %@", exception.reason); } Now I am getting nil value for my array and the err is err = 0x0000000281ff1020 domain: nil - code: 4864 There were no issues before I updated my iPad to iPadOS 16. Any help is appreciated.
1
0
726
Nov ’22
iOS 15.2 is taking long to calculate predicates
I have an array with around 200K elements and I am using this predicate to filter some elements. NSArray * filteredArray = [mainArray filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"(value1 == %@) && (value2 == %@) && (value3 >= %d) && (value1 != %@)", value1, value2, value3, value4]]; When I am running this app in iPad older iOS versions this code takes 0.22 seconds for execution. (I have tested in iOS 14.7, 12.4, 13.2 etc..). But when I am running the it in iOS 15.1 or 15.2 the same code takes 0.63 seconds for execution. Does anyone know why it is taking long time in new iOS version? Any help would be appreciated.
2
0
707
Jan ’22