I want to install my Iphone app to different iphones for testing. But every time I have do the provisioning profile thing. How can I use the device UDID in my application wh
Apple does not allow this, app build as Ad-Hoc will only run if and only if there is a UDID in the provisioning profile.
You will need to add the UDID for every iOS device you want to test you app via the provisionings portal.
There a solution to use a single Ad-Hoc profile for most of your apps: use a wildcard bundle ID (*) to make one provisioning profile word with more then one app. But you can't do this for apps that have APNS or iAP.