Now you’re ready to build your application. Make sure your Code Signing Identity is set to the Ad Hoc version of iPhone Distribution by selecting your ad-hoc mobile provision from the Any iPhone OS Device pop-up. Select Build > Clean (Command-Shift-K, this is optional) and then Build > Build and Archive. Your application will build and the Xcode Organizer window will open.
The newly archived application will appear in iPhone Development > Archived Applications in the Organizer. Locate the build (it is listed by application name and by build time and date) and select it. In the bottom pane, select Sharing > Share Application. A “Share Archived Application” pop-down dialog appears.
I previously posted about building ipa files for ad hoc distribution. So now we have two ways.