Skip to content

Commit

Permalink
Pure Swift Version (#33)
Browse files Browse the repository at this point in the history
* Initial commit

* Swift 4 basic skeleton

* Full swift impl (crashes on tests)

* Fully working pure Swift version

* Remove Quick and Nimble

* objc-compat

* Fixed a test failure for path encoding

* Add an example

* Simplify the example project a bit

* Fixed issue where oauth parameters were generated once for signing and once for the headers, which could lead to nonce and timestamp mismatch. Hidden by unit tests using static values.

* Swift 4.2 and iOS >12 support

* Unlock Swift 4.2 and 5 in Podspec

* Fix warnings on deprecated string metho in iOS 9.3+

* Update travis

Prune after rebase

Fixing up travis more

Change example back to iOS 10.3

Trying ios 9.3 again... travis

Travis.

* Fix indentation

* License 2 legacy source files seperately

* Rename LICENSE

* Add test harnesses for tvos, macos, watchos

* Remove Carthage

* Clean up pod lib lint

* Fix travis

* Switched secrets tuple for struct

* Copyright notices

* Fixed scheme naming conflict between test app and cocoapods
  • Loading branch information
adamkaplan committed Mar 14, 2020
1 parent f53fb3a commit 0fdcc85
Show file tree
Hide file tree
Showing 88 changed files with 4,835 additions and 1,191 deletions.
40 changes: 37 additions & 3 deletions .gitignore
@@ -1,3 +1,37 @@
/Cartfile.resolved
/Carthage
xcuserdata
# OS X
.DS_Store

# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
*.xccheckout
profile
*.moved-aside
DerivedData
*.hmap
*.ipa

# Bundler
.bundle

# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Note: if you ignore the Pods directory, make sure to uncomment
# `pod install` in .travis.yml
#
Pods/
12 changes: 7 additions & 5 deletions .travis.yml
@@ -1,6 +1,8 @@
os: osx
osx_image: xcode11.3
#language: swift -- this is an alias to objective-c
language: objective-c
xcode_project: TDOAuth.xcodeproj
xcode_scheme: "TDOAuth-OSX"
xcode_sdk: macosx10.11
osx_image: xcode7.3
install: carthage bootstrap --platform Mac
podfile: Example/Podfile
xcode_workspace: Example/TDOAuth.xcworkspace
xcode_scheme: TDOAuth_iOS
xcode_destination: platform=iOS Simulator,OS=12.0,name=iPhone XS
1 change: 0 additions & 1 deletion Cartfile

This file was deleted.

29 changes: 29 additions & 0 deletions Example/Podfile
@@ -0,0 +1,29 @@
use_frameworks!

target 'TDOAuth_iOS' do
platform :ios, '9.3'

pod 'TDOAuth', :path => '../'

target 'TDOAuth_Tests' do
inherit! :search_paths
end
end

target 'TDOAuth_macOS' do
platform :osx, '10.10'

pod 'TDOAuth', :path => '../'
end

target 'TDOAuth_watchOS' do
platform :watchos, '3.0'

pod 'TDOAuth', :path => '../'
end

target 'TDOAuth_tvOS' do
platform :tvos, '11.0'

pod 'TDOAuth', :path => '../'
end
27 changes: 27 additions & 0 deletions Example/Podfile.lock
@@ -0,0 +1,27 @@
PODS:
- OMGHTTPURLRQ/UserAgent (3.2.4)
- TDOAuth (1.4.0):
- TDOAuth/ObjC (= 1.4.0)
- TDOAuth/ObjC (1.4.0):
- TDOAuth/Swift
- TDOAuth/Swift (1.4.0):
- OMGHTTPURLRQ/UserAgent

DEPENDENCIES:
- TDOAuth (from `../`)

SPEC REPOS:
trunk:
- OMGHTTPURLRQ

EXTERNAL SOURCES:
TDOAuth:
:path: "../"

SPEC CHECKSUMS:
OMGHTTPURLRQ: 9ac96bdf5c90a33f75836630729ea1adc312a9ed
TDOAuth: 0e97e457c75b1da7644f0ee7a45b2d9f0bb8be6c

PODFILE CHECKSUM: 723c3a58be002020721462a9d5959c71505c58b8

COCOAPODS: 1.9.1
21 changes: 21 additions & 0 deletions Example/TDOAuth-macOS/AppDelegate.swift
@@ -0,0 +1,21 @@
// Copyright 2020, Verizon Media.
// Licensed under the terms of the MIT license. See LICENSE file in https://github.com/yahoo/TDOAuth for terms.

import Cocoa

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {



func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert code here to initialize your application
}

func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}


}

@@ -0,0 +1,58 @@
{
"images" : [
{
"idiom" : "mac",
"size" : "16x16",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "16x16",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "32x32",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "32x32",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "128x128",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "128x128",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "256x256",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "256x256",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "512x512",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "512x512",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
6 changes: 6 additions & 0 deletions Example/TDOAuth-macOS/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

0 comments on commit 0fdcc85

Please sign in to comment.