Skip to content

Build attempts to use ARC, which fails #1218

@brianquinlan

Description

@brianquinlan

When building package:objective_c as a dependency of a Flutter plugin, I get:

ARC Restrictions (Xcode): ARC forbids explicit message send of 'dealloc'
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:21:9


Semantic Issue (Xcode): 'release' is unavailable: not available in automatic reference counting mode
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:41:11


ARC Restrictions (Xcode): ARC forbids explicit message send of 'release'
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:41:11


ARC Restrictions (Xcode): ARC forbids explicit message send of 'dealloc'
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:42:9


ARC Casting Rules (Xcode): Implicit conversion of C pointer type 'void *' to Objective-C pointer type 'id' requires a bridged cast
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:56:12


Semantic Issue (Xcode): 'release' is unavailable: not available in automatic reference counting mode
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:58:5


ARC Restrictions (Xcode): ARC forbids explicit message send of 'release'
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:58:5


Semantic Issue (Xcode): 'release' is unavailable: not available in automatic reference counting mode
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:86:11


ARC Restrictions (Xcode): ARC forbids explicit message send of 'release'
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:86:11


ARC Restrictions (Xcode): ARC forbids explicit message send of 'dealloc'
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:87:9


Could not build the application for the simulator.
Error launching application on iPhone 15 Pro.

Adding

  s.requires_arc = []

to

pkgs/objective_c/ios/objective_c.podspec
pkgs/objective_c/macos/objective_c.podspec

fixes the issue for me.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions