skip to Main Content

TLDR; I created a swift widget, and now I can’t build my flutter app.


I’ve created a small widget, following this tutorial

https://itnext.io/develop-an-ios-14-widget-in-flutter-with-swiftui-e98eaff2c606

Which went fine, I built in Xcode, and voila I had a widget, and my app.
Back to vscode to make changes, and now I can’t build, and get a bundle conflict!

Unable to install /Users/monsters/Projects/flutter_time_to_call/my_app/build/ios/iphonesimulator/Runner.app on 45CE9F59-2AC0-494F-B043-C3F1B4E27EFC. This is
sometimes caused by a malformed plist file:
ProcessException: Process exited abnormally:
An error was encountered processing the command (domain=IXErrorDomain, code=2):
Failed to set plugin placeholders for com.bigmojo.timeToCall
Failed to create promise.
Underlying error (domain=IXErrorDomain, code=8):
        Attempted to set plugin placeholder promise with bundle ID com.example.timeToCall.time-to-call-widget that does not match required prefix of
        com.bigmojo.timeToCall. for parent
        Mismatched bundle IDs.

I’ve manually created profiles etc.. and used them in Xcode that have the ‘correct’ bundle id’s, but something keeps ignoring them, and generating that com.example bundle id…
Not sure where to go from here!

It was pointed out that maybe my info.plist hadn’t been updated, but I checked, and this is the relevant part

<key>CFBundleDisplayName</key>
<string>time_to_call_widget</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>

I changed the display name, which did nothing..

Attempted to set plugin placeholder promise with bundle ID com.example.timeToCall.time-to-call-widget

I’ve searched the entire project for the word example , and found nothing either..

I’ve seen comments about it being the bundleid setting in Xcode, but I’ve done all I can think there…

2

Answers


  1. Chosen as BEST ANSWER

    And the answer is run

    flutter clean
    

    Thanks! Stefano


  2. As per default, the Info.plist file points to the PRODUCT_BUNDLE_IDENTIFIER variable for the CFBundleIdentifier key.

    The PRODUCT_BUNDLE_IDENTIFIER variable is defined in the file:

    project/ios/Runner.xcodeproj/project.pbxproj

    Make sure to edit the file above by setting the PRODUCT_BUNDLE_IDENTIFIER with the value you need. Please note that there should be 3 occurrences, make sure to edit all of them:

    PRODUCT_BUNDLE_IDENTIFIER = com.newpackage.app;

    Update:

    I checked the project/ios/Runner.xcodeproj/project.pbxproj file, and all settings of PRODUCT_BUNDLE_IDENTIFIER ‘seem’ correct

    EG:

    PRODUCT_BUNDLE_IDENTIFIER = com.bigmojo.timeToCall.widget;
    PRODUCT_NAME = "$(TARGET_NAME)";
    PROVISIONING_PROFILE_SPECIFIER = "time to call widget";
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search