grpc: Swift project Build Error when archiving

my project build is no problem

but when i try to Release app use Xcode archive . i got this error .

2016-07-15 8 25 25
Pod::Spec.new do |s|
  s.name             = "YiJianGRPC"
  s.version          = "0.1.6"
  s.summary          = "socket connection with grpc"
  s.ios.deployment_target = '8.0'

  s.platform     = :ios, '8.0'
  s.requires_arc = true

  s.source_files = 'Pod/Classes/*.{h,m}'
  src = "Pod/Classes/"
  dir = "YiJian"

  s.dependency "!ProtoCompiler-gRPCPlugin", "~> 0.14"


  pods_root = '../Pods'


  protoc_dir = "#{pods_root}/!ProtoCompiler"
  protoc = "#{protoc_dir}/protoc"
  plugin = "#{pods_root}/!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin"



  s.prepare_command = <<-CMD
    mkdir -p #{dir}

    #{protoc} \
       --plugin=protoc-gen-grpc=#{plugin} \
       --objc_out=#{dir} \
       --grpc_out=#{dir} \
       -I #{src} \
       -I #{protoc_dir} \
       #{src}/yijian.proto
  CMD

  s.subspec "Messages" do |ms|
    ms.source_files = "#{dir}/*.pbobjc.{h,m}", "#{dir}/**/*.pbobjc.{h,m}"
    ms.header_mappings_dir = dir
    ms.requires_arc = false
    ms.dependency "Protobuf"
    ms.pod_target_xcconfig = {
     'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1',
   }
  end

  s.subspec "Services" do |ss|
    ss.source_files = "#{dir}/*.pbrpc.{h,m}", "#{dir}/**/*.pbrpc.{h,m}"
    ss.header_mappings_dir = dir
    ss.requires_arc = true
    ss.dependency "gRPC-ProtoRPC"
    ss.dependency "#{s.name}/Messages"
  end


end

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 23 (17 by maintainers)

Most upvoted comments

http://stackoverflow.com/questions/24103169/swift-compiler-error-non-modular-header-inside-framework-module?rq=1 set CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES

this works for me

i was able to successfully create an archive after commenting out "#import “transformations/GRXMappingWriter.h” in gRPC-RxLibrary-umbrella.h

@k7 We probably need some more information on your problem. Could you provide a link to the project with problem or any code available?