Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file not found #import <video_compress/video_compress-Swift.h> #35

Closed
MrQiu920702 opened this issue Aug 11, 2020 · 12 comments
Closed

file not found #import <video_compress/video_compress-Swift.h> #35

MrQiu920702 opened this issue Aug 11, 2020 · 12 comments

Comments

@MrQiu920702
Copy link

ios
/Users/dongjieqiu/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/video_compress-2.0.0/ios/Classes/VideoCompressPlugin.m:2:9: fatal error: 'video_compress/video_compress-Swift.h' file not found
#import <video_compress/video_compress-Swift.h>

@hatemragab
Copy link

is there any progress ?

@dcr309duan
Copy link

Same problem.

2 similar comments
@liuweichn
Copy link

Same problem.

@IgreatD
Copy link

IgreatD commented Dec 4, 2020

Same problem.

@jonataslaw
Copy link
Owner

You need to have swift on your project.
This project was built with swift and kotlin, you need to support both languages.

solutions:
Method 1: exclude ios folder and run on terminal:

flutter create . (don't forget dot)


Method 2:
add to ios/Podfile
use_frameworks!

example:

use_frameworks! 
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')

and swift version:
config.build_settings['SWIFT_VERSION'] = '5.0'

example:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['SWIFT_VERSION'] = '5.0' # added this
    end
  end
end

As this is not a problem related to the plugin, but rather about using Flutter, I am closing this.

@wutingyu
Copy link

I used method 1(flutter create .) , but it stills not work?

@ArefMozafari
Copy link

I used the both solutions and none of them works.
What should we do?

@NightSkyWatchers
Copy link

I used method 2 , it works

@lavande820
Copy link

I used method 2 , it works

Hello, may I ask how you added "use_frameworks!" to the Podfile file?

@NightSkyWatchers
Copy link

I used method 2 , it works

Hello, may I ask how you added "use_frameworks!" to the Podfile file?

Open the podfile in Android studio and add it as follows
image

@LindaSze
Copy link

I can't add [ use_frameworks!],cause it will make other mistake about libraries.
so, is there any other solution?

@pranavo72bex
Copy link
Contributor

pranavo72bex commented Feb 20, 2024

I can't add [ use_frameworks!],cause it will make other mistake about libraries. so, is there any other solution?

Did you find any way to fix the build issue without using use_frameworks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests