JackAppDev / flutter_iap

Flutter iap plugin
MIT License
100 stars 15 forks source link

iOS and use_frameworks! in Podfile #25

Open alamboley opened 5 years ago

alamboley commented 5 years ago

Hey @JackAppDev,

I spotted an issue with Firebase Cloud Functions plugin due to the Podfile requirement on this iap plugin: adding use_frameworks!.

Does adding use_frameworks! is a temp fix, or required for the long term?

alamboley commented 5 years ago

If I remove this use_frameworks!:

Starting Xcode build...
Xcode build done.
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    /Users/aymeric/Documents/Workspace/SDKs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_iap-1.2.1/ios/Classes/FlutterIapPlugin.m:4:17: error: definition of 'FlutterIapPlugin' must be imported from module 'flutter_iap.FlutterIapPlugin' before it is required
    @implementation FlutterIapPlugin
                    ^
    In module 'flutter_iap' imported from /Users/aymeric/Documents/Workspace/SDKs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_iap-1.2.1/ios/Classes/FlutterIapPlugin.m:2:
    /Users/aymeric/Documents/Workspace/Flutter/InstaBoost/insta_boost/build/ios/Debug-iphoneos/flutter_iap/flutter_iap.framework/Headers/FlutterIapPlugin.h:3:12: note: previous definition is here
    @interface FlutterIapPlugin : NSObject<FlutterPlugin>
               ^
    1 error generated.
    /Users/aymeric/Documents/Workspace/SDKs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_iap-1.2.1/ios/Classes/FlutterIapPlugin.m:4:17: error: definition of 'FlutterIapPlugin' must be imported from module 'flutter_iap.FlutterIapPlugin' before it is required
    @implementation FlutterIapPlugin
                    ^
    In module 'flutter_iap' imported from /Users/aymeric/Documents/Workspace/SDKs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_iap-1.2.1/ios/Classes/FlutterIapPlugin.m:2:
    /Users/aymeric/Documents/Workspace/Flutter/InstaBoost/insta_boost/build/ios/Debug-iphoneos/flutter_iap/flutter_iap.framework/Headers/FlutterIapPlugin.h:3:12: note: previous definition is here
    @interface FlutterIapPlugin : NSObject<FlutterPlugin>
               ^
    1 error generated.
Could not build the precompiled application for the device.