0

I have read a lot about defaults and plutil commands but still I could not find the way how to edit those UserDefaults values on the actual iPhone using terminal from the laptop. Mentioned commands allow us to modify defaults on simulator or mac os app. Not on actual iPhone.

I would love to find the way similar to adb shell setprop to set some stored value inside my iOS app without recompilation with terminal. I know how to list our devices with instruments in terminal but is there any way to achieve what I want?

STNC
  • 1

1 Answers1

0

Have you tried running the app from the terminal and setting the destination as your iOS device?

xcodebuild \
-workspace MyApp.xcworkspace \
-scheme MyApp \
-destination "platform=iOS,name=User's iPhone"

After you have the app running there try using those commands you mentioned to overwrite the UserDefaults. There might be some other helpful information on connecting to you iOS device through the terminal here

Zac Clark
  • 125
  • 1
  • 10
  • Hmm.. I am not sure if this will work but I found this solution (https://stackoverflow.com/a/26053673/6061250) for different problem but it will probably solve my problem too :) TLDR: jailbreak and use of SSH to get an access to iOS terminal – STNC Feb 06 '19 at 20:15