grpc / grpc-ios

gRPC for iOS
Apache License 2.0
39 stars 22 forks source link

[Test] Introduce SPM test sample app #97

Closed dennycd closed 2 years ago

dennycd commented 2 years ago

Manually created XCode sample test app project for swift package manager build test.

Also introduce build_test_spm_samples.sh for command line build test via xcodebuild

Build and Verify

run build test script and verify success

./scripts/build_test_spm_samples.sh
HannahShiSFB commented 2 years ago

May I ask why set GCC_TREAT_WARNINGS_AS_ERRORS = YES in both scripts/build_test_spm_samples.sh and tests/spm/gRPCSample/build.xcconfig?

dennycd commented 2 years ago

May I ask why set GCC_TREAT_WARNINGS_AS_ERRORS = YES in both scripts/build_test_spm_samples.sh and tests/spm/gRPCSample/build.xcconfig?

xcconfig can only be applied to project target (all sample app targets) but not to its dependencies (e.g. gRPC-Cpp). For that we need to pass the preprocessor macro via xcodebuild comamnd line and populate it upstream.