ProFitErol
ProFitErol

Reputation: 11

Flutter printing: ^5.2.1 IOS Issue

I currently experience some difficulty to add printing plugin for my flutter app.

I add this "printing: ^5.2.1" line of code to my pubspec.yaml file and I run the app on simulator with out implementing any other additional code to it. Android works absolutely fine but IOS is giving me this build error:

** BUILD FAILED ** Xcode's output: ↳ /Users/erol/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/printing-5.2.1/ios/Classes/PrintJob.swift:200:96: error: editor placeholder in source file let activityViewController = UIActivityViewController(activityItems: [fileURL, body ?? <#default value#>], applicationActivities: nil) ^ /Users/erol/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/printing-5.2.1/ios/Classes/PrintJob.swift:200:96: error: editor placeholder in source file let activityViewController = UIActivityViewController(activityItems: [fileURL, body ?? <#default value#>], applicationActivities: nil)


Any one out there could give me clue why am I experiencing this Issue and how to solve it?

Upvotes: 0

Views: 274

Answers (1)

Nisanth Reddy
Nisanth Reddy

Reputation: 6405

What is probably happening is that the package has some native dependencies.

On Android, these native dependencies are resolved at runtime.

But on iOS, you would have to also install the pods.

Steps

  1. Open your terminal.
  2. From your project root, cd ios && pod install.

After it is complete, run your app on iOS Simulator again.

Upvotes: 0

Related Questions