Discussion Forums  >  Xcode, Errors, Installing, Configuring

Replies: 6    Views: 1849

Azz
I hate code!
Profile
Posts: 33
Reg: Jul 01, 2012
Sheffield
4,630
09/12/12 01:44 PM (13 years ago)

Data argument not used by format string

[BT_debugger showIt:self:[NSString stringWithFormat:@"building screen from stale configuration data saved at: @", [self saveAsFileName]]]; I'm getting this warning when downloading my source code and running the app in Xcode in the BT_screen_menuButtons.m file, I've tried a few fixes but nothing seems to be working...
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/12/12 02:15 PM (13 years ago)
I think that's probably OK. I "think" what it means is that it's building the screen using the cached version of the configuration data file. After that, it should prompt for a refresh if reportToURL has been left untouched and the app is online. Is this warning preventing you from doing something, or you're just concerned about it? Mark
 
Azz
I hate code!
Profile
Posts: 33
Reg: Jul 01, 2012
Sheffield
4,630
like
09/12/12 04:46 PM (13 years ago)
No everything works fine and the app runs smoothly when on the simulator I was just concerned because there were a few warnings, looking through some other posts though I have actually corrected the problem, on the line of code where the warning was I entered a '%' before the '@' and everything seems to be okay and no warnings, so all good.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/13/12 09:53 AM (13 years ago)
Yup...this is something that has been showing up on machines running Mountain Lion and the newest version of Xcode. Initially, after some testing, I thought this was an issue related to some new functionality in iOS / Xcode / Mountain Lion. Like deprecated methods and the like. These kinds of things happen every time a new version of iOS is nearing release and we find / fix / update all sorts of stuff each time. BUT, this is NOT the case with what you are seeing. You are seeing ACTUAL SYNTAX ERRORS in some of the method calls to the BT_debugger class. The BT_debugger class is the file that outputs all the friendly and helpful messags to your output console when your app is running. We use it literally hundreds of times in the code to help all of us understand what the software is doing. It appears that the newest version of Xcode is doing BETTER at not only finding small issues like this, but also warning. The issues it's reporting are NOT preventing the app from executing but DO need fixed. I've found most of them but have not begun rolling out fixes yet. I plan to roll out these fixes when iOS 6 is released. These, along with some others we're unaware of yet. These are related to method calls like this: [BT_debugger showIt:self:[NSString stringWithFormat:@"Done loading": %@", @""]]; There is nothing wrong with that statement and it has no syntax errors. Xcode will not report anything like it. However, this is wrong.... [BT_debugger showIt:self:[NSString stringWithFormat:@"Done loading": @", @""]]; and WOULD issue a warning and SHOULD issue a warning. It's not proper code! The missing % (percent sign) in front of the seconds @ character makes it invalid. This is our totally our fault, it's a typo that I must have made a very long time ago. Because the older Xcode didn't warn us, or anyone else, it has gone unnoticed. After digging around for a bunch of hours, I'm estimating that there are about 9 of these occurrences (missing %) in about 7 different files in the project. There could be more, or less. I'll find them all and roll out the fixes when iOS 6 is released. In the meantime, you're welcome to simply add the missing % sign in each method call showing a warning. Or not, the project will compile fine with these warnings. Like I said before...errors and warnings are GOOD because they help developers like us (and you) find simple errors, improve our code, and therefore improve the overall performance of our software. If you spent a day with me in the office, you'de hear: Old code is good code and we are still young" at least a dozen times :-)
 
Azz
I hate code!
Profile
Posts: 33
Reg: Jul 01, 2012
Sheffield
4,630
like
09/13/12 10:03 AM (13 years ago)
Yes there is around 9 warnings when I download the source code and putting the '%' in front of the '@' sign has worked. I'd just like to say a thank you for this site as I've gone from no coding knowledge whatsoever to finalising an app ready to send to Apple in 7 months, great!
 
skywalka
I hate code!
Profile
Posts: 4
Reg: Aug 27, 2012
Sydney
40
like
10/09/12 10:36 PM (13 years ago)
After I add the % the Format String Issue goes away but a Parse Issue - Expected Expression is created for the same line of code.
 
skywalka
I hate code!
Profile
Posts: 4
Reg: Aug 27, 2012
Sydney
40
like
10/14/12 07:53 PM (13 years ago)
This issue is preventing the iphone simulator from running. I'd appreciate any help somebody can give me. Thanks.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.