Tag: iphone

Best Cocoa/Objective-C Wrapper Library for SQLite on iPhone

I’m developing for the iPhone and am looking for a good Cocoa/Objective-C library for working with SQLite. I don’t want to use the standard procedural SQLite C API. I see options at sqlite.org under the Objective-C section, but am not sure which is the best in terms of library API design, stability, and functionality. I’d […]

iOS 5 does not allow to store downloaded data in Documents directory?

I have made an application for my client by keeping target iOS as 4. But since the application still not submitted to Apple store, my client is planning to upgrade it for iOS 5.0. For this I read the guideline from Apple and found that “Only user-generated data or that cannot otherwise be recreated by […]

What is objc_setAssociatedObject() and in what cases should it be used?

In a project I have taken on, the original author has opted to use objc_setAssociatedObject() and I’m not 100% clear what it does or why they decided to use it. I decided to look it up and, unfortunately, the docs aren’t very descriptive about its purpose. objc_setAssociatedObject Sets an associated value for a given object […]

Finding distance from RSSI value of Bluetooth Low Energy enabled device

I am working on Bluetooth low energy concept project. I am getting the RSSI value between 1 and 100. As I move the tag the RSSI value increase as the peripheral moves away from the iPhone and decreases as it moves closer. Can anybody help me to get exact distance between the iPhone and the […]

Managing HTTP Cookies on iPhone

I want to port a python app that uses mechanize for the iPhone. This app needs to login to a webpage and using the site cookie to go to other pages on that site to get some data. With my python app I was using mechanize for automatic cookie management. Is there something similar for […]

Should I use NSUserDefaults or a plist to store data?

I will be storing a few strings (maybe 10-20). I am not sure if I should use NSUserDefaults to save them, or write them out to a plist. What is considered best practice? NSUserDefaults seems like it is less lines of code, therefore quicker to implement. I’d like to add that these string values will […]

NSOperation on the iPhone

I’ve been looking for some concrete scenarios for when NSOperation on the iPhone is an ideal tool to use in an application. To my understanding, this is a wrapper around writing your own threaded code. I haven’t seen any Apple demo apps using it, and I’m wondering if I’m missing out on a great tool […]

iPhone SDK difference between isKindOfClass and isMemberOfClass

Can any one tell me what the difference is between the isKindOfClass:(Class)aClass and the isMemberOfClass:(Class)aClass functions? I know it is something small like, one is global while the other is an exact class match but I need someone to specify which is which please.

CFNetwork and Bonjour integration for iPhone to Mac integration

I want to use CFNetwork and Bonjour in conjunction to be able to have communications between my iPhone app and a Mac app. The app on the iPhone would have one button. Then on the Mac app, there will be a label. If the button is pushed on the iPhone app, the label changes on […]

iPhone proper usage of Application Delegate

I’m looking to be able to reference certain state/objects through anywhere in my application. For instance, a user logs in to their application, I need to call a web service and retrieve the users information. Then I want to be able to access this information from anywhere in the application with something like the following: […]