Changing a currently running apps settings?

Hello,

I’m currently using appium to test an iOS application, The application has a plist file used for settings, which I have been editing in a sort of hacky method.

So normally, the file is located in a directory like the following,
~/Library/Developer/CoreSimulator/Devices/DE7E6086-67A0-4CDB-A8E3-1F82D7623A67/data/Containers/Data/Application/FC1C02D3-C8E3-40FC-84E0-839EC89E2769/Library/Preferences/com.my.app.plist

I am able to get the simulator ID, but how do I get the application ID for the currently running application?

I know not exactly an appium only question, but I’m struggling.