KasemJaffer / receive_sharing_intent

A Flutter plugin that enables flutter apps to receive sharing photos, text and url from other apps.
Apache License 2.0
334 stars 395 forks source link

Compilation error for iOS if use_frameworks is disabled in Podfile #195

Open korvan opened 3 years ago

korvan commented 3 years ago

Swift file is included as #import <receive_sharing_intent/receive_sharing_intent-Swift.h> ReceiveSharingIntentPlugin.m

According to apple documentation such include works if we include code from framework. If frameworks are disabled in Podfile by:

use_frameworks!

Swift.h files should be included without package name prefix, or support for both scenarios can be added:

if __has_include(<receive_sharing_intent/receive_sharing_intent-Swift.h>)

import <receive_sharing_intent/receive_sharing_intent-Swift.h>

else

import "receive_sharing_intent-Swift.h"

endif