How can I check all the methods that were deprecated since iOS 4.3? Is there a website, that shows or filters all the methods that are deprecated in a give particular iOS?
The best place is to check in Apple Class Reference. Ex. for NSString.
This will be updated by them after every modification, and will be almost accurate and uptodate as compared to all other website, which in turn will get the information from here only.
if ([object respondsToSelector:#selector(methodName)])
{
// do something
}
Related
Is there a way to retrieve which app the contents of the clipboard on iOS was copied from?
So "http://google.com" was copied from Safari, etc.
No, there isn't. It would probably violate the 'sandbox' principle which is implemented throughout iOS.
The only similar feature I know of is UIApplicationDelegate's method - application:openURL:sourceApplication:annotation: where the source application is explicitly passed as a parameter.
I've found out that it's very easy to customize UIPageControl page images (I've checked it for iOS7/8):
[self setValue:[UIImage imageNamed:#"my_icon_for_off_state"] forKey:#"_pageImage"];
[self setValue:[UIImage imageNamed:#"my_icon_for_on_state"] forKey:#"_currentPageImage"];
But I wonder can I publish my app with this code, because these variables are declared as private in UIPageControl?
As per Apple, you can't use private API's in your project.
However we can. Don't worry. Just be honest and while submitting the app, inform them that you have used xyz code.
Apple DON'T approve the app where insecure private API's are used.
Many times, I used private API's and Apple approved it.
Honesty is simplicity.
One of the example
As you've already stated, those properties are declared private by Apple so you will be unable to use them. You can change the tint color of the page "dots" by using pageIndicatorTintColor and currentPageIndicatorTintColor.
I have found an undocumented method for detecting sim card availability in iphone. This method needs CoreTelephony.framework
NSString * CTSIMSupportGetSIMStatus();
int CTGetSignalStrength();
NSString *status = CTSIMSupportGetSIMStatus();
NSLog(#"Sim card status %#",status);
This method works well. can i use this method in my project? If i use this undocumented method, will apple reject my app? plz let me know... Thanks
You can not use undocumented method as Apple says that they can change the implementation for bug fixing or by updating the SDK cause App crash. They do not allow the use of Private API and trace at submission at store. Mostly private method can be found in debugging at Xcode and start with _Underscore so you can try alternative to achieving things if you do not want to get reject your application later at submission.
In the HockeyApp SDK v. 3.5, they have shifted to a new method of user identification. In previous versions of the SDK, there was a callback method - (NSString*)userNameForCrashManager:(BITCrashManager *)crashManager which would set a string which would identify all crash reports sent from the client.
However, in version 3.5 of the SDK, it seems that this is deprecated, and it is preferred that you simply call:
[[BITHockeyManager sharedHockeyManager].authenticator authenticateInstallation];
This sets a unique ID for the user. But how can I access this identifier? I want to attach it to support emails so that I can search for crash reports the user has submitted.
You can use the following delegate to set the userName:
- (NSString *)userNameForHockeyManager:(BITHockeyManager *)hockeyManager componentManager:(BITHockeyBaseManager *)componentManager
This is documented in the header and help ofBITHockeyManagerDelegate and the replacement is also mentioned in the header and help of BITCrashManagerDelegate documentation.
BITAuthenticator is only used for beta distribution due to the fact that Apple removed the UDID calls from iOS 7. See the documentation and help. It is automatically disabled in App Store builds and without further setup creates anonymous IDs! Please read the mentioned documentation.
I think you are looking for publicInstallationIdentifier. That should return an NSString, unique for each user.
Look at this header file - BITAuthenticator.h .
Also, in the BITHockeyManager, there is a method called configureWithIdentifier: in which you can pass the identifier.
Is there a common way to detect if a symbol exists or not? Like CGPathCreateCopyByStrokingPath() in iOS5, which is only available on iOS5 and later.
If I compile and run apps using this routine on iOS 4 devices, I would get a runtime dyld error.
In Objective-C, +class and other utility APIs can be used to determine the existence of some class or some selector, is there any API to do this on dyld-ed symbols?
Or is it under Apple's permission to use dyld functions for an AppStore oriented app?
To check the availability of a function, explicitly compare its address to NULL or nil.
if (CGPathCreateCopyByStrokingPath != NULL) {
// it exists
}
Here's Apple's documentation on the matter (listing 3-2).