Coder Social home page Coder Social logo

Comments (12)

shankari avatar shankari commented on July 28, 2024

I poked around the code a bit, and it looks like GTMSessionFetcher is already supported for certain modes. Are there instructions on how to do include it and to check whether it is being used?
https://github.com/google/gtm-oauth2/blob/master/Source/GTMOAuth2Authentication.h#L25

#if (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) \
  || (TARGET_OS_IPHONE && defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0)
  #ifndef GTM_USE_SESSION_FETCHER
    #define GTM_USE_SESSION_FETCHER 1
  #endif

  #define GTMOAUTH2AUTHENTICATION_DEPRECATE_OLD_ENUMS 1
#endif

#if GTM_USE_SESSION_FETCHER
  #import "GTMSessionFetcher.h"
#else
  #import "GTMHTTPFetcher.h"
#endif  // GTM_USE_SESSION_FETCHER

from gtm-oauth2.

thomasvl avatar thomasvl commented on July 28, 2024

The defaults there should force anything using a current Xcode and SDKs to use the session fetcher by default. You can manually set GTM_USE_SESSION_FETCHER to 1 in your project to ensure this is true also.

I'm behind on a bunch of wiki updates for the projects, I'll keep trying to get the time to do updates. The short/hand waving version is use the sources from this project and the sources from the SessionFetcher project and if things compile/link you should be good to go. :)

from gtm-oauth2.

shankari avatar shankari commented on July 28, 2024

Hm. I am using cordova, so I am not sure it is using the current SDKs. I'll use the "copy sources" installation method, put in some breakpoints and report back on the results.

from gtm-oauth2.

shankari avatar shankari commented on July 28, 2024

Works like a charm with the current version of cordova (4.0.1).

Note that I included all the GTMOAuth2 code and the GTMSessionFetcher code as source by adding them to my project. I don't really like that option because GTMSessionFetcher has a lot of files - it would be better to add it as a framework or a static library.

But that's a packaging issue in a different library, not a code issue. I am fine with closing this issue, or you can keep it around in order to track the doc issue.

LMK if you want me to close instead.

from gtm-oauth2.

thomasvl avatar thomasvl commented on July 28, 2024

Good to hear, I'll keep this open as a reminder to get back to docs.

from gtm-oauth2.

thomasvl avatar thomasvl commented on July 28, 2024

Docs updated. Also documented the cocoapod which uses the SessionFetcher.

from gtm-oauth2.

mnang avatar mnang commented on July 28, 2024

My projects are using GthhttpFetcher and NSURLConnection class is deprecated. Where can i download the GTMSessionFetcher files?
Please point to me where i can download the files.
One of project is using cocoapod too.

Thanks in advance.

from gtm-oauth2.

thomasvl avatar thomasvl commented on July 28, 2024

https://github.com/google/gtm-session-fetcher is the project site for the GTMSessionFetcher. It has a cocoapod.

Note: Since you posted on the gtm-oauth project; gtm-oauth2 has been deprecated - https://github.com/google/gtm-oauth2#warning-deprecation-notice

from gtm-oauth2.

mnang avatar mnang commented on July 28, 2024

It's a big file, do i need to download the entire file as my App doesn't compatible for tvOS or watchOS, just iOS.
thank you

from gtm-oauth2.

thomasvl avatar thomasvl commented on July 28, 2024

See the docs on the project, you'll likely need a few files (i.e. - the whole dependency) as part of moving. Some may depend on what features you want to make use of.

from gtm-oauth2.

mnang avatar mnang commented on July 28, 2024

Could you please tell me which enum value will be equivalent to kGTMHTTPFetcherErrorAuthenticationChallengeFailed = -2, from the GTMHTTPFetcher file

typedef NS_ENUM(NSInteger, GTMSessionFetcherError) {
GTMSessionFetcherErrorDownloadFailed = -1,
GTMSessionFetcherErrorUploadChunkUnavailable = -2,
GTMSessionFetcherErrorBackgroundExpiration = -3,
GTMSessionFetcherErrorBackgroundFetchFailed = -4,
GTMSessionFetcherErrorInsecureRequest = -5,
GTMSessionFetcherErrorTaskCreationFailed = -6,
};

from gtm-oauth2.

mnang avatar mnang commented on July 28, 2024

Is there any equal enum value for this kGTMHTTPFetcherErrorAuthenticationChallengeFailed = -2, from the GTMHTTPFetcher file in new GTMSessionFetcher file?
Please let me know.

from gtm-oauth2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.