iosswiftflutterxcodecodemagic

GeneratedPluginRegistrant.m module not found - but nothing on the internet helps


I've finally completed my app and I wanted to built it using CodeMagic. I don't want to codesign it since I'm the only iOS user that will use the app, and I will sideload it using AltStore. After lots and lots of struggeling I created my own codemagic.yaml that seem to work.

The problem is GeneratedPluginRegistrant.m and that "module xx not found" thingy. No matter what I do it seems like nothing works. Almost everybody on the internet says "Oh, just clean everything, regenerate pods blabla"...I've tried that ok? But CodeMagic every time I trigger a build creates a new instance with clean folders right? So cleaning won't be necessary (my cache is not configured and I don't see anything on codemagic in cache category).

I've tried everything:

The second most common answer was to open the xcworkspace file instead of xcproject, but I'm building it using xcodebuild -workspace ios/Runner.xcworkspace -scheme Runner -configuration Release -sdk iphoneos -archivePath $HOME/Runner.xcarchive archive | xcpretty or flutter build ios --release --no-tree-shake-icons --no-codesign both with same result. Even tried connecting using VNC and opening xcworkspace and running it directly from Xcode but with the same result.

You can ask me guys anything about the code and things I've done/not have done, I really want to have it functional. Thanks!

My Podfile: https://pastebin.com/ku0zJux8
My codemagic.yaml: https://pastebin.com/QzuN2jLa
Output from CodeMagic and Xcode build: https://pastebin.com/WEigWqhW
Output from build.log (using >> ~/build.log 2>&1): https://pastebin.com/QETetYD6
Output from building using flutter build ios --release --no-codesign --no-tree-shake-icons --verbose on Xcode 15.4 and iOS 17.5: https://gist.github.com/HelloItsMeAdm/a7534f06a8ed988238c99aad51c10856


Solution

  • Well I've been struggling with this for like a week now and I've finally figured it out.

    I was building it using Codemagic so I didn't think about running flutter pub cache repair together with flutter pub run build_runner build --delete-conflicting-outputs after flutter pub get - these were from ChatGPT, didn't find them on any forums. This seemed to fixed my issue.