1

iOS does not allow users to clear the cache of an individual app (like android). This requires manually deleting and reinstalling the app each and every time to completely clear the cache. I would like to programmatically delete and reinstall apps via the command line. I am able to delete. However, I have not found a way to redownload/reinstall apps. Archiving of ios apps is also no longer allowed (e.g. ideviceinstaller -a )

I have already attempted a few third party tools to no avail.

Is there any way to access the iOS app store via direct download link? Any other recommendations for achieving this "clearing of cache" on individual iOS app store apps would be appreciated.

Steve
  • 149
  • 1
  • 11
  • Why do you need to "clear the cache"? What goal are you trying to accomplish? – Rudedog Apr 10 '19 at 23:35
  • There is something that occurs on each individual app i work (several in app and play stores) with that only is restored upon cache clearing on android and deletion/reinstallation on iOS. – Steve Apr 11 '19 at 21:12
  • If there is a bug in your app that can only be corrected by re-installing the app, then you should fix the bug, not paper it over by re-installing. – Rudedog Apr 11 '19 at 21:16
  • These aren't my apps. These are apps built by hundreds if not thousands of other people. Also it's not a bug. It's an app initialization event that only occurs upon first load and/or 24 hours later – Steve Apr 11 '19 at 22:37

1 Answers1

1

Deleting apps can be done via ideviceinstaller. (You probably already know this).

Installing apps from the App Store is more complicated, as there are no clear-cut APIs to do this.

You can use UI Automation for iOS devices to automate this process. You can write scripts (using the Facebook WebDriverAgent or Appium) which automate the process of opening an app store URL in the browser and installing that app via the App Store.

You can do this on real, physical devices without jailbreaking, but you do require a code signing certificate and provisioning profile from Apple for this to work. You can get these by enrolling in the Apple Developer Program.

Frederik Carlier
  • 4,606
  • 1
  • 25
  • 36