I got mine working by adding the following lines to the xxx.podspec:
s.preserve_paths = 'xxxxxx.xcframework/**/*'
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework xxxxxx' }
s.vendored_frameworks = 'xxxxxx.xcframework'
Notice the /**/* at the end of s.preserve_paths
Here is the full xxx.podspec file:
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint xxx.podspec` to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'xxx'
s.version = '1.0.0'
s.summary = 'xxx'
s.description = <<-DESC
xxx is a flutter plugin
DESC
s.homepage = 'https://example.com'
s.license = { :file => '../LICENSE', :type => 'BSD' }
s.author = { 'xxx' => 'email@example.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.platform = :ios, '10.0'
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
s.swift_version = '5.0'
s.preserve_paths = 'xxxxxx.xcframework/**/*'
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework xxxxxx' }
s.vendored_frameworks = 'xxxxxx.xcframework'
end
Make sure to copy the xxxxxx.xcframework directory to .../xxx/ios/xxxxxx.xcframework (where your plugin xxx.podspec is located)
Add xxxxxx.xcframework to Pods scheme to be able to import it
The Frameworks directory should be below the Pods scheme when running the flutter command to create a plugin ie.
flutter create --org com.xxx --template=plugin --platforms=android,ios -a java -i swift xxx
Source: Developing packages & plugins
(If not, add it)

- Navigate to
Pods scheme and right-click on Frameworks
- Click
Add Files to "Pods"...

- Navigate to the root of the
ios directory where the xxxxxx.xcframework is located
- Uncheck
Copy items if needed
- Select
Create folder references
- Check
Pods-Runner
- Check your plugin ie.
xxx
- Click
Add
Embed xxxxxx.xcframework into your project
(this should allow you to run/publish to real devices)

- Click on the
Pods scheme
- In
TARGETS select Pods-Runner
- Click on the
General tab
- Ensure the
xxxxx.xcframework is present underneath Frameworks and Libraries (if not, add it by clicking on the +)
- Change
Embed to Embed & Sign

- Click on your plugin ie.
xxx
- Ensure the
xxxxx.xcframework is present underneath Frameworks and Libraries
- Change
Embed to Embed & Sign

- Again, for both targets below
Pods scheme, the next steps should already be fine, but just check it
- Click
Build Phases
- Click
Link Binary With Libraries
- Ensure
xxxxx.xcframework is present, if not add it by clicking the + and that the Status is set to Required
Now you should be able to import the framework and reference it in your code and should also publish perfectly fine.
Hope this helps, and good luck. I hope this doesn't change again soon
fingers crossed