Skip to content

Removing a plugin may make project unbuildable on iOS  #10089

@goderbauer

Description

@goderbauer

I wanted to convert https://github.com/perlatus/flutter_zoomable_image from a plugin to a regular dart package (since it doesn't use any native code). That was more complicated than I thought. I expected to just do the following:

  1. delete android/ folder
  2. delete ios/ folder
  3. remove plugin section from pubspec.yaml

After performing these steps the example app worked great on Android. However, on iOS, I was presented with build errors:

    PhaseScriptExecution [CP]\ Check\ Pods\ Manifest.lock /Users/goderbauer/Library/Developer/Xcode/DerivedData/Runner-glyyagulozskefbxpevofwjpxfte/Build/Intermediates/Runner.build/Release-iphoneos/Runner.build/Script-4BFD143A4E00DC7226158EFA.sh
        cd /Users/goderbauer/dev/flutter_zoomable_image/example/ios
        /bin/sh -c /Users/goderbauer/Library/Developer/Xcode/DerivedData/Runner-glyyagulozskefbxpevofwjpxfte/Build/Intermediates/Runner.build/Release-iphoneos/Runner.build/Script-4BFD143A4E00DC7226158EFA.sh
    diff: /../Podfile.lock: No such file or directory
    diff: /Manifest.lock: No such file or directory
    error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
    
Could not build the precompiled application for the device.

From the exception it was unclear how to resolve those. After comparing the ios example app with a freshly created flutter app (flutter create) I figured out I had to do the following:

  1. open up example/ios/Runner.xcworkspace in Xcode
  2. In the Build Phases tab delete all three build pahses that start with [CP]
  3. In the Link Binary With Library section delete Pod_Runner.framework

After that, the example app would also build and run on iOS.

We either need to document this or - if we expect this conversion to happen frequently - make it simpler.

/cc @collinjackson @mit-mit

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: pluginsSupport for writing, building, and running plugin packagesfound in release: 2.2Found to occur in 2.2has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions