ios 平台运行时可能出现的问题以及解决方案
shichunlei opened this issue · comments
问题1.
Automatically assigning platform ios
with version 8.0
on target CloudLive
because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform
.
####解决方案:
问题2
[!] <PBXResourcesBuildPhase UUID=
xxx>
attempted to initialize an object with an unknown UUID. 0B6359431C33CA0200C80C5D
for attribute: files
. This can be the result of a merge and the unknown UUID is being discarded.
解决方案
问题 3
`
Launching lib/main.dart on iPhone XS Max in debug mode...
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `swift_plugin` from `.symlinks/plugins/swift_plugin/ios`
Resolving dependencies of `Podfile`
Comparing resolved specification to the sandbox manifest
A Flutter
A swift_plugin
Downloading dependencies
-> Installing Flutter (1.0.0)
-> Installing swift_plugin (0.0.1)
- Running pre install hooks
[!] Unable to determine Swift version for the following pods:
- `swift_plugin` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/xcode/target_validator.rb:115:in `verify_swift_pods_swift_version'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/xcode/target_validator.rb:37:in `validate!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:459:in `validate_targets'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:138:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command/install.rb:48:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'
Error output from CocoaPods:
↳
[!] `<PBXGroup UUID=`97C146E51CF9000F007C117D`>` attempted to initialize an object with an unknown UUID. `CF3B75C9A7D2FA2A4C99F110` for attribute: `children`. This can be the result of a merge and the unknown UUID is being discarded.
[!] Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Error launching application on iPhone XS Max.
Exited (sigterm)
`
####解决方案
'image_gallery_saver/image_gallery_saver-Swift.h' file not found
flutter build ios --no-codesign
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building xyz.joewu.btguest for device (ios-release)...
Running pod install... 1.0s
Running Xcode build...
Xcode build done. 1.7s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
shared_preferences-ecdftdlsessmeqbydyobcruftruf
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/image_gallery_saver-1.2.2/ios/Classes/ImageGallerySaverPlugin.m:2:9: fatal error:
'image_gallery_saver/image_gallery_saver-Swift.h' file not found
#import <image_gallery_saver/image_gallery_saver-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/image_gallery_saver-1.2.2/ios/Classes/ImageGallerySaverPlugin.m:2:9: fatal error:
'image_gallery_saver/image_gallery_saver-Swift.h' file not found
#import <image_gallery_saver/image_gallery_saver-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'multi_image_picker/multi_image_picker-Swift.h' file not found
解决同上
#import <multi_image_picker/multi_image_picker-Swift.h>
改为
#import <multi_image_picker-Swift.h>