How can we upload files on application under test on iphone? I’m using selenium ,saucelabs -appium

So far tried pushfile but does not work . Is there any documentation or examples to refer?

If we speak about real devices on sauce labs then it is not possible accordingly to - https://support.saucelabs.com/s/article/Pushing-files-to-Sauce-Mobile-Devices?language=en_US

On the simulator, it should be possible simply via driver.pushFile() but you need to set LocalFileDetector firstly
driver.setFileDetector(new LocalFileDetector());