Skip to content

[camera] Define clang modules plugin for iOS #41439

@jmagman

Description

@jmagman

Define clang modules in camera plugin to:

  1. Allow it to be imported into Swift apps as libraries without use_frameworks!.
  2. Allow it to be module imported @import into Objective-C apps.

See further details in #41007

Steps to Reproduce

Import into Swift app as a library

  1. flutter create test_create_app
  2. Add camera to the pubspec.
dependencies:
  flutter:
    sdk: flutter
  camera: any
  1. In generated ios/Podfile remove use_frameworks!
  2. flutter build ios
  3. In AppDelegate.swift add import camera at the top.
  4. Build.

Compilation error: no such module 'camera'

Module import (@import) into Objective-C app

  1. flutter create -i objc test_create_app
  2. Add camera.
dependencies:
  flutter:
    sdk: flutter
  camera: any
  1. flutter build ios
  2. In AppDelegate.m add @import camera; at the top.
  3. Build.

Compilation error: no such module 'camera'

Metadata

Metadata

Assignees

Labels

a: existing-appsIntegration with existing apps via the add-to-app flowp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions