Cause
iOS apps must be signed with a team and a provisioning profile that matches the exact bundle identifier. com.example.* identifiers are already claimed, so Xcode cannot create a profile for yours.
Steps
- Open the workspace:
open ios/Runner.xcworkspace.
- Select the Runner project, then the Runner target, then Signing & Capabilities.
- Tick Automatically manage signing and choose your Team (add your Apple ID under Xcode > Settings > Accounts if empty).
- Change Bundle Identifier to something unique, for example
com.yourname.myapp.
- Use the same identifier for the RunnerTests target if present.
- On the iPhone: Settings > Privacy & Security > Developer Mode (iOS 16+), enable it and reboot.
- After first install, trust your developer profile in Settings > General > VPN & Device Management.
- Run
flutter run again.
Free account limits
- Profiles expire after 7 days; reinstall to renew.
- A limited number of app IDs per week, and no push notifications, Sign in with Apple or other paid capabilities.
- For TestFlight or the App Store you need the paid Apple Developer Program.
Release builds
flutter build ipa --release
then upload with Xcode Organizer or the Transporter app. Set the bundle id, version and build number (version: 1.0.0+3 in pubspec.yaml) before archiving.
Pitfalls
- Capabilities (push, associated domains) must be added to the App ID in your developer account, and the profile regenerated.
- Changing bundle id after Firebase setup means regenerating
GoogleService-Info.plist for the new id.