Crash analytics and reporting for iOS [closed] - iphone

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
We are in the process of evaluating a 3rd party solution or custom solution for our iOS app for crash reporting. We are looking at Crashlytics, BugSense, Testflight. They all seem to serve the purpose i.e. live crash reporting.
Also, we have been looking at custom solution implementation along the lines of Xcode 4.2 debug doesn't symbolicate stack call
2 questions:
Does a 3rd party solution (Crashlytics, BugSense etc) provide an advantage over a custom solution when the only purpose that we want to use it for is crash reporting?
How much of a functionality can we add to the custom exception handler e.g. if I want to post the stacktrace to a server with HTTP post, can I do it in the exception handler or do I need to wait until my application launches the next time to send the logs? How soon should an exception handler exit?
Thanks,
Hetal

You shouldn't do your own crash reporting solution, but use an existing solution because writing a reliable and safe crash reporter is hard. Landon Fuller, developer of PLCrashReporter, explains why in this article: Reliable Crash Reporting
In general running any non async-safe code once the crash occurred, should be avoided at any cost! This means that any Objective-C code has to be avoided at all. This also means that you crash reports should only send to your server at the next launch. You should also not rely on a 3rd party framework using PLCrashReporter per default, as whatever the framework does in addition should be implemented done async-safe too.
Writing your own exception handler will hardly ever be as detailed, good and reliable as anything based on PLCrashReporter.
In addition to your mentioned 3rd party solutions, there is also the open source solution QuincyKit (based on PLCrashReporter with a companion PHP based basic server solution) and HockeyApp, which can also be used with the QuincyKit client. (Note: I am one of the developers of these two solutions)

Related

Organising a big project - how is it done? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I understand that for smaller projects keeping methods in the main view controller (namely viewDidLoad) is the way forward, but for bigger projects im thinking this cant be the way apps are organised - the m file would be chuffing huge! also there would be thousands of declarations at the top! Im nowhere near building an app that big but i'm intrigued, would you put them in a separate file and call them when they're needed? or is it just a case of scroll past the declarations and use pragma marks to find what your looking for?
Basically this is not a specific question for developing iOS applications, it's more of a software architecture problem and requires more knowledge that can't be put in a single answer.
But to get hold of how things usually work, the project has to be planned by pen and paper first, since those are the developer's best tool, then when you've got the main parts of your project planned in a good manner, you start by plotting some ERD of your main components, and decide what will each part be responsible of, then start coding from there a prototype version.
when you have a simple project up and running, you start cleaning up the code, planning even further, and start testing your code, I can't describe how important testing is !
You'll also need software to manage your project (not the source code, but the project itself), something like asana maybe to keep track of tasks and who does what.
In order to keep your code safe against overwriting by other people who are working with you, and to keep things managed across versions, you'll need to setup a revision control repository of some king, Git is supported out of the box by XCode !
Now for the part of code writing, you need to learn some kind of pattern and follow it, iOS projects and most others now follow the MVC structure, which answers your question of how big the classes will get and how things will communicate together without turning into a mess !
Yes, you'll need pragmas and code trickery here and there, but you should always follow the patterns and conventions in order to keep things maintainable when projects grow !
again as I said, this is not anywhere near a good start, you need lots of experience and knowledge before you can actually work on huge projects, but it's something !
Keep up the good work, and always remember that you always have to ask questions, never be intimidated :)
Edit 1
Forgot to add a tip on reading about Agile software development that's probably my last tip :)

Updating Database from iOS app [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Hi I am newbie to iOS programming,
I am building an iOS app to display a catalogue(Product name, Item No, Discription, and Image) of the products. After the user installs the app on the iOS device there may be updates happening to the product list. The user will not be able to modify any data in the database.
Can some one give me an idea of what kind Database i would require to use (SQL lite, Json or Coredata) and how i can let the update happen. Should I update just the new / modified records or update the complete database each time.
From some examples of apps i have seen from the appstore the app downloads the entire (latest version) of the database the first time the app is loaded.
Thanks in advance to all the friends out there in the community. your suggestions, codes, examples and any reference materials and links will be of great help.
Cheers!!
A couple of thoughts:
Apple's recommended framework is Core Data. Especially if you have a lot of data, it's probably worth familiarizing yourself with it.
Direct SQLite programming can have its advantages, but unless you have a compelling reason to pursue it (and I don't see anything suggesting this in your question), stick with Core Data. If you do decide to use SQLite, consider using the FMDB Objective-C wrapper for SQLite.
If you're dealing with a trivial amount of data (e.g. a dozen records), Core Data is probably overkill and you could just use a property list (plist). For example, if you have downloaded your JSON into a NSArray or NSDictionary, you can then just do writeToFile to save it, and dictionaryWithContentsOFFile or arrayWithContentsOfFile to read it back at a future date.
JSON is generally considered more of a mechanism for exchanging data with a server. I wouldn't be inclined to store data locally in JSON format (though you could). I'd use a plist instead.
By the way, it's generally not advised to store the images themselves in your CoreData/SQLite database. If you have larger files, for performance reasons, we often store them in the iOS File System (and save some reference to the file name in the database).
You mention that you have seen apps that download the entire (latest version) of a database. A more sophisticated implementation (critical with larger databases) would entail downloading updates (edits, deletions, insertions) rather than the full database. For a small database, if you can get away with the solution you propose (and it certainly makes it easier), but as your app becomes more sophisticated, you will want to consider more elegant server integration.

Have EF automatically resend queries after various errors [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
When I execute a command against a redundant SQL configuration (such as SQL Azure), I sometimes get timeouts and other misc. errors that are due to a server being shutdown or failing. On Azure this isn't a problem, since redundancy is built-in. The correct action is to re-attempt the query with a new connection, and most likely the load balancers (or whatever) will kick you over to a server that's functioning properly.
My question is whether there is a way to have Entity Framework (v4 or v5) do this automatically? Wrapping every query with a try/catch block (that reattempts the query if certain errors are received) is impractically, and I feel confident that there's a solution to this problem that I'm overlooking.
For related information about SQL Azure's random closing of connections, see: http://msdn.microsoft.com/en-us/library/ee336245.aspx#cc. However, as of late, I have not gotten this error from Azure at all... I just got the occasional, sporadic SQL timeout.
have a look at the Transient Fault Handling Framework from SQL CAT :
http://windowsazurecat.com/2010/12/sql-azure-and-entity-framework-connection-fault-handling/
=== Added by #pbarranis ===
According to that same site, but a different page:
The Transient Fault Handling Framework has been superseded by a newer
deliverable from the Patterns & Practices team. It is now called the
Transient Fault Handling Application Block and comes in all 3 flavors:
•Developer guidance:
http://msdn.microsoft.com/en-us/library/hh680934(v=PandP.50).aspx
•NuGet package:
http://nuget.org/List/Packages/EnterpriseLibrary.WindowsAzure.TransientFaultHandling
•Source code:
http://nuget.org/List/Packages/EnterpriseLibrary.Source.WindowsAzure
The new Transient Fault Handling Application Block is now our
officially recommended approach to handling transient faults in the
applications running on the Windows Azure platform.
If you use Entity Framework 6 (currently in alpha) then there is some new in-built support for transient retries with Azure SQL Database (with a little bit of configuration): http://entityframework.codeplex.com/wikipage?title=Connection%20Resiliency%20Spec
I've created a library which allows you to configure Entity Framework to retry using the Fault Handling block without needing to change every database call - generally you will only need to change your config file and possibly one or two lines of code.
This allows you to use it for Entity Framework or Linq To Sql.
https://github.com/robdmoore/ReliableDbProvider

Advanced iOS Prototyping tool [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm looking for an advanced iOS prototyping tool. Here are some of the requirements that would be necessary for me to use one:
Should be able to run on a device and respond like a real app does. I don't mind if the prototype runs in a container.
Should be able to rotate a UITableView horizontally (like in Pulse/BBC) and also support gestures on the table.
I've seen some prototyping tools but none of them seem to support my second requirement above. My only alternative seems to be coding, which I do not want to do at this stage because there are a lot of other details that would end up making the prototype too-much-to-handle. Any pointers?
I think you are putting too much effort into a prototype which (I'll assume) is going to be thrown away once you start implementing the real deal.
Ask yourself what you want to accomplish with a prototype.
Is it to test your navigation and design with users to see if it is intuitive and complete? In that case I would recommend that you write no code at all and make a prototype in something like Keynote. you can even use that to make a clickable PDF that you can view in full screen on the device to let users tap on buttons etc. Check out the instructional videos on Keynotopia here for an example of what I'm talking about. I've even bought their awesome templates and love prototyping this way.
Is it to see if a specific technical thing can actually be done? In that case do minimal UI and write your code for real.
If you're trying to just develop a wireframe, you can use control dragging and drag & drop interfaces within Storyboard in Xcode. If you want to do anything else, you'll need to at least add some code behind it.
Best prototyping tool I've found is here .
It's free too. But I agree 100% with #Heiberg above - don't waste your time perfecting the prototype.
Blueprint has been removed by Apple recently. App Cooker would be the best option for you with the free viewer called App Taster. A big update is coming, the price will go up. It's the right time to jump in. www.appcooker.com
I agree with #Heiberg that a long involved prototyping process isn't worth it. The iOS prototyping tool I built, Flinto takes that to heart. We focused a lot of our effort on making the process of creating the prototype very fast.
Gesture support is forthcoming. Rotation is handled by dedicated portrait and landscape versions of your prototype.
I'm happy with AppCooker for the iPad. It has also free reader, called AppTaster, so other people can try your prototypes.
It's not 100% perfect, and update cycle is rare, but I like it.
It supports gestures, but doesn't support rotation.

What are some great iPhone questions for exercise? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
In a small team where everyone is coding away on a project for a little while I want to encourage some different thinking to keep people increasing their iOS knowledge as well as to get a bit more variety in their daily activities. I'm not looking for interview questions involving manhole covers, nor very specific questions about whether drawRect: is part of UIView or UIViewController. I'm looking for questions more along the lines of https://stackoverflow.com/questions/1282830/uiimagepickercontroller-uiimage-memory-and-more - which has a lot of questions and a lot of great information. I voted it up.
I'm thinking of sending out one of these topics about every week and then having a discussion about it towards the end of the week with some examples. Maybe assign a short presentation on a rotating basis so someone gets the job of delivering a 10-minute presentation about the topic, prizes awarded etc. - then when some task comes up involving that topic we may not have an expert but we at least have someone who knows where to start looking for answers. And maybe is keen to find out more based on that exercise.
stackoverflow, while it has "great questions", has a lot that are not so great and these scroll by in huge numbers daily. In iPhone-tagged questions sorted by votes I'm seeing very few of the kind of questions I want. I'm going to look further at some of the top-ranked questions here of course but these are the questions people had to ask, not necessarily the questions that others might get the most benefit from.
There are lots of exercises for "programmers" around but those are not what is needed. I want this to be iPhone specific. We come from a range of backgrounds and are all decent programmers already.
So - what are some things about iPhone development that YOU think are worth knowing? Can those things be phrased in the form of a question that leads an enterprising programmer to a satisfying answer? What made you stop and think, saved you days, pushed you in another direction that was fun and/or profitable, increased your knowledge or just made you feel good for having discovered the answer?
Things every iOS developer should know about:
Categories (how to extend existing classes with new
functionality)
Delegation pattern (how to implement your own delegates using either
a formal or informal protocol)
Blocks (often an improvement on delegation in case of
asynchronous calls, also useful in many other ways)
Passing NSErrors through indirection pointers.
NSInvocationOperation / NSOperationQueue for easy / clean threading code.
With the arrival of iOS 5 soon, one might want to learn about:
Storyboarding with Xcode 4.2 / iOS SDK 5.0
ARC
As a iPhone developer I will set these topics as a 10 minutes presentation.
Beginner level, may be useless if you are already developed in Obj-C but quite useful to integrate a C++ dev in your team
C++ vs Objective-C, Objective-C 2.0, Objective-C++
Memory management in Obj-C (retain, release, autorelease)
MVC design pattern
IB outlets
Design patterns in Obj-C
Use Stack Overflow before Google (not specifically iOS)
Medium/Advanced level
** Instruments ** (how to use it) (very important)
Comment code (even if selectors are expressive? a line or two is always better)
Automated tests (Who test their app anyway ? :))
Image manipulation + memory warnings
Code review of past apps (what is good, what is bad)
Code abstraction (see what module you have copied/pasted many times on yours apps and way to make it like a framework)
OpenGL ES (basics, only useful if you makes games)
Maps integration (with custom callouts, pins ...)
App Store submission (things to check before sending the app)
In-app Purchases
Push notifications
Core Data
SQLlite
Web service integration
Game Kit
Reducing loading times in the app by preloading
XMLParser (DOM and SAX)
Bonjour
Networking (checking that the iPhone can connect to the server)
Social network integration (FB, twitter, 4square ...)
Using GoogleMaps webservices
JSON
Core Animation (very long presentation)
Using UIAcceloremeter
Custom Views
Creating IB outlets
Creating Frameworks
Using Core Audio
Geolocalisation
Using C++ frameworks with iOS Projects
Things I don't know :
Calendar
Using iTunes library
CoreTelephony
Messing with Address Book
iAd
Video