ko2ic / image_downloader

Flutter plugin that downloads images and movies on the Internet and saves to Photo Library on iOS or specified directory on Android.
https://pub.dartlang.org/packages/image_downloader#-readme-tab-
MIT License
92 stars 116 forks source link

Problem after install the component #41

Closed evertonfoz closed 5 years ago

evertonfoz commented 5 years ago

Hello how are you? When I install image_downloader 0.18.1, I get several warnings and an error as follows:

Launching lib/main.dart on iPhone Xʀ in debug mode...

Running pod install...

Running Xcode build...

Xcode build done. 145,6s

Failed to build iOS app

Error output from Xcode build:

** BUILD FAILED **

Xcode's output:

warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'BoringSSL-GRPC')

warning: The iOS Simulator deployment target is set to 4.3, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'FMDB')

warning: The iOS Simulator deployment target is set to 4.3, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'nanopb')

warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'GTMSessionFetcher')

warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'gRPC-C++-gRPCCertificates-Cpp')

warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'Protobuf')

warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'gRPC-Core')

warning: The iOS Simulator deployment target is set to 5.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'leveldb-library')

warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'gRPC-C++')

warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'Flutter')

/Users/evertoncoimbradearaujo/desin/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:101:9: warning: 'dispatch_queue_set_specific' is only available on iOS 5.0 or newer [-Wunguarded-availability]

        dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL);

        ^~~~~~~~~~~~~~~~~~~~~~~~~~~

In module 'Foundation' imported from /Users/evertoncoimbradearaujo/desin/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.h:9:

In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:

In module 'Dispatch' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/usr/include/dispatch/queue.h:1352:1: note: 'dispatch_queue_set_specific' has been marked as being introduced in iOS 5.0 here, but the deployment target is iOS 4.3.0

dispatch_queue_set_specific(dispatch_queue_t queue, const void *key,

^

/Users/evertoncoimbradearaujo/desin/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:101:9: note: enclose 'dispatch_queue_set_specific' in an @available check to silence this warning

        dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL);

        ^~~~~~~~~~~~~~~~~~~~~~~~~~~

/Users/evertoncoimbradearaujo/desin/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:184:54: warning: 'dispatch_get_specific' is only available on iOS 5.0 or newer [-Wunguarded-availability]

    FMDatabaseQueue *currentSyncQueue = (__bridge id)dispatch_get_specific(kDispatchQueueSpecificKey);

                                                     ^~~~~~~~~~~~~~~~~~~~~

In module 'Foundation' imported from /Users/evertoncoimbradearaujo/desin/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.h:9:

In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:

In module 'Dispatch' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/usr/include/dispatch/queue.h:1408:1: note: 'dispatch_get_specific' has been marked as being introduced in iOS 5.0 here, but the deployment target is iOS 4.3.0

dispatch_get_specific(const void *key);

^

/Users/evertoncoimbradearaujo/desin/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:184:54: note: enclose 'dispatch_get_specific' in an @available check to silence this warning

    FMDatabaseQueue *currentSyncQueue = (__bridge id)dispatch_get_specific(kDispatchQueueSpecificKey);

                                                     ^~~~~~~~~~~~~~~~~~~~~

2 warnings generated.

/Users/evertoncoimbradearaujo/desin/ios/Pods/FMDB/src/fmdb/FMDatabase.m:1486:15: warning: 'sqlite3_wal_checkpoint_v2' is only available on iOS 5.0 or newer [-Wunguarded-availability]

    int err = sqlite3_wal_checkpoint_v2(_db, dbName, checkpointMode, logFrameCount, checkpointCount);

              ^~~~~~~~~~~~~~~~~~~~~~~~~

In module 'SQLite3' imported from /Users/evertoncoimbradearaujo/desin/ios/Pods/FMDB/src/fmdb/FMDatabase.m:8:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.4.sdk/usr/include/sqlite3.h:8245:16: note: 'sqlite3_wal_checkpoint_v2' has been marked as being introduced in iOS 5.0 here, but the deployment target is iOS 4.3.0

SQLITE_API int sqlite3_wal_checkpoint_v2(

               ^

/Users/evertoncoimbradearaujo/desin/ios/Pods/FMDB/src/fmdb/FMDatabase.m:1486:15: note: enclose 'sqlite3_wal_checkpoint_v2' in an @available check to silence this warning

    int err = sqlite3_wal_checkpoint_v2(_db, dbName, checkpointMode, logFrameCount, checkpointCount);

              ^~~~~~~~~~~~~~~~~~~~~~~~~

1 warning generated.

/Users/evertoncoimbradearaujo/flutter/.pub-cache/hosted/pub.dartlang.org/image_downloader-0.18.1/ios/Classes/ImageDownloaderPlugin.m:4:17: error: definition of 'ImageDownloaderPlugin' must be imported from module 'image_downloader.ImageDownloaderPlugin' before it is required

@implementation ImageDownloaderPlugin

                ^

In module 'image_downloader' imported from /Users/evertoncoimbradearaujo/flutter/.pub-cache/hosted/pub.dartlang.org/image_downloader-0.18.1/ios/Classes/ImageDownloaderPlugin.m:2:

/Users/evertoncoimbradearaujo/desin/build/ios/Debug-iphonesimulator/image_downloader/image_downloader.framework/Headers/ImageDownloaderPlugin.h:3:12: note: previous definition is here

@interface ImageDownloaderPlugin : NSObject<FlutterPlugin>

           ^

1 error generated.

Runner-cdvhsshslrzaizeuefipigqspnal

note: Using new build systemnote: Planning buildnote: Constructing build description

Could not build the application for the simulator.

Error launching application on iPhone Xʀ.

Can you help me please?

Thanks

ko2ic commented 5 years ago

@evertonfoz Supports iOS8 and above. The same applies to other Plugins.

ghost commented 5 years ago

can you help me on how to fix to avoid the mistake i went through?

Look this errors at the end

/Users/evertoncoimbradearaujo/flutter/.pub-cache/hosted/pub.dartlang.org/image_downloader-0.18.1/ios/Classes/ImageDownloaderPlugin.m:4:17: error: definition of 'ImageDownloaderPlugin' must be imported from module 'image_downloader.ImageDownloaderPlugin' before it is required

@implementation ImageDownloaderPlugin

            ^

In module 'image_downloader' imported from /Users/evertoncoimbradearaujo/flutter/.pub-cache/hosted/pub.dartlang.org/image_downloader-0.18.1/ios/Classes/ImageDownloaderPlugin.m:2:

/Users/evertoncoimbradearaujo/desin/build/ios/Debug-iphonesimulator/image_downloader/image_downloader.framework/Headers/ImageDownloaderPlugin.h:3:12: note: previous definition is here

@interface ImageDownloaderPlugin : NSObject

evertonfoz commented 5 years ago

I created a flutter project from scratch, inserted image_downloader: ^ 0.18.1 in pubspec.yaml, I got the get packages and when executing the following error is displayed

Launching lib / main.dart on iPhone Xʀ in debug mode ... Running pod install ... Running Xcode build ... Xcode build done. 19.6s Failed to build iOS app Error output from Xcode build: ↳      BUILD FAILED

Xcode's output: ↳     warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'Flutter')     1 error generated.     note: Using new build systemnote: Planning buildnote: Constructing build description

Without its component, build occurs without warnings and errors.

Please, can you help me?

evertonfoz commented 5 years ago

The problem was solved adding use_frameworks! in podfile...thanks

ko2ic commented 5 years ago

@evertonfoz Was use_frameworks! supposed to be described by default, but wasn't it?

evertonfoz commented 5 years ago

Exactly. When creating a Flutter project this statement was not included. But I believe it's some problem in my environment. I think it would be interesting for you to put in your documentation the need for it.

ko2ic commented 5 years ago

I wrote it on the wiki just in case. https://github.com/ko2ic/image_downloader/wiki#in-case-of-build-failed-with-simulator-deployment-target-is-set-to-70-warning