Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AGIOS-574, AGIOS-546, AGIOS-542 and AGIOS-543 #115

Merged
merged 7 commits into from
Sep 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Shoot/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ platform :ios, '9.0'
use_frameworks!

target 'Shoot' do
pod 'AeroGearHttp', '1.0.0'
pod 'AeroGearOAuth2', '1.0.1'
pod 'AeroGearHttp', :git => 'https://github.com/aerogear/aerogear-ios-http.git', :branch => 'ios11'
pod 'AeroGearOAuth2', :git => 'https://github.com/aerogear/aerogear-ios-oauth2.git', :branch => 'ios11'
end
4 changes: 2 additions & 2 deletions Shoot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ NOTES: Because this app uses your camera, you should run it on actual device. Ru
self.performUpload("https://www.googleapis.com/upload/drive/v2/files", parameters: self.extractImageAsMultipartParams())
}
```
In [1] initialize config. The default config uses an external browser approach when lauching the authorization request (ie: Safari opens to prompt you for your credentials). If you prefer to use an embedded webview, uncomment line [2].
In [1] initialize config. The default config uses an external browser approach when launching the authorization request (ie: Safari opens to prompt you for your credentials). If you prefer to use an embedded webview, uncomment line [2].

You can use AccountManager to create an OAuth2Module in [3]

Inject the oauth2 module to self.http [4], then all headers will be added for you when self.performUpload do the http.POST
Inject the oauth2 module to self.http [4], then all headers will be added for you when self.performUpload do the http.request with method: .post
30 changes: 23 additions & 7 deletions Shoot/Shoot.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,17 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0810;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = AeroGear;
TargetAttributes = {
48F709FA19B59E9800DDB152 = {
CreatedOnToolsVersion = 6.0;
LastSwiftMigration = 0810;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
};
48F70A0C19B59E9800DDB152 = {
CreatedOnToolsVersion = 6.0;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
TestTargetID = 48F709FA19B59E9800DDB152;
};
Expand Down Expand Up @@ -361,14 +361,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -409,14 +415,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -457,7 +469,8 @@
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.aerogear.shoot;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0.1;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -476,7 +489,8 @@
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = org.aerogear.shoot;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0.1;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -498,7 +512,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.aerogear.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0.1;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Shoot.app/Shoot";
};
name = Debug;
Expand All @@ -517,7 +532,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.aerogear.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0.1;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Shoot.app/Shoot";
};
name = Release;
Expand Down
50 changes: 25 additions & 25 deletions Shoot/Shoot/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="f2u-eh-GSp">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13189.4" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="f2u-eh-GSp">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13165.3"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand All @@ -15,28 +19,25 @@
<viewControllerLayoutGuide type="bottom" id="Fms-Tp-IcC"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="tim-6x-e6f">
<rect key="frame" x="4" y="0.0" width="592" height="512"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="579"/>
<gestureRecognizers/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qMk-sY-8Hc">
<rect key="frame" x="4" y="512" width="592" height="88"/>
<rect key="frame" x="0.0" y="579" width="375" height="88"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZGJ-EN-ff5">
<rect key="frame" x="0.0" y="0.0" width="197" height="88"/>
<rect key="frame" x="0.0" y="0.0" width="125" height="88"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="googleplus-icon" translatesAutoresizingMaskIntoConstraints="NO" id="npv-RH-Q33">
<rect key="frame" x="82" y="27" width="33" height="33"/>
<rect key="frame" x="46" y="27" width="33" height="33"/>
<gestureRecognizers/>
<variation key="heightClass=compact-widthClass=compact" misplaced="YES">
<rect key="frame" x="33" y="56" width="24" height="21"/>
</variation>
</imageView>
</subviews>
<color key="backgroundColor" red="0.85098039219999999" green="0.20392156859999999" blue="0.1450980392" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.85098039219999999" green="0.20392156859999999" blue="0.1450980392" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<gestureRecognizers/>
<constraints>
<constraint firstAttribute="height" constant="113" id="5GC-ht-ByZ"/>
Expand All @@ -62,13 +63,13 @@
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fF8-tg-fgN">
<rect key="frame" x="395" y="0.0" width="197" height="88"/>
<rect key="frame" x="250" y="0.0" width="125" height="88"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="facebook-icon" translatesAutoresizingMaskIntoConstraints="NO" id="T3R-AW-esk">
<rect key="frame" x="82" y="28" width="33" height="33"/>
<rect key="frame" x="46" y="28" width="33" height="33"/>
</imageView>
</subviews>
<color key="backgroundColor" red="0.17254901959999999" green="0.25490196079999999" blue="0.53725490200000003" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.17254901959999999" green="0.25490196079999999" blue="0.53725490200000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<gestureRecognizers/>
<constraints>
<constraint firstAttribute="height" constant="88" id="JVG-uI-eEv"/>
Expand All @@ -93,14 +94,14 @@
<outletCollection property="gestureRecognizers" destination="k2C-Tf-MNg" appends="YES" id="9pq-DH-inM"/>
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FR6-cA-Lyp">
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FR6-cA-Lyp">
<rect key="frame" x="197" y="0.0" width="198" height="88"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="keycloack-icon" translatesAutoresizingMaskIntoConstraints="NO" id="mbI-aZ-UfH">
<rect key="frame" x="83" y="27" width="33" height="33"/>
<rect key="frame" x="46" y="27" width="33" height="33"/>
</imageView>
</subviews>
<color key="backgroundColor" red="0.0" green="0.22352941179999999" blue="0.41960784309999999" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.0" green="0.22352941179999999" blue="0.41960784309999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<gestureRecognizers/>
<constraints>
<constraint firstAttribute="width" constant="88" id="D0O-en-aJY"/>
Expand Down Expand Up @@ -129,7 +130,7 @@
</connections>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="fF8-tg-fgN" firstAttribute="height" secondItem="ZGJ-EN-ff5" secondAttribute="height" id="1L8-aw-ktR"/>
<constraint firstItem="fF8-tg-fgN" firstAttribute="leading" secondItem="FR6-cA-Lyp" secondAttribute="trailing" id="7Ga-PA-nQc"/>
Expand Down Expand Up @@ -211,7 +212,7 @@
</variation>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gv5-9X-8YN" userLabel="BackToCamera">
<rect key="frame" x="20" y="20" width="56" height="61"/>
<rect key="frame" x="16" y="20" width="56" height="61"/>
<constraints>
<constraint firstAttribute="width" constant="56" id="bAE-0P-gza"/>
<constraint firstAttribute="height" constant="61" id="diq-hO-j4k"/>
Expand All @@ -236,14 +237,14 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="l3c-bX-UA7">
<rect key="frame" x="523" y="36" width="57" height="30"/>
<rect key="frame" x="302" y="36" width="57" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="57" id="hvS-5a-l5h"/>
<constraint firstAttribute="height" constant="30" id="zHb-ga-cp6"/>
</constraints>
<state key="normal" title="Settings">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<variation key="heightClass=compact-widthClass=compact">
<mask key="constraints">
Expand All @@ -256,7 +257,7 @@
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="Fms-Tp-IcC" firstAttribute="top" secondItem="qMk-sY-8Hc" secondAttribute="bottom" id="1n9-5A-r1g"/>
<constraint firstItem="FR6-cA-Lyp" firstAttribute="leading" secondItem="tim-6x-e6f" secondAttribute="trailing" constant="-7" id="5j3-k7-aGd"/>
Expand Down Expand Up @@ -368,7 +369,6 @@
<tabBarItem key="tabBarItem" title="Shoot" id="XOs-rP-loq"/>
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="p2I-lX-r5W">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
Expand Down