Can't build a flutter project with PathProvider dependency
This issue should be fixed by https://github.com/flutter/flutter/pull/15437
To apply the fix to an existing project, add these lines to ios/Podfile.
I finally find a workaround.
I went to the GitHub repo, found the PathProviderPlugin.h
file, and put it inside the location:
build/ios/Debug-iphonesimulator/path_provider/path_provider.framework/Headers/
Sounds a little bit dirty, but was the only way to keep coding.
Hope helps someone. And thanks to @GünterZöchbauer to help me find a useful lead.
- Open the project in xcode. i.e On Android Studio, right click -> Flutter -> open in xcode.
- Find the PathProviderPlugin.h file. (Find -> Find in workspace -> 3. PathProviderPlugin.h)
- Click on the result. In case you cannot find the result, right click on the PathProviderPlugin.m file and choose 'Reveal In Project Navigator'
- There you will see PathProviderPlugin.h file.
- On right hand side, target membership, change the settings from project to public.
Do this for any files for which compiler is complaining, till you are able to build your project.