Ipa requirements to automate the app

I have configured my mac. It has OS X el capita and xcode 7 and configured with appium

Can i automation any app installed in device or installed from app store if have the bundel id.
If No please sugst what else should i need to automate other that the ipa file and bundel id.

And any requirements with respect to ipa file too.