mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #445] Objective C Example #291
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#291
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 @lewis-smith on GitHub (Mar 15, 2018).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/445
Description:
I have a project which is mostly Objective C, but I am trying to do new work in Swift where possible.
I am adding an integration with Fitbit.
I have created a class in Swift to handle all the business logic, but I am looking to deal with the URL handler in
AppDelegatewhich is an Objective C file.I am not able to get the correct syntax for this.
The code (and this template!) implies support for Objective C, but a worked example for this would be hugely appreciated
Tried:
Gets compile error:
OAuth Provider (Twitter, Github, ..):
Fitbit
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
9.0 (Swift 4.0)
9.0 (Swift 3.2)
8.x (Swift 3.x)
8.0 (Swift 2.3)
7.3.1
other: (Please fill in the version you are using.)
objective c
@phimage commented on GitHub (Mar 22, 2018):
maybe try with swift 3.2 because I do not try objc since swift 4
I make some methods prefixed with objc_ to handle some compatibility issue with objective c
in Sources/Objc.swift
I think maybe some annotations must be added, like
@objc, and maybe some methods are missing@lewis-smith commented on GitHub (Mar 26, 2018):
Ok thanks :)
As a work around I added a pass through method to my custom class:
Which I can call from Objective C. If I am not missing something obvious I will leave this in place for now.
@ddaddy commented on GitHub (Nov 3, 2020):
I know this is an old issue, but I am also having this problem.
I am using
1.4.1as suggested by the readme, but it seemsOAuthSwift.handle(url: url)is not exposed toobjc