iphone

Create product keys for iPhone application? [iPhone SDK]

Is it possible to assign different identifiers to copies of an app downloaded from the app store that is hard coded into the application? Or is their anyway of permanently storing an identifier in the application bundle such that when it is copied, the key remains within the bundle? EDIT: Ok, how about iTunes reciepts, can they be used ...

CoreData: "Dangling reference to an invalid object." error.

I'm working on a Cocoa-Touch app, it uses CoreData and has some NSPersistentObject subclasses generated by the XCode model editor. I've noticed that recently, when saving the context I get an error which has as user info the following part: (gdb) po ui { "Dangling reference to an invalid object." = <null>; NSAffectedObjectsErro...

Is Md5 Encryption Symmetric or Asymmetric?

For my iPhone application, Apple wants to know if my password encryption (md5) is greater then 64-bit symmetric or greater then 1024-bit symmetric. I have not been able to find it online, so I am wondering if anyone knows the answer. In addition, is this considered an appropriate encryption technology for passwords, or should I use som...

iPhone ExtAudioFileConvert.cpp: getting rid of mutex and thread handling...

I'm rewriting the ExtAudioFileConvert.cpp sample from Apple to do some extra output file handling... I am not going to be calling it more than once, so I should have no re-entrancy issues. I'm also rewriting it in C. Since I haven't had a lot of experience with mutex locking or thread handling, I was hoping not to copy and paste tho...

Iphone unregistering nsnotifications on application will terminate why?

Hello, I have always wondered why is it necessary to unregister your nsnotifications in the application will terminate method. I know that nothing that I can notice happens if I don't, so what are the implications of not doing so?. Any help will be greatly appreciated. Thank you. -Oscar ...

how do i tell a website that it's a UIwebview so it can use css to redraw view

I have a UIwebview that I want to go to Amazon.com, when I load amazon.com it doesn't have the same format as if I went there from iphone safari. What tell a website like amamzon to redraw for iphone? Here's my Code: - (void)viewDidLoad { NSString *urlAddress = @"http://www.amazon.com/Inventive-Gadgets-Inc-PQFan-Professionally/dp/B000...

Making the first row of UITableView hidden until user scrolls up on iPhone

For the Facebook and a few other iPhone apps, I've seen what looks like a UITableView with the top row out of view while the other rows are rendered. Then when the user scrolls up, the the very first row becomes visible. Typically, the top most row is the "load more ..." item. Is there a trick to having the second row look like the firs...

How to merge conflicts (file project.pbxproj) in Xcode use svn?

There are 2 members in our team. We use Xcode's SCM (use SVN) to manger our source code files. We all add files to our Xcode project. He has commited to svn server. When I update, Xcode find there has conflicts in project.pbxproj file.Then I select quit Xcode and manual merge the conflicts. Then I start to edit my project.pbxproj, merge...

Problem with viewing a text file on UIWebview

I have a problem when loading a text file with unicode content into a UIWebview. How can I set Encoding for the UIWebview using loadRequest like this: [myWebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:tempFilePath]]]; This code seem to work but I can't use it to open MS Office file: [myWebView load...

Cocos2d and chipmunk how to simulate depth?

Hello, I am developing a game that intends to toss an object but instead of having it being tossed horizontally I would like to simulate it being thrown along the imaginary z axis that is simulate depth in my game. Something like the nintendo duck hunt game. Can someone point me in the right direction to implement this?. My first idea w...

What design pattern best represents the "File Owner" object in the iPhone?

I'm new to iPhone development. I'm reading that the "File Owner" in the xib is the responsible for instantiating all objects defined in the nib... some type of factory pattern comes to mind, but maybe I'm not looking at the big picture... So, what would be the closest design pattern (gof) associated with the "File Owner" concept? ...

Adding item to a subview from a external class

I've created a UIView and can add things to it by using [self.topView addSubview:image]; Now I am importing a class to create a calendar which has a heap of buttons. I could put it in the same class and say [self.topView addSubview:button] but if its in another class how do I add it to the subview of the class that owns it? Hope that mak...

Animating removeFromSuperview

I'd like to animate the transition from a subview back to the super view. I display the subview using: [UIView beginAnimations:@"curlup" context:nil]; [UIView setAnimationDelegate:self]; [UIView setAnimationDuration:.5]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; [self.view addSubview:...

Is GDB in Xcode just flakey?

I'm developing an iPhone application using mixed Obj-C and C++. It seems that sometimes the values of various fields are totally bogus as reported by gdb when stepping from an Obj-C file to a C++ file. For instance, in a method: int count = 1; for (int i = 0; i < count; ++i) { int x = 0; // put a breakpoint here to see how many ti...

UIImageView's CALayer's anchorPoint "accessing unknown component of property" error

I'm trying to rotate an image about the bottom right corner. To do this I know I need to set the layer's anchorPoint, but I can't access it. I've included the QuartzCore framework in my project. To simplify the problem as much as possible, I've reduced the method to these three lines, which still throw the error "error: accessing unknown...

Open strings file from recource folder

Hi.. I have a language file downloaded from a web service located in my resources folder of the project. The file name is "no.properties" and I need to load the file into a string to make further use of it.. The content of my file is displayed like this: CMD_EXIT = Avslutt CMD_PAUSE = Pause CMD_SCAN = Skann ect..... Here is my co...

UIActionSheet orientation

Hi guys! Is there any way to set the orientation of the UIActionSheet programatically? My iPhone orientation is Portrait, but the UIActionSheet need to be Landscape. Can this be done? Edit: So my problem is that I don't want to rotate the rootviewcontroller to landscape mode, only the UIActionSheet. So is this possible somehow? ...

Detect GPS Hardware in iphone

hi I want to know how to detect GPS HardWare in present in Iphone or not ...

How do I reliably release memory in iPhone app?

If I have this code NSString *postData = [@"foo=" stringByAppendingString:fooText.text]; ... NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url]; ... [postData release]; //this causes crash [request release]; //this causes crash Now I understand this is the expected behavior according to Apple's doc...

fbconnect logout is not working perfectly

i have integrated Fbconnect in LoginViewController.I want to logout the session from another view controller .. How i can do this ? I tried this .. LoginViewController *obj1 = [[LoginViewController alloc] init]; [obj1._session logout]; [obj1._session.delegates removeObject: self]; It removing the session..But wen i go to Login...