Add test_spec to podspec.
s.test_spec 'Tests' do |test_spec|
test_spec.source_files = 'Tests/**/*'
end
pod lib lint image_picker.podspec --no-clean --verbose
i386 linker errors
Undefined symbols for architecture i386:
"_FlutterMethodNotImplemented", referenced from:
-[FLTImagePickerPlugin handleMethodCall:result:] in ImagePickerPlugin.o
"_OBJC_CLASS_$_FlutterError", referenced from:
objc-class-ref in ImagePickerPlugin.o
"_OBJC_CLASS_$_FlutterMethodChannel", referenced from:
objc-class-ref in ImagePickerPlugin.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
From the validator code it looks like the i386 simulator can be excluded by setting a VALID_ARCHS that includes armv7 and x86_64. See https://github.com/CocoaPods/CocoaPods/issues/8129.
Add s.pod_target_xcconfig = { 'VALID_ARCHS' => 'armv7 arm64 x86_64' } to podspec.
No build warnings or errors.
Now there's a new warning, though no errors and tests pass:
warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'image_picker' from project 'Pods')
warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'image_picker' from project 'Pods')

What's the suggested value of VALID_ARCHS that will prevent the i386 simulator from running but also not cause a build warning?
$ pod --version
1.8.1
https://github.com/flutter/plugins/tree/master/packages/image_picker/ios
This seems to have made the warning go away in the actual Xcode project with any simulator/device selected:
s.pod_target_xcconfig = { 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
But obviously that isn't the key the validator is checking, so in the lint I still get this note because the i386 simulator is still building:
- NOTE | [iOS] xcodebuild: ld: warning: ignoring file /Users/m/Library/Developer/Xcode/DerivedData/App-delzxvvvbagvqiamowplxdvtihdi/Build/Products/Release-iphonesimulator/image_picker/image_picker.framework/image_picker, building for iOS Simulator-i386 but attempting to link with file built for iOS Simulator-x86_64
- NOTE | [iOS] xcodebuild: ld: warning: ignoring file Flutter/Flutter.framework/Flutter, missing required architecture i386 in file Flutter/Flutter.framework/Flutter (3 slices)
This seems to have made the warning go away in the actual Xcode project
Interestingly this was only true for an Objective-C plugin. With a Swift plugin it fails to compile even though both apps have ONLY_ACTIVE_ARCH=NO for Release:
CompileSwift normal i386 (in target 'App' from project 'App')
cd /var/folders/mv/qlhc4vsj6tqct166rw3zwmth00mfq2/T/CocoaPods-Lint-20191001-97932-c24o1c-test_swift_plugin
...
/var/folders/mv/qlhc4vsj6tqct166rw3zwmth00mfq2/T/CocoaPods-Lint-20191001-97932-c24o1c-test_swift_plugin/App/main.swift:1:8: error: could not find module 'test_swift_plugin' for target 'i386-apple-ios-simulator'; found: x86_64-apple-ios-simulator, x86_64
import test_swift_plugin
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Same issue
same issue
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1:
Most helpful comment
same issue