MissingPluginException(No implementation found for method getInstalledMaps on channel map_launcher)
I am getting the error as per title in
- iOS 18.0 (actual device),
- iOS 17.0 (simulator)
Working fine in
- Android simulator (Pixel_8_Pro_API_VanillaIceCream)
Added the following to Info.plist
And this is my source code
It basically failed to read the function .installedMaps
That seems like something that would happen if you installed the plugin into already running app because it has the dart part but not native one. Could you try restarting the app and also try flutter clean to be sure. Let me know if you still have that issue after that
Hey @mattermoran , yup that is what I google-ed and found too. Unfortunately, the issue persists still.
I tried to re-build the app from following methods, none works.
- flutter run --flavor {app-scheme}
- build it directly from Xcode
I even tried to uninstall the app, and reinstall, no joy too :(
Also, tried to run in verbose mode, same output
Could you try to clone the repo and run the included example app to see it works?
@mattermoran yup, I've tested the example app and it is working correctly on my simulator. Hence I wonder which part of my project not installing the package correctly.
It's very strange because there should be nothing special. One thing I'd recommend to try is to create a brand new flutter app and install the plugin same way you done and see if there's any difference
I'll be closing this issue as I don't think it's an issue with this plugin.
I am facing this issue right now, and it's blocking a release.
Many things have happened lately with platform updates mostly from Android side, with the advent of new permissions and foldable devices. I also had to upgrade many other libs and I'm even considering reassembling the entire app on top of a new Flutter (blank) application — which would take the team several days, but it's been weeks of fixing stuff so far already.
Forgive me the rant. Let me know if I can help debugging this, as it may affect applications transitioning between platform versions. I suspect of something at the Gradle layer, but I'm no expert.
I suspect of something at the Gradle layer, but I'm no expert.
I say that because map_launcher works as expected when in debug mode. 3.5.0, just reinstalled and ran fresh tests.
@emyller does it work on a freshly created flutter project? I would be happy to help out but without being able to reproduce I have no way of understanding what's going on.
@mattermoran It took us a few days — as mentioned above — to reassemble the entire app on top of a new flutter create project. The plugin works now.
I don't know what could have changed yet, but it's certainly not our own code. I will soon check out the delta for anything relevant. For now we really need to unblock releasing. Thank you for being around, hopefully I'll be able to provide helpful intel soon.
The issue happens as soon as one enables shrinking when in release mode. This explains why the plugin only works in debug mode.
@mattermoran I believe there must be some rule to add to android/app/proguard-rules.pro, but I lack understanding of how this works. For now I will disable shrinking which I suppose is acceptable by Google for production.
I read and experimented a bit further. In order to fix this issue right now, the developer must add the following to their android/app/proguard-rules.pro (or whatever is specified in proguardFiles) file:
-keep class com.alexmiller.map_launcher.** { *; } # https://pub.dev/packages/map_launcher
Now I am not sure if the library is able to include its own ProGuard-rules file, or if this just has to be added to the documentation. I am sorry I can't find time right now to learn more and send a patch — though I might sometime soon.
Happy New Year!
Thanks for the investigation. It explains why the plugin was being stripped out. I'll check what needs to be added on the plugin side for it to be kept around or update readme.
so I did the research and it doesn't look like a standard to include the rules in the plugin directly. I went through all flutter official plugins as well as plus ones and neither have them. I will close this issue let me know if I should reopen if you think otherwise
Thanks for the update. I think it's worth at least mentioning in the plugin documentation, as figuring this out requires some amount of debugging abilities. I'd love to submit a PR myself though I'm AFK for a while... though I'm happy to keep the issue closed and hope search engines will lead people here.
I'm happy to add it in the docs I'm just trying to figure out if the issue somewhere else? It's strange that it happens only in this plugin I'm sure you have more plugins do all of them include it?
I'm happy to add it in the docs I'm just trying to figure out if the issue somewhere else? It's strange that it happens only in this plugin I'm sure you have more plugins do all of them include it?
Very good point. Yes we had a list of maybe a dozen rules we were able to track but ultimately decided to disable shrinking and accept a bigger app size for the sake of our small team's sanity. The documentation around this is so poor, or maybe we were all just doing something wrong. 🤷
seems like flutter has an open issue about documenting this exact behavior https://github.com/flutter/flutter/issues/136909 I'll subscribe to that issue and once they provide some guidance on best practice for plugin authors I'll make sure to implement.