warning: duplicate definition of category 'Testing Support' on interface GTLRService

45 views
Skip to first unread message

Steve Cronin

unread,
Jun 5, 2020, 9:46:37 PM6/5/20
to Google APIs Client Library for Objective-C
Using CocoaPods - Podfille:

use_frameworks!


target 'BlahBlah' do


  platform :osx, '10.12'


  pod 'GTMAppAuth'


  pod 'GoogleAPIClientForREST/PeopleService'


end


In the appropriate class I have:

#import <GTMAppAuth/GTMAppAuth.h>

#import <GoogleAPIClientForREST/GTLRPeopleService.h>


on the second import line above I get:

Duplicate definition of category 'TestingSupport' on interface 'GTLRService'

1. In module 'GoogleAPIClientForREST' imported from /Users/steve/Documents/Projects/macOS/BlahBlah-Google/BlahBlahGoogleContactService.h:7:


How do I clear up this matter?

thom...@google.com

unread,
Jun 8, 2020, 11:53:38 AM6/8/20
to Google APIs Client Library for Objective-C
Can you make a sample project to show this?  Or tweak one of the examples to get it?  I've tried adding "use_frameworks!" to the CalendarSample, but even with that things still seems to build (assuming I updated this correctly after the fact).

TVL

Steve Cronin

unread,
Jun 8, 2020, 3:39:22 PM6/8/20
to Google APIs Client Library for Objective-C
In building a test project I uncovered an embedded class which had already imported these:

#import <GoogleAPIClientForREST/GTLRPeopleService.h>

#import <GTMAppAuth/GTMAppAuth.h>


Once I cleared that up I then ran into a similar 'duplicate' issue in GTMTVAuthoricationRequest.h
...

#ifndef GTMAPPAUTH_USER_IMPORTS

#import <AppAuth/AppAuth.h>    <<-- warning occurred here!

#else // GTMAPPAUTH_USER_IMPORTS

#import "AppAuth.h"

#endif // GTMAPPAUTH_USER_IMPORTS


I then added preprocessor macro (=1) for 'GTMAPPAUTH_USER_IMPORTS' which then cleared up the Xcode warnings...

So at this point I think I'm good.  Thanks for the slap on the head which led to the solution!


Reply all
Reply to author
Forward
0 new messages