Updated app will remove existent files [duplicate] - ios

This question already has an answer here:
iPhone App Update and Documents Directory
(1 answer)
Closed 9 years ago.
Help please, I'm new to iOS Development. I have an iOS App which downloads some images from a web server. When I try to re-download those files, my code will check if was downloaded already or not..
Now, my question is:
If I downloaded all necessary files to the Documents directory of my app, what's going to happen if I create a new version/update of this App? I mean, if my customers who have already installed v1.0 and downloaded all necessary files and then update the app from appstore, will all downloaded files be erased?
Thanks.

No, your user's data will not be lost when updating the app if it is stored in the Documents directory.
The only time this data will be lost is if the user deletes the application of if the user resets his/her phone.

Related

Retrieving MY iOS app's files from the App Store [duplicate]

This question already has answers here:
How to reverse engineer an Xcode project from an app?
(2 answers)
Closed 3 years ago.
Recently, I accidentally overwrote my iOS app on my Mac. But I uploaded to Apple Connect for testing. Is there a way to retrieve the files of my app from there?
No. What you uploaded to App Store Connect is compiled code. What you are looking for is your source code (text).

Save file in ios that retain even the app is deleted - Swift [duplicate]

This question already has answers here:
Realm Swift: Is it possible to keep database after the apps is uninstalled?
(2 answers)
Closed 5 years ago.
I would like to save a file programmatically and fetch it. Is it possible to create a file and save it locally and retain it even the app is deleted?
No you can't do this, Because all files is depend on app container and when you uninstall app container automatically removed.
But for that you can use iCloud or Dropbox for file storage and after you can retrieve same file,
You can use iCloud to sync user's data (such as a database). So when application is deleted and downloaded again, saved data in iCloud will be sync with app bundle on downloading process.

How to fetch all music apps name contains in device [duplicate]

This question already has answers here:
Finding list of installed apps on iphone
(7 answers)
Closed 6 years ago.
I have to fetch all music apps name contains in device (like google play,gaana,saavan) and has to show all name in my app. I search a lot but not able to find a solution.Please help me if anyone has an idea.
Is there any way to fetch downloaded music files or list from iTunes store?
iOS applications are installed in Sandboxed environment, meaning that they cannot do anything outside their own application. It may work on Jailbroken devices!
More details given in this link,

Lost apple private keys after disk failure [duplicate]

This question already has answers here:
Lost Private Key For iPhone Distribution Certificate. What could be solutions?
(2 answers)
Closed 8 years ago.
I have developed an IOs app on my MacbookPro laptop, which unfortunately had suffered a disk failure last week, with all data on it being lost.
Dumb as I am, I did not backup any of the keys I had on my laptop. My question is, can I still somehow update my existing application (I do still have my source code) in the app store? Or is it the same case with Google's keystore, where if you lose your key you must create a new application?
Thanks
You can update your app easily. Simply follow the same steps you originally followed to create a new app store distribution profile. As long as you do not change the app id of the application, it will be the same app.

Is it possible to retain data of the older version if a new version of app is deployed on device?

I am new to iOS development so my question may be n00bish.I am working on an app for iPad which downloads PDFs and stores on the device(iPad) in the Documents directory so the user can still read them if he isn't connected to WiFi. My question is:if a newer version of the app is available and the user installs it, will it delete all the data(documents,in this case) from the device? If yes,how do I prevent the old data from being deleted? I am using CoreData in this app(if this helps)
When a user installs an updated version of any app, the app's sandbox is kept intact. Only the app and its resource bundle are replaced. So basically, anything you have stored in Documents or Library will be kept intact after the update process. There is no guarantee that files in Library/Caches or tmp will be kept but those should only have transient files anyway.

Resources