Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
Automated Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ibm-devx-automation authored and dolph committed Dec 18, 2018
1 parent ecb889c commit acee1c1
Show file tree
Hide file tree
Showing 25 changed files with 591 additions and 437 deletions.
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -12,3 +12,5 @@ To contribute code, documentation, or tests, please submit a pull request to
the GitHub repository. Generally, we expect two maintainers to review your pull
request before it is approved for merging. For more details, see the
[MAINTAINERS](MAINTAINERS.md) page.

Contributions are subject to the [Developer Certificate of Origin, Version 1.1](https://developercertificate.org/) and the [Apache License, Version 2](https://www.apache.org/licenses/LICENSE-2.0.txt).
4 changes: 1 addition & 3 deletions Cartfile
@@ -1,4 +1,2 @@
# Use a project from GitHub
github "watson-developer-cloud/swift-sdk" ~> 0.29.0


github "watson-developer-cloud/swift-sdk" == 0.37.0
1 change: 0 additions & 1 deletion Cartfile.resolved

This file was deleted.

18 changes: 9 additions & 9 deletions MAINTAINERS.md
Expand Up @@ -58,12 +58,12 @@ For any given pull request, ask yourself "is this a new feature?" If so, does
the pull request (or associated issue) contain narrative indicating the need
for the feature? If not, ask them to provide that information.

Are new unit tests in place that test all new behaviors introduced? If not, do
not merge the feature until they are! Is documentation in place for the new
feature? (See the documentation guidelines). If not do not merge the feature
until it is! Is the feature necessary for general use cases? Try and keep the
scope of any given component narrow. If a proposed feature does not fit that
scope, recommend to the user that they maintain the feature on their own, and
close the request. You may also recommend that they see if the feature gains
traction among other users, and suggest they re-submit when they can show such
support.
Are new unit tests in place that test all new behaviors introduced? If not, do
not merge the feature until they are! Is documentation in place for the new
feature? (See the documentation guidelines). If not do not merge the feature
until it is! Is the feature necessary for general use cases? Try and keep the
scope of any given component narrow. If a proposed feature does not fit that
scope, recommend to the user that they maintain the feature on their own, and
close the request. You may also recommend that they see if the feature gains
traction among other users, and suggest they re-submit when they can show such
support.
39 changes: 24 additions & 15 deletions Podfile
@@ -1,24 +1,33 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '9.0'

target 'visualrecognitionios' do
pod 'BMSCore', '~> 2.0'

# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod "SwiftSpinner", '~> 1.3.0'
pod 'KTCenterFlowLayout', '~> 1.3.1'
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod "SwiftSpinner", '~> 1.5.0'
pod 'KTCenterFlowLayout', '~> 1.3.1'

# Pods for visualrecognitionios
# Pods for visualrecognitionios

target 'visualrecognitioniosTests' do
inherit! :search_paths
# Pods for testing
end

target 'visualrecognitioniosUITests' do
inherit! :search_paths
# Pods for testing
end
target 'visualrecognitioniosTests' do
inherit! :search_paths
# Pods for testing
end

target 'visualrecognitioniosUITests' do
inherit! :search_paths
# Pods for testing
end

post_install do |installer|
installer.pods_project.targets.each do |target|
if ['SwiftSpinner', 'SwiftCloudant', 'KTCenterFlowLayout'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.2'
end
end
end
end
end
15 changes: 0 additions & 15 deletions Podfile.lock

This file was deleted.

330 changes: 200 additions & 130 deletions visualrecognitionios.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -65,6 +66,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down

This file was deleted.

This file was deleted.

29 changes: 18 additions & 11 deletions visualrecognitionios/AppDelegate.swift
@@ -1,20 +1,31 @@
//
// AppDelegate.swift
// visualrecognitionios
//
/**
* Copyright IBM Corporation 2018
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/

import UIKit
import BMSCore





@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

let myBMSClient = BMSClient.sharedInstance
Expand All @@ -26,16 +37,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {




return true
}








func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
Expand All @@ -58,5 +66,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


}
54 changes: 54 additions & 0 deletions visualrecognitionios/ApplicationError.swift
@@ -0,0 +1,54 @@
/**
* Copyright IBM Corporation 2018
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/

import Foundation

enum ApplicationError: Error, CustomStringConvertible {

case missingCredentials

case invalidCredentials

case photoLibraryUnavailable

case cameraUnavailable

case error(String)

var title: String {
switch self {
case .missingCredentials: return "Missing Visual Recognition Credentials"
case .invalidCredentials: return "Invalid Visual Recognition Credentials"
case .photoLibraryUnavailable: return "Photo Library Unavailable"
case .cameraUnavailable: return "Camera Unavailable"
case .error: return "Visual Recognition Failed"
}
}

var message: String {
switch self {
case .missingCredentials: return "Please check the readme to ensure proper credentials configuration."
case .invalidCredentials: return "Please check the readme to ensure proper credentials configuration."
case .photoLibraryUnavailable: return "The Photo Library feature is currently unavailable on this device. Please try again."
case .cameraUnavailable: return "The camera feature is currently unavailable on this device. If you are running the application on a simulator, please use a physical device in order to utilize camera functionality."
case .error(let msg): return msg
}
}

var description: String {
return title + ": " + message
}
}
Expand Up @@ -119,6 +119,11 @@
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Expand Down
12 changes: 3 additions & 9 deletions visualrecognitionios/BMSCredentials.plist
Expand Up @@ -3,17 +3,11 @@
<plist version="1.0">
<dict>
<key>visualrecognitionApikey</key>
<string>udjoctDVR6w5MPBWyeSc4d5asWBwsB3icmE0EYsPfc_L</string>
<string>REPLACEME.visualRecognitionServiceName.apikey</string>
<key>visualrecognitionUrl</key>
<string>https://gateway.watsonplatform.net/visual-recognition/api</string>
<key>visualrecognitionIam_apikey_name</key>
<string>auto-generated-apikey-6b032082-f31d-481f-af55-b2910f27dc63</string>
<key>visualrecognitionIam_role_crn</key>
<string>crn:v1:bluemix:public:iam::::serviceRole:Writer</string>
<key>visualrecognitionIam_apikey_description</key>
<string>Auto generated apikey during resource-key operation for Instance - crn:v1:bluemix:public:watson-vision-combined:us-south:a/e56d18c8cb3aac1a8126d01600e292d8:c7f402b5-d45a-4a6f-aba8-6848ae995997::</string>
<key>visualrecognitionIam_serviceid_crn</key>
<string>crn:v1:bluemix:public:iam-identity::a/e56d18c8cb3aac1a8126d01600e292d8::serviceid:ServiceId-55bb3792-b649-4c47-afe4-e0bc01d54287</string>
<key>visualrecognitionNote</key>
<string>This apiKey will be valid in an hour or so.</string>
<key>appName</key>
<string>visualrecognitionios</string></dict>
</plist>
19 changes: 11 additions & 8 deletions visualrecognitionios/Base.lproj/Main.storyboard
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="CR1-Xo-p8W">
<?xml version="1.0" encoding="UTF-8"?>
<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="CR1-Xo-p8W">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -15,15 +18,15 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="Bend.jpg" translatesAutoresizingMaskIntoConstraints="NO" id="6jT-A4-TeE">
<frame key="frameInset" width="100.00%" height="100.00%"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
<toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="psf-U5-Jsf">
<frame key="frameInset" height="44"/>
<rect key="frame" x="0.0" y="623" width="375" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<items>
<barButtonItem systemItem="camera" id="bCi-sc-Ynu">
Expand All @@ -40,7 +43,7 @@
</items>
</toolbar>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="wcO-FL-OCq">
<frame key="frameInset" minX="16" height="21.24%" maxX="16" maxY="44"/>
<rect key="frame" x="16" y="490.5" width="343" height="132.5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="G41-Pz-yQD">
<size key="itemSize" width="50" height="50"/>
Expand Down Expand Up @@ -83,7 +86,7 @@
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="CR1-Xo-p8W" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="3N7-yh-24e">
<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"/>
<color key="barTintColor" red="0.29019607843137252" green="0.56470588235294117" blue="0.88627450980392153" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<textAttributes key="titleTextAttributes">
Expand Down

0 comments on commit acee1c1

Please sign in to comment.