Skip to content

KyoheiG3/gRPCExample

Repository files navigation

gRPCExample

This is example to use with gRPC Swift for iOS.

  1. Update submodules
$ git submodule update --init
  1. Build packages
$ cd grpc-swift
$ make

How to build grpc-swift

Requirements

  • Xcode 9.3

Add grpc-swift

$ git submodule add [email protected]:KyoheiG3/grpc-swift.git
$ cd grpc-swift

Make Project

generate-xcodeproj

$ make project

remove ignore

$ vim .gitignore
#/SwiftGRPC.xcodeproj

edit modulemaps

$ vim SwiftGRPC.xcodeproj/GeneratedModuleMap/BoringSSL/module.modulemap
umbrella "../../../../grpc-swift/Sources/BoringSSL/include"

This is not required. However, if you don't change, others may get build error.

SwiftGRPC Build Settings

$ open ./SwiftGRPC.xcodeproj

Change Base SDK

SDKROOT = iphoneos

2017-10-27 10 11 42

Change Supported Platforms

SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"

2017-10-27 10 11 57

Change Deployment Target

IPHONEOS_DEPLOYMENT_TARGET = 9.0

2017-10-27 10 12 37

Remove RootsEncoder, Simple, Echo, protoc-gen-swift and protoc-gen-swiftgrpc from TARGET

before after
2018-04-11 13 24 02 2018-04-11 13 26 28

MyProject Build Settings

Add SwiftGRPC Project

2017-10-27 11 49 33

Embed Frameworks

2018-04-11 13 48 50

Add Header Search Paths

HEADER_SEARCH_PATHS = $(SRCROOT)/grpc-swift/Sources/CgRPC/include

2017-10-27 10 30 37

Disable Bitcode

ENABLE_BITCODE = NO

If you don't change, Cannot export ipa.

2017-10-27 10 27 59

Add Configurations

If your project is added some configurations, SwiftGRPC also should be added same configurations.

MyProject

2017-10-27 10 34 50

SwiftGRPC

2017-10-27 10 34 24

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages