Podfile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. source 'https://github.com/CocoaPods/Specs.git'
  2. platform :ios, '9.0'
  3. install! 'cocoapods', :deterministic_uuids => false
  4. # Location of gRPC's repo root relative to this file.
  5. GRPC_LOCAL_SRC = '../../..'
  6. %w(
  7. test
  8. generic
  9. ).each do |target_name|
  10. target target_name do
  11. pod 'gRPC-Core', :path => GRPC_LOCAL_SRC
  12. pod 'gRPC-Core/Tests', :path => GRPC_LOCAL_SRC
  13. pod 'gRPC-C++', :path => GRPC_LOCAL_SRC
  14. pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true
  15. end
  16. end
  17. post_install do |installer|
  18. installer.pods_project.targets.each do |target|
  19. target.build_configurations.each do |config|
  20. config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'YES'
  21. end
  22. # CocoaPods creates duplicated library targets of gRPC-Core when the test targets include
  23. # non-default subspecs of gRPC-Core. All of these library targets start with prefix 'gRPC-Core'
  24. # and require the same error suppresion.
  25. if target.name.start_with?('gRPC-Core')
  26. target.build_configurations.each do |config|
  27. # TODO(zyc): Remove this setting after the issue is resolved
  28. # GPR_UNREACHABLE_CODE causes "Control may reach end of non-void
  29. # function" warning
  30. config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO'
  31. # Abseil isn't free from the following warning
  32. config.build_settings['GCC_WARN_64_TO_32_BIT_CONVERSION'] = 'NO'
  33. config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) COCOAPODS=1 GRPC_CRONET_WITH_PACKET_COALESCING=1'
  34. end
  35. end
  36. end
  37. end