i am using EkSource class from Eventkit framework for creating custum calender but , when i am running application in ios 4.3.3. i am getting following error :-
2012-04-03 14:49:36.522 TimeFix[791:707] -[EKEventStore sources]:
unrecognized selector sent to instance 0x252a00 2012-04-03
14:49:36.590 TimeFix[791:707] *
Terminating app due to uncaught
exception 'NSInvalidArgumentException', reason: '-[EKEventStore
sources]: unrecognized selector sent to instance 0x252a00'
but when i am using ios 5.0 ipod for run application, is working fine with custom calender.
so please suggest me what is the is problem with ios 4.3.3.
Your error shows that you might have used something like this
[EKEventStore sources]
Am I right? If yes,
then apple doc says
sources
Returns an unordered array of source objects.
(NSArray *)sources
Return Value An unordered array of EKSource objects.
Availability Available in iOS 5.0 and later. Declared In
EKEventStore.h
So it is available in iOS 5.0 & later.
Related
I have a date picker in my app and it was working fine up until I updated to the latest Xcode.
Now when I use it it crashes and gives this error.
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIDatePickerMacCompactView _setTextColor:]: unrecognized selector sent to instance 0x11135ae50'
This is an app that is on iOS and Mac OS using catalyst.
The date picker works fine on the iOS devices but crashed like this on the Mac version.
Has anyone got any idea on what may be happening, I cannot find the UIDatePickerMacCompactView in there files anywhere.
Just by reading the error message, are you setting the text color as UIColor instead of NSColor by chance. I have little experience with Catalyst so I might be wrong but that's my 2 cents.
I am testing my music application compatibility on IOS7 by running it on Xcode 5 iPhone simulator(IOS7) but it crashes on retrieving all the music items using following code.
MPMediaQuery *allSongs = [[MPMediaQuery alloc] init];
NSArray *itemsFromGenericQuery = [allSongs items]; // Here application crashes
Crash log :
[__NSCFNumber libraryCompletionHandler]: unrecognized selector sent to instance 0xdd66840
This is snapshot for the threads running at the time of crash:
I am suspecting that there is some bug in Xcode5..!
EDIT : I could run the same application using Xcode 4.6.3 on simulator/device without any issue/crash.
[__NSCFNumber libraryCompletionHandler]: unrecognized selector sent to instance 0xdd66840
This error says that an object of type NSNumber was passed the message -libraryCompletionHandler. NSNumber doesn't have a -libraryCompletionHandler method, hence the crash. Obviously, something bad is going on.
Usually this is an indication of a bad cast, or a zombie. In this case, I would suspect a zombie object.
Congratz, you may have found a defect in the iOS 7 Simulator. Woo Hoo!
I am suspecting that there is some bug in Xcode5..!
There are clearly some bugs in the developer preview versions of Xcode 5, but it sounds like it's your app that's crashing rather than Xcode or the simulator itself. That would lead one to believe that the problem is more likely to be either in your app, or possibly in the operating system.
[__NSCFNumber libraryCompletionHandler]: unrecognized selector sent to instance 0xdd66840
Bad pointers are a common cause of unrecognized selector errors, especially when they involve classes that don't seem to be involved in the code that's crashing. Turn on NSZombieEnabled and set a breakpoint on all exceptions to track down the problem.
Maybe it's the project settings
Try to add -ObjC
I am getting this Error :
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MasterViewController setRefreshControl:]: unrecognized selector sent to instance 0x2681e0'
How to resolve this issue because in simulator my app is running but on device with the same code my app is not running.
I hope your simulator is iOS6 Simulator and the device in which you tried to run may have a lower OS version ..right?
.
From UIRefreshControl Class Reference,
Availability : Available in iOS 6.0 and later.
Refresh control is new to iOS6. So if you want to support iOS5, the best thing to do is check if the refresh control class exists (you can use NSClassFromString ), and if it doesn't exists either not use it or use an alternative.
I am using CoreData on my iPhone app. When I test the app on a old 1g iPhone running iOS 3.1.3 I get a SIGABRT in this method
#pragma mark - Application's Documents directory
/**
Returns the URL to the application's Documents directory.
*/
- (NSURL *)applicationDocumentsDirectory
{
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
}
*** -[NSFileManager URLsForDirectory:inDomains:]: unrecognized selector sent to instance 0x106920
2011-04-08 23:49:26.311 TestApp[963:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSFileManager URLsForDirectory:inDomains:]: unrecognized selector sent to instance 0x106920'
2011-04-08 23:49:26.321 TestApp[963:207] Stack:...
I am using XCode 4. It seems like the selector is not supported, however I thought they were saying that CoreData should work on iOS > 3.....so why are does the code that is generated along with it not working...
URLsForDirectory is only available in iOS 4.0 and later
Because the code is NOT related to Core Data but to an Foundation method on the NSFileManager class which is available since iOS 4.0.
I have an iPhone app that uses the json-framework. I moved some of the code, including the json-framework source, from the main project to a static library. When I did this, the json-framework stopped getting compiled into the binary (double checked with class dump). This causes a nasty error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString JSONValue]: unrecognized selector sent to instance 0x43897f0'
Everything else in the static library continues to function properly.
Apparently, categories and static libraries don't work unless you sprinkle the magic dust on the linker flag. According to a Technical Q&A, you have to add the -ObjC linker flag to the main project (not the library, as stated in the Q&A).