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

error: 'printing/printing-Swift.h' file not found #41

Closed
calmh opened this issue Feb 26, 2019 · 6 comments
Closed

error: 'printing/printing-Swift.h' file not found #41

calmh opened this issue Feb 26, 2019 · 6 comments

Comments

@calmh
Copy link

calmh commented Feb 26, 2019

I can't seem to get this to build for iOS. With flutter 1.0, having just added printing: ^1.3.3 to the pubspec,

$ flutter build ios
Building ... for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: ...
Running pod install...                                       1.5s
Starting Xcode build...
Xcode build done.                                            8.8s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/jb/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/printing-1.3.3/ios/Classes/PrintingPlugin.m:18:9: fatal
    error: 'printing/printing-Swift.h' file not found
    #import <printing/printing-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

Encountered error while building for device.

I also set SWIFT_VERSION=4.2 in the environment as otherwise pod install could not complete. I don't think the above is related, though.

Any advice?

@DavBfr
Copy link
Owner

DavBfr commented Feb 26, 2019

You have to edit your ios/Podfile and add the line

use_frameworks!

just below target 'Runner' do
That should work.

@calmh
Copy link
Author

calmh commented Feb 26, 2019

Thanks! It compiles. :)

@calmh calmh closed this as completed Feb 26, 2019
@DavBfr
Copy link
Owner

DavBfr commented Feb 26, 2019

I'll add that to the Readme

@rapPayne
Copy link

@DavBfr It doesn't seem to have made it to the README.md. Want me to do a pull request?

@DavBfr
Copy link
Owner

DavBfr commented Apr 27, 2019

@rapPayne, If it is not well explained, you can, yes

@asrinagesh
Copy link

Hi, I seem to be getting this error even after I added the "use_frameworks" line.

I am testing on iOS 13 if that's a known issue.

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

4 participants