Skip to content

Commit ed17284

Browse files
committed
Move Protobuf back to subspec and set requires_arc to false.
Setting requires_arc to false at the top level caused crashes when using the plugin.
1 parent 64893c4 commit ed17284

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ios/flutter_blue.podspec

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ Bluetooth Low Energy plugin for Flutter.
1818
s.dependency 'Flutter'
1919
s.platform = :ios, '8.0'
2020
s.framework = 'CoreBluetooth'
21-
s.dependency 'Protobuf', '~> 3.11.4'
22-
s.requires_arc = false
21+
22+
s.subspec "Protos" do |ss|
23+
ss.source_files = "gen/*.pbobjc.{h,m}", "gen/**/*.pbobjc.{h,m}"
24+
ss.header_mappings_dir = "gen"
25+
ss.requires_arc = false
26+
ss.dependency "Protobuf", '~> 3.11.4'
27+
end
2328

2429
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
2530
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64', 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', }

0 commit comments

Comments
 (0)