dart-lang / native

Dart packages related to FFI and native assets bundling.
BSD 3-Clause "New" or "Revised" License
115 stars 39 forks source link

ffigen 13.0.0 build failed after include the generated .m file. #1360

Closed yanshouwang closed 1 month ago

yanshouwang commented 1 month ago

Here is the error message:

Launching lib/main.dart on Mimir in debug mode...
Warning: Missing build name (CFBundleShortVersionString).
Warning: Missing build number (CFBundleVersion).
Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store.
Automatically signing iOS for device deployment using specified development team in Xcode project: T5YVNX2NAC
Xcode build done.                                            6.1s
Failed to build iOS app
Could not build the precompiled application for the device.
ARC Restrictions (Xcode): ARC forbids explicit message send of 'retain'
/Users/yanshouwang/dev/camerax/camerax_ios/ios/Classes/ffi.g.m:7:16
ffi.g.m:7

Semantic Issue (Xcode): 'retain' is unavailable: not available in automatic reference counting mode
/Users/yanshouwang/dev/camerax/camerax_ios/ios/Classes/ffi.g.m:7:16
ffi.g.m:7

Semantic Issue (Xcode): 'release' is unavailable: not available in automatic reference counting mode
/Users/yanshouwang/dev/camerax/camerax_ios/ios/Classes/ffi.g.m:9:9
ffi.g.m:9

ARC Restrictions (Xcode): ARC forbids explicit message send of 'release'
/Users/yanshouwang/dev/camerax/camerax_ios/ios/Classes/ffi.g.m:9:9
ffi.g.m:9
yanshouwang commented 1 month ago

Do I need to disable the ARC for this .m file as the stackOverflow said?

liamappelbe commented 1 month ago

Yep. We have to do something similar in package:objective_c. We put s.requires_arc = [] in the podspec file.

yanshouwang commented 1 month ago

Solved.