Old interface displayed after Application update - ios

Sometimes, i have strange behaviour while running new version of my applications (native ios application, developed under XCode 4.3).
It seems like some old interface parts displayed, while running new version of application.
It occurs on IOS simulator and on real device, connected to developer machine.
Deleting Derived data doesnt help. Cleaning sources doesnt help.
Deleting and Reinstalling application helps, but i afraid what some users can see old interface.
How to be totally sure what users will see new interface ?
I took a look on similiar question here and there but didnot found answer - how to be sure what users will see new interface after application update. Reinstaling application is not solution.

I dont think you need to worry about this happening when updating through the App Store, as the actual app update procedure is that the update is installed to a new directory, then user documents are copied over, then the old app is deleted.
Better described here What precisely happens when iOS installs an update to an app?

I know for sure that deleted or renamed resource files (like .xib files or images) remain in the bundle on the device or simulator, even if you clean/rebuild the xcode project.
The only way to make sure those files are gone completely, is to remove the app from the home screen, like you described. So I think the undeleted files could be part of your problem.
Also check if you have changed something about the localized .xib files or .strings files.
I'm pretty sure, that if the problem goes away when you delete the app from the home screen, then no end user will encounter your unwanted interface parts.

Related

How does Xcode know which app to replace when updating

I have been working on an app in Xcode (not submitted to the App Store or anything like that) that has a lot of very important data whose loss is insurmountable. The app has recently started crashing on startup; therefore, I have tried to update the code to Swift2 so that it works.
After having Xcode automatically update this app to the new version of Swift, I have been having a major issue: When I re-download the app using a cable plugged into the iMac and the iDevice, the new version of the app does not replace the old one––it adds another app to the device. Why would this be happening, and, more importantly, is there any way to fix that?
The point of this is to retrieve the data which was saved in UserDefaults to the previous version of the app. Hence, I'll do pretty much anything to get that data back.
It is absolutely imperative that I retrieve the data stored in UserDefaults; the data is not stored anywhere else.
You are correct that the key is the bundle ID. We have a main bundle ID for production and a second target with a different ID for testing. Pretty convenient to have different versions of the app on the same device.
The second thing you can check is that the version number in the new project is greater than the version on the original project.
To see what apps and versions are installed on your phone, go to Devices (Shift-Command-2). Select your phone from the list on the left and the manually installed apps will be listed near the bottom. Sometimes this gets covered by the Console messages so you might need to scroll down.
Here's what the Device Manager looks like--I deleted my console logs...
Here is the Installed Apps view. It is behind the console logs so you need to scroll down in the top area...

Xcode project won't build, has no devices except Mac

I duplicated a project called Spartan App, and made the necessary changes to rename project to Wolverine App. The app is working great on my simulator and device so I pushed it up to Github for another developer to continue work on.
When the other developer opens the workspace, Xcode 6 doesn't seem to recognize it as an app. It still has the "Spartan App" as the target, and the only device shown is Mac. Neither of us know what's going on. Tried clearing and re-initializing the repo but that didn't help.
Check the Devices in your Wolverine App.xcodeproj menu. Check that it's set to iPhone/iPad (whichever you're working on, or both). These files don't really play nice with git, unless you set them up to. See this link to try to make collaboration better for the future https://robots.thoughtbot.com/xcode-and-git-bridging-the-gap

Ad hoc distribution broken in iOS7

I apologize for this not being exactly a programming question
I have a few apps that I'm deploying internally in our org using ad-hoc distribution with Enterprise account. What worked in iOS6 now creates two icons: one a normal app icon and another one is a weird default icon that has the same name as the main app. Clicking on this icon does not do anything. See attached screenshot (it only has the gray icons). I can remove the app through conventional means (long press and then the "X" icon), but I can not remove the gray icons.
Does anybody know what are those, and how do I get rid of them?
I had the same problem. The fastest way to get rid of these ghost or dead icons is to make a backup of your iDevice and then restore it.
I tried every hint i found with google and nothing helped but the restore. So my advice: Don't google anymore, just backup & restore ;-)
yes, we see that too. often but not always. it definitely looks like a bug
as for getting rid: no really good way...
restart the device, rearrange, delete a few times and wait a few days. a combination of that did the trick for a few phones here
no real solution except for apple to fix it :D
I found a reproducible way of causing this problem.
For me, it appears to be linked to the plist used for over the air distribution.
If you generate it through XCode/Archive/Enterprise Distribution, it works normally.
If you subsequently update the ipa, but keep the old plist, you will get this issue if you did one or more of the following:
1) change bundle identifier
2) changed the mobileprovision used to compile
3) changed the app version
Can anyone confirm? Or is this only happening to me?

(Programmatically/Automatically) Removing iOS-Apps

I'm looking for a solution how to remove all installed iOS-Apps from a device. I'm working on a project for iOS-Security. For different analytical stuff on a jail-broken device it's necessary to automatically install a fat bunch of apps, perform all the tests and remove them afterwards to get free space for further applications. The auto installation and test-logic is already done. I only stuck with the apps-removing part.
User installed iOS-Apps are located in /var/mobile/Applications/.
Each application has its own randomly named directory e.g. 7654BE30-F438-42CE-98E0-B95264458C49/.
To proof whether an application is already installed or not my software checks out the com.apple.mobile.installation.plist in /private/var/mobile/Library/Caches/
I've tried to remove the binaries of all applications in /var/mobile/Applications/ and there references in the com.apple.mobile.installation.plist. It seems like the iOS generates a new com.apple.mobile.installation.plist after each installation-process, so it makes no difference whether I remove all the entries out of com.apple.mobile.installation.plist or not. So if I would like to install an application which was already tested someday my software wouln't recognize that it's not installed yet, because it's still listed in com.apple.mobile.installation.plist.
I try to find out where the iOS stores all the information about a user installed application. Would appreciate any help or hint to find out the information. Thanks in advance!
Consider I'm working with an jailbroken iDevice, so everything is possible ;-)
Wipe whole device programmatically
Is there a way to programatically restore my iphone to factory settings?
Uninstall some app programmatically
if you want to uninstall apps, you can use private API "MobileInstallationUninstall". However, it requires entitlement "com.apple.private.mobileinstall.allowedSPI", which you can get, because your device is jailbroken.

When does iPad clear library/caches?

In response to Apple's changes in iOS data storage guidelines I recently reconfigured an iPad app to store its documents (50MB+) in the library/caches folder.
During testing in the iOS simulator I didn't see any problems with this cache when I simulated an update (following Brad Larsson's suggestion). I also tried deleting all of the contents of the library/caches folder to make sure that my app could recover.
However, when I released the app upgrade I found that my users complained of problems that were traced back to the iPad partially deleting this cache. It seemed like sub-folder structure was at least partially left intact, but sub-folder contents were deleted.
I've redesigned the app to deal with this situation during an upgrade, but I'm worried about what will happen when the iPad decides to clear the library/caches.
Does anyone have any experience or insight into the time when the iPad would try and delete items in this cache?
Thanks
There is no 100% clear answer to this question, because Apples iOS Data Storage Guidelines are very vague … They don't explain in which cases iOS 5 will delete data inside the cache dir …
In most cases iOS starts to kill files when it's getting low on disc space, but sometimes my app lost data for no good reason. So I had do implement some kind of recovery modus to redownload/-generate files the app needs.
This article is interesting: http://iphoneincubator.com/blog/data-management/local-file-storage-in-ios-5
The documentation states the following:
On iOS 5.0 and later, the system may delete the Caches directory on
rare occasions when the system is very low on disk space. This will
never occur while an app is running. However, you should be aware that
iTunes restore is not necessarily the only condition under which the
Caches directory can be erased.
The part about it never occuring while the app is running is crucial for our app, and is a really good insurance that we won't get unexpected behaviour.

Resources