问题
I do not know how to code in Objective-C and have to get an app working with the G Suite SDK so that I can get information about members of the groups. The problem is that in September Google changed how auth requests work, so this tutorial no longer works. I know I need to switch over to using GTMAppAuth, but it's all Objective-C.
回答1:
I am currently working on YouTube Data API and trying to implement functions in Swift. The following is what I did:
- Install GTMAppAuth using Cocoapods.
- Add bridging header and import necessary headers.
- The above 2 steps didn't result in a successful compilation, since xcode can't find the headers. I manually add header search path in build settings.
After doing these steps, I can access those Objective-C class & methods from Swift classes.
For the "how to use GTMAppAuth" part, I found an example here (though I haven't test it) https://github.com/Alder85/AppAuthSwift
Maybe you can also find some hints here.
(Sorry for that this is just my experience and may not be a complete answer. I am new here in the stackoverflow and have too little reputations to post a comment.)
来源:https://stackoverflow.com/questions/41618131/how-to-use-gtmappauth-in-swift