views:

17

answers:

0

I am getting a weird behavior on the iPhone device where it reads random strings it seems to have in memory or stored away somewhere and putting them where they don't belong. For example I have a navigation controller in the project and I put this in my code:

self.navigationItem.title = @"Title";

And the title shows up as some other string I allocate somewhere else in the project. Say I have another view controller with a label in it and I put

label.text = @"Some text";

Then that text shows up instead as the title on the navigation controller. This second class is never instantiated by the way so the string is not allocated on runtime, it must be read from somewhere other than memory. And if I comment out the above line, the navigation controller steals its title from somewhere else.

I should probably tell you a little bit about my project setup. I have a framework project which is built following this guide: http://www.drobnik.com/touch/2010/05/making-your-own-iphone-frameworks-in-xcode/ , which is then added as a framework in my other project, which is an iPhone application. The only thing I didn't follow in that guide was how to copy resources so I just dragged in the xib files and images as references in my application project. If I build using simulator on both projects and link that framework in everything works fine but if I build the framework using device it seems to get confused about something.

Does anyone have any idea what causes this behavior or have a link to another static framework tutorial?