iosxcodeflutterbundle-identifier

'This app could not be installed at this time' error Xcode


When I am trying to run my Flutter app, the build is succeeded, but when xcode tries to install this build automatically on the simulator, the following error occurs:

The parent bundle has the same identifier
     (com.abc.def) as sub-bundle at 
    /Users/jan/Library/Developer/CoreSimulator/Devices/DFF35FBB-FE6C-462E-80964BFBFAF57291/data/Library/Caches/com.apple.mobile.installd.staging/temp.zyu9i6/extracted/Runner.app/Frameworks/App.framework

I am already stuck for a couple of days with this error. I don't find an answer for this issue on the word wide web.

I already tried to erase all content and settings of the simulator, but that does not solve the problem. Cleaning the project is also not the solution.

Thanks!


Solution

  • You need to change the CFBundleIdentifier in this file :

    ios/Flutter/AppFrameworkInfo.plist
    

    Add ".app" to the flutter BundleId "XXX" :

    <key>CFBundleIdentifier</key> <string>XXX.app</string>
    

    With "XXX" your own bundle-id.

    The answer is also given in this issue: https://github.com/flutter/flutter/issues/25090#issuecomment-449042782