Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 45 additions & 12 deletions Demo/MultiAccountOauthDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -245,18 +245,21 @@
TargetAttributes = {
53DB57F51EFDFF3900D71C93 = {
CreatedOnToolsVersion = 8.3.3;
DevelopmentTeam = BW259GUV6N;
DevelopmentTeam = CHZJAHSJ6N;
LastSwiftMigration = 0920;
ProvisioningStyle = Automatic;
};
53DB58091EFDFF3900D71C93 = {
CreatedOnToolsVersion = 8.3.3;
DevelopmentTeam = BW259GUV6N;
LastSwiftMigration = 0920;
ProvisioningStyle = Automatic;
TestTargetID = 53DB57F51EFDFF3900D71C93;
};
53DB58141EFDFF3900D71C93 = {
CreatedOnToolsVersion = 8.3.3;
DevelopmentTeam = BW259GUV6N;
LastSwiftMigration = 0920;
ProvisioningStyle = Automatic;
TestTargetID = 53DB57F51EFDFF3900D71C93;
};
Expand Down Expand Up @@ -316,9 +319,24 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-MultiAccountOauthDemo/Pods-MultiAccountOauthDemo-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
"${BUILT_PRODUCTS_DIR}/AppAuth/AppAuth.framework",
"${BUILT_PRODUCTS_DIR}/GTMAppAuth/GTMAppAuth.framework",
"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
"${BUILT_PRODUCTS_DIR}/MultiAccountOAuth/MultiAccountOAuth.framework",
"${BUILT_PRODUCTS_DIR}/RandomColorSwift/RandomColorSwift.framework",
"${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppAuth.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMAppAuth.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MultiAccountOAuth.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RandomColorSwift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -376,13 +394,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-MultiAccountOauthDemoTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
87F21C5FFA7BE1229F909D7F /* [CP] Copy Pods Resources */ = {
Expand All @@ -406,13 +427,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-MultiAccountOauthDemo-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
ACFD57EF8E46B149DC2E7C94 /* [CP] Check Pods Manifest.lock */ = {
Expand All @@ -421,13 +445,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-MultiAccountOauthDemoUITests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
F6BB87BA4CAEEDA5A06A9369 /* [CP] Copy Pods Resources */ = {
Expand Down Expand Up @@ -609,12 +636,13 @@
baseConfigurationReference = 2678A507D3E4389AE7243C10 /* Pods-MultiAccountOauthDemo.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = BW259GUV6N;
DEVELOPMENT_TEAM = CHZJAHSJ6N;
INFOPLIST_FILE = MultiAccountOauthDemo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.thywis.MultiAccountOauthDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -623,12 +651,13 @@
baseConfigurationReference = 43FF853EC1F50D95AE2C71BC /* Pods-MultiAccountOauthDemo.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = BW259GUV6N;
DEVELOPMENT_TEAM = CHZJAHSJ6N;
INFOPLIST_FILE = MultiAccountOauthDemo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.thywis.MultiAccountOauthDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -643,7 +672,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.thywis.MultiAccountOauthDemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MultiAccountOauthDemo.app/MultiAccountOauthDemo";
};
name = Debug;
Expand All @@ -659,7 +689,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.thywis.MultiAccountOauthDemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MultiAccountOauthDemo.app/MultiAccountOauthDemo";
};
name = Release;
Expand All @@ -674,7 +705,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.thywis.MultiAccountOauthDemoUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
TEST_TARGET_NAME = MultiAccountOauthDemo;
};
name = Debug;
Expand All @@ -689,7 +721,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.thywis.MultiAccountOauthDemoUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
TEST_TARGET_NAME = MultiAccountOauthDemo;
};
name = Release;
Expand Down

This file was deleted.

15 changes: 10 additions & 5 deletions Demo/MultiAccountOauthDemo/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="4Iu-pe-WgB">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="4Iu-pe-WgB">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
<array key="Avenir.ttc">
<string>Avenir-Medium</string>
</array>
</customFonts>
<scenes>
<!--Navigation Controller-->
<scene sceneID="PmY-Me-7fa">
<objects>
<navigationController id="4Iu-pe-WgB" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="TCK-Sf-Ia0">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<textAttributes key="titleTextAttributes">
<fontDescription key="fontDescription" type="system" weight="thin" pointSize="23"/>
Expand Down Expand Up @@ -76,7 +81,7 @@
<constraint firstAttribute="width" secondItem="rxR-Fr-I6k" secondAttribute="height" multiplier="1:1" id="ljI-oE-3WF"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aci-OE-gXU">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aci-OE-gXU">
<rect key="frame" x="70" y="5" width="244" height="23"/>
<constraints>
<constraint firstAttribute="height" constant="23" id="hsX-H5-3C7"/>
Expand All @@ -85,7 +90,7 @@
<color key="textColor" red="0.35686274509999999" green="0.5568627451" blue="0.86274509799999999" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="All Inboxes" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6eF-0Q-X0V">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="All Inboxes" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6eF-0Q-X0V">
<rect key="frame" x="70" y="30" width="244" height="23"/>
<constraints>
<constraint firstAttribute="height" constant="23" id="gln-r2-CMI"/>
Expand Down
32 changes: 32 additions & 0 deletions Demo/MultiAccountOauthDemo/CloudServiceCell.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// CloudServiceCell.swift
// MultiAccountOauthDemo
//
// Created by Sergey Kudryavtsev on 8/13/17.
// Copyright © 2017 Thywis inc. All rights reserved.
//

import UIKit

protocol CloudServiceCellDelegate: class {
func cloudServiceCell(_ cell: CloudServiceCell, authenticateButtonWasPressed button: UIButton)
}

class CloudServiceCell: UITableViewCell {

weak var delegate: CloudServiceCellDelegate?

@IBOutlet weak var authenticateButton: UIButton!
@IBOutlet weak var emailLabel: UILabel!
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var logoImageView: UIImageView!

override func awakeFromNib() {
super.awakeFromNib()
authenticateButton.addTarget(self, action: #selector(CloudServiceCell.authenticateButtonPressed), for: .touchUpInside)
}

func authenticateButtonPressed() {
delegate?.cloudServiceCell(self, authenticateButtonWasPressed: authenticateButton)
}
}
2 changes: 1 addition & 1 deletion Demo/MultiAccountOauthDemo/InfoTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class InfoTableViewCell: UITableViewCell {
func getUserLabel(name: String) -> UIImage {

let color = RandomColorSwift.randomColor(hue: .value(email.hashValue % 360) , luminosity: .dark)
return textToImage(char: "\(name.characters.first!)".uppercased(), size: CGSize(width: 200, height: 200), ratio: 0.6, bgColor: color)
return textToImage(char: "\(name.first!)".uppercased(), size: CGSize(width: 200, height: 200), ratio: 0.6, bgColor: color)

}

Expand Down
29 changes: 20 additions & 9 deletions Demo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
PODS:
- Alamofire (4.5.0)
- Alamofire (4.5.1)
- AppAuth (0.9.1)
- GTMAppAuth (0.6.1):
- AppAuth (~> 0.9.0)
- GTMSessionFetcher (~> 1.1)
- GTMSessionFetcher (1.1.12):
- GTMSessionFetcher/Full (= 1.1.12)
- GTMSessionFetcher/Core (1.1.12)
- GTMSessionFetcher/Full (1.1.12):
- GTMSessionFetcher/Core (= 1.1.12)
- MultiAccountOAuth (1.0):
- Alamofire (~> 4.5.0)
- Alamofire (= 4.5.1)
- AppAuth (~> 0.9.1)
- SwiftyJSON (~> 3.1.4)
- GTMAppAuth
- SwiftyJSON (~> 4.0.0)
- RandomColorSwift (1.0.0)
- SwiftyJSON (3.1.4)
- SwiftyJSON (4.0.0)

DEPENDENCIES:
- MultiAccountOAuth (from `../`)
- RandomColorSwift

EXTERNAL SOURCES:
MultiAccountOAuth:
:path: "../"
:path: ../

SPEC CHECKSUMS:
Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140
Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a
AppAuth: f7d9a2ce4ffe79a62a8b0c1d0938e88d9809b846
MultiAccountOAuth: f884707f76cd17116af859ea1f22e2534a265a4e
GTMAppAuth: ae710e1e53431e2bcdd57f9f92daa16a58a2947d
GTMSessionFetcher: ebaa1f79a5366922c1735f1566901f50beba23b7
MultiAccountOAuth: 34434574f3a3520e29060c6adec9e9518e7c00fa
RandomColorSwift: 9f85058b721665d52d239ca166a913e083506444
SwiftyJSON: c2842d878f95482ffceec5709abc3d05680c0220
SwiftyJSON: 070dabdcb1beb81b247c65ffa3a79dbbfb3b48aa

PODFILE CHECKSUM: 6d150c46156a0dcf369bf70e112a5e10af4c9ad6

COCOAPODS: 1.2.1
COCOAPODS: 1.3.1
5 changes: 3 additions & 2 deletions MultiAccountOauth.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ Pod::Spec.new do |s|
s.platform = :ios, '9.0'
s.requires_arc = true
s.dependency 'AppAuth', '~> 0.9.1'
s.dependency 'SwiftyJSON', '~> 3.1.4'
s.dependency 'Alamofire', '~> 4.0.1'
s.dependency 'SwiftyJSON', '~> 4.0.0'
s.dependency 'Alamofire', '~> 4.8.2'
s.dependency 'GTMAppAuth'
s.source_files = 'MultiAccountOauth/*.swift'

end
Loading