giandifra / simple_share

A Flutter plugin for share image, video or file
MIT License
18 stars 15 forks source link

Build failed in iOS #1

Open shariful2011 opened 5 years ago

shariful2011 commented 5 years ago

I am trying to build one iOS app with this plugin but failed with following error message:

Launching lib/main.dart on iPhone XR in debug mode... Xcode build done. 24.5s Failed to build iOS app Error output from Xcode build: ↳ BUILD FAILED Xcode's output: ↳ === BUILD TARGET simple_share OF PROJECT Pods WITH CONFIGURATION Debug === /Users/user/.pub-cache/hosted/pub.dartlang.org/simple_share-0.0.1+2/ios/Classes/SimpleSharePlugin.m:2:9: fatal error: 'simple_share/simple_share-Swift.h' file not found

import <simple_share/simple_share-Swift.h>

^~~~~~~~~~~ 1 error generated. Could not build the application for the simulator. Error launching application on iPhone XR. Exited (sigterm)

giandifra commented 5 years ago

Hi, i update the package, but the error can to be fixed with pod update from terminal on the project ios folder, you can try? thank you

masbenx commented 5 years ago

Hi @giandifra , I already update the package and the pod. but I got an error message

[!] CocoaPods could not find compatible versions for pod "simple_share": In Podfile: simple_share (from.symlinks/plugins/simple_share/ios`)

Specs satisfying the simple_share (from.symlinks/plugins/simple_share/ios) dependency were found, but they required a higher minimum deployment target. `

my pod setting is for platform :ios, '9.0'

giandifra commented 5 years ago

i set minimum deployment target to 10.0 , how you can see here ios-distribution only the 5% of devices have the iOS version less than 11. The iOS 9 together iOS 10 is in this 5% of devices. Anyway I will change the version to 9.0 in next release. Thank you

bigappsmx commented 5 years ago

I run into this same issue. I did the pop update in the ios folder and still have the following error

Are there any other options for building for iOS?


    /Users/exodo/dev/flutter/.pub-cache/hosted/pub.dartlang.org/simple_share-0.0.1+3/ios/Classes/SimpleSharePlugin.m:2:9: fatal error: 'simple_share/simple_share-Swift.h' file not found
    #import <simple_share/simple_share-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
Could not build the application for the simulator.
Error launching application on iPhone 7 Plus.```
bigappsmx commented 5 years ago

I fixed this by replacing my ios folder with the ios folder from the example