-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
flutter/plugins
#2115Labels
a: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
Description
Define clang modules in camera plugin to:
- Allow it to be imported into Swift apps as libraries without
use_frameworks!. - Allow it to be module imported
@importinto Objective-C apps.
See further details in #41007
Steps to Reproduce
Import into Swift app as a library
flutter create test_create_app- Add camera to the pubspec.
dependencies:
flutter:
sdk: flutter
camera: any
- In generated
ios/Podfileremoveuse_frameworks! flutter build ios- In AppDelegate.swift add
import cameraat the top. - Build.
Compilation error: no such module 'camera'
Module import (@import) into Objective-C app
flutter create -i objc test_create_app- Add camera.
dependencies:
flutter:
sdk: flutter
camera: any
flutter build ios- In AppDelegate.m add
@import camera;at the top. - Build.
Compilation error: no such module 'camera'
Metadata
Metadata
Assignees
Labels
a: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.