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

Failed to build iOS app #12

Closed ImaginationRoom closed 5 years ago

ImaginationRoom commented 5 years ago

We are unable to build the iOS app. It works on Android.

Here is the error.

Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    === BUILD TARGET shared_preferences OF PROJECT Pods WITH CONFIGURATION Debug ===
    /Users/user1/development/flutter/.pub-cache/hosted/pub.dartlang.org/image_downloader-0.11.2/ios/Classes/ImageDownloaderPlugin.m:2:9: fatal error: 'image_downloader/image_downloader-Swift.h' file not found
    #import <image_downloader/image_downloader-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

Could not build the application for the simulator.
Error launching application on iPhone XR.

We tried to build it on both the simulator and real device, getting the same error. This happened last week and we saw this issue, so we didn't bother to raise another issue.

Today we downloaded the latest built from Mar. 11, still having the same issue.

We tried deleting Podfile.lock before building and didn't work.

ko2ic commented 5 years ago

@ImaginationRoom Is Your App's AppDelegate Objective-C?

If so, it is the same problem as https://github.com/ko2ic/image_downloader/issues/9#issuecomment-471608482. Please try it.

ImaginationRoom commented 5 years ago

use_frameworks! fixed the issue. My AppDelegate is swift. use_frameworks! was commented out because firebase library required that. Since many people use firebase library, it would be useful if you mention that use_frameworks! is required for this library in the read me file.

Thank you for your amazing work on the library.

ko2ic commented 5 years ago

@ImaginationRoom Thank you for comment.

I decided to write troubleshooting.

use_frameworks! was commented out because firebase library required that.

I use many firebase libraries but it is also working without commenting out.
Certainly, the old version was so, but not now.

If you have to comment out, most of the library lacks support. For Example, flutter_twitter_login. In this case, it is better to use here because there is PR .