Application size doesn't reduce after deleting bundle content - iphone

I have an iphone application with custom bundle in resources with hi-resoultion photos (sized about 150mb). I need to reduce application size, so i do an update and remove this bundle from resources, but when i apply new update on installed application, its size remains the same.
Is it possible to "update" application resouces after update from appstore?

Solved my question.
The problem was that installing application directly from xcode to the phone didn't act the same way like installing a new app version from appstore. The version on the iphone kept old resources in bundle after installing via xcode. But I emulated situatuion like "appstore new version install" using TestFlight. I made 2 different version with diferrent bundles and installed one after another. The size of app changed! The problem was solved.
Maybe it was some bugs - stangely cleaning, removid derived data, didn't help at all.

Related

How do I release updates to adhoc builds?

I want to release an update to my ad hoc build that exists on my various devices?
UPDATE: I don't mind doing it manually for each device my question is, how do I update the app's without deleting them first off the device. i.e. I want to keep the database on the device in tact...itunes doesn't allow this.
I guess you will have to install a new build on every device via iTunes.
Or you can try TestFlight, it's a great tool. And you can just install a new builds from the device itself. And if you include TestFlight SDK you will be able to get all the sessions and all the crashes of that app(with stacktrace).
Update: use TestFlight. You don't have to delete the app in order to install a newer one. I use Core Data and NSUserDefaults and after installing a newer build nothing is being lost. So I guess it's something you are looking for.
I f you use OTA to distribute your ipas than I think, you can just update those file on your server and if the bundleid and product name haven’t changed, and the bundle version and the CFBundleVersion short numbers are higher than the ones that are deployed, its should update the deployed apps. (I am not 100% sure about it though)...

iPhone app Update Vs new version

Let's say I have an existing IOS app live on Appstore which is version 1.0
Now I make some changes to the app and want to submit back.
Are there 2 separate ways to submit ?
Like can I still keep the version as 1.0 and just submit the app OR
I need to create a new version 1.1 and then submit it ?
What are the differences in the process?
Also from the customer end, how does this work for new/existing users ?
I have just discovered something about version upgrades and the App Store. Just now, I'm suffering issues and users crashes because of a behavior of iOS system that I can't figure before. And, very important, iTunes, AppStore and iOS have modified some upgrading and installing rules in last versions. Now, it works this way:
- When user install a new version, all the files in the bundle are downloaded and copied in the previous existing bundle, but OLD FILES OR COMPONENTS ARE NOT DELETED (or not all are deleted). So, the final bundle IS NOT equal to the bundle of a fresh installation of the new version.
- For example, if a xib/nib file is localized to different languages for the new version, the updated bundle will include both versions: the one in the root folder and the other one in each localized folder. The system, obviously, will use the first one and only a fresh installation will show localizations for that file.
One of my apps shows that issue with MainWindow.xib and as there are some modifications in references and classes, the updated apps crash each time you try to run as it is using a obsolet object. I have built a new version changing the name of the xib/nib files that have been localized. As MainWindow is one of them, I have to modify the reference in info.plist of course.
OK, knowing that, you can build a new version with complete different components in the bundle that, if files of previous version does exist, the app then offers the user the option of using them. That is, two versions of the app in a single icon and bundle. Not very difficult to do.
BUT, the very weird thing is that I think that new iOS version and iTunes don't allow downgrades. I have tried to do it but didn't get it done. That is, if you install a version, for example 1.2, it is impossible AFAIK to install latter v1.1 on the device nor in iTunes->"Applications". So, the double version bundle will live until a reinstallation of the app.
You need to create a new version number, which makes sense since this is a new version of your app. This will then appear as an update for your customers. I don't think you can upload a new binary with the same version without removing the old one from the store.
You add a new version in iTunes connect, then update the version number in Xcode to match and create a new archive. It's pretty straightforward.
You must always increase the version number of any update to your app.
Users will see a badge on the App Store icon on the device, and in iTunes on their PC. Going into the updates section, it will list your app along with the list of changes you've provided, and a button to install the update. They can also update all apps at once.
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:#"CFBundleVersion"];
NSLog(#"version is%#",version);
You do not have to open version numbers to submit any longer. Open up Xcode, go to Window - Organizer - Archives and Distribute an app you have created successfully.

Cannot update images in Xcode simulator

I would like to update some images (gif) in my application. After replacing the gif files in the folder, I build the application and run it; the images shown in simulator are not updated. I tried to "Clear all target" and then re-built the application; the new images can be shown in the simulator.
Does it mean the images will be successfully updated in the devices which have installed the older version of the application? Should I modify the code?
You cannot update the images in the older version of your applications. You will have to make a fresh release with the new images inorder for the changes to be reflected in your application.
Once the binary is compiled and distributed any changes to the application can be done by rebuilding and submitting the application. However if you are doing testing only then delete the app and reinstall after a clean build.
Hope this clears things for you.

iPhone Not Deleting the Settings

I have just installed the latest update to the iPhone.
I also have deleted my app from the iPhone and noticed that a previous install of my app has left the Settings bundle on my phone after I dis-installed the app. Now, I have a Settings bundle without the related app.
This should not be possible as the older version sandbox should have been cleaned up or deleted when I dis-installed the previous (older version ) of my app.
What's going on? How did this happen? What programmatically happen that could even allow the Settings bundle to persist?
In order to solve this situation, I did a full restore to the original factory settings and this eliminates the app Settings bundle that had no related app. Restoring your contacts, etc did not cause an issue.
Having said this, it still seems strange that you can un-install an app and have the settings bundle remain. But, it is a good design for their to be different sandboxes for different installs of the same app which keeps everything ring fenced.

Installing application on iphone it override on the last application

When I am installing new application on iphone, this current application get override on the last application,so we can not maintain the previous application.
Please help to solve this installation problem.
If you change the app identifier in info.plist you can have a different version on the phone at the same time...
However, do you really want to do that? Most apps migrate by loading a new version, but then updating the old database or preferences to work with the new version of the application. Just because your application is replaced does not mean the data the user created is replaced.
If you change the Product Name in the build settings, that directly affects the name of the .app bundle. You can have two copies of the same app, as long as theyhave different names - this can be helpful for testing a new version while preserving the old, stable version.
As Kendall says, you probably want to use the same name for newer released versions of the same application.