Skip to content

[in_app_purchase] Define clang modules plugin for iOS #41648

@jmagman

Description

@jmagman

Define clang modules in in_app_purchase 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 in_app_purchase to the pubspec.
dependencies:
  flutter:
    sdk: flutter
  in_app_purchase: any
  1. In generated ios/Podfile remove use_frameworks!
  2. flutter build ios
  3. In AppDelegate.swift add import in_app_purchase at the top.
  4. Build.

Compilation error: no such module 'in_app_purchase'

Module import (@import) into Objective-C app

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

Compilation error: no such module 'in_app_purchase'

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: existing-appsIntegration with existing apps via the add-to-app flowp: in_app_purchasePlugin for in-app purchasepackageflutter/packages repository. See also p: labels.platform-iosiOS applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions