mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #31] Serious compile issues #16
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TarangKhanna on GitHub (Mar 8, 2015).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/31
The error is: unknown>:0: error: could not build Objective-C module 'OAuthSwift'
It works and suddenly it gives this error on build. I have tried this on 3 different laptops and the solution to clean build and delete derived data does not work all the time. Sometimes it shows one error(aforementioned) or it shows 21 errors
We spent over 4 hours with apple engineers on this in a hackathon with no progress.
Thank you for your work!
@danshev commented on GitHub (Mar 15, 2015):
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
OAuth1andOAuth2due to the use ofas!. 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:
@Chrisell commented on GitHub (Mar 22, 2015):
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?
@ramki1979 commented on GitHub (Apr 6, 2015):
How to build this with 6.1.1, I am getting the following errors for length & size methods in String+OAuthSwift.swift
Update: Use https://github.com/WazzeZ/OAuthSwift fork for xcode 6.1 and 6.2
@gabriel-jones commented on GitHub (Apr 6, 2015):
SUPPORT FOR BEFORE SWIFT 1.2
There are a few main types of errors. First, the down casting he does looks like this:
as! StringWhich 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? WebViewProtocolHas an error. Easiest way to fix this is to go to
OAuthWebViewController.swiftand find this piece of code on line 13:protocol WebViewProtocoland change it to:
@objc protocol WebViewProtocolNext error is what ramki1979 said: there are some string errors in some files. One you can fix is this:
if count(queryString.utf16) == 0Just change it to a property, not a function:
if queryString.utf16Count == 0Bascially, if you ever see
count(stringName.utf16)Just change it to
stringName.utf16CountAlso another example under
String+OAuthSwift.swiftyou will find this:func length()->Int{ return count(self) }which should just return:
return self.utf16CountHope I helped you guys. Tell me if I missed anything!
@ejpusa-zz commented on GitHub (Apr 11, 2015):
Ok, almost@ Down to 1 error, tried a number of permutations, still bugs out. Thanks for all your help gabriel-jones.

@ejpusa-zz commented on GitHub (Apr 11, 2015):
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? :-)
@phimage commented on GitHub (Sep 29, 2015):
@TarangKhanna please close this old github issue
(only you or project owner can do it)