After updating my Provision Profile, I start getting Code Sign Error when building it on the device. It drove me crazy. I just have found how to solve it and want to share it with you. So, basically it relates to manually update your Project .xcodeproj bundle.
1. Close all your instances of Xcode.
2. Make sure to back up your .xcodeproj bundle and/or your entire Xcode project, or make sure your Xcode project has a proper version control setup.
3. You should open your .xcodeproj bundle: Open your project folder in Finder, then Control-click on your .xcodeproj file and choose Show Package Contents. You will see there are several files. We are interested in project.pbxproj file.
4. Open project.pbxproj in a text editor.
5. Once you open it with a text editor the lines you are looking for should start with ‘PROVISIONING_PROFILE =’ or ‘PROVISIONING_PROFILE[sdk=iphoneos*] =’. Delete all these lines.
That’s it! I hope this may help someone….