This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Will Apple accept Apps with deprecated code?
I am developping an iPhone application and i am using a method like this :
- (NSString*)udid
{
UIDevice* device = [UIDevice currentDevice];
return [device.uniqueIdentifier stringByReplacingOccurrencesOfString:#"-" withString:#""];
}
But i have seen that the "uniqueIdentifier" is deprecated.The problem it's working fine, and i would like to know what's will happen if i will post my app in the store like this ( with the use of the deprecated method)
thanks for your answers.
In general, don't use deprecated apis, as they are liable to be removed from future versions. Also, APIs are generally deprecated because they are obsolete or sub-optimal, and there's usually a newer, better way of doing whatever you're trying to do.
In your case, definitely don't, for this reason:
http://gigaom.com/apple/apple-cracks-down-on-udid-use/
I believe the popular alternative is to create a UUID (which will be unique, but not tied to the device) on first run and save it to refer to on subsequent runs. It's been quite extensively talked about if you google it.
Related
This question already has answers here:
presentModalViewController:Animated is deprecated in ios6
(5 answers)
Closed 8 years ago.
I'm trying to edit my source code on Xcode, but I keep getting an error.
Code:
// Present the mail composition interface.
[self presentModalViewController:picker animated:YES];
ERROR: 'presentModalViewController:animated:' is deprecated: first deprecated in iOS 6.0
Is there any way to fix this?
Typically, using deprecated features in any programming language may not work or may result in malfunctioning software.
Wikipedia defines deprecated as:
Deprecation is an attribute applied to a computer software feature,
characteristic, or practice to indicate that it should be avoided
(often because it is being superseded).
In short, you shouldn't be using presentModalViewController:animated:, and that's why you're getting the error.
http://en.wikipedia.org/wiki/Deprecation
I'm having some trouble about ordering records in an SQLite table used for my iOS project.
I've been looking for solution for a while, also asked the question here.
Since then, I got some help from a user in SQLite mail-list and he suggested me an extension, but it's for windows. Here is the link.
And this extension is using CompareString function(see MSDN).
So that if I can manage to find equivalent of this function in Mac, I might be able to use the library in my Xcode project. Furthermore, that could create an alternative SQLite extension for iOS developers.
So is there such a function in Mac OS? Mostly similar maybe?
I'm not sure why your question was down-voted by someone else... maybe it's because what you are asking for is not clear?
As for CompareString function equivalents, look at the various compare methods in NSString (such as [NSString compare:]) and see if you can use something like to sort your UITableView.
http://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/compare:options:
This question already has answers here:
Closed 11 years ago.
Possible Duplicates:
Twitter SDK on iOS with standard UI
Send a tweet from iPhone app
Is there an iPhone SDK API for twitter?
Is there a twitter SDK available for iOS? I checked their website but i can't find anything. I know that iOS 5 will have integrated twitter support, but what about ios4?
Thanks
See http://dev.twitter.com/pages/libraries#objectivec for some Objective-C client libraries. I haven't actually used any of these myself, but from what I hear the first option (MGTwitterEngine) does the job nicely.
Alternatively, you can find a tutorial for DIY from scratch here (although, it is a bit dated, no OAuth for example).
In iOS4, you can use NSURLConnection instances to talk to the Twitter API, and decode the returned JSON or XML. There are definitely good JSON decoder classes online for Objective-C, but many of the (pre-built) 'Twitter' classes, which wrap the API callbacks in a nice class, available online are now outdated as they are not maintained. If I were to recommend one, it would be the MGTwitterEngine, as this is maintained by Matt Gemmell, a prolific and reliable iOS developer - who obviously cares for the platform. He works on Twitterrific, which uses the MGTwitterEngine class, for instance; the likelihood of it being maintained is quite high.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
We need to write some software that will compile and run on both an Mac OS X server and Ubuntu. We would love to use Objective-C with all of its Cocoa goodness, however the GNUstep implementations of the parts we are using are broken (in the latest Ubuntu package anyway.)
In light of this should we use C++ (I would really rather not), C or something else that we have not thought of?
It is a server/back-end process that is very resource intensive, Java and other interpreted versions of this software perform much worse than the Objective-C proof of concept we have written, hence we now wish to re-write in a "compiled[1]" language.
(NB: Some people might consider this subjective, however at the end of the day we do need to get a job done, there has to be a reasonably appropriate correct answer here).
[1] Compiled to native CPU instructions, not compiled into "byte codes" that then have to be run by an interpreter.
I would implement the core business logic in C and take the time to write GUI wrappers native To each platform's code -- Objective-C /Cocoa and GTK/gnome or whatever.
What sort of software are you trying to create?
The most likely answer is C/C++.
I would recommend Objective-C for portability and ease of use. You don't get to use Cocoa if you want to run on Linux, but Objective-C is a really nice language and it let's you easily interface with regular C code.
Consider using Python. You can write applications that are native in appearance on both platforms with wxPython.
Python comes with Max OS X and Ubuntu desktop and your application can be packaged to look and behave like any other native application on either platform.
How about java?
And if you need some really native thing, you can always use JNI.
How about FreePascal maybe with Lazarus if you're interested in GUI development?
Assuming that you want to create an application with a graphical user interface, I think that C++/QT is the most likely candidate. I'm not aware of any other compiled[1] language with mature toolkit support on OSX and Linux.
By 'compiled' I'm making the assumption that you mean 'produces a native executable'.
I would vote for ANSI C or C++ coupled with POSIX.
Given the other answers below I think you need to make two choices
1) If you need a GUI not you need to choose the UI library either a cross platform one ee.g QT, wx etc or write different ones for OSX and Linux - Apples preferred way and I think gettting you the best look and feel on each platform
2) whether your application needs fast calculations as that could drive your language choice e.g. C++/C/Objective-C vs python
The two choices are separate as you can mix most GUI choices with different languages.
I would hazard a guess that C/C++ would be the most obvious platform independent languages.
(I would really rather not)
Why not? What sort of software do you plan on developing?
It depends on what you want to do. If you are looking for very high performance application, your options are C/C++. If you are looking for quick development, your options are Java/Python.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm working on a Cocoa app targeting Leopard and above, and I'm thinking about adding a crash reporter to it (I'd like to think my app won't crash, but let's get real here). I have some mostly conceptual questions before I really get started.
1) How does this work conceptually, knowing when there's a crash and bringing up a reporter? Do I have a daemon running looking for a crash, or do I wait until my app is launched next time to report?
2) Can this be done in Cocoa? Or would I have to dip into Carbon or IOKit or somesuch?
3) Is this even a good idea? Mac OS X already has a built in crash reporter, but as a developer I don't get to see the crash logs. I don't think my app will be crashing often, frankly, but I just don't want to be naive but this sort of thing.
What are your thoughts and opinions regarding this?
I've had a lot of success with UKCrashReporter. The code is straighforward and easy to modify to match the L&F of your app.
PLCrashReporter looks interesting, though.
I'd stay away from Smart Crash Reporter just because many users (rightfully) don't appreciate your app injecting code into unexpected places and it strikes me as a fragile (perhaps dangerous to use in a released app) approach.
Others have answered the question well and pointed to some good example code.
Coding it yourself is fairly simple. The strategy generally is:
catch appropriate signals
launch a separate crash reporter app that lives inside your application's bundle
the crash reporter app then finds the latest crash log entry for your app and sends it to you via whatever method you desire (POST, email, etc)
I've also rolled my own: SFBCrashReporter
There is a small post on my blog about it.
I have seen a few apps use Smart Crash Reporter or perhaps some variant of it. When your application crashes, it will bring up the usual Apple crash dialog with an extra button which says "Send to both Apple and You"
I would shy away from Smart Crash Reporter for the single reason that it has a bad taste for a lot of users, and is a good way to get bad press for your app (deserved or not) PLCrashReporter or UKCrashReporter http://zathras.de/angelweb/sourcecode.htm they will give some ideas about what to do and how to do it in ways that don't inject into other code space.
Another option is Google's Breakpad. It has a Cocoa framework wrapper, and is compatible with Mozilla's Socorro server. It's used by Firefox, and the Cocoa framework is used in the current betas of Camino. The client-side integration is pretty easy, but I've never looked at what it takes to run an instance of the Socorro server.
I'm using ILCrashReporter and it works really nicely. The method is email based so it works well with Fogbugz.