Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8520835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:38:34+00:00 2026-06-11T06:38:34+00:00

restkit is using in a different way the oauth2 protocol, I need to change

  • 0

restkit is using in a different way the oauth2 protocol, I need to change the code to be able to use it in my way:

From:

// OAuth 2 valid request
if (self.authenticationType == RKRequestAuthenticationTypeOAuth2) {
    NSString *authorizationString = [NSString stringWithFormat:@"OAuth2 %@", self.OAuth2AccessToken];
    [_URLRequest setValue:authorizationString forHTTPHeaderField:@"Authorization"];
}

to:

// OAuth 2 valid request
if (self.authenticationType == RKRequestAuthenticationTypeOAuth2) {
    NSString *authorizationString = [NSString stringWithFormat:@"Bearer %@", self.OAuth2AccessToken];
    [_URLRequest setValue:authorizationString forHTTPHeaderField:@"Authorization"];
}

Use of “Bearer” instead of “Oauth2” ….

I’m using CocoaPods to import restkit in my project.

Can I fork Restkit repository on github and use the fork via CocoaPod instead of the official version?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:38:36+00:00Added an answer on June 11, 2026 at 6:38 am

    You certainly can. Take a look at https://github.com/CocoaPods/CocoaPods/wiki/Dependency-declaration-options

    If RestKit included its .podspec file in the repository then you could just change your Podfile to point to your fork i.e.

    pod 'RestKit', :git => 'https://github.com/you/RestKit.git'
    

    Unfortunately RestKit does not include its .podspec. Instead copy RestKit.podspec from https://github.com/CocoaPods/Specs/blob/master/RestKit/0.10.2/RestKit.podspec and add it to your project. Edit the .podspec to use your fork as its source. You can then specify a local .podspec in your Podfile:

    pod 'RestKit', :podspec => 'local/path/to/RestKit.podspec'
    

    Alternately you might just add this .podspec to your fork and use the former dependency declaration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am using: from restkit import Resource, SimplePool, BasicAuth, request environment: Python 2.7.2+ (default,
I'm using RestKit to load a gzipped JSON with RKRequest: RKRequest* request = [[RKClient
I am trying to use RestKit on my app, and currently using master on
I'm using the RestKit iOS package to allow a user to pull info from
I'm using RestKit to grab objects from my RoR service and using CoreData to
I'm using Restkit to communicate with Drupal CMS. When I'm sending the first request
I'm using restkit trying to serialize an object after I do a PUT request,
I am successfully retrieving JSON data from a web service with GET using Restkit's
I am using RestKit in my Objective-C project and need to specify a timeout
I'm using RestKit to pull data from the Foursquare API into my iphone app,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.