Discussion Forums  >  Uncategorized

Replies: 5    Views: 163

stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
01/26/12 08:38 PM (14 years ago)

Data not downloaded in device, not simulator

I know I probably should be able to figure this out after all this time but I'm getting a data for this screen has not been downloaded message for one of my screens when I run on the iphone, but it all works well on the simulator! How can if find the data for the simulator but not the device. I already redownloaded source code but no help. Thanks
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
01/26/12 10:05 PM (14 years ago)
Is the data supposed to be local, or come from the Internet? If local, have you rebuilt your app for the phone and included the necessary file? If Internet, does your phone have a good connection? Mark
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
01/26/12 10:11 PM (14 years ago)
Mark, The htm file that would not load is local but what I did was clean and then run again and it works. Just what does clean do anyway? Steve
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
01/27/12 12:40 AM (14 years ago)
Hi Steve, I don't understand the Clean process completely, but let me give it a shot. When you compile a program, it takes all the files you have associated with the program, along with libraries and other related files, and links them all together in such a way that the end result is a compiled program. That process uses intermediate files such as precompiled headers for that process. If you add a new file to the project, like an HTML document or something, that file will be added to the Compile Sources folder (no idea where that is!), and Xcode will manage if/when the file needs to be recompiled based on its current time stamp. Doing a Clean on a project will force the recompile of the new file, along with all the others, by deleting all current intermediate files and rebuilding everything. Essentially, as I understand it, it breaks all the links that were defined earlier, and rebuilds them again. It does this on a project-wide basis. A Clean basically, again, as I understand it, starts the compile process from scratch as if it were the first time the project was ever compiled. I read that an alternative is to Touch the new file, which will cause a recompile of that file on the next build. I read that you can right-click on the file in Xcode and select Touch, and it will be taken care of on the next build. That's an explanation as I understand it! I'll try and bring in some experts to verify what I wrote. Thanks! Mark
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/27/12 12:48 AM (14 years ago)
GoNorthWest is practicing for his Cupertino future. VERY WELL SAID. Additionally, I think it also deletes any previous files in the /build directory. Clean has been a common programmer task for many years and all sorts of compilers have it built it. For reasons like Mark explained, it's very very important to understand what types of problem lingering files can cause. Lingering as in unused but in the project. Clean does it's best to locate 'links' to these files and remove them if they are unneeded and add them if they are needed. Most IDE's (Xode, Eclipse, VisualStudio, and dozens of others) used by developers that are programming in a language that requires compiling (compared to a non-compiled language like .PHP, commonly called a scripting language for exactly this reason, they are not compiled) do all sorts of magical things when the Clean button is used. In the olden days it was much easier to understand (Clean deleted stuff) but today's tools are far more graphical and don't make alot of things easy to understand. The golden rule: Clean often, Clean before build, Clean before distribute.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
01/27/12 12:51 AM (14 years ago)
Great explanation, David...thanks! I was a bit surprised by the lack of a clear explanation anywhere on the net, but I'm glad to have a bit more of a handle on it now!
 

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.