Discussion Forums  >  Uncategorized

Replies: 8    Views: 262

CBungert
Aspiring developer
Profile
Posts: 56
Reg: Jun 17, 2011
Minneapolis
3,310
07/11/11 08:56 AM (14 years ago)

iOS: App Updating and Slimming for Release

I have completed my second app, first was in 1.4, second in 1.5. I am to the point where I want to slim done the .app to the smallest possible size. I removed the quiz data, mp3's and video samples (I didn't use any of it). It may be a problem for another post entirely but I was having issues adding media to my project so I downloaded source + sample media, then changed my file names to match the included media files names and that worked... deleted what I didn't use after. I wanted to know if there is more I safely remove. Also after completing the app, I noticed that it doesn't update until I change something in my app control panel. So if I were to release this now, people could download it (or when apple reviewed it) alot of content would be missing unless I were to click save on a screen in my app control panel, after the .app had been downloaded... How do I fix this?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
07/12/11 06:03 PM (14 years ago)
a) Adding media and files to you project: This should not be tough and I'm surprised to hear you had to re-name things. Did you drag the files you wanted to add to the project into Xcode? Adding them to the directory structure isn't enough, you must add the files in Xcode using 'add files' in one of the folders. b) Removing files: It's tough to know which files you can safely remove. However, if you've removed unused .mp3's and images (BT_Images folder) great. If you remove any plain-text type files you won't notice much difference. The .m and .h class files in the project are so small that they hardly impact the overall size of the project. c) Not sure what you're asking about 'fixing' the content update process. If you add content then 'save' in the control panel the app will prompt to refresh. This means your end users will be asked to refresh. Most developers are creating a version suitable for Apple's approval, getting it approved, then updating content when needed.
 
CBungert
Aspiring developer
Profile
Posts: 56
Reg: Jun 17, 2011
Minneapolis
3,310
like
07/12/11 07:51 PM (14 years ago)
A) yes, I followed that procedure, however icons, background images, and seemingly anything extra I added failed to appear. I would drag and drop files, and use add files to project option as well. Dont know if thats the problem, although if I had already dragged and dropped them into the project it would notify me that the project already contained those files. B) I cut project from 18.1Mb to 9.0Mb successfully, No errors. C) When I initially run my project on my dev iphone or simulator, directly after build. it contains old graphics, its missing icons, and things I have since updated, it does not prompt for update until the app is closed and restarted. This is concerning since I dont know what apple will see when they review the app. Will they get prompted for an update? Will it contain only what the source is set to initially display? After one refresh I consider what I see to be my final product, before the refresh I see my project at roughly 50% complete. Thanks for any help you can provide.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
07/13/11 11:19 PM (14 years ago)
A) Project files. Not sure what could be happening here. Usually it's best to open the output console with the app running on the simulator (or a connected device) to review the comments. The output console will tell you where it's looking for the files (in the Xcode project, in the cache, etc). For files included in the project, the control panel should have a file name and no URL. Again, have a look at the output console with it running as see if you can slueth out where it's not finding the files. B) Great work! C) This too can be clarified by looking at the output console. Where the the app is reading it's configuration file can get confusing, depening on how it's setup. Also, the v.5 documentation has a good explanation of how this update process works. Maybe have a look at that to see if it makes sense. My hunch is that the app is reading a version of your BT_appConfig.txt file from a place you're not changing?
 
CBungert
Aspiring developer
Profile
Posts: 56
Reg: Jun 17, 2011
Minneapolis
3,310
like
07/22/11 03:22 PM (14 years ago)
Alright, the Name of the App is Muddy Waters Menu and Ordering and exactly what I described is happening... When I test it, it is the App that I want it to be... When Apple Approved it, I am almost positive that they got the same effect I described in my first post, only part of the the work I did appears (menus, icons, photos, backgrounds that I altered do not show up, and continue to not show up until I open the control panel and change something, and click save. I open a custom HTML, delete the last character and retype it, press save... then the next time they open the app, it updates to what I want... what I change doesn't matter, as the only thing I have ever changed to force a refresh had nothing to do with the sections/ tabs / menus that I had problems with... Did I miss a force refresh option or something... I only need to make sure that the app is updated when it opens the first time... which for whatever reason, it doesn't seem to be checking...
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
07/23/11 01:59 AM (14 years ago)
I think I understand. The app will not load anything from any URL the first time it launches. It will only load the configuration data from the BT_config.txt file you compile in the app with Xcode. This is because some apps never check after this for a remote data file. If this file contains a data url, it will show the Refresh button so users can refresh the content. This also means that if you created an app, downloaded it and compiled it and sumitted it, then made changes in your control panel, the app will NOT understand these changes until the refresh button is used or until the app checks for updates automatically. This means you'll probably be best recompiling your app with the latest config data you have (get it from the control panel) then re-submitting an update. This will ensure that it launches and loads the way you want wihtout needing to refresh.
 
CBungert
Aspiring developer
Profile
Posts: 56
Reg: Jun 17, 2011
Minneapolis
3,310
like
07/23/11 08:52 AM (14 years ago)
when I installed lion on my one week old macbook pro... it said my HD was messed up, and then apple told me to reinstall snow leopard, and then install lion so long story short... I guess that was dumb, I couldn't think of anything I on my HD I needed. I don't have any of the images I used in the app... Xcode is different... Project compiles no problems, its just that the images are missing, So I guess your update suggestion leads me to another question. Are the images from the original binary replaced by images of the same name? If I were to omit the BT_images folder from an update, would the updated app use the BT_images folder that was originally contained in the app? or would it then be missing the folder entirely? The source code I just downloaded contains everything the way I want it to be (I already knew that though, because once it refreshes, it is all correct) I am not sure how to approach this issue, but my thoughts are either to find a way to force refresh the app or to regrettably redo and retest everything so that I can release an update. For some reason, the logic behind this issue is escaping me, because if the config file is correct (it is right?) since the app is updating correctly from it. Why wouldn't the app update? If the config file compiled in the app is outdated, and the one from the source I downloaded is correct, is there a way to update nothing but that? I don't know what to do...
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
07/23/11 11:53 AM (14 years ago)
I'm also a bit confused after reading your comments. Whatever you compile and subit as an update becomes the new app. When iOS updates apps it removes the old one then installs the new one. This means you can't simply update part of it. If you remove the BT_Images folder then submit an update the images will still be missing. Why not just update the BT_config.txt file in your project and nothing else? Copy the contents of your Config Data (get it from your Core Settings in the control panel) into the existing Xcode project. Compile, submit. This means the copy of the config data in the project will be the same as the config data on the server to tapping refresh would change nothing until you changed something.
 
CBungert
Aspiring developer
Profile
Posts: 56
Reg: Jun 17, 2011
Minneapolis
3,310
like
07/23/11 12:34 PM (14 years ago)
Bam... Havent done the config copy yet, but I am almost certain that is the answer I needed. As I said before, the app was approved by apple, its available now, its just for a friend of mines' restaurant in minneapolis, but I just want to be sure that the app users have a desirable experience. Before I make the fix, you can download it and see what I mean. The button menu structure is different. Also, thanks for the explanation on updating, knowing that its an entirely different binary, not updates to the current one, is a good thing to keep in mind. Im probably only a couple hours of work from having this app complete and near perfect. Thank you very, very much for all your assistance! Edit: the app is called Muddy Waters menu and ordering
 

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.