You are using Entitlement file
The entitlements file defines certain capabilities of your app. Usually, the file is automatically generated by Xcode when you enable a capability for your app. You only need the file if you enable certain capabilities, e.g. Healthkit integration. If you'd like to use these features, you have to add it. Otherwise, Apple will reject your app.
To fix this
- Go to the build settings of your target.
- Make sure that you have "All" selected instead of "Basic"
- Type "entitlements" into the search box
- The result is the build setting where you can specify where your
entitlements file is located
- Remove them
You are using the wrong Provisioning Profile
A provisioning profile is a collection of digital entities that uniquely ties developers and devices to an authorized iPhone Development Team and enables a device to be used for testing. A Development Provisioning Profile must be installed on each device on which you wish to run your application code.
- Go to Build Settings > Code Signing > Provisioning Profile
- Select a development profile under Team
Please ensure that the Team in the project, target and tests are the same.
Bundle Identifier and App ID do not match
- Go to the build settings of your target
- Select Packaging and change your App ID to match the Bundle ID
Clear cache in Xcode
Command-Option-Shift-K to clean out the build folder. Even better, quit Xcode and clean out ~/Library/Developer/Xcode/DerivedData manually.