Verwenden Sie eine Gabel Restkit auf Github über CocoaPods?
restkit verwendet das oauth2-Protokoll auf andere Weise. Ich muss den Code ändern, um es auf meine Weise verwenden zu können:
Von:
// OAuth 2 valid request
if (self.authenticationType == RKRequestAuthenticationTypeOAuth2) {
NSString *authorizationString = [NSString stringWithFormat:@"OAuth2 %@", self.OAuth2AccessToken];
[_URLRequest setValue:authorizationString forHTTPHeaderField:@"Authorization"];
}
zu:
// OAuth 2 valid request
if (self.authenticationType == RKRequestAuthenticationTypeOAuth2) {
NSString *authorizationString = [NSString stringWithFormat:@"Bearer %@", self.OAuth2AccessToken];
[_URLRequest setValue:authorizationString forHTTPHeaderField:@"Authorization"];
}
Verwendung von "Bearer" anstelle von "Oauth2" ....
Ich verwende CocoaPods, um ein Restkit in mein Projekt zu importieren.
Kann ich das Restkit-Repository auf Github verteilen und die Gabel über CocoaPod anstelle der offiziellen Version verwenden?