How to add Google Drive API in Swift iOS Application?

℡╲_俬逩灬. 提交于 2019-12-10 22:11:36

问题


I have an application written in Swift which already uses the SwiftyDropbox API. I installed SwiftyDropbox with cocoapods and the use_frameworks! keyword. And now, when I add this pod 'Google-API-Client' to my Podfile, I get a Duplicate definition error in my Google Drive API when I tried to build my project.

So, I've decided to follow the Google Drive guide : https://developers.google.com/drive/ios/quickstart?ver=swift

But it seems this guide is deprecated, because there is no file named GTL.xcodeproj or GTMSessionFetcher.xcodeproj in the files we download by following this tutorial. And all the steps they describes seems to be inconsistent.

So I don't know what can I do to work with SwiftyDropbox and Google Drive API in my iOS project.


回答1:


Just looked into the repo, it had an update last Jan 13 that may have affected the naming of the xcodeproject.

Currently, the Step 3.b project will then be

  • google-api-objectivec-client/Source/GTLCore.xcodeproj
  • gtm-session-fetcher/Source/GTMSessionFetcherCore.xcodeproj

Hopefully this is a bit of help with importing the project.



来源:https://stackoverflow.com/questions/34995694/how-to-add-google-drive-api-in-swift-ios-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!