Skip to content

Commit

Permalink
Move Xcode, Demo and github files to specific folders
Browse files Browse the repository at this point in the history
Add tumblr test into Demo
  • Loading branch information
phimage committed Oct 18, 2016
1 parent c7d1a3d commit 0296377
Show file tree
Hide file tree
Showing 48 changed files with 231 additions and 63 deletions.
File renamed without changes.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@


### Description:

### OAuth Provider (Twitter, Github, ..):


### OAuth Version:
- [ ] Version 1
- [ ] Version 2

### OS (Please fill the version) :
- [x] iOS :
- [ ] OSX :
- [ ] TVOS :
- [ ] WatchOS :

### Installation method:
- [ ] Carthage
- [ ] CocoaPods
- [ ] Manually

### Library version:
- [ ] head
- [ ] v1.0.0
- [ ] v0.6
- [ ] other: (Please fill in the version you are using.)

### Xcode version:
- [ ] 8.0 (Swift 3.0)
- [ ] 8.0 (Swift 2.3)
- [ ] 7.3.1
- [ ] other: (Please fill in the version you are using.)

- [ ] objective c
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by phimage on 25/07/16.
// Copyright © 2016 Dongri Jin. All rights reserved.
//

#if os(iOS)
import UIKit

class NavigationController: UINavigationController {
Expand Down Expand Up @@ -33,3 +33,4 @@ class NavigationController: UINavigationController {
*/

}
#endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -840,11 +840,11 @@ extension ViewController {
// MARK: Tumblr
func doOAuthTumblr(_ serviceParameters: [String:String]){
let oauthswift = OAuth1Swift(
consumerKey: serviceParameters["consumerKey"]!,
consumerSecret: serviceParameters["consumerSecret"]!,
requestTokenUrl: "http://www.tumblr.com/oauth/request_token",
authorizeUrl: "http://www.tumblr.com/oauth/authorize",
accessTokenUrl: "http://www.tumblr.com/oauth/access_token"
consumerKey: serviceParameters["consumerKey"]!,
consumerSecret: serviceParameters["consumerSecret"]!,
requestTokenUrl: "https://www.tumblr.com/oauth/request_token",
authorizeUrl: "https://www.tumblr.com/oauth/authorize",
accessTokenUrl: "https://www.tumblr.com/oauth/access_token"
)

self.oauthswift = oauthswift
Expand All @@ -853,12 +853,30 @@ extension ViewController {
withCallbackURL: URL(string: "oauth-swift://oauth-callback/tumblr")!,
success: { credential, response, parameters in
self.showTokenAlert(name: serviceParameters["name"], credential: credential)
self.testTumblr(oauthswift, serviceParameters: serviceParameters)
},
failure: { error in
print(error.description)
}
)
}
func testTumblr(_ oauthswift: OAuth1Swift, serviceParameters: [String:String]){
let _ = oauthswift.client.get(
"https://api.tumblr.com/v2/user/info", headers: ["Accept":"application/json"],
success: { data, response in
if let jsonDict = try? JSONSerialization.jsonObject(with:data, options: .allowFragments) , let dico = jsonDict as? [String: Any] {
print(dico)
}
else {
print("no json response")
}
},
failure: { error in
print(error)
}
)
}


// MARK: Slack
func doOAuthSlack(_ serviceParameters: [String:String]){
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions OAuthSwiftOSXDemo/Info.plist → Demo/OSX/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,12 @@
<string>Main</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
</dict>
</plist>
3 changes: 3 additions & 0 deletions OAuthSwiftDemo/Info.plist → Demo/iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>

</dict>
</plist>
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions ISSUE_TEMPLATE.md

This file was deleted.

133 changes: 81 additions & 52 deletions OAuthSwift.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C40890BF1C11B37000E3146A"
BuildableName = "OAuthSwift.framework"
BlueprintName = "OAuthSwiftWatchOS"
ReferencedContainer = "container:OAuthSwift.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C40890BF1C11B37000E3146A"
BuildableName = "OAuthSwift.framework"
BlueprintName = "OAuthSwiftWatchOS"
ReferencedContainer = "container:OAuthSwift.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C40890BF1C11B37000E3146A"
BuildableName = "OAuthSwift.framework"
BlueprintName = "OAuthSwiftWatchOS"
ReferencedContainer = "container:OAuthSwift.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0296377

Please sign in to comment.