Not able to install file on iOS simulator

I am trying to install zipped .app file on simulator.
String iOSPath = System.getProperty("user.dir") + "/app/" + "";

capabilities.setCapability(MobileCapabilityType.APP, iOSPath);

And according to documentation for .app, the .app folder must be the root of the zip file.
However I get the following error:

org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Bad app: /myPathToApp/ App paths need to be absolute or an URL to a compressed app file: App zip unzipped OK, but we could not find ‘.app’ bundle in it. Make sure your archive contains at least one package having ‘.app’ extension

Note: When I manually unzip, I get .app file on mac, which I am able to run. But for bamboo integration I need to read from .zip.

I have:
Appium 1.21.0
Xcode 12.5
iOS 14.5

Try to run unzip -Z1 <path_to_zip> on your archive and make sure a folder whose name ends with .app/ is present in the list

The .app folder is the root which is zipped. Inside that I don’t see another app file. When I put this app folder inside a folder and zip, it will work. But unfortunately I get this file only.

I don’t see any problem. Simply repack it to fix the structure of archived files.
I assume you rely on the default behaviour of macOS’s GUI unarchiver tool, which by default unachives everything to a folder whose name is generated from the archived file name. This is not how unzip works

Thanks for the reply, it works now :partying_face:
I extracted the folder into a new folder with name .