Code Monkey home page Code Monkey logo

Comments (7)

danshev avatar danshev commented on May 23, 2024

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.

Chrisell avatar Chrisell commented on May 23, 2024

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.

ramki1979 avatar ramki1979 commented on May 23, 2024

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.

gabriel-jones avatar gabriel-jones commented on May 23, 2024

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.

ejpusa-zz avatar ejpusa-zz commented on May 23, 2024

Ok, almost@ Down to 1 error, tried a number of permutations, still bugs out. Thanks for all your help gabriel-jones.
screen shot 2015-04-11 at 4 07 53 pm

from oauthswift.

ejpusa-zz avatar ejpusa-zz commented on May 23, 2024

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? :-)

screen shot 2015-04-11 at 4 13 59 pm

from oauthswift.

phimage avatar phimage commented on May 23, 2024

@TarangKhanna please close this old github issue
(only you or project owner can do it)

from oauthswift.

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.