Skip to content
This repository has been archived by the owner on Jul 21, 2022. It is now read-only.

Xcode build failed #4

Closed
dotneet opened this issue Dec 18, 2018 · 5 comments
Closed

Xcode build failed #4

dotneet opened this issue Dec 18, 2018 · 5 comments

Comments

@dotneet
Copy link

dotneet commented Dec 18, 2018

Thank you for creating very useful plugin.

Android build works without problem.
But I had got the error below in iOS build.
Is there anyone who has any idea to solve this?

Launching lib/main.dart on iPhone XR in debug mode...
Running pod install...
Starting Xcode build...
Xcode build done.                                           13.6s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    === BUILD TARGET url_launcher OF PROJECT Pods WITH CONFIGURATION Debug ===
    /Users/devneko/opt/flutter/.pub-cache/hosted/pub.dartlang.org/app_review-0.0.9/ios/Classes/AppReviewPlugin.m:2:9: fatal error: 'app_review/app_review-Swift.h' file not found
    #import <app_review/app_review-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    /Users/devneko/opt/flutter/.pub-cache/hosted/pub.dartlang.org/esys_flutter_share-0.0.5/ios/Classes/EsysFlutterSharePlugin.m:2:9: fatal error: 'esys_flutter_share/esys_flutter_share-Swift.h' file not found
    #import <esys_flutter_share/esys_flutter_share-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

Could not build the application for the simulator.
Error launching application on iPhone XR.
@meelelijan
Copy link

Hi,

I think this is a similar issue, put the plugin esys_flutter_share: ^0.0.6 on pubspec.yaml, when I run pod install this error pops up.

[!] Unable to determine Swift version for the following pods:
esys_flutter_share does not specify a Swift version and none of the targets (Runner) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.

@xellDart
Copy link

some here

@raulmabe
Copy link

I get this one with v0.0.7:

Launching lib/main.dart on iPhone XS Max in debug mode...
Starting Xcode build...
Xcode build done.                                            1,8s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    === BUILD TARGET url_launcher OF PROJECT Pods WITH CONFIGURATION Debug ===
    /Users/raulmateobeneyto/flutter/.pub-cache/hosted/pub.dartlang.org/esys_flutter_share-0.0.7/ios/Classes/Esys
    FlutterSharePlugin.m:2:9: fatal error: 'esys_flutter_share/esys_flutter_share-Swift.h' file not found
    #import <esys_flutter_share/esys_flutter_share-Swift.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

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

I need to solve this bug, if anyone could help! Much appreciated

@xellDart
Copy link

Hi, I developed custom plugin with some bases, for the moment only can share Images, but works with IOS and Android
https://github.com/xperiafan13-rom/ShareImage-Flutter

Example
Future writeToFile(ByteData data, String path) async {
final Uint8List list = data.buffer.asUint8List();
final file = await new File(path).create();
await file.writeAsBytes(list);
}

share() async {
getImage().then((onValue) async {
ByteData data = onValue.buffer.asByteData();
final tempDir = await getTemporaryDirectory();
String path = '${tempDir.path}/qr.jpg';
writeToFile(data, path).then((value) {
Share.image(
path: 'qr.jpg',//path,
mimeType: ShareType.TYPE_IMAGE,
title: 'IDLegal',
text: 'IDLegal').share();
});

});

}

@d-wolf
Copy link
Contributor

d-wolf commented Jan 25, 2019

I guess it's the same issue as described here. The iOS part of the plugin is developed in swift. So if you create a new flutter project, the iOS part of your flutter app must be in swift aswell. Probably you have chosen the standard objective-c implementation. The plugin is incompatible to an objective-c app.

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

No branches or pull requests

5 participants