iphone

When does the DENY delete rule in Core Data actually deny deletion of an object?

An Employee has an inverse relationship to it's Department and vice versa. The Employee entity has an Relationship called department, and it has a DENY delete rule. Employee shall be deleted. Now: Does DENY actually deny deletion of employee, because department is still referencing a Department? Or does it mean that a Department can't be...

Most performant way to check how many objects are referenced by an to-many relationship in Core Data?

Lets say I have an employees relationship in an Company entity, and it's to-many. And they're really many. Apple in 100 years, with 1.258.500.073 employees. Could I simply do something like NSInteger numEmployees = [apple.employees count]; without firing 1.258.500.073 faults? (Well, in 100 years, the iPhone will easily handle so man...

Does the Fetch Request do the recommended batch faulting?

I'm curious. Apple says in the docs: Core Data automatically fires faults when necessary (when a persistent property of a fault is accessed). However, firing faults individually can be inefficient, and there are better strategies for getting data from the persistent store (see “Batch Faulting and Pre-fetching with the ...

Does Core Data take appropriate action automatically when there's a Low Memory Warning?

Does it turn some managed objects into faults when there's a Low Memory Warning? Or must we do that manually by calling the -refreshObjects:mergeChanges: method which puts the affected managed objects on diet quickly? And...would that actually hurt? What if these objects are currently used by an NSFetchedResultsController to show up on a...

Is it true that it's a bad idea to retain any managed object, anywhere?

Because: Core Data owns the life cycle, and it can turn them into a fault at any time today or tomorrow. And probably it won't care much about the retainCount. So I'm curious if retaining managed objects 1) makes any sense 2) or how bad it is, and why it is bad ...

How do I change the default image name for the splash/launch image in an iPhone app

I tried adding a Launch image key to myappname-info.plist with the value Test and a Test.png in the Resources folder but it doesn't seem to work. ...

int vs NSNumber vs NSInteger

I have a line of code that will work differently depending on the datatypes "day" and "1". I believe it is the following although I will check my source code later. day = day + 1; Does this make sense? What would the differences be? ...

iPhone apps for company-internal use - possible?

I hope this is still programming related, as SuperUser doesn't seem the appropriate place. Basically I wonder if it is possible to have Applications that are internal to a company on the iPhone? That is something like a companion Application to an Intranet (when Safari and Mail just don't cut it) which wouldn't make sense on the AppStor...

What exactly is a memory page fault?

From the docs: Note: Core Data avoids the term unfaulting because it is confusing. There's no “unfaulting” a virtual memory page fault. Page faults are triggered, caused, fired, or encountered. Of course, you can release memory back to the kernel in a variety of ways (using the functions vm_deallocate, munmap, or sbrk...

How to properly deal with KVO notifications when an managed object turns into a fault?

From the docs: When Core Data turns an object into a fault, key-value observing (KVO) change notifications (see Key-Value Observing Programming Guide) are sent for the object’s properties. If you are observing properties of an object that is turned into a fault and the fault is subsequently realized, you receive chang...

Any chance to get Core Data using Tokyo Cabinet as the persistent store?

I watched a free high quality video with Aaron Hillegass about Core Data vs Tokyo Cabinet. Besides that this guy is amazingly funny (really, if you want to laugh now, watch it!), he shows off Tokyo Cabinet beeing about 40x faster than Core Data. I wonder if it's worth thinking about how to attach this to Core Data? Does that make any se...

Showing IPhone keyboard in different languages based on user input.

Hi, My question is related to the following question, and can be said almost same. http://stackoverflow.com/questions/330542/setting-the-iphone-keyboard-language But here are my requirement. I am writing dictionary app for IPhone, which support multiple languages. So my requirement is to display the English keyboard when user has sele...

iPhone 3GS Firmware for 3.1.3?

I'm a paid developer and I just realized that I need to downgrade a 3GS from 4.0 WITHOUT using XCode. Where can I get the firmware from? ...

networkActivityIndicatorVisible

Hi, Is this code correct to use with the networkActivityIndicatorVisible? - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; UIApplication* app2 = [UIApplication sharedApplication]; app2.networkActivityIndicatorVisible = YES; [self loadSources]; // Loads data in table view app2.networkActi...

I need objective-C syntax for calculating bmi

Actually I am working on bmi calculator. Where I would like to calculate bmi for height in inches and weight in lbs and also in need of correct formula for height in cm and weight in kgs. I have tried but couldn't calculate actual value coming withing the range as below. It exceeds the range. BMI Categories: * Underweight = <18.5 * N...

Appstore - An application with only Youtube videos will be accepted?

Hi, this is my question... I have a compilation(UITableView) of videos from youtube of a particular genre (funny videos, for example) and I want to know if this app will pass the approval process. These videos are freely accessible by anyone in youtube, but isn't uploaded/recorded by me. This is a concept: http://img263.imageshack.us/...

Problem with writing mobilesubstrate plugins for iOS

I am trying to hooking message sending for iOS 3.2, I implement my own hook on a working ExampleHook program I find on the web. But my hook apparently caused segmentation fault everytime it hooks and I don't know why. I want to hook to [NSURL initWithString:(NSString *)URLString relativeToURL:(NSURL *)baseURL; and here is my related...

Flurry's not collecting any data from my iPhone-app

Hi all, I want to use Flurry to collect some statistics, so I registered and created an app in Flurry. Then, I put the following code in my appDidFinishLaunching: [FlurryAPI startSession:@"code here"]; Afterwards, I installed the app on my iPhone and ran it - but I don't see any data online. Am I missing something? And is data also ...

Changing the UIViewControllers self.navigationController value?

Hello I am building a custom UINavigationController (Not subclassing it, I subclass UIViewController for this), I would like to have the instances of UIViewController that are added to my custom navigationController to get a reference to the custom navigation controller when they access the self.navigationController. I.e You would, fr...

Decimal numbers works in iPhone simulator but NOT on iPhone device

Hi everybody, I noticed a weird behaviour of iPhone OS when using decimal values. The simulator parse them from strings in a correct way but when I test the app on my iPhone it lose the decimal part. In particular, I store values in a dictionary that I retrieve in this way: Code: NSString *thickStr = [dictionary valueForKey:@"thicknes...