Solution : This was solved after the help of many people. I am writing this now so that people with similar problems can benefit from it. So that I can recreate this error, I had to run the mailing build on my device. This was done after a consultation with MrMage, which said that I should change the certificate to the developer, and not to the distribution. This allowed me to repair the error and debug it. The problem was that the compiler ignored all calls to set CGSize values. I was able to prevent this by setting the Optimization Level in the target settings to None instead of Fastest, Smallest.
Hi,
I have a very peculiar in my application. A few days ago, my application was approved in the app store, but to my horror, I soon found that it had a big mistake. I went to my computer, but when it ran the code (both in the simulator and on the device), everything worked fine. I tried everything: recompile and upgrade, clear all goals, reinstall SDK, etc.
Here is a more detailed description of the problem. I have a detail table view in my application that downloads some data from an online source. It displays the boot view at boot time, and then reloads the table view after setting the data source. Table cells contain UITextViews, which resizes to fit the text. When I launch the application on the computer or debug it on the device, the text loads and displays fine, but when I boot from the App Store and launch it, it will only display text for the first time, and then leave it blank to rest. I know that data is being loaded because texviews are resized to fit the text, they just don't display it.
Does anyone know what might cause this error? How can I find out if my assembly assembly contains an error that does not appear in the debug assembly?
Regards, BEN.
PS: I compared the target settings for debugging and distribution assemblies. The only difference that I see is the “Optimization Level” in the “Code Generation” section. I tried changing this to build debugging, but this did not reveal a problem.
EDIT: I solved the problem by doing what Mr. Mage suggested. It turns out that this code is indeed the cause of the error. When working in the debugger, the width and height properties of "s" are constantly zero, and I can’t change this no matter what. I look at why this is happening.
- (void) setText:(NSString *)string { CGSize s = [string sizeWithFont:textView.font constrainedToSize:CGSizeMake(290, FLT_MAX)]; s.height += kStaticSize; //SizeWithFont is very unreliable so have to do some dirty tweaking if (s.height > 100 && s.height <= 250) s.height += 20; else if (s.height > 250 && s.height <= 500) s.height += 40; else if (s.height > 500 && s.height <= 800 ) s.height += 50; else if (s.height > 800 && s.height <= 1200) s.height += 60; else if (s.height > 1200 && s.height <= 1700) s.height += 100; else if (s.height > 1700) s.height += 200; s.width = 290; CGRect r = textView.frame; r.size = s; [textView setFrame:r]; [self.textView setText: string]; [self.textView setNeedsDisplay]; }