I am encountering this error when I am loading an Ad Hoc build of my Push Notification enabled iPhone app onto my device:
no valid aps-environment entitle
Generate a Provision Profile specific for your App ID (Push Notifications Enabled), do not use the widlcard ones
I kept going through the process over and over again with one mistake... the Provisioning profile i kept on using was DEVELOPMENT this WILL NOT WORK
you NEED to use ADHOC provisioning profile
For IONIC USERS:-
CAUSE:- If you are running your app in iphone using "ionic run ios" then this will also cause the same problem. SOLUTION:- instead you must run your ios app using XCODE to install app into iphone.
SOLVED MY PROBLEM!!!!
In my case, I renamed the App. So the provisioning profile was generated for the old App-ID. All I had to do, was to change the App-ID and add an new provisioning profile with the new App-ID.