Skip to content

Exclude arm7v from iOS architectures when building add-to-app plugins in host app with CocoaPods #101793

@jmagman

Description

@jmagman

Avoid a linker error when Flutter plugins as CocoaPods are built as arm7v in add-to-app hosts, which will happen when that architecture slice is removed from Flutter.xcframework in #97342.

#97341 handled plugins not building for arm7v in normal Flutter app plugins by setting EXCLUDED_ARCHS in the podhelper:

build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphoneos*]'] = '$(inherited) armv7'

Figure out how to do the same for add-to-app plugins linking against Flutter when they are built into the host app. This is particularly tricky since there's no post_install Flutter script hook in the add-to-app version of this script:

https://github.com/flutter/flutter/blob/fe5daddb14a4c80f25dbcfd7f446f93dec1776c7/packages/flutter_tools/templates/module/ios/library/Flutter.tmpl/podhelper.rb.tmpl

Note the xcframeworks generated from flutter build ios-framework are already correct and those plugins do not build for arm7v--this issue is only tracking Option A

'connectivity.xcframework',
'ios-arm64',

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: existing-appsIntegration with existing apps via the add-to-app flowplatform-iosiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions