This repository was archived by the owner on Dec 15, 2021. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 123
This repository was archived by the owner on Dec 15, 2021. It is now read-only.
'GTLDefines.h' file not found #182
Copy link
Copy link
Closed
Description
Repro steps:
- Start an iOS project with Podfile:
platform :ios, '9.3.1' use_frameworks! pod 'GoogleAPIClient', '~> 1.0.2' pod 'GTMOAuth2', '~> 1.1.0' - Write an API for Google Cloud Endpoints and build it to get a discovery file out.
- Clone this repo and build the ServiceGenerator tool from it, then run that tool on the discovery doc to generate Objective-C sources for the client to your cloud endpoints API.
CURRENT_DIR=`pwd` REPO_DIR="google-api-objectivec-client-temp" # Clone the Google API client library from git. Using --recursive gets the stuff in Deps too. git clone --recursive https://github.com/google/google-api-objectivec-client.git ${REPO_DIR} # Build the ServiceGenerator binary cd ${REPO_DIR}/Source/Tools/ServiceGenerator/ xcodebuild -project ServiceGenerator.xcodeproj -alltargets -configuration Release build # Run the ServiceGenerator on our discovery doc cd ${CURRENT_DIR} ${REPO_DIR}/Source/Tools/ServiceGenerator/build/Release/ServiceGenerator ./foo-v1-rpc.discovery --outputDir ./foo-ios-client # Clean up rm -rf ${REPO_DIR} - Add
GTLFoo.handGTLFoo_Sources.mto your project in XCode, whereFoois the name of your API. - In your bridging header file, import your API header:
#import "GTLFoo.h"
- Build. You'll get build errors (
Foobelow is nowApi):
/Users/Eliot/dev/biketracker/biketracker-ios/BikeTracker/BikeTracker-Bridging-Header.h:20:9: note: in file included from /Users/Eliot/dev/biketracker/biketracker-ios/BikeTracker/BikeTracker-Bridging-Header.h:20: #import "GTLApi.h" ^ /Users/Eliot/dev/biketracker/biketracker-ios/biketracker-ios-client/GTLApi.h:16:9: note: in file included from /Users/Eliot/dev/biketracker/biketracker-ios/biketracker-ios-client/GTLApi.h:16: #import "GTLApiConstants.h" ^ /Users/Eliot/dev/biketracker/biketracker-ios/biketracker-ios-client/GTLApiConstants.h:21:11: error: 'GTLDefines.h' file not found #import "GTLDefines.h" ^ <unknown>:0: error: failed to import bridging header '/Users/Eliot/dev/biketracker/biketracker-ios/BikeTracker/BikeTracker-Bridging-Header.h' GTLDefines.h is in the Pod, at Pods/GoogleAPIClient/Source/GTLDefines.h. Why can't XCode see it?
Build Settings -> Header Search Paths contains "$(inherited)".
Aggouri
Metadata
Metadata
Assignees
Labels
No labels