The 1st party Flutter plugin package_info uses symlinks to help maintain the identical iOS and macOS implementations of the plugin. This in turn is a technique taken from firebase_core, and was recommended to me here, since it is commonly the case that the iOS and macOS implementations will be identical. The error message I get when attempting to publish (since very recently) is:
$ flutter packages pub publish
....
Do you want to publish just_audio 0.4.1 (y/N)? y
Uploading...
Package archive contains a symlink: `ios/Classes/AudioPlayer.m`.
pub finished with exit code 1
$
The audioplayers package has the same issue, which is blocking me to release a bug fix.
Thanks for the quick report.
I think we're surprised that anyone was using this. I'm not convinced it's a good idea to be using symlinks in pub packages.
But I'm okay walking back this upload check until we've established a clear policy on whether this is good or bad.
I can see how it's nice to be able to have symlinks for plugins with the same code on multiple platforms.
Just to double-check: could you please confirm that in all cases you are adding a symlink pointing inside the archive, and never pointing outside of it?
@isoos That's correct.
I can see how it's nice to be able to have symlinks for plugins with the same code on multiple platforms.
The alternative is added complexity in the Flutter plugin tooling to allow manually specifying shared code locations for certain platform combinations.
This should have been fixed by now. The new pub.dev release allows symlinks as long as they are pointing to a valid file in the archive.
Thank you, @isoos ! I can confirm this now works for my package.