Error running app with gRPC pod install on actual iOS device -
i trying integrate grpc ios app
i using current branch of grpc objective c.
i have integrated .podspec file , can build , run ios app in simulator mode, when try build , run app on actual iphone 6s following error
dyld: library not loaded: .framework/grpc referenced from: /var/containers/bundle/application/05197094-48b9-4fa9-9d4d-68ed83817c0f/myapp.app/myapp reason: image not found (lldb)
when remove pod app builds , runs on iphone, grpc, have tried adding grpc.framework embedded framework, nothing.
any ideas?
here .podspec
pod::spec.new |s| s.name = 'testgrpc' s.version = '0.0.1' s.license = 'apache 2.0' s.authors = { 'epic.' => 'myemail@gmail.com'} s.homepage = 'http://www.test.com/' s.source = { :git => 'https://github.com/grpc/grpc.git' } s.summary = 'grpc api' s.ios.deployment_target = '7.1' s.osx.deployment_target = '10.9' # base directory .proto files are. src = '.' # we'll use protoc grpc plugin. s.dependency '!protocompiler-grpcplugin', '~> 1.0' # pods directory corresponding app's podfile, relative location of podspec. pods_root = '../pods' # path cocoapods downloads protoc , grpc plugin. protoc_dir = "#{pods_root}/!protocompiler" protoc = "#{protoc_dir}/protoc" plugin = "#{pods_root}/!protocompiler-grpcplugin/grpc_objective_c_plugin" # directory want generated files placed. example. dir = "#{pods_root}/#{s.name}" # run protoc objective-c , grpc plugins generate protocol messages , grpc clients. # can run command manually if later change protos , need regenerate. # alternatively, can advance version of podspec , run `pod update`. 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}/*.proto cmd # --objc_out plugin generates pair of .pbobjc.h/.pbobjc.m files each .proto file. s.subspec 'messages' |ms| ms.source_files = "#{dir}/*.pbobjc.{h,m}" ms.header_mappings_dir = dir ms.requires_arc = false # generated files depend on protobuf runtime. ms.dependency 'protobuf' end # --objcgrpc_out plugin generates pair of .pbrpc.h/.pbrpc.m files each .proto file # service defined. s.subspec 'services' |ss| ss.source_files = "#{dir}/*.pbrpc.{h,m}" ss.header_mappings_dir = dir ss.requires_arc = true # generated files depend on grpc runtime, , on files generated `--objc_out`. ss.dependency 'grpc-protorpc' ss.dependency "#{s.name}/messages" end s.pod_target_xcconfig = { # needed pods depend on protobuf: 'gcc_preprocessor_definitions' => '$(inherited) gpb_use_protobuf_framework_imports=1', # needed pods depend on grpc-rxlibrary: 'clang_allow_non_modular_includes_in_framework_modules' => 'yes', } end
Comments
Post a Comment