Comments (7)
I believe related:
When I open the Demo in the newest version of xCode 6.2 (6C131e), I also get a lot of compile errors. Many are in the OAuth1
and OAuth2
due to the use of as!
. When I remove the exclamation, the errors go away, except for a few:
Cannot downcast from 'UIViewController?' to non-@objc protocol type 'WebViewProtocol'
on the line:
if let webView = self.webViewController as WebViewProtocol {
from oauthswift.
Same issues here. Xcode Version 6.2 (6C131e) as well. I'm assuming the master build has been upgraded for Xcode6.3/iOS 8.3, hence the errors?
from oauthswift.
How to build this with 6.1.1, I am getting the following errors for length & size methods in String+OAuthSwift.swift
'String' is not convertible to 'Range<I>'
Update: Use https://github.com/WazzeZ/OAuthSwift fork for xcode 6.1 and 6.2
from oauthswift.
SUPPORT FOR BEFORE SWIFT 1.2
There are a few main types of errors. First, the down casting he does looks like this:
as! String
Which will make an error. What you have to do is write this:
as String!
Next error is what danshev said:
if let webView = self.webViewController as? WebViewProtocol
Has an error. Easiest way to fix this is to go to OAuthWebViewController.swift
and find this piece of code on line 13:
protocol WebViewProtocol
and change it to:
@objc protocol WebViewProtocol
Next error is what ramki1979 said: there are some string errors in some files. One you can fix is this:
if count(queryString.utf16) == 0
Just change it to a property, not a function:
if queryString.utf16Count == 0
Bascially, if you ever see
count(stringName.utf16)
Just change it to
stringName.utf16Count
Also another example under String+OAuthSwift.swift
you will find this:
func length()->Int{ return count(self) }
which should just return:
return self.utf16Count
Hope I helped you guys. Tell me if I missed anything!
from oauthswift.
Ok, almost@ Down to 1 error, tried a number of permutations, still bugs out. Thanks for all your help gabriel-jones.
from oauthswift.
Got it! Thanks. Looks clean. Wow, lots of crazy code, what books do you read? This code seems pretty hardcore, how do you keep up with it? Blogs, sites, coders you follow? :-)
from oauthswift.
@TarangKhanna please close this old github issue
(only you or project owner can do it)
from oauthswift.
Related Issues (20)
- does Slack api return User Token? HOT 1
- Can't allow cookies for url request
- how can I send http request with url scheme? HOT 1
- Small buttons after login on webview OAuth2
- Twitch Dev URL Scheme Issue HOT 2
- OAuthSwiftError -10 after canceling redirection to app HOT 3
- Connot Run on Linux HOT 3
- OAuthSwift authorize : States not equal in response. HOT 1
- Canceling Apple ID isn't handled
- Swift Concurrency HOT 1
- Call to /request_token after canceling a request fails with HTTP 401 because oauth_token is already set.
- Cannot redirect to the app after autosubmit credentials HOT 4
- the closure for the authorize function callback is not being executed at all. HOT 2
- url scheme no works,debug out HOT 2
- Twitter SignIn - SessionStorage Error HOT 3
- A
- visionOS Support HOT 1
- Trying to use different JSON properties in token result HOT 1
- Does not work with Zotero Oauth HOT 3
- It takes a while to show the authorization web page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauthswift.