├── SimpleAI ├── Assets.xcassets │ ├── Contents.json │ ├── paper airplane.imageset │ │ ├── paper airplane@3x.png │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── MessageModel.swift ├── Info.plist ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── AppDelegate.swift ├── MessagesViewCell.swift └── ViewController.swift ├── Pods ├── Target Support Files │ ├── AI │ │ ├── AI.modulemap │ │ ├── AI-dummy.m │ │ ├── AI-prefix.pch │ │ ├── AI-umbrella.h │ │ ├── AI.xcconfig │ │ └── Info.plist │ └── Pods-SimpleAI │ │ ├── Pods-SimpleAI.modulemap │ │ ├── Pods-SimpleAI-dummy.m │ │ ├── Pods-SimpleAI-umbrella.h │ │ ├── Pods-SimpleAI.debug.xcconfig │ │ ├── Pods-SimpleAI.release.xcconfig │ │ ├── Info.plist │ │ ├── Pods-SimpleAI-resources.sh │ │ ├── Pods-SimpleAI-frameworks.sh │ │ ├── Pods-SimpleAI-acknowledgements.markdown │ │ └── Pods-SimpleAI-acknowledgements.plist ├── Manifest.lock ├── Pods.xcodeproj │ ├── xcuserdata │ │ └── johnnyperdomo.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ ├── AI.xcscheme │ │ │ └── Pods-SimpleAI.xcscheme │ └── project.pbxproj └── AI │ ├── AI │ └── src │ │ ├── Credentials.swift │ │ ├── Requests │ │ ├── Utils │ │ │ └── SessionStorage.swift │ │ ├── Request.swift │ │ ├── RequestUtilites.swift │ │ ├── QueryRequest.swift │ │ ├── PrivateRequest.swift │ │ ├── TextQueryRequest.swift │ │ └── UserEntitiesRequest.swift │ │ ├── QueryResponse.swift │ │ ├── Completion.swift │ │ ├── CallbacksContainer.swift │ │ ├── NSError.swift │ │ ├── AI.swift │ │ ├── Service.swift │ │ ├── JSON.swift │ │ └── ResponseSerialize.swift │ ├── README.md │ └── LICENSE ├── SimpleAI.xcworkspace ├── xcuserdata │ └── johnnyperdomo.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── SimpleAI.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── johnnyperdomo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcuserdata │ └── johnnyperdomo.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── Podfile ├── Podfile.lock ├── LICENSE └── README.md /SimpleAI/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Pods/Target Support Files/AI/AI.modulemap: -------------------------------------------------------------------------------- 1 | framework module AI { 2 | umbrella header "AI-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AI/AI-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AI : NSObject 3 | @end 4 | @implementation PodsDummy_AI 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SimpleAI { 2 | umbrella header "Pods-SimpleAI-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /SimpleAI/Assets.xcassets/paper airplane.imageset/paper airplane@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnnyperdomo/Simple-Ai-Chat/HEAD/SimpleAI/Assets.xcassets/paper airplane.imageset/paper airplane@3x.png -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SimpleAI : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SimpleAI 5 | @end 6 | -------------------------------------------------------------------------------- /SimpleAI.xcworkspace/xcuserdata/johnnyperdomo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnnyperdomo/Simple-Ai-Chat/HEAD/SimpleAI.xcworkspace/xcuserdata/johnnyperdomo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SimpleAI.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SimpleAI.xcodeproj/project.xcworkspace/xcuserdata/johnnyperdomo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnnyperdomo/Simple-Ai-Chat/HEAD/SimpleAI.xcodeproj/project.xcworkspace/xcuserdata/johnnyperdomo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Pods/Target Support Files/AI/AI-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /SimpleAI.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'SimpleAI' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for SimpleAI 9 | pod 'AI' 10 | end 11 | -------------------------------------------------------------------------------- /SimpleAI.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AI (0.0.8) 3 | 4 | DEPENDENCIES: 5 | - AI 6 | 7 | SPEC REPOS: 8 | https://github.com/cocoapods/specs.git: 9 | - AI 10 | 11 | SPEC CHECKSUMS: 12 | AI: 73c9a26daeb5362016fd345a2d0ee346919a526f 13 | 14 | PODFILE CHECKSUM: 0f066a0eacfa815aa6035edc5e2f8e3ad3d51d6e 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AI (0.0.8) 3 | 4 | DEPENDENCIES: 5 | - AI 6 | 7 | SPEC REPOS: 8 | https://github.com/cocoapods/specs.git: 9 | - AI 10 | 11 | SPEC CHECKSUMS: 12 | AI: 73c9a26daeb5362016fd345a2d0ee346919a526f 13 | 14 | PODFILE CHECKSUM: 0f066a0eacfa815aa6035edc5e2f8e3ad3d51d6e 15 | 16 | COCOAPODS: 1.5.3 17 | -------------------------------------------------------------------------------- /SimpleAI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AI/AI-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double AIVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char AIVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_SimpleAIVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_SimpleAIVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /SimpleAI/Assets.xcassets/paper airplane.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "paper airplane@3x.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /SimpleAI/MessageModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessageModel.swift 3 | // SimpleAI 4 | // 5 | // Created by Johnny Perdomo on 10/5/18. 6 | // Copyright © 2018 Johnny Perdomo. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class MessageModel { 12 | 13 | let content: String 14 | let id: String 15 | 16 | init(content: String, id: String) { 17 | self.content = content 18 | self.id = id 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /SimpleAI.xcodeproj/xcuserdata/johnnyperdomo.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SimpleAI.xcscheme 8 | 9 | orderHint 10 | 2 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AI/AI.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AI 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/AI 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/johnnyperdomo.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AI.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 0 13 | 14 | Pods-SimpleAI.xcscheme 15 | 16 | isShown 17 | 18 | orderHint 19 | 1 20 | 21 | 22 | SuppressBuildableAutocreation 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AI" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/AI/AI.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "AI" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AI" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/AI/AI.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "AI" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/Credentials.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Credentials.swift 3 | // APII 4 | // 5 | // Created by Kuragin Dmitriy on 11/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct Credentials { 12 | var clientAccessToken: String 13 | 14 | public init(_ clientAccessToken: String) { 15 | self.clientAccessToken = clientAccessToken 16 | } 17 | 18 | public init(clientAccessToken: String) { 19 | self.clientAccessToken = clientAccessToken 20 | } 21 | } 22 | 23 | private let kAuthorizationHTTPHeaderFieldName = "Authorization" 24 | 25 | internal extension URLRequest { 26 | mutating func authenticate(_ credentials: Credentials) { 27 | self.addValue("Bearer \(credentials.clientAccessToken)", forHTTPHeaderField: kAuthorizationHTTPHeaderFieldName); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AI/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.0.8 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SimpleAI/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/Requests/Utils/SessionStorage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SessionStorage.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 11/03/16. 6 | // Copyright © 2016 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | fileprivate let kSessionIdentifierStoreKey = "kSessionIdentifierStoreKey" 12 | 13 | public struct SessionStorage { 14 | public static var defaultSessionIdentifier: String = SessionStorage.retrieveDefaultSessionIdentifier() 15 | 16 | fileprivate static func retrieveDefaultSessionIdentifier() -> String { 17 | let userDefaults = UserDefaults.standard 18 | 19 | if let storedSessionIdentifier = userDefaults.object(forKey: kSessionIdentifierStoreKey) as? String { 20 | return storedSessionIdentifier 21 | } else { 22 | let generatedSessionIdentifier = NSUUID().uuidString 23 | 24 | userDefaults.set(generatedSessionIdentifier, forKey: kSessionIdentifierStoreKey) 25 | userDefaults.synchronize() 26 | 27 | return generatedSessionIdentifier 28 | } 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Johnny Perdomo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/QueryResponse.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Response.swift 3 | // api 4 | // 5 | // Created by Kuragin Dmitriy on 06/10/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct Message { 12 | public let type: Int 13 | public let speech: String 14 | } 15 | 16 | public struct Fulfillment { 17 | public let speech: String 18 | public let messages: [Message] 19 | } 20 | 21 | public struct Metadata { 22 | public let intentId: String? 23 | public let intentName: String? 24 | } 25 | 26 | public struct Context { 27 | public let name: String 28 | public let parameters: [String: Any] 29 | } 30 | 31 | public struct Result { 32 | public let source: String 33 | public let resolvedQuery: String 34 | public let action: String? 35 | 36 | public let parameters: [String: Any]? 37 | public let contexts: [Context]? 38 | 39 | public let fulfillment: Fulfillment? 40 | public let metadata: Metadata 41 | } 42 | 43 | public struct QueryResponse { 44 | public let identifier: String 45 | public let timestamp: Date 46 | 47 | public let result: Result 48 | } 49 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/Completion.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Completion.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 10/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | 12 | typealias CompletionError = Error 13 | 14 | enum Completion { 15 | case success(A) 16 | case failure(CompletionError) 17 | } 18 | 19 | extension Completion { 20 | func next(_ f: (A) -> Completion) -> Completion{ 21 | switch self { 22 | case .success(let x): 23 | return f(x) 24 | case .failure(let error): 25 | return .failure(error) 26 | } 27 | } 28 | } 29 | 30 | extension Completion { 31 | func next(_ error: CompletionError?) -> Completion { 32 | switch self { 33 | case .success(let x): 34 | if let error = error { 35 | return .failure(error) 36 | } else { 37 | return .success(x) 38 | } 39 | case .failure(let error): 40 | return .failure(error) 41 | } 42 | } 43 | } 44 | 45 | struct CompletionStringError: Error { 46 | let errorMessage: String 47 | } 48 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/CallbacksContainer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CallbacksContainer.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 12/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class CallbacksContainer { 12 | fileprivate var callbacks: [(T) -> Void] = [] 13 | fileprivate var onResolvecallbacks: [() -> Void] = [] 14 | 15 | fileprivate var state: T? 16 | 17 | func resolve(_ object: T) { 18 | if state == nil { 19 | state = object 20 | 21 | while onResolvecallbacks.count > 0 { 22 | let callback = self.onResolvecallbacks.remove(at: 0) 23 | DispatchQueue.main.async(execute: { () -> Void in 24 | callback() 25 | }) 26 | } 27 | } 28 | 29 | self.fire() 30 | } 31 | 32 | fileprivate func fire() { 33 | while callbacks.count > 0 && state != nil { 34 | let q = self.callbacks.remove(at: 0) 35 | DispatchQueue.main.async(execute: { () -> Void in 36 | q(self.state!) 37 | }) 38 | } 39 | } 40 | 41 | func onResolve(_ fn: @escaping () -> Void) { 42 | onResolvecallbacks.append(fn) 43 | } 44 | 45 | func put(_ fn: @escaping (T) -> Void) { 46 | callbacks.append(fn) 47 | 48 | self.fire() 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/NSError.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSError.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 10/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public let AIErrorDomain: String = "AIErrorDomain" 12 | 13 | public enum AIErrorCode: Int { 14 | case unknownError 15 | 16 | case responseSerializeMissingKey 17 | case responseSerializeTypeMismatch 18 | case responseBodyEmpty 19 | 20 | case requestSerializeMissingKey 21 | case requestSerializeTypeMismatch 22 | 23 | case responseObjectEmpty 24 | case responseDataEmpty 25 | case mimeTypeEmpty 26 | case unexpectedMIMEType 27 | case wrongResponseObjectType 28 | 29 | case requestUserCancelled 30 | } 31 | 32 | internal extension NSError { 33 | convenience init(code: AIErrorCode, message: String) { 34 | let userInfo = [ 35 | NSLocalizedDescriptionKey: message 36 | ] 37 | 38 | self.init(domain: AIErrorDomain, code: code.rawValue, userInfo: userInfo) 39 | } 40 | } 41 | 42 | internal extension NSError { 43 | convenience init(forHTTPStatusCode statusCode: Int) { 44 | let userInfo = [ 45 | NSLocalizedDescriptionKey: HTTPURLResponse.localizedString(forStatusCode: statusCode) 46 | ] 47 | 48 | self.init(domain: NSURLErrorDomain, code: statusCode, userInfo: userInfo) 49 | } 50 | } 51 | 52 | internal extension NSError { 53 | convenience init(forErrorString errorString: String) { 54 | self.init(code: AIErrorCode.unknownError, message: errorString) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/AI.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AI.swift 3 | // APII 4 | // 5 | // Created by Kuragin Dmitriy on 11/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct AI { 12 | public static var language: Language = .english 13 | public static var credentials: Credentials? = .none { 14 | didSet { 15 | if let credentials = credentials { 16 | self.sharedService.credentials = credentials 17 | } 18 | } 19 | } 20 | 21 | public static var defaultQueryParameters: QueryParameters = QueryParameters() 22 | public static var session: URLSession = URLSession.shared 23 | 24 | public static func configure(_ credentials: Credentials) { 25 | self.credentials = credentials 26 | } 27 | 28 | public static func configure(_ clientAccessToken: String) { 29 | self.configure(Credentials(clientAccessToken)) 30 | } 31 | 32 | public static func configure(clientAccessToken: String) { 33 | self.configure(clientAccessToken) 34 | } 35 | } 36 | 37 | extension AI { 38 | public static var sharedService: Service = AI.retrieveSharedService() 39 | 40 | fileprivate static func retrieveSharedService() -> Service { 41 | if let credentials = AI.credentials { 42 | return Service(credentials: credentials, session: session, defaultQueryParameters: defaultQueryParameters, language: language) 43 | } else { 44 | fatalError("Library should be configured. Use AI.configure methods.") 45 | } 46 | } 47 | } 48 | 49 | extension AI { 50 | 51 | } 52 | -------------------------------------------------------------------------------- /SimpleAI/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /SimpleAI/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/Requests/Request.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Request.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 11/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public enum RequestCompletion { 12 | case success(T) 13 | case failure(Error) 14 | } 15 | 16 | extension Completion { 17 | func toRequestCompletion() -> RequestCompletion { 18 | switch self { 19 | case .success(let object): 20 | return .success(object) 21 | case .failure(let error): 22 | return .failure(error) 23 | } 24 | } 25 | } 26 | 27 | public protocol Request: class { 28 | var credentials: Credentials { get } 29 | var session: URLSession { get } 30 | 31 | associatedtype ResponseType 32 | 33 | @discardableResult 34 | func resume(completionHandler: @escaping (RequestCompletion) -> Void) -> Self 35 | 36 | func cancel() 37 | } 38 | 39 | public extension Request { 40 | typealias SuccessCompletionHandler = (ResponseType) -> Void 41 | typealias FailureCompletionHandler = (Error) -> Void 42 | 43 | @discardableResult 44 | func success(completionHandler: @escaping SuccessCompletionHandler) -> Self { 45 | return self.resume { (completion) -> Void in 46 | if case .success(let object) = completion { 47 | completionHandler(object) 48 | } 49 | } 50 | } 51 | 52 | @discardableResult 53 | func failure(completionHandler: @escaping FailureCompletionHandler) -> Self { 54 | return self.resume { (completion) -> Void in 55 | if case .failure(let error) = completion { 56 | completionHandler(error) 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Simple-Ai-Chat 2 | Natural Language Processing(NLP) A.I. Chatbot made with Swift 4 3 | 4 | ## Preview 5 | ![Alt Text](https://media.giphy.com/media/9FXRsIMYuH834w2fBD/giphy.gif) 6 | 7 | **Built with** 8 | - Ios 12 9 | - Xcode 10 10 | 11 | ## Features 12 | - **Chatbot uses natural language processing to understand what the user is trying to say, no matter the way he says it.** 13 | - **Chatbot provides a unique experience to the user by using [DialogFlow](https://dialogflow.com/) and responding to user responses according to the subject** 14 | ```swift 15 | AI.sharedService.textRequest('user_response') 16 | ``` 17 | - **Chat bubbles have an expandable *tableView* according to message size, by using ```automaticDimension```** 18 | 19 | ## Requirements 20 | ```swift 21 | import AI 22 | ``` 23 | 24 | **_Pod Files_** 25 | ```swift 26 | pod 'AI' //Can use Cocoa Touch 27 | ``` 28 | [NLP Artificial intelligence made by using DialogFlow](https://dialogflow.com/) 29 | 30 | [Documentation Resources](https://dialogflow.com/docs) 31 | 32 | ## Project Configuration 33 | You'll have to configure your ```DialogFlow``` account to have access to A.I. training console. 34 | > You can train your A.I. to understand and reply to whatever you want. It can perform any task. 35 | 36 | 1. Create your [Dialogflow](https://dialogflow.com/) account 37 | 38 | 2. Create your first [agent](https://dialogflow.com/docs/agents) 39 | 40 | 3. Get ```Client Access Token``` from Agent's *settings menu* to connect to the api client from your app 41 | ```swift 42 | //File: Appdelegate.swift 43 | AI.configure(YOUR_PERSONAL_CLIENT_ACCESS_TOKEN) 44 | ``` 45 | 4. Start communicating with your A.I. to take over the world!!! :stuck_out_tongue: :alien: :smirk: 46 | ## License 47 | Standard MIT [License](https://github.com/johnnyperdomo/Simple-Ai-Chat/blob/master/LICENSE) 48 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/Service.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Service.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 11/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public protocol BaseService { 12 | var credentials: Credentials { get } 13 | var session: URLSession { get } 14 | } 15 | 16 | public protocol QueryService: BaseService { 17 | var defaultQueryParameters: QueryParameters { get set } 18 | var language: Language { get } 19 | } 20 | 21 | public extension QueryService { 22 | func textRequest(_ query: TextQueryType) -> TextQueryRequest { 23 | return TextQueryRequest(query: query, credentials: credentials, queryParameters: defaultQueryParameters, session: session, language: language) 24 | } 25 | 26 | func textRequest(_ query: String) -> TextQueryRequest { 27 | return textRequest(.one(query)) 28 | } 29 | 30 | func textRequest(_ query: [TextQueryElement]) -> TextQueryRequest { 31 | return textRequest(.array(query)) 32 | } 33 | } 34 | 35 | public protocol UserEntitiesService: BaseService { 36 | 37 | } 38 | 39 | public extension UserEntitiesService { 40 | func userEntitiesUploadRequest(_ entities: [UserEntity]) -> UserEntitiesRequest { 41 | return UserEntitiesRequest(credentials: credentials, entities: entities, session: session) 42 | } 43 | } 44 | 45 | public class Service: BaseService, QueryService, UserEntitiesService { 46 | public var credentials: Credentials 47 | public var session: URLSession 48 | 49 | public let language: Language 50 | 51 | public var defaultQueryParameters: QueryParameters 52 | 53 | init(credentials: Credentials, session: URLSession, defaultQueryParameters: QueryParameters, language: Language) { 54 | self.session = session 55 | self.credentials = credentials 56 | 57 | self.defaultQueryParameters = defaultQueryParameters 58 | 59 | self.language = language 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /SimpleAI/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /SimpleAI/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SimpleAI 4 | // 5 | // Created by Johnny Perdomo on 10/2/18. 6 | // Copyright © 2018 Johnny Perdomo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AI 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | 19 | AI.configure("INSERT_API_KEY") 20 | 21 | return true 22 | } 23 | 24 | func applicationWillResignActive(_ application: UIApplication) { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | func applicationDidEnterBackground(_ application: UIApplication) { 30 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 31 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 32 | } 33 | 34 | func applicationWillEnterForeground(_ application: UIApplication) { 35 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 36 | } 37 | 38 | func applicationDidBecomeActive(_ application: UIApplication) { 39 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 40 | } 41 | 42 | func applicationWillTerminate(_ application: UIApplication) { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/johnnyperdomo.xcuserdatad/xcschemes/AI.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/JSON.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JSON.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 06/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | typealias JSONAny = AnyObject 12 | typealias JSONObject = [String: AnyObject] 13 | typealias JSONArray = [AnyObject] 14 | typealias JSONString = String 15 | typealias JSONNumber = NSNumber 16 | typealias JSONNull = NSNull 17 | 18 | enum JSON { 19 | case object(JSONObject) 20 | case array(JSONArray) 21 | case number(JSONNumber) 22 | case jString(JSONString) 23 | 24 | case null 25 | case none 26 | 27 | init(_ object: JSONAny?) { 28 | self.init(object: object) 29 | } 30 | 31 | init(object: JSONAny?) { 32 | if let object = object { 33 | switch object { 34 | case let object as JSONObject: 35 | self = .object(object) 36 | case let object as JSONArray: 37 | self = .array(object) 38 | case let object as JSONNumber: 39 | self = .number(object) 40 | case let object as JSONString: 41 | self = .jString(object) 42 | case _ as JSONNull: 43 | self = .null 44 | default: 45 | self = .none 46 | } 47 | } else { 48 | self = .none 49 | } 50 | } 51 | 52 | subscript(index: Int) -> JSON { 53 | get { 54 | if case .array(let array) = self { 55 | if index >= 0 && index < array.count { 56 | return JSON(array[index]) 57 | } 58 | 59 | return .none 60 | } 61 | 62 | return .none 63 | } 64 | } 65 | 66 | subscript(key: String) -> JSON { 67 | get { 68 | if case .object(let object) = self { 69 | return JSON(object[key]) 70 | } 71 | 72 | return .none 73 | } 74 | } 75 | } 76 | 77 | extension JSON { 78 | var string: String? { 79 | if case .jString(let object) = self { 80 | return object 81 | } 82 | 83 | return .none 84 | } 85 | 86 | var int: Int? { 87 | if case .number(let object) = self { 88 | return object.intValue 89 | } 90 | 91 | return .none 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/johnnyperdomo.xcuserdatad/xcschemes/Pods-SimpleAI.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/Requests/RequestUtilites.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RequestUtilites.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 11/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | func handle(_ data: Data?, _ response: URLResponse?, _ error: Error?) -> Completion { 12 | if let error = error { 13 | return .failure(error) 14 | } 15 | 16 | guard response != .none else { 17 | return .failure(NSError(code: .responseObjectEmpty, message: "NSURLResponse is empty.")) 18 | } 19 | 20 | guard let response = response as? HTTPURLResponse else { 21 | return .failure(NSError(code: .wrongResponseObjectType, message: "Wrong response type. Expected NSHTTPURLResponse.")) 22 | } 23 | 24 | let acceptableStatusCodes = IndexSet(integersIn: NSRange(location: 200, length: 100).toRange() ?? 0..<0) 25 | 26 | if !acceptableStatusCodes.contains(response.statusCode) { 27 | return .failure(NSError(forHTTPStatusCode: response.statusCode)) 28 | } 29 | 30 | guard let mimeType = response.mimeType else { 31 | return .failure(NSError(code: .mimeTypeEmpty, message: "MIMEType connot be empty")) 32 | } 33 | 34 | let acceptableContentTypes = Set(arrayLiteral: "application/json", "text/json", "text/javascript") 35 | 36 | if !acceptableContentTypes.contains(mimeType) { 37 | return .failure(NSError(code: .unexpectedMIMEType, message: "Wrong MIMEType type: \(mimeType). Expected \(acceptableContentTypes)")) 38 | } 39 | 40 | guard let data = data else { 41 | return .failure(NSError(code: .responseDataEmpty, message: "Response data is empty.")) 42 | } 43 | 44 | return .success(data) 45 | } 46 | 47 | func serializeJSON(_ data: Data) -> Completion { 48 | do { 49 | let object = try JSONSerialization.jsonObject(with: data, options: JSONSerialization.ReadingOptions(rawValue: 0)) 50 | return .success(object) 51 | } catch let error as NSError { 52 | return .failure(error) 53 | } 54 | } 55 | 56 | func validateObject(_ object: Any) -> Completion<[String: Any]> { 57 | if let object = object as? [String: Any] { 58 | if let code = JSON(object as JSONAny?)["status"]["code"].int { 59 | if code == 200 { 60 | return .success(object) 61 | } else { 62 | return .failure(NSError(forHTTPStatusCode: code)) 63 | } 64 | } else { 65 | return .failure(SerializeError.missingKey("status.code")) 66 | } 67 | } else { 68 | return .failure(SerializeError.typeMismatch("root")) 69 | } 70 | } 71 | 72 | func serializeObject(_ object: [String: Any]) -> Completion { 73 | do { 74 | let response = try ResponseSerializer().serialize(object) 75 | return .success(response) 76 | } catch let error { 77 | return .failure(error) 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /Pods/AI/README.md: -------------------------------------------------------------------------------- 1 | Cocoa SDK for api.ai 2 | ============== 3 | 4 | [![Build Status](https://travis-ci.org/api-ai/api-ai-ios-sdk.svg?branch=master)](https://travis-ci.org/api-ai/api-ai-cocoa-swift) 5 | [![Version](https://img.shields.io/cocoapods/v/AI.svg?style=flat)](http://cocoapods.org/pods/AI) 6 | [![License](https://img.shields.io/cocoapods/l/AI.svg?style=flat)](http://cocoapods.org/pods/AI) 7 | [![Platform](https://img.shields.io/cocoapods/p/AI.svg?style=flat)](http://cocoapods.org/pods/AI) 8 | [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 9 | 10 | * [Overview](#overview) 11 | * [Prerequisites](#prerequisites) 12 | * [Running the Demo app](#runningthedemoapp) 13 | * [Integrating api.ai into your Cocoa app](#integratingintoyourapp) 14 | 15 | --------------- 16 | 17 | ## Overview 18 | The API.AI iOS SDK makes it easy to integrate natural language processing API on Apple devices. API.AI allows using voice commands and integration with dialog scenarios defined for a particular agent in API.AI. 19 | 20 | ## Prerequsites 21 | * Create an [API.AI account](http://api.ai) 22 | * Install [CocoaPods](#cocoapods) or [Carthage](#carthage) 23 | 24 | 25 | ## Running the Demo app (CocoaPods supports only) 26 | * Run ```pod update``` in the AIDemo project folder. 27 | * Open **AIDemo.xworkspace** in Xcode. 28 | * In **AppDelegate** insert API key. 29 | ``` 30 | AI.configure("YOUR_CLIENT_ACCESS_TOKEN") 31 | ``` 32 | 33 | Note: an agent in **api.ai** should exist. Keys could be obtained on the agent's settings page. 34 | 35 | * Define sample intents in the agent. 36 | * Run the app in Xcode. 37 | Inputs are possible with text and voice (experimental). 38 | 39 | 40 | ## Integrating into your app 41 | 42 | ### CocoaPods 43 | 44 | [CocoaPods](http://cocoapods.org) is a dependency manager for Swift and Objective-C Cocoa projects. Installing: 45 | 46 | ```bash 47 | $ [sudo] gem install cocoapods 48 | ``` 49 | 50 | List "AI" in a text file named `Podfile` in your Xcode project directory: 51 | 52 | ```ruby 53 | source 'https://github.com/CocoaPods/Specs.git' 54 | platform :ios, '10.0' 55 | use_frameworks! 56 | 57 | target '' do 58 | pod 'AI', '~> 0.7' 59 | end 60 | ``` 61 | 62 | Now you can install the dependencies in your project: 63 | 64 | ```bash 65 | $ pod install 66 | ``` 67 | 68 | ### Carthage 69 | 70 | [Carthage](https://github.com/Carthage/Carthage) is intended to be the simplest way to add frameworks to your Cocoa application. 71 | 72 | You can use [Homebrew](http://brew.sh) and install the `carthage` tool on your system simply by running `brew update` and `brew install carthage`. 73 | 74 | Create a `Cartfile` with following text: 75 | ``` 76 | github "api-ai/AI" 77 | ``` 78 | 79 | Run `carthage update`. 80 | Drag the built `AI.framework` into your Xcode project. 81 | 82 | ### Init the SDK. 83 | 84 | In the ```AppDelegate.swift```, add AI import: 85 | ```Swift 86 | import AI 87 | ``` 88 | 89 | In the AppDelegate.swift, add 90 | 91 | ```Swift 92 | // Define API.AI configuration here. 93 | AI.configure("YOUR_CLIENT_ACCESS_TOKEN") 94 | ``` 95 | 96 | ### Perform request. 97 | 98 | ```Swift 99 | ... 100 | // Request using text (assumes that speech recognition / ASR 101 | // is done using a third-party library, e.g. AT&T) 102 | AI.sharedService.TextRequest("Hello").success { (response) -> Void in 103 | // Handle success ... 104 | }.failure { (error) -> Void in 105 | // Handle error ... 106 | } 107 | ``` 108 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/Requests/QueryRequest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // QueryRequest.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 13/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public enum Language { 12 | case english 13 | case spanish 14 | case russian 15 | case german 16 | case portuguese 17 | case portuguese_Brazil 18 | case french 19 | case italian 20 | case japanese 21 | case korean 22 | case chinese_Simplified 23 | case chinese_HongKong 24 | case chinese_Taiwan 25 | } 26 | 27 | extension Language { 28 | var stringValue: String { 29 | switch self { 30 | case .english: 31 | return "en" 32 | case .spanish: 33 | return "es" 34 | case .russian: 35 | return "ru" 36 | case .german: 37 | return "de" 38 | case .portuguese: 39 | return "pt" 40 | case .portuguese_Brazil: 41 | return "pt-BR" 42 | case .french: 43 | return "fr" 44 | case .italian: 45 | return "it" 46 | case .japanese: 47 | return "ja" 48 | case .korean: 49 | return "ko" 50 | case .chinese_Simplified: 51 | return "zh-CN" 52 | case .chinese_HongKong: 53 | return "zh-HK" 54 | case .chinese_Taiwan: 55 | return "zh-TW" 56 | } 57 | } 58 | } 59 | 60 | public protocol QueryRequest: Request { 61 | associatedtype ResponseType = QueryResponse 62 | 63 | var queryParameters: QueryParameters { get } 64 | var language: Language { get } 65 | } 66 | 67 | extension QueryRequest where Self: QueryContainer { 68 | func query() -> String { 69 | return "v=20150910" 70 | } 71 | } 72 | 73 | public struct Entry { 74 | public var value: String 75 | public var synonyms: [String] 76 | } 77 | 78 | public struct Entity { 79 | public var id: String? = .none 80 | public var name: String 81 | public var entries: [Entry] 82 | } 83 | 84 | public struct QueryParameters { 85 | public var contexts: [Context] = [] 86 | public var resetContexts: Bool = false 87 | public var sessionId: String? = SessionStorage.defaultSessionIdentifier 88 | public var timeZone: TimeZone? = TimeZone.autoupdatingCurrent 89 | public var entities: [Entity] = [] 90 | 91 | public init() {} 92 | } 93 | 94 | extension QueryParameters { 95 | func jsonObject() -> [String: Any] { 96 | var parameters = [String: Any]() 97 | 98 | parameters["contexts"] = contexts.map({ (context) -> [String: Any] in 99 | return ["name": context.name, "parameters": context.parameters] 100 | }) 101 | 102 | parameters["resetContexts"] = resetContexts 103 | 104 | if let sessionId = sessionId { 105 | parameters["sessionId"] = sessionId 106 | } 107 | 108 | if let timeZone = timeZone { 109 | parameters["timezone"] = timeZone.identifier 110 | } 111 | 112 | parameters["entities"] = entities.map({ (entity) -> [String: Any] in 113 | var entityObject = [String: Any]() 114 | 115 | entityObject["name"] = entity.name 116 | entityObject["entries"] = entity.entries.map({ (entry) -> [String:Any] in 117 | ["value": entry.value, "synonyms": entry.synonyms] 118 | }) 119 | 120 | return entityObject 121 | }) 122 | 123 | return parameters 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /SimpleAI/MessagesViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessagesViewCell.swift 3 | // SimpleAI 4 | // 5 | // Created by Johnny Perdomo on 10/5/18. 6 | // Copyright © 2018 Johnny Perdomo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class MessagesViewCell: UITableViewCell { 12 | 13 | var leftConstraint: NSLayoutConstraint! 14 | var rightConstraint: NSLayoutConstraint! 15 | 16 | var message: MessageModel? { 17 | didSet { 18 | guard let unwrappedMessage = message else { return } 19 | messageTextLbl.text = unwrappedMessage.content 20 | 21 | if unwrappedMessage.id == "user" { 22 | leftConstraint.isActive = false 23 | rightConstraint.isActive = true 24 | bubbleBackgroundView.backgroundColor = #colorLiteral(red: 0.2588235438, green: 0.7568627596, blue: 0.9686274529, alpha: 1) 25 | messageTextLbl.textColor = #colorLiteral(red: 0, green: 0, blue: 0, alpha: 1) 26 | } else { 27 | rightConstraint.isActive = false 28 | leftConstraint.isActive = true 29 | bubbleBackgroundView.backgroundColor = #colorLiteral(red: 0.2549019754, green: 0.2745098174, blue: 0.3019607961, alpha: 1) 30 | messageTextLbl.textColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0) 31 | } 32 | 33 | } 34 | } 35 | 36 | private let messageTextLbl: UILabel = { 37 | let messageTextlbl = UILabel() 38 | messageTextlbl.translatesAutoresizingMaskIntoConstraints = false 39 | messageTextlbl.textColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0) 40 | messageTextlbl.numberOfLines = 10 41 | return messageTextlbl 42 | }() 43 | 44 | private let bubbleBackgroundView: UIView = { 45 | let bubbleBackgroundView = UIView() 46 | bubbleBackgroundView.translatesAutoresizingMaskIntoConstraints = false 47 | bubbleBackgroundView.layer.cornerRadius = 15 48 | bubbleBackgroundView.backgroundColor = #colorLiteral(red: 0.2588235438, green: 0.7568627596, blue: 0.9686274529, alpha: 1) 49 | return bubbleBackgroundView 50 | }() 51 | 52 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 53 | super.init(style: style, reuseIdentifier: reuseIdentifier) 54 | 55 | setUpLayout() 56 | } 57 | 58 | 59 | func setUpLayout() { 60 | addSubview(bubbleBackgroundView) 61 | addSubview(messageTextLbl) 62 | 63 | messageTextLbl.topAnchor.constraint(equalTo: topAnchor, constant: 16).isActive = true 64 | messageTextLbl.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -32).isActive = true 65 | messageTextLbl.widthAnchor.constraint(lessThanOrEqualToConstant: 250).isActive = true 66 | leftConstraint = messageTextLbl.leftAnchor.constraint(equalTo: leftAnchor, constant: 32) 67 | leftConstraint.isActive = false 68 | 69 | rightConstraint = messageTextLbl.rightAnchor.constraint(equalTo: rightAnchor, constant: -32) 70 | rightConstraint.isActive = true 71 | 72 | bubbleBackgroundView.topAnchor.constraint(equalTo: messageTextLbl.topAnchor, constant: -16).isActive = true 73 | bubbleBackgroundView.leadingAnchor.constraint(equalTo: messageTextLbl.leadingAnchor, constant: -16).isActive = true 74 | bubbleBackgroundView.bottomAnchor.constraint(equalTo: messageTextLbl.bottomAnchor, constant: 16).isActive = true 75 | bubbleBackgroundView.trailingAnchor.constraint(equalTo: messageTextLbl.trailingAnchor, constant: 16).isActive = true 76 | 77 | } 78 | 79 | required init?(coder aDecoder: NSCoder) { 80 | fatalError("init coder") 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/Requests/PrivateRequest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PrivateRequest.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 13/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | let kBaseURLString = "https://api.api.ai/v1" 12 | 13 | protocol QueryContainer { 14 | func query() -> String 15 | } 16 | 17 | protocol PrivateRequest: class { 18 | var method: String { get } 19 | var started: Bool { get set } 20 | var dataTask: URLSessionDataTask? { get set } 21 | 22 | var request: URLRequest { get } 23 | 24 | associatedtype ResponseType 25 | var callbacks: CallbacksContainer>? { get set } 26 | 27 | func runRequest() throws -> URLSessionDataTask 28 | 29 | func privateResume(_ completionHandler: @escaping (RequestCompletion) -> Void); 30 | } 31 | 32 | extension PrivateRequest { 33 | func privateResume(_ completionHandler: @escaping (RequestCompletion) -> Void) { 34 | if (!started) { 35 | started = true 36 | 37 | do { 38 | try self.dataTask = self.runRequest() 39 | } catch let error as NSError { 40 | self.callbacks?.resolve(.failure(error)) 41 | } 42 | } 43 | 44 | callbacks?.put(completionHandler) 45 | } 46 | } 47 | 48 | extension PrivateRequest where Self: Request { 49 | var request: URLRequest { 50 | guard let baseURL = URL(string: kBaseURLString) else { 51 | fatalError("Could not get URL from URL string for base URL.") 52 | } 53 | 54 | var request = URLRequest(url: baseURL) 55 | 56 | let components = URLComponents(url: baseURL.appendingPathComponent(self.method), resolvingAgainstBaseURL: false) 57 | if var components = components { 58 | if let queryContainer = self as? QueryContainer { 59 | components.query = queryContainer.query() 60 | } 61 | 62 | request.url = components.url 63 | } 64 | 65 | request.addValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type") 66 | 67 | request.httpMethod = "POST" 68 | 69 | request.authenticate(credentials) 70 | 71 | return request 72 | } 73 | } 74 | 75 | func += (left: inout Dictionary, right: Dictionary) { 76 | for (k, v) in right { 77 | left.updateValue(v, forKey: k) 78 | } 79 | } 80 | 81 | extension PrivateRequest where Self: QueryRequest { 82 | func jsonRequestParameters(_ additionalParameters: [String:AnyObject] = [String:AnyObject]()) throws -> Data { 83 | var parameters = queryParameters.jsonObject() 84 | parameters["lang"] = language.stringValue as AnyObject? 85 | 86 | parameters += additionalParameters 87 | 88 | 89 | let jsonBody = try JSONSerialization.data(withJSONObject: parameters, options: JSONSerialization.WritingOptions(rawValue: 0)) 90 | 91 | return jsonBody 92 | } 93 | } 94 | 95 | extension PrivateRequest where Self: QueryRequest { 96 | func handleQueryResponse(_ data: Data?, _ response: URLResponse?, _ error: Error?) -> RequestCompletion { 97 | let response = handle(data, response, error) 98 | .next(serializeJSON) 99 | .next(validateObject) 100 | .next(serializeObject) 101 | 102 | switch response { 103 | case .success(let object): 104 | return .success(object) 105 | case .failure(let error): 106 | return .failure(error) 107 | } 108 | } 109 | } 110 | 111 | protocol BoundaryContainer { 112 | associatedtype Generator: BoundaryGenerator 113 | var boundary: String { get } 114 | } 115 | 116 | protocol BoundaryGenerator { 117 | static func generate() -> String 118 | } 119 | 120 | class RandomBoundaryGenerator: BoundaryGenerator { 121 | static func generate() -> String { 122 | return String(format: "Boundary+%08X%08X", arc4random(), arc4random()) 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/Requests/TextQueryRequest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TextQueryRequest.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 13/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct TextQueryElement { 12 | public var text: String 13 | public var confidence: Double 14 | } 15 | 16 | public enum TextQueryType { 17 | case one(String) 18 | case array([TextQueryElement]) 19 | } 20 | 21 | public protocol TextQueryRequestType : QueryRequest { 22 | var query: TextQueryType { get } 23 | } 24 | 25 | public class TextQueryRequest: TextQueryRequestType, PrivateRequest, QueryContainer { 26 | internal var started: Bool = false 27 | 28 | //private properties 29 | 30 | weak var callbacks: CallbacksContainer>? = .none 31 | 32 | let method: String = "query" 33 | var dataTask: URLSessionDataTask? = nil 34 | 35 | // public properties 36 | 37 | public typealias ResponseType = QueryResponse 38 | 39 | public let credentials: Credentials 40 | public let session: URLSession 41 | 42 | public var queryParameters: QueryParameters 43 | 44 | public let query: TextQueryType 45 | 46 | public let language: Language 47 | 48 | public init(query: TextQueryType, credentials: Credentials, queryParameters: QueryParameters, session: URLSession, language: Language) { 49 | self.query = query 50 | self.credentials = credentials 51 | self.session = session 52 | self.queryParameters = queryParameters 53 | self.language = language 54 | } 55 | 56 | public convenience init(query: String, credentials: Credentials, queryParameters: QueryParameters, session: URLSession, language: Language) { 57 | self.init(query: .one(query), credentials: credentials, queryParameters: queryParameters, session: session, language: language) 58 | } 59 | 60 | public convenience init(query: [TextQueryElement], credentials: Credentials, queryParameters: QueryParameters, session: URLSession, language: Language) { 61 | self.init(query: .array(query), credentials: credentials, queryParameters: queryParameters, session: session, language: language) 62 | } 63 | 64 | func runRequest() throws -> URLSessionDataTask { 65 | let callbacksContainer = CallbacksContainer>() 66 | 67 | self.callbacks = callbacksContainer 68 | 69 | var request = self.request 70 | 71 | var requestJson: [String:Any] = [:]; 72 | 73 | switch query { 74 | case .one(let text): 75 | requestJson["query"] = text; 76 | case .array(let array): 77 | requestJson["query"] = array.map({ (element) -> String in 78 | return element.text 79 | }) 80 | 81 | requestJson["confidence"] = array.map({ (element) -> Double in 82 | return element.confidence 83 | }) 84 | } 85 | 86 | request.httpBody = try self.jsonRequestParameters(requestJson as [String: AnyObject]) 87 | 88 | let dataTask = self.session.dataTask(with: request) { (data, response, error) in 89 | callbacksContainer.resolve(self.handleQueryResponse(data, response, error)) 90 | } 91 | 92 | dataTask.resume() 93 | 94 | return dataTask 95 | } 96 | 97 | fileprivate func run(_ completionHandler: @escaping (RequestCompletion) -> Void) { 98 | self.privateResume(completionHandler) 99 | } 100 | 101 | @discardableResult 102 | public func resume(completionHandler: @escaping (RequestCompletion) -> Void) -> Self { 103 | // TODO: Replace run-function with the following call. 104 | // (self as TextQueryRequest).privateResume(completionHandler) 105 | self.run(completionHandler) 106 | return self 107 | } 108 | 109 | public func cancel() { 110 | let cancelError = NSError(code: .requestUserCancelled, message: "Request user cancelled.") 111 | 112 | callbacks?.resolve(.failure(cancelError)) 113 | 114 | dataTask?.cancel() 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /SimpleAI/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SimpleAI 4 | // 5 | // Created by Johnny Perdomo on 10/2/18. 6 | // Copyright © 2018 Johnny Perdomo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AI 11 | 12 | class ViewController: UIViewController { 13 | 14 | 15 | let messagesTableView: UITableView = { 16 | let messagesTableView = UITableView() 17 | messagesTableView.register(MessagesViewCell.self, forCellReuseIdentifier: "cellId") 18 | messagesTableView.translatesAutoresizingMaskIntoConstraints = false 19 | messagesTableView.isScrollEnabled = true 20 | 21 | 22 | return messagesTableView 23 | }() 24 | 25 | private let pageTitle: UILabel = { 26 | let pageTitle = UILabel() 27 | pageTitle.translatesAutoresizingMaskIntoConstraints = false 28 | pageTitle.textColor = #colorLiteral(red: 0.06274510175, green: 0, blue: 0.1921568662, alpha: 1) 29 | 30 | let attributedText = NSMutableAttributedString(string: "Smart A.I. Chat", attributes: [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 25)]) 31 | 32 | pageTitle.attributedText = attributedText 33 | return pageTitle 34 | }() 35 | 36 | var messagesArray = [ 37 | MessageModel(content: "Hey What's Up, Ask me Something. I'm Super Smart", id: "agent") 38 | ] 39 | 40 | @IBOutlet weak var sendBtn: UIButton! 41 | @IBOutlet weak var messageField: UITextField! 42 | 43 | @IBAction func sendBtnClicked(_ sender: Any) { 44 | if messageField.text != nil && messageField.text != "" { 45 | queryResponse(query: messageField.text!) 46 | messagesArray.append(MessageModel(content: messageField.text!, id: "user")) 47 | messagesTableView.reloadData() 48 | messageField.text = "" 49 | } 50 | } 51 | 52 | override func viewDidLoad() { 53 | super.viewDidLoad() 54 | 55 | messagesTableView.dataSource = self 56 | messagesTableView.delegate = self 57 | messagesTableView.separatorStyle = .none 58 | messagesTableView.backgroundColor = #colorLiteral(red: 0.937254902, green: 0.937254902, blue: 0.9568627451, alpha: 1) 59 | messagesTableView.rowHeight = UITableView.automaticDimension 60 | messagesTableView.estimatedRowHeight = 200 61 | 62 | view.addSubview(messagesTableView) 63 | view.addSubview(pageTitle) 64 | 65 | messagesTableView.topAnchor.constraint(equalTo: view.topAnchor, constant: 100).isActive = true 66 | messagesTableView.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true 67 | messagesTableView.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true 68 | messagesTableView.bottomAnchor.constraint(equalTo: messageField.topAnchor, constant: -20).isActive = true 69 | 70 | pageTitle.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 30).isActive = true 71 | pageTitle.bottomAnchor.constraint(equalTo: messagesTableView.topAnchor, constant: -18).isActive = true 72 | 73 | } 74 | 75 | func queryResponse(query: String) { 76 | AI.sharedService.textRequest(query).success { (response) in 77 | 78 | if let speech = response.result.fulfillment?.speech { 79 | self.messagesArray.append(MessageModel(content: speech, id: "agent")) 80 | self.messagesTableView.reloadData() 81 | print(response) 82 | 83 | } 84 | }.failure { (error) in 85 | print(error) 86 | } 87 | } 88 | } 89 | 90 | extension ViewController: UITableViewDataSource, UITableViewDelegate { 91 | 92 | 93 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 94 | if indexPath.section == 0 { 95 | return UITableView.automaticDimension 96 | } else { 97 | return 40 98 | } 99 | } 100 | 101 | func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat { 102 | if indexPath.section == 0 { 103 | return UITableView.automaticDimension 104 | } else { 105 | return 40 106 | } 107 | } 108 | 109 | func numberOfSections(in tableView: UITableView) -> Int { 110 | return 1 111 | } 112 | 113 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 114 | return messagesArray.count 115 | } 116 | 117 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 118 | let cell = tableView.dequeueReusableCell(withIdentifier: "cellId", for: indexPath) as! MessagesViewCell 119 | 120 | let message = messagesArray[indexPath.row] 121 | cell.message = message 122 | cell.backgroundColor = .clear 123 | cell.layer.cornerRadius = 10 124 | return cell 125 | } 126 | 127 | 128 | } 129 | -------------------------------------------------------------------------------- /SimpleAI/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/Requests/UserEntitiesRequest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UserEntitiesRequest.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 10/03/16. 6 | // Copyright © 2016 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct UserEntityEntry { 12 | public var value: String 13 | public var synonyms: [String] 14 | 15 | public init(value: String, synonyms: [String]) { 16 | self.value = value 17 | self.synonyms = synonyms 18 | } 19 | } 20 | 21 | extension UserEntityEntry { 22 | func jsonObject() -> [String: AnyObject] { 23 | return [ 24 | "value": value as AnyObject, 25 | "synonyms": synonyms as AnyObject 26 | ] 27 | } 28 | } 29 | 30 | public struct UserEntity { 31 | public var sessionId: String? = SessionStorage.defaultSessionIdentifier 32 | public var name: String 33 | public var entries: [UserEntityEntry] 34 | public var extend: Bool = false 35 | 36 | public init(sessionId: String?, name: String, entries: [UserEntityEntry]) { 37 | self.sessionId = sessionId 38 | self.name = name 39 | self.entries = entries 40 | } 41 | 42 | public init(name: String, entries: [UserEntityEntry]) { 43 | self.name = name 44 | self.entries = entries 45 | } 46 | } 47 | 48 | extension UserEntity { 49 | func jsonObject() -> [String: Any] { 50 | var object: [String: Any] = [ 51 | "name": name as Any, 52 | "entries": entries.map { (entry) -> [String: Any] in 53 | entry.jsonObject() 54 | } 55 | ] 56 | 57 | if let sessionId = sessionId { 58 | object["sessionId"] = sessionId 59 | } 60 | 61 | object["extend"] = extend 62 | 63 | return object 64 | } 65 | } 66 | 67 | public struct UserEntitiesResponse { 68 | let code: Int 69 | let errorType: String? 70 | } 71 | 72 | public extension UserEntitiesResponse { 73 | var isSuccess: Bool { 74 | return code == 200 75 | } 76 | } 77 | 78 | public class UserEntitiesRequest: Request, PrivateRequest { 79 | var started: Bool = false 80 | 81 | weak var callbacks: CallbacksContainer>? = .none 82 | 83 | let method: String = "userEntities" 84 | var dataTask: URLSessionDataTask? = nil 85 | 86 | public typealias ResponseType = UserEntitiesResponse 87 | 88 | public let credentials: Credentials 89 | public let session: URLSession 90 | 91 | fileprivate let entities: [UserEntity] 92 | 93 | init(credentials: Credentials, entities: [UserEntity], session: URLSession) { 94 | self.credentials = credentials 95 | self.session = session 96 | self.entities = entities 97 | } 98 | 99 | fileprivate func serializeRequest() throws -> Data { 100 | let requestBody = self.entities.map { (entity) -> [String: Any] in 101 | entity.jsonObject() 102 | } 103 | 104 | return try JSONSerialization.data(withJSONObject: requestBody, options: JSONSerialization.WritingOptions(rawValue: 0)) 105 | } 106 | 107 | func runRequest() throws -> URLSessionDataTask { 108 | let callbacksContainer = CallbacksContainer>() 109 | 110 | self.callbacks = callbacksContainer 111 | 112 | var request = self.request 113 | 114 | request.httpBody = try self.serializeRequest() 115 | 116 | let dataTask = self.session.dataTask(with: request, completionHandler: { (data, response, error) -> Void in 117 | let response = handle(data, response, error).next(serializeJSON).next(validateObject).next(userEntitiesResponseSerialize) 118 | 119 | switch response { 120 | case .success(let object): 121 | callbacksContainer.resolve(.success(object)) 122 | case .failure(let error): 123 | callbacksContainer.resolve(.failure(error)) 124 | } 125 | }) 126 | 127 | dataTask.resume() 128 | 129 | return dataTask 130 | } 131 | 132 | fileprivate func run(_ completionHandler: @escaping (RequestCompletion) -> Void) { 133 | self.privateResume(completionHandler) 134 | } 135 | 136 | @discardableResult 137 | public func resume(completionHandler: @escaping (RequestCompletion) -> Void) -> Self { 138 | // TODO: Replace run-function with the following call. 139 | // (self as TextQueryRequest).privateResume(completionHandler) 140 | self.run(completionHandler) 141 | return self 142 | } 143 | 144 | public func cancel() { 145 | let cancelError = NSError(code: .requestUserCancelled, message: "Request user cancelled.") 146 | 147 | callbacks?.resolve(.failure(cancelError)) 148 | 149 | dataTask?.cancel() 150 | } 151 | } 152 | 153 | func userEntitiesResponseSerialize(_ object: [String: Any]) -> Completion { 154 | guard let statusObject = object["status"] else { 155 | return .failure(SerializeError.missingKey("status")) 156 | } 157 | 158 | guard let status = statusObject as? [String: AnyObject] else { 159 | return .failure(SerializeError.typeMismatch("status")) 160 | } 161 | 162 | guard let code = status["code"] as? Int else { 163 | return .failure(SerializeError.missingKey("code")) 164 | } 165 | 166 | guard let errorType = status["errorType"] as? String else { 167 | return .failure(SerializeError.missingKey("errorType")) 168 | } 169 | 170 | return .success(UserEntitiesResponse(code: code, errorType: errorType)) 171 | } 172 | -------------------------------------------------------------------------------- /Pods/AI/AI/src/ResponseSerialize.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ResponseMapping.swift 3 | // AI 4 | // 5 | // Created by Kuragin Dmitriy on 10/11/15. 6 | // Copyright © 2015 Kuragin Dmitriy. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | enum SerializeError { 12 | case missingKey(String) 13 | case typeMismatch(String) 14 | } 15 | 16 | extension SerializeError: Error {} 17 | 18 | protocol Serializer { 19 | associatedtype Source = [String: Any] 20 | associatedtype Destination 21 | 22 | func serialize(_ source: Source) throws -> Destination 23 | } 24 | 25 | func objectForKey(_ key: String, dict: [String: Any], ignoreMissingKey: Bool = false) throws -> T { 26 | // TODO: The ignoreMissingKey is never used; remove if it's redundant. 27 | if let object = dict[key] { 28 | if let object = object as? T { 29 | return object 30 | } else { 31 | throw SerializeError.typeMismatch(key) 32 | } 33 | } else { 34 | throw SerializeError.missingKey(key) 35 | } 36 | } 37 | 38 | func objectForKeyOrNull(_ key: String, dict: [String: Any]) -> T? { 39 | if let object = dict[key] { 40 | if let object = object as? T { 41 | return object 42 | } else { 43 | return .none 44 | } 45 | } else { 46 | return .none 47 | } 48 | } 49 | 50 | struct MessageSerializer: Serializer { 51 | typealias Destination = Message 52 | 53 | func serialize(_ source: Dictionary) throws -> Message { 54 | let type: Int = try objectForKey("type", dict: source) 55 | let speech: String = try objectForKey("speech", dict: source) 56 | 57 | return Message(type: type, speech: speech) 58 | } 59 | } 60 | 61 | struct FulfillmentSerializer: Serializer { 62 | typealias Destination = Fulfillment 63 | 64 | func serialize(_ source: FulfillmentSerializer.Source) throws -> FulfillmentSerializer.Destination { 65 | let speech: String = try objectForKey("speech", dict: source) 66 | 67 | let messageSerializer = MessageSerializer() 68 | 69 | let sourceMessages: [[String:Any]] = objectForKeyOrNull("messages", dict: source) ?? [] 70 | 71 | let messages = try sourceMessages.map { (sourceMessage) -> Message in 72 | return try messageSerializer.serialize(sourceMessage) 73 | } 74 | 75 | return Destination(speech: speech, messages: messages) 76 | } 77 | } 78 | 79 | struct MetadataSerializer: Serializer { 80 | typealias Destination = Metadata 81 | 82 | func serialize(_ source: MetadataSerializer.Source) throws -> MetadataSerializer.Destination { 83 | let intentId: String? = objectForKeyOrNull("intentId", dict: source) 84 | let intentName: String? = objectForKeyOrNull("intentName", dict: source) 85 | 86 | return Destination(intentId: intentId, intentName: intentName) 87 | } 88 | } 89 | 90 | struct ContextSerializer: Serializer { 91 | typealias Destination = Context 92 | 93 | func serialize(_ source: ContextSerializer.Source) throws -> ContextSerializer.Destination { 94 | let name: String = try objectForKey("name", dict: source) 95 | let parameters: [String:Any] = try objectForKey("parameters", dict: source) 96 | 97 | return Destination(name: name, parameters: parameters) 98 | } 99 | } 100 | 101 | struct ResultSerializer: Serializer { 102 | typealias Destination = Result 103 | 104 | func serialize(_ source: ResultSerializer.Source) throws -> ResultSerializer.Destination { 105 | let sourceResult: String = try objectForKey("source", dict: source) 106 | let resolvedQuery: String = try objectForKey("resolvedQuery", dict: source) 107 | let action: String? = objectForKeyOrNull("action", dict: source) 108 | 109 | let parameters: [String:Any]? = try? objectForKey("parameters", dict: source) 110 | 111 | let contextsArray: [[String:Any]]? = try? objectForKey("contexts", dict: source) 112 | let contextSerializer = ContextSerializer() 113 | 114 | let contexts = try contextsArray.map { (object) -> [Context] in 115 | try object.map({ (object) -> Context in 116 | try contextSerializer.serialize(object) 117 | }) 118 | } 119 | 120 | let fulfillmentObject: [String:Any]? = try? objectForKey("fulfillment", dict: source) 121 | 122 | let fulfillment = try fulfillmentObject.map({ (obj) -> Fulfillment in 123 | try FulfillmentSerializer().serialize(obj) 124 | }) 125 | 126 | let metadata = try MetadataSerializer().serialize(try objectForKey("metadata", dict: source)) 127 | 128 | return Destination( 129 | source: sourceResult, 130 | resolvedQuery: resolvedQuery, 131 | action: action, 132 | parameters: parameters, 133 | contexts: contexts, 134 | fulfillment: fulfillment, 135 | metadata: metadata 136 | ) 137 | } 138 | } 139 | 140 | struct ResponseSerializer: Serializer { 141 | typealias Destination = QueryResponse 142 | 143 | func serialize(_ source: ResponseSerializer.Source) throws -> ResponseSerializer.Destination { 144 | let identifier: String = try objectForKey("id", dict: source) 145 | 146 | let dateFormatter = DateFormatter() 147 | dateFormatter.locale = Locale(identifier: "en_US") 148 | dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" 149 | 150 | guard let timestamp: Date = dateFormatter.date(from: try objectForKey("timestamp", dict: source)) else { 151 | throw SerializeError.typeMismatch("timestamp") 152 | } 153 | 154 | let result = try ResultSerializer().serialize(try objectForKey("result", dict: source)) 155 | 156 | return Destination( 157 | identifier: identifier, 158 | timestamp: timestamp, 159 | result: result 160 | ) 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | 145 | if [[ "$CONFIGURATION" == "Debug" ]]; then 146 | install_framework "${BUILT_PRODUCTS_DIR}/AI/AI.framework" 147 | fi 148 | if [[ "$CONFIGURATION" == "Release" ]]; then 149 | install_framework "${BUILT_PRODUCTS_DIR}/AI/AI.framework" 150 | fi 151 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 152 | wait 153 | fi 154 | -------------------------------------------------------------------------------- /Pods/AI/LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AI 5 | 6 | Apache License 7 | Version 2.0, January 2004 8 | http://www.apache.org/licenses/ 9 | 10 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 11 | 12 | 1. Definitions. 13 | 14 | "License" shall mean the terms and conditions for use, reproduction, 15 | and distribution as defined by Sections 1 through 9 of this document. 16 | 17 | "Licensor" shall mean the copyright owner or entity authorized by 18 | the copyright owner that is granting the License. 19 | 20 | "Legal Entity" shall mean the union of the acting entity and all 21 | other entities that control, are controlled by, or are under common 22 | control with that entity. For the purposes of this definition, 23 | "control" means (i) the power, direct or indirect, to cause the 24 | direction or management of such entity, whether by contract or 25 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 26 | outstanding shares, or (iii) beneficial ownership of such entity. 27 | 28 | "You" (or "Your") shall mean an individual or Legal Entity 29 | exercising permissions granted by this License. 30 | 31 | "Source" form shall mean the preferred form for making modifications, 32 | including but not limited to software source code, documentation 33 | source, and configuration files. 34 | 35 | "Object" form shall mean any form resulting from mechanical 36 | transformation or translation of a Source form, including but 37 | not limited to compiled object code, generated documentation, 38 | and conversions to other media types. 39 | 40 | "Work" shall mean the work of authorship, whether in Source or 41 | Object form, made available under the License, as indicated by a 42 | copyright notice that is included in or attached to the work 43 | (an example is provided in the Appendix below). 44 | 45 | "Derivative Works" shall mean any work, whether in Source or Object 46 | form, that is based on (or derived from) the Work and for which the 47 | editorial revisions, annotations, elaborations, or other modifications 48 | represent, as a whole, an original work of authorship. For the purposes 49 | of this License, Derivative Works shall not include works that remain 50 | separable from, or merely link (or bind by name) to the interfaces of, 51 | the Work and Derivative Works thereof. 52 | 53 | "Contribution" shall mean any work of authorship, including 54 | the original version of the Work and any modifications or additions 55 | to that Work or Derivative Works thereof, that is intentionally 56 | submitted to Licensor for inclusion in the Work by the copyright owner 57 | or by an individual or Legal Entity authorized to submit on behalf of 58 | the copyright owner. For the purposes of this definition, "submitted" 59 | means any form of electronic, verbal, or written communication sent 60 | to the Licensor or its representatives, including but not limited to 61 | communication on electronic mailing lists, source code control systems, 62 | and issue tracking systems that are managed by, or on behalf of, the 63 | Licensor for the purpose of discussing and improving the Work, but 64 | excluding communication that is conspicuously marked or otherwise 65 | designated in writing by the copyright owner as "Not a Contribution." 66 | 67 | "Contributor" shall mean Licensor and any individual or Legal Entity 68 | on behalf of whom a Contribution has been received by Licensor and 69 | subsequently incorporated within the Work. 70 | 71 | 2. Grant of Copyright License. Subject to the terms and conditions of 72 | this License, each Contributor hereby grants to You a perpetual, 73 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 74 | copyright license to reproduce, prepare Derivative Works of, 75 | publicly display, publicly perform, sublicense, and distribute the 76 | Work and such Derivative Works in Source or Object form. 77 | 78 | 3. Grant of Patent License. Subject to the terms and conditions of 79 | this License, each Contributor hereby grants to You a perpetual, 80 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 81 | (except as stated in this section) patent license to make, have made, 82 | use, offer to sell, sell, import, and otherwise transfer the Work, 83 | where such license applies only to those patent claims licensable 84 | by such Contributor that are necessarily infringed by their 85 | Contribution(s) alone or by combination of their Contribution(s) 86 | with the Work to which such Contribution(s) was submitted. If You 87 | institute patent litigation against any entity (including a 88 | cross-claim or counterclaim in a lawsuit) alleging that the Work 89 | or a Contribution incorporated within the Work constitutes direct 90 | or contributory patent infringement, then any patent licenses 91 | granted to You under this License for that Work shall terminate 92 | as of the date such litigation is filed. 93 | 94 | 4. Redistribution. You may reproduce and distribute copies of the 95 | Work or Derivative Works thereof in any medium, with or without 96 | modifications, and in Source or Object form, provided that You 97 | meet the following conditions: 98 | 99 | (a) You must give any other recipients of the Work or 100 | Derivative Works a copy of this License; and 101 | 102 | (b) You must cause any modified files to carry prominent notices 103 | stating that You changed the files; and 104 | 105 | (c) You must retain, in the Source form of any Derivative Works 106 | that You distribute, all copyright, patent, trademark, and 107 | attribution notices from the Source form of the Work, 108 | excluding those notices that do not pertain to any part of 109 | the Derivative Works; and 110 | 111 | (d) If the Work includes a "NOTICE" text file as part of its 112 | distribution, then any Derivative Works that You distribute must 113 | include a readable copy of the attribution notices contained 114 | within such NOTICE file, excluding those notices that do not 115 | pertain to any part of the Derivative Works, in at least one 116 | of the following places: within a NOTICE text file distributed 117 | as part of the Derivative Works; within the Source form or 118 | documentation, if provided along with the Derivative Works; or, 119 | within a display generated by the Derivative Works, if and 120 | wherever such third-party notices normally appear. The contents 121 | of the NOTICE file are for informational purposes only and 122 | do not modify the License. You may add Your own attribution 123 | notices within Derivative Works that You distribute, alongside 124 | or as an addendum to the NOTICE text from the Work, provided 125 | that such additional attribution notices cannot be construed 126 | as modifying the License. 127 | 128 | You may add Your own copyright statement to Your modifications and 129 | may provide additional or different license terms and conditions 130 | for use, reproduction, or distribution of Your modifications, or 131 | for any such Derivative Works as a whole, provided Your use, 132 | reproduction, and distribution of the Work otherwise complies with 133 | the conditions stated in this License. 134 | 135 | 5. Submission of Contributions. Unless You explicitly state otherwise, 136 | any Contribution intentionally submitted for inclusion in the Work 137 | by You to the Licensor shall be under the terms and conditions of 138 | this License, without any additional terms or conditions. 139 | Notwithstanding the above, nothing herein shall supersede or modify 140 | the terms of any separate license agreement you may have executed 141 | with Licensor regarding such Contributions. 142 | 143 | 6. Trademarks. This License does not grant permission to use the trade 144 | names, trademarks, service marks, or product names of the Licensor, 145 | except as required for reasonable and customary use in describing the 146 | origin of the Work and reproducing the content of the NOTICE file. 147 | 148 | 7. Disclaimer of Warranty. Unless required by applicable law or 149 | agreed to in writing, Licensor provides the Work (and each 150 | Contributor provides its Contributions) on an "AS IS" BASIS, 151 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 152 | implied, including, without limitation, any warranties or conditions 153 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 154 | PARTICULAR PURPOSE. You are solely responsible for determining the 155 | appropriateness of using or redistributing the Work and assume any 156 | risks associated with Your exercise of permissions under this License. 157 | 158 | 8. Limitation of Liability. In no event and under no legal theory, 159 | whether in tort (including negligence), contract, or otherwise, 160 | unless required by applicable law (such as deliberate and grossly 161 | negligent acts) or agreed to in writing, shall any Contributor be 162 | liable to You for damages, including any direct, indirect, special, 163 | incidental, or consequential damages of any character arising as a 164 | result of this License or out of the use or inability to use the 165 | Work (including but not limited to damages for loss of goodwill, 166 | work stoppage, computer failure or malfunction, or any and all 167 | other commercial damages or losses), even if such Contributor 168 | has been advised of the possibility of such damages. 169 | 170 | 9. Accepting Warranty or Additional Liability. While redistributing 171 | the Work or Derivative Works thereof, You may choose to offer, 172 | and charge a fee for, acceptance of support, warranty, indemnity, 173 | or other liability obligations and/or rights consistent with this 174 | License. However, in accepting such obligations, You may act only 175 | on Your own behalf and on Your sole responsibility, not on behalf 176 | of any other Contributor, and only if You agree to indemnify, 177 | defend, and hold each Contributor harmless for any liability 178 | incurred by, or claims asserted against, such Contributor by reason 179 | of your accepting any such warranty or additional liability. 180 | 181 | END OF TERMS AND CONDITIONS 182 | 183 | APPENDIX: How to apply the Apache License to your work. 184 | 185 | To apply the Apache License to your work, attach the following 186 | boilerplate notice, with the fields enclosed by brackets "{}" 187 | replaced with your own identifying information. (Don't include 188 | the brackets!) The text should be enclosed in the appropriate 189 | comment syntax for the file format. We also recommend that a 190 | file or class name and description of purpose be included on the 191 | same "printed page" as the copyright notice for easier 192 | identification within third-party archives. 193 | 194 | Copyright {yyyy} {name of copyright owner} 195 | 196 | Licensed under the Apache License, Version 2.0 (the "License"); 197 | you may not use this file except in compliance with the License. 198 | You may obtain a copy of the License at 199 | 200 | http://www.apache.org/licenses/LICENSE-2.0 201 | 202 | Unless required by applicable law or agreed to in writing, software 203 | distributed under the License is distributed on an "AS IS" BASIS, 204 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 205 | See the License for the specific language governing permissions and 206 | limitations under the License. 207 | 208 | 209 | Generated by CocoaPods - https://cocoapods.org 210 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Apache License 18 | Version 2.0, January 2004 19 | http://www.apache.org/licenses/ 20 | 21 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 22 | 23 | 1. Definitions. 24 | 25 | "License" shall mean the terms and conditions for use, reproduction, 26 | and distribution as defined by Sections 1 through 9 of this document. 27 | 28 | "Licensor" shall mean the copyright owner or entity authorized by 29 | the copyright owner that is granting the License. 30 | 31 | "Legal Entity" shall mean the union of the acting entity and all 32 | other entities that control, are controlled by, or are under common 33 | control with that entity. For the purposes of this definition, 34 | "control" means (i) the power, direct or indirect, to cause the 35 | direction or management of such entity, whether by contract or 36 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 37 | outstanding shares, or (iii) beneficial ownership of such entity. 38 | 39 | "You" (or "Your") shall mean an individual or Legal Entity 40 | exercising permissions granted by this License. 41 | 42 | "Source" form shall mean the preferred form for making modifications, 43 | including but not limited to software source code, documentation 44 | source, and configuration files. 45 | 46 | "Object" form shall mean any form resulting from mechanical 47 | transformation or translation of a Source form, including but 48 | not limited to compiled object code, generated documentation, 49 | and conversions to other media types. 50 | 51 | "Work" shall mean the work of authorship, whether in Source or 52 | Object form, made available under the License, as indicated by a 53 | copyright notice that is included in or attached to the work 54 | (an example is provided in the Appendix below). 55 | 56 | "Derivative Works" shall mean any work, whether in Source or Object 57 | form, that is based on (or derived from) the Work and for which the 58 | editorial revisions, annotations, elaborations, or other modifications 59 | represent, as a whole, an original work of authorship. For the purposes 60 | of this License, Derivative Works shall not include works that remain 61 | separable from, or merely link (or bind by name) to the interfaces of, 62 | the Work and Derivative Works thereof. 63 | 64 | "Contribution" shall mean any work of authorship, including 65 | the original version of the Work and any modifications or additions 66 | to that Work or Derivative Works thereof, that is intentionally 67 | submitted to Licensor for inclusion in the Work by the copyright owner 68 | or by an individual or Legal Entity authorized to submit on behalf of 69 | the copyright owner. For the purposes of this definition, "submitted" 70 | means any form of electronic, verbal, or written communication sent 71 | to the Licensor or its representatives, including but not limited to 72 | communication on electronic mailing lists, source code control systems, 73 | and issue tracking systems that are managed by, or on behalf of, the 74 | Licensor for the purpose of discussing and improving the Work, but 75 | excluding communication that is conspicuously marked or otherwise 76 | designated in writing by the copyright owner as "Not a Contribution." 77 | 78 | "Contributor" shall mean Licensor and any individual or Legal Entity 79 | on behalf of whom a Contribution has been received by Licensor and 80 | subsequently incorporated within the Work. 81 | 82 | 2. Grant of Copyright License. Subject to the terms and conditions of 83 | this License, each Contributor hereby grants to You a perpetual, 84 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 85 | copyright license to reproduce, prepare Derivative Works of, 86 | publicly display, publicly perform, sublicense, and distribute the 87 | Work and such Derivative Works in Source or Object form. 88 | 89 | 3. Grant of Patent License. Subject to the terms and conditions of 90 | this License, each Contributor hereby grants to You a perpetual, 91 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 92 | (except as stated in this section) patent license to make, have made, 93 | use, offer to sell, sell, import, and otherwise transfer the Work, 94 | where such license applies only to those patent claims licensable 95 | by such Contributor that are necessarily infringed by their 96 | Contribution(s) alone or by combination of their Contribution(s) 97 | with the Work to which such Contribution(s) was submitted. If You 98 | institute patent litigation against any entity (including a 99 | cross-claim or counterclaim in a lawsuit) alleging that the Work 100 | or a Contribution incorporated within the Work constitutes direct 101 | or contributory patent infringement, then any patent licenses 102 | granted to You under this License for that Work shall terminate 103 | as of the date such litigation is filed. 104 | 105 | 4. Redistribution. You may reproduce and distribute copies of the 106 | Work or Derivative Works thereof in any medium, with or without 107 | modifications, and in Source or Object form, provided that You 108 | meet the following conditions: 109 | 110 | (a) You must give any other recipients of the Work or 111 | Derivative Works a copy of this License; and 112 | 113 | (b) You must cause any modified files to carry prominent notices 114 | stating that You changed the files; and 115 | 116 | (c) You must retain, in the Source form of any Derivative Works 117 | that You distribute, all copyright, patent, trademark, and 118 | attribution notices from the Source form of the Work, 119 | excluding those notices that do not pertain to any part of 120 | the Derivative Works; and 121 | 122 | (d) If the Work includes a "NOTICE" text file as part of its 123 | distribution, then any Derivative Works that You distribute must 124 | include a readable copy of the attribution notices contained 125 | within such NOTICE file, excluding those notices that do not 126 | pertain to any part of the Derivative Works, in at least one 127 | of the following places: within a NOTICE text file distributed 128 | as part of the Derivative Works; within the Source form or 129 | documentation, if provided along with the Derivative Works; or, 130 | within a display generated by the Derivative Works, if and 131 | wherever such third-party notices normally appear. The contents 132 | of the NOTICE file are for informational purposes only and 133 | do not modify the License. You may add Your own attribution 134 | notices within Derivative Works that You distribute, alongside 135 | or as an addendum to the NOTICE text from the Work, provided 136 | that such additional attribution notices cannot be construed 137 | as modifying the License. 138 | 139 | You may add Your own copyright statement to Your modifications and 140 | may provide additional or different license terms and conditions 141 | for use, reproduction, or distribution of Your modifications, or 142 | for any such Derivative Works as a whole, provided Your use, 143 | reproduction, and distribution of the Work otherwise complies with 144 | the conditions stated in this License. 145 | 146 | 5. Submission of Contributions. Unless You explicitly state otherwise, 147 | any Contribution intentionally submitted for inclusion in the Work 148 | by You to the Licensor shall be under the terms and conditions of 149 | this License, without any additional terms or conditions. 150 | Notwithstanding the above, nothing herein shall supersede or modify 151 | the terms of any separate license agreement you may have executed 152 | with Licensor regarding such Contributions. 153 | 154 | 6. Trademarks. This License does not grant permission to use the trade 155 | names, trademarks, service marks, or product names of the Licensor, 156 | except as required for reasonable and customary use in describing the 157 | origin of the Work and reproducing the content of the NOTICE file. 158 | 159 | 7. Disclaimer of Warranty. Unless required by applicable law or 160 | agreed to in writing, Licensor provides the Work (and each 161 | Contributor provides its Contributions) on an "AS IS" BASIS, 162 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 163 | implied, including, without limitation, any warranties or conditions 164 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 165 | PARTICULAR PURPOSE. You are solely responsible for determining the 166 | appropriateness of using or redistributing the Work and assume any 167 | risks associated with Your exercise of permissions under this License. 168 | 169 | 8. Limitation of Liability. In no event and under no legal theory, 170 | whether in tort (including negligence), contract, or otherwise, 171 | unless required by applicable law (such as deliberate and grossly 172 | negligent acts) or agreed to in writing, shall any Contributor be 173 | liable to You for damages, including any direct, indirect, special, 174 | incidental, or consequential damages of any character arising as a 175 | result of this License or out of the use or inability to use the 176 | Work (including but not limited to damages for loss of goodwill, 177 | work stoppage, computer failure or malfunction, or any and all 178 | other commercial damages or losses), even if such Contributor 179 | has been advised of the possibility of such damages. 180 | 181 | 9. Accepting Warranty or Additional Liability. While redistributing 182 | the Work or Derivative Works thereof, You may choose to offer, 183 | and charge a fee for, acceptance of support, warranty, indemnity, 184 | or other liability obligations and/or rights consistent with this 185 | License. However, in accepting such obligations, You may act only 186 | on Your own behalf and on Your sole responsibility, not on behalf 187 | of any other Contributor, and only if You agree to indemnify, 188 | defend, and hold each Contributor harmless for any liability 189 | incurred by, or claims asserted against, such Contributor by reason 190 | of your accepting any such warranty or additional liability. 191 | 192 | END OF TERMS AND CONDITIONS 193 | 194 | APPENDIX: How to apply the Apache License to your work. 195 | 196 | To apply the Apache License to your work, attach the following 197 | boilerplate notice, with the fields enclosed by brackets "{}" 198 | replaced with your own identifying information. (Don't include 199 | the brackets!) The text should be enclosed in the appropriate 200 | comment syntax for the file format. We also recommend that a 201 | file or class name and description of purpose be included on the 202 | same "printed page" as the copyright notice for easier 203 | identification within third-party archives. 204 | 205 | Copyright {yyyy} {name of copyright owner} 206 | 207 | Licensed under the Apache License, Version 2.0 (the "License"); 208 | you may not use this file except in compliance with the License. 209 | You may obtain a copy of the License at 210 | 211 | http://www.apache.org/licenses/LICENSE-2.0 212 | 213 | Unless required by applicable law or agreed to in writing, software 214 | distributed under the License is distributed on an "AS IS" BASIS, 215 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 216 | See the License for the specific language governing permissions and 217 | limitations under the License. 218 | 219 | 220 | License 221 | MIT 222 | Title 223 | AI 224 | Type 225 | PSGroupSpecifier 226 | 227 | 228 | FooterText 229 | Generated by CocoaPods - https://cocoapods.org 230 | Title 231 | 232 | Type 233 | PSGroupSpecifier 234 | 235 | 236 | StringsTable 237 | Acknowledgements 238 | Title 239 | Acknowledgements 240 | 241 | 242 | -------------------------------------------------------------------------------- /SimpleAI.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B9202048A497186FF22280A6 /* Pods_SimpleAI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 155E5B17EA2FFD77060A6CB0 /* Pods_SimpleAI.framework */; }; 11 | FE7DFDC3216415B900E8A2FB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE7DFDC2216415B900E8A2FB /* AppDelegate.swift */; }; 12 | FE7DFDC5216415B900E8A2FB /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE7DFDC4216415B900E8A2FB /* ViewController.swift */; }; 13 | FE7DFDC8216415B900E8A2FB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FE7DFDC6216415B900E8A2FB /* Main.storyboard */; }; 14 | FE7DFDCA216415BA00E8A2FB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FE7DFDC9216415BA00E8A2FB /* Assets.xcassets */; }; 15 | FE7DFDCD216415BA00E8A2FB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FE7DFDCB216415BA00E8A2FB /* LaunchScreen.storyboard */; }; 16 | FEEE4B9B2167D0DD0060ED5A /* MessagesViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEEE4B9A2167D0DD0060ED5A /* MessagesViewCell.swift */; }; 17 | FEEE4B9D2167D36C0060ED5A /* MessageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEEE4B9C2167D36C0060ED5A /* MessageModel.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | 155E5B17EA2FFD77060A6CB0 /* Pods_SimpleAI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SimpleAI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 39AC4B8E739068557D26C8D2 /* Pods-SimpleAI.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleAI.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI.debug.xcconfig"; sourceTree = ""; }; 23 | B87F10B2A99E8D4870254329 /* Pods-SimpleAI.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleAI.release.xcconfig"; path = "Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI.release.xcconfig"; sourceTree = ""; }; 24 | FE7DFDBF216415B900E8A2FB /* SimpleAI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleAI.app; sourceTree = BUILT_PRODUCTS_DIR; }; 25 | FE7DFDC2216415B900E8A2FB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 26 | FE7DFDC4216415B900E8A2FB /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 27 | FE7DFDC7216415B900E8A2FB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 28 | FE7DFDC9216415BA00E8A2FB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 29 | FE7DFDCC216415BA00E8A2FB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 30 | FE7DFDCE216415BA00E8A2FB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 31 | FEEE4B9A2167D0DD0060ED5A /* MessagesViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagesViewCell.swift; sourceTree = ""; }; 32 | FEEE4B9C2167D36C0060ED5A /* MessageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageModel.swift; sourceTree = ""; }; 33 | /* End PBXFileReference section */ 34 | 35 | /* Begin PBXFrameworksBuildPhase section */ 36 | FE7DFDBC216415B900E8A2FB /* Frameworks */ = { 37 | isa = PBXFrameworksBuildPhase; 38 | buildActionMask = 2147483647; 39 | files = ( 40 | B9202048A497186FF22280A6 /* Pods_SimpleAI.framework in Frameworks */, 41 | ); 42 | runOnlyForDeploymentPostprocessing = 0; 43 | }; 44 | /* End PBXFrameworksBuildPhase section */ 45 | 46 | /* Begin PBXGroup section */ 47 | 797E361596075B47F65C4BCE /* Pods */ = { 48 | isa = PBXGroup; 49 | children = ( 50 | 39AC4B8E739068557D26C8D2 /* Pods-SimpleAI.debug.xcconfig */, 51 | B87F10B2A99E8D4870254329 /* Pods-SimpleAI.release.xcconfig */, 52 | ); 53 | name = Pods; 54 | sourceTree = ""; 55 | }; 56 | C3161D9CCF3B442412055F66 /* Frameworks */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | 155E5B17EA2FFD77060A6CB0 /* Pods_SimpleAI.framework */, 60 | ); 61 | name = Frameworks; 62 | sourceTree = ""; 63 | }; 64 | FE7DFDB6216415B900E8A2FB = { 65 | isa = PBXGroup; 66 | children = ( 67 | FE7DFDC1216415B900E8A2FB /* SimpleAI */, 68 | FE7DFDC0216415B900E8A2FB /* Products */, 69 | 797E361596075B47F65C4BCE /* Pods */, 70 | C3161D9CCF3B442412055F66 /* Frameworks */, 71 | ); 72 | sourceTree = ""; 73 | }; 74 | FE7DFDC0216415B900E8A2FB /* Products */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | FE7DFDBF216415B900E8A2FB /* SimpleAI.app */, 78 | ); 79 | name = Products; 80 | sourceTree = ""; 81 | }; 82 | FE7DFDC1216415B900E8A2FB /* SimpleAI */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | FE7DFDC2216415B900E8A2FB /* AppDelegate.swift */, 86 | FE7DFDC4216415B900E8A2FB /* ViewController.swift */, 87 | FEEE4B9A2167D0DD0060ED5A /* MessagesViewCell.swift */, 88 | FE7DFDC6216415B900E8A2FB /* Main.storyboard */, 89 | FE7DFDC9216415BA00E8A2FB /* Assets.xcassets */, 90 | FE7DFDCB216415BA00E8A2FB /* LaunchScreen.storyboard */, 91 | FE7DFDCE216415BA00E8A2FB /* Info.plist */, 92 | FEEE4B9C2167D36C0060ED5A /* MessageModel.swift */, 93 | ); 94 | path = SimpleAI; 95 | sourceTree = ""; 96 | }; 97 | /* End PBXGroup section */ 98 | 99 | /* Begin PBXNativeTarget section */ 100 | FE7DFDBE216415B900E8A2FB /* SimpleAI */ = { 101 | isa = PBXNativeTarget; 102 | buildConfigurationList = FE7DFDD1216415BA00E8A2FB /* Build configuration list for PBXNativeTarget "SimpleAI" */; 103 | buildPhases = ( 104 | 4F7A318C0CBBD62975F0EC96 /* [CP] Check Pods Manifest.lock */, 105 | FE7DFDBB216415B900E8A2FB /* Sources */, 106 | FE7DFDBC216415B900E8A2FB /* Frameworks */, 107 | FE7DFDBD216415B900E8A2FB /* Resources */, 108 | 11C374F001C8CBE1B23AC7C6 /* [CP] Embed Pods Frameworks */, 109 | ); 110 | buildRules = ( 111 | ); 112 | dependencies = ( 113 | ); 114 | name = SimpleAI; 115 | productName = SimpleAI; 116 | productReference = FE7DFDBF216415B900E8A2FB /* SimpleAI.app */; 117 | productType = "com.apple.product-type.application"; 118 | }; 119 | /* End PBXNativeTarget section */ 120 | 121 | /* Begin PBXProject section */ 122 | FE7DFDB7216415B900E8A2FB /* Project object */ = { 123 | isa = PBXProject; 124 | attributes = { 125 | LastSwiftUpdateCheck = 1000; 126 | LastUpgradeCheck = 1000; 127 | ORGANIZATIONNAME = "Johnny Perdomo"; 128 | TargetAttributes = { 129 | FE7DFDBE216415B900E8A2FB = { 130 | CreatedOnToolsVersion = 10.0; 131 | }; 132 | }; 133 | }; 134 | buildConfigurationList = FE7DFDBA216415B900E8A2FB /* Build configuration list for PBXProject "SimpleAI" */; 135 | compatibilityVersion = "Xcode 9.3"; 136 | developmentRegion = en; 137 | hasScannedForEncodings = 0; 138 | knownRegions = ( 139 | en, 140 | Base, 141 | ); 142 | mainGroup = FE7DFDB6216415B900E8A2FB; 143 | productRefGroup = FE7DFDC0216415B900E8A2FB /* Products */; 144 | projectDirPath = ""; 145 | projectRoot = ""; 146 | targets = ( 147 | FE7DFDBE216415B900E8A2FB /* SimpleAI */, 148 | ); 149 | }; 150 | /* End PBXProject section */ 151 | 152 | /* Begin PBXResourcesBuildPhase section */ 153 | FE7DFDBD216415B900E8A2FB /* Resources */ = { 154 | isa = PBXResourcesBuildPhase; 155 | buildActionMask = 2147483647; 156 | files = ( 157 | FE7DFDCD216415BA00E8A2FB /* LaunchScreen.storyboard in Resources */, 158 | FE7DFDCA216415BA00E8A2FB /* Assets.xcassets in Resources */, 159 | FE7DFDC8216415B900E8A2FB /* Main.storyboard in Resources */, 160 | ); 161 | runOnlyForDeploymentPostprocessing = 0; 162 | }; 163 | /* End PBXResourcesBuildPhase section */ 164 | 165 | /* Begin PBXShellScriptBuildPhase section */ 166 | 11C374F001C8CBE1B23AC7C6 /* [CP] Embed Pods Frameworks */ = { 167 | isa = PBXShellScriptBuildPhase; 168 | buildActionMask = 2147483647; 169 | files = ( 170 | ); 171 | inputPaths = ( 172 | "${SRCROOT}/Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI-frameworks.sh", 173 | "${BUILT_PRODUCTS_DIR}/AI/AI.framework", 174 | ); 175 | name = "[CP] Embed Pods Frameworks"; 176 | outputPaths = ( 177 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AI.framework", 178 | ); 179 | runOnlyForDeploymentPostprocessing = 0; 180 | shellPath = /bin/sh; 181 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SimpleAI/Pods-SimpleAI-frameworks.sh\"\n"; 182 | showEnvVarsInLog = 0; 183 | }; 184 | 4F7A318C0CBBD62975F0EC96 /* [CP] Check Pods Manifest.lock */ = { 185 | isa = PBXShellScriptBuildPhase; 186 | buildActionMask = 2147483647; 187 | files = ( 188 | ); 189 | inputPaths = ( 190 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 191 | "${PODS_ROOT}/Manifest.lock", 192 | ); 193 | name = "[CP] Check Pods Manifest.lock"; 194 | outputPaths = ( 195 | "$(DERIVED_FILE_DIR)/Pods-SimpleAI-checkManifestLockResult.txt", 196 | ); 197 | runOnlyForDeploymentPostprocessing = 0; 198 | shellPath = /bin/sh; 199 | 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"; 200 | showEnvVarsInLog = 0; 201 | }; 202 | /* End PBXShellScriptBuildPhase section */ 203 | 204 | /* Begin PBXSourcesBuildPhase section */ 205 | FE7DFDBB216415B900E8A2FB /* Sources */ = { 206 | isa = PBXSourcesBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | FE7DFDC5216415B900E8A2FB /* ViewController.swift in Sources */, 210 | FEEE4B9B2167D0DD0060ED5A /* MessagesViewCell.swift in Sources */, 211 | FE7DFDC3216415B900E8A2FB /* AppDelegate.swift in Sources */, 212 | FEEE4B9D2167D36C0060ED5A /* MessageModel.swift in Sources */, 213 | ); 214 | runOnlyForDeploymentPostprocessing = 0; 215 | }; 216 | /* End PBXSourcesBuildPhase section */ 217 | 218 | /* Begin PBXVariantGroup section */ 219 | FE7DFDC6216415B900E8A2FB /* Main.storyboard */ = { 220 | isa = PBXVariantGroup; 221 | children = ( 222 | FE7DFDC7216415B900E8A2FB /* Base */, 223 | ); 224 | name = Main.storyboard; 225 | sourceTree = ""; 226 | }; 227 | FE7DFDCB216415BA00E8A2FB /* LaunchScreen.storyboard */ = { 228 | isa = PBXVariantGroup; 229 | children = ( 230 | FE7DFDCC216415BA00E8A2FB /* Base */, 231 | ); 232 | name = LaunchScreen.storyboard; 233 | sourceTree = ""; 234 | }; 235 | /* End PBXVariantGroup section */ 236 | 237 | /* Begin XCBuildConfiguration section */ 238 | FE7DFDCF216415BA00E8A2FB /* Debug */ = { 239 | isa = XCBuildConfiguration; 240 | buildSettings = { 241 | ALWAYS_SEARCH_USER_PATHS = NO; 242 | CLANG_ANALYZER_NONNULL = YES; 243 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 244 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 245 | CLANG_CXX_LIBRARY = "libc++"; 246 | CLANG_ENABLE_MODULES = YES; 247 | CLANG_ENABLE_OBJC_ARC = YES; 248 | CLANG_ENABLE_OBJC_WEAK = YES; 249 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 250 | CLANG_WARN_BOOL_CONVERSION = YES; 251 | CLANG_WARN_COMMA = YES; 252 | CLANG_WARN_CONSTANT_CONVERSION = YES; 253 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 254 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 255 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 256 | CLANG_WARN_EMPTY_BODY = YES; 257 | CLANG_WARN_ENUM_CONVERSION = YES; 258 | CLANG_WARN_INFINITE_RECURSION = YES; 259 | CLANG_WARN_INT_CONVERSION = YES; 260 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 261 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 262 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 263 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 264 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 265 | CLANG_WARN_STRICT_PROTOTYPES = YES; 266 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 267 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 268 | CLANG_WARN_UNREACHABLE_CODE = YES; 269 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 270 | CODE_SIGN_IDENTITY = "iPhone Developer"; 271 | COPY_PHASE_STRIP = NO; 272 | DEBUG_INFORMATION_FORMAT = dwarf; 273 | ENABLE_STRICT_OBJC_MSGSEND = YES; 274 | ENABLE_TESTABILITY = YES; 275 | GCC_C_LANGUAGE_STANDARD = gnu11; 276 | GCC_DYNAMIC_NO_PIC = NO; 277 | GCC_NO_COMMON_BLOCKS = YES; 278 | GCC_OPTIMIZATION_LEVEL = 0; 279 | GCC_PREPROCESSOR_DEFINITIONS = ( 280 | "DEBUG=1", 281 | "$(inherited)", 282 | ); 283 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 284 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 285 | GCC_WARN_UNDECLARED_SELECTOR = YES; 286 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 287 | GCC_WARN_UNUSED_FUNCTION = YES; 288 | GCC_WARN_UNUSED_VARIABLE = YES; 289 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 290 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 291 | MTL_FAST_MATH = YES; 292 | ONLY_ACTIVE_ARCH = YES; 293 | SDKROOT = iphoneos; 294 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 295 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 296 | }; 297 | name = Debug; 298 | }; 299 | FE7DFDD0216415BA00E8A2FB /* Release */ = { 300 | isa = XCBuildConfiguration; 301 | buildSettings = { 302 | ALWAYS_SEARCH_USER_PATHS = NO; 303 | CLANG_ANALYZER_NONNULL = YES; 304 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 305 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 306 | CLANG_CXX_LIBRARY = "libc++"; 307 | CLANG_ENABLE_MODULES = YES; 308 | CLANG_ENABLE_OBJC_ARC = YES; 309 | CLANG_ENABLE_OBJC_WEAK = YES; 310 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 311 | CLANG_WARN_BOOL_CONVERSION = YES; 312 | CLANG_WARN_COMMA = YES; 313 | CLANG_WARN_CONSTANT_CONVERSION = YES; 314 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 315 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 316 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 329 | CLANG_WARN_UNREACHABLE_CODE = YES; 330 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 331 | CODE_SIGN_IDENTITY = "iPhone Developer"; 332 | COPY_PHASE_STRIP = NO; 333 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 334 | ENABLE_NS_ASSERTIONS = NO; 335 | ENABLE_STRICT_OBJC_MSGSEND = YES; 336 | GCC_C_LANGUAGE_STANDARD = gnu11; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 339 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 340 | GCC_WARN_UNDECLARED_SELECTOR = YES; 341 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 342 | GCC_WARN_UNUSED_FUNCTION = YES; 343 | GCC_WARN_UNUSED_VARIABLE = YES; 344 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 345 | MTL_ENABLE_DEBUG_INFO = NO; 346 | MTL_FAST_MATH = YES; 347 | SDKROOT = iphoneos; 348 | SWIFT_COMPILATION_MODE = wholemodule; 349 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 350 | VALIDATE_PRODUCT = YES; 351 | }; 352 | name = Release; 353 | }; 354 | FE7DFDD2216415BA00E8A2FB /* Debug */ = { 355 | isa = XCBuildConfiguration; 356 | baseConfigurationReference = 39AC4B8E739068557D26C8D2 /* Pods-SimpleAI.debug.xcconfig */; 357 | buildSettings = { 358 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 359 | CODE_SIGN_STYLE = Automatic; 360 | DEVELOPMENT_TEAM = JX3EAWJE5N; 361 | INFOPLIST_FILE = SimpleAI/Info.plist; 362 | LD_RUNPATH_SEARCH_PATHS = ( 363 | "$(inherited)", 364 | "@executable_path/Frameworks", 365 | ); 366 | PRODUCT_BUNDLE_IDENTIFIER = com.johnnyperdomo.SimpleAI; 367 | PRODUCT_NAME = "$(TARGET_NAME)"; 368 | SWIFT_VERSION = 4.2; 369 | TARGETED_DEVICE_FAMILY = "1,2"; 370 | }; 371 | name = Debug; 372 | }; 373 | FE7DFDD3216415BA00E8A2FB /* Release */ = { 374 | isa = XCBuildConfiguration; 375 | baseConfigurationReference = B87F10B2A99E8D4870254329 /* Pods-SimpleAI.release.xcconfig */; 376 | buildSettings = { 377 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 378 | CODE_SIGN_STYLE = Automatic; 379 | DEVELOPMENT_TEAM = JX3EAWJE5N; 380 | INFOPLIST_FILE = SimpleAI/Info.plist; 381 | LD_RUNPATH_SEARCH_PATHS = ( 382 | "$(inherited)", 383 | "@executable_path/Frameworks", 384 | ); 385 | PRODUCT_BUNDLE_IDENTIFIER = com.johnnyperdomo.SimpleAI; 386 | PRODUCT_NAME = "$(TARGET_NAME)"; 387 | SWIFT_VERSION = 4.2; 388 | TARGETED_DEVICE_FAMILY = "1,2"; 389 | }; 390 | name = Release; 391 | }; 392 | /* End XCBuildConfiguration section */ 393 | 394 | /* Begin XCConfigurationList section */ 395 | FE7DFDBA216415B900E8A2FB /* Build configuration list for PBXProject "SimpleAI" */ = { 396 | isa = XCConfigurationList; 397 | buildConfigurations = ( 398 | FE7DFDCF216415BA00E8A2FB /* Debug */, 399 | FE7DFDD0216415BA00E8A2FB /* Release */, 400 | ); 401 | defaultConfigurationIsVisible = 0; 402 | defaultConfigurationName = Release; 403 | }; 404 | FE7DFDD1216415BA00E8A2FB /* Build configuration list for PBXNativeTarget "SimpleAI" */ = { 405 | isa = XCConfigurationList; 406 | buildConfigurations = ( 407 | FE7DFDD2216415BA00E8A2FB /* Debug */, 408 | FE7DFDD3216415BA00E8A2FB /* Release */, 409 | ); 410 | defaultConfigurationIsVisible = 0; 411 | defaultConfigurationName = Release; 412 | }; 413 | /* End XCConfigurationList section */ 414 | }; 415 | rootObject = FE7DFDB7216415B900E8A2FB /* Project object */; 416 | } 417 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0223332967FCEDE0A0782131C8950111 /* RequestUtilites.swift in Sources */ = {isa = PBXBuildFile; fileRef = 676EB16AA603A833490626C01B92E559 /* RequestUtilites.swift */; }; 11 | 060BD7B5223CA8871290F040CEEBD8D6 /* QueryResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D7CB76878913287A29944BA8530F4D4 /* QueryResponse.swift */; }; 12 | 177576C7B0A6CDFBED7E7B7DE837DBE5 /* QueryRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29BB8EC7F102E667F2A7B91AF2F49E81 /* QueryRequest.swift */; }; 13 | 276DBEAD6C839514EA204461B70F69A2 /* Pods-SimpleAI-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F3B8AAD8309C2FBD1635B9FCBABF3E84 /* Pods-SimpleAI-dummy.m */; }; 14 | 2F58A54C13F6E93011F5C3C2FDC1A747 /* ResponseSerialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2074ABA561E448730C7619087A04995 /* ResponseSerialize.swift */; }; 15 | 3773861E02CB344AF6E2859CC6ECC2AD /* NSError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62BAA1F12470AA918ABA7530C6CD792F /* NSError.swift */; }; 16 | 4EEED2315B427019B578AEEDD9FF608B /* Service.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC941A5259C71C02B9714D88737D8593 /* Service.swift */; }; 17 | 7714E4B71FDF132B34C4C41475D8EF21 /* AI-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 33E16A65DFD48361DF57218F11AB12C6 /* AI-dummy.m */; }; 18 | 7EDC593B14D376DA480505ECB7197B19 /* TextQueryRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA56CB7F4E99C3F296B3D91E8F2F0AB3 /* TextQueryRequest.swift */; }; 19 | 8AF5FFEFA6B5ACFC3F1F93075CFF4456 /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11592CED473E8F8546494319E8864B2E /* JSON.swift */; }; 20 | 9460492878C8FD8ABDB8CE0E44FB4A7F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 21 | AABA633E98C048887C3F40DBF800C94E /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD2C902E3D3099F5E86EDE53E876B3FC /* Request.swift */; }; 22 | AD077089140895DBA4C3F864F84F9EF7 /* UserEntitiesRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = E695C12E1D1BC2CDAF665D481435B390 /* UserEntitiesRequest.swift */; }; 23 | ADE12C08EE67ECD1BBB395BCA0083655 /* Pods-SimpleAI-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F57C20127DDC64EA0D35A75545EB8FD /* Pods-SimpleAI-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 24 | C4C6EFA2FED337008D256536DAD7508E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 25 | CD8D35FE82052484168C93922409182F /* AI-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 067E39CC0A09D022144B9A57CE49C395 /* AI-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 26 | D1A15A98A9F7FDEB7523F7238330F7F1 /* PrivateRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B5419C584433C5EE5B5F4CD7CCFBBA /* PrivateRequest.swift */; }; 27 | D49A6650053148F96B6C3180BA3EA293 /* Completion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E8D970902E7C28694AAA71F8A19FC06 /* Completion.swift */; }; 28 | E5800B20D6A354B34922201B14875F30 /* CallbacksContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A0012581CA635CE8017997A1E617AB0 /* CallbacksContainer.swift */; }; 29 | E75DE4E11B693B441F13E90B2C50B9B3 /* SessionStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB1A5C24C0749B74B4910F77FBD5D893 /* SessionStorage.swift */; }; 30 | EFBD974E313FC4D1260C4E43DA331597 /* AI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30C336FDDBC5E0F1B66FC416EFB921F6 /* AI.swift */; }; 31 | F8E4D6257EC955C15C95FDBE4EA96B86 /* Credentials.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B05A59B57BD509D28E8F088B69AC1D1 /* Credentials.swift */; }; 32 | /* End PBXBuildFile section */ 33 | 34 | /* Begin PBXContainerItemProxy section */ 35 | 7C4F5769E91E5D6A7A9E94D17FA51A72 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = 78DD8D1F1498C2CF966A3E5CF392733E; 40 | remoteInfo = AI; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 067E39CC0A09D022144B9A57CE49C395 /* AI-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AI-umbrella.h"; sourceTree = ""; }; 46 | 11592CED473E8F8546494319E8864B2E /* JSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSON.swift; path = AI/src/JSON.swift; sourceTree = ""; }; 47 | 13685A66D619F25461D01D7C2A946BB8 /* AI.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AI.xcconfig; sourceTree = ""; }; 48 | 1F57C20127DDC64EA0D35A75545EB8FD /* Pods-SimpleAI-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SimpleAI-umbrella.h"; sourceTree = ""; }; 49 | 29BB8EC7F102E667F2A7B91AF2F49E81 /* QueryRequest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QueryRequest.swift; path = AI/src/Requests/QueryRequest.swift; sourceTree = ""; }; 50 | 2E8D970902E7C28694AAA71F8A19FC06 /* Completion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Completion.swift; path = AI/src/Completion.swift; sourceTree = ""; }; 51 | 30C336FDDBC5E0F1B66FC416EFB921F6 /* AI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AI.swift; path = AI/src/AI.swift; sourceTree = ""; }; 52 | 33E16A65DFD48361DF57218F11AB12C6 /* AI-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "AI-dummy.m"; sourceTree = ""; }; 53 | 3778BBEBFD5222ED2F4231B74499B426 /* AI.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = AI.modulemap; sourceTree = ""; }; 54 | 47B5419C584433C5EE5B5F4CD7CCFBBA /* PrivateRequest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrivateRequest.swift; path = AI/src/Requests/PrivateRequest.swift; sourceTree = ""; }; 55 | 4AF541CA840F52703E2284B44088995B /* AI-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AI-prefix.pch"; sourceTree = ""; }; 56 | 62BAA1F12470AA918ABA7530C6CD792F /* NSError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NSError.swift; path = AI/src/NSError.swift; sourceTree = ""; }; 57 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 58 | 676EB16AA603A833490626C01B92E559 /* RequestUtilites.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestUtilites.swift; path = AI/src/Requests/RequestUtilites.swift; sourceTree = ""; }; 59 | 7D7CB76878913287A29944BA8530F4D4 /* QueryResponse.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QueryResponse.swift; path = AI/src/QueryResponse.swift; sourceTree = ""; }; 60 | 831E5B29AD41C11592B8C08DC28C2B43 /* Pods-SimpleAI-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SimpleAI-frameworks.sh"; sourceTree = ""; }; 61 | 8A7B34E41A1F5EEADA1FE627DD716159 /* Pods-SimpleAI-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SimpleAI-acknowledgements.plist"; sourceTree = ""; }; 62 | 8AAC4120514B1408F10CD87823DA628B /* Pods-SimpleAI.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SimpleAI.release.xcconfig"; sourceTree = ""; }; 63 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 64 | 9A0012581CA635CE8017997A1E617AB0 /* CallbacksContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CallbacksContainer.swift; path = AI/src/CallbacksContainer.swift; sourceTree = ""; }; 65 | 9B05A59B57BD509D28E8F088B69AC1D1 /* Credentials.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Credentials.swift; path = AI/src/Credentials.swift; sourceTree = ""; }; 66 | AC24364ED5FEA4398C77244CD60AD3BF /* Pods-SimpleAI-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SimpleAI-resources.sh"; sourceTree = ""; }; 67 | C7EFBFFB1492BDB6CB59ABE1004C9F84 /* AI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = AI.framework; path = AI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | CA56CB7F4E99C3F296B3D91E8F2F0AB3 /* TextQueryRequest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextQueryRequest.swift; path = AI/src/Requests/TextQueryRequest.swift; sourceTree = ""; }; 69 | CD2C902E3D3099F5E86EDE53E876B3FC /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = AI/src/Requests/Request.swift; sourceTree = ""; }; 70 | D44793A178F54795C762FA411134A723 /* Pods_SimpleAI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SimpleAI.framework; path = "Pods-SimpleAI.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 71 | D58A05E6415325C79F4396689292BBF4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 72 | D5D2D4C5EFCCF024194E9D42377A3DD8 /* Pods-SimpleAI-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SimpleAI-acknowledgements.markdown"; sourceTree = ""; }; 73 | E126ECA30E4719071984625DCF8C89E8 /* Pods-SimpleAI.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SimpleAI.modulemap"; sourceTree = ""; }; 74 | E695C12E1D1BC2CDAF665D481435B390 /* UserEntitiesRequest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UserEntitiesRequest.swift; path = AI/src/Requests/UserEntitiesRequest.swift; sourceTree = ""; }; 75 | EB1A5C24C0749B74B4910F77FBD5D893 /* SessionStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionStorage.swift; path = AI/src/Requests/Utils/SessionStorage.swift; sourceTree = ""; }; 76 | EC941A5259C71C02B9714D88737D8593 /* Service.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Service.swift; path = AI/src/Service.swift; sourceTree = ""; }; 77 | F2074ABA561E448730C7619087A04995 /* ResponseSerialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialize.swift; path = AI/src/ResponseSerialize.swift; sourceTree = ""; }; 78 | F3B8AAD8309C2FBD1635B9FCBABF3E84 /* Pods-SimpleAI-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SimpleAI-dummy.m"; sourceTree = ""; }; 79 | FBC49660AF85EC63F7F3B58CD2979A6A /* Pods-SimpleAI.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SimpleAI.debug.xcconfig"; sourceTree = ""; }; 80 | FC9D4FEB0CF84CEEB184BED65FC38DF1 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 81 | /* End PBXFileReference section */ 82 | 83 | /* Begin PBXFrameworksBuildPhase section */ 84 | 3490CDD948280567405AB199BD775898 /* Frameworks */ = { 85 | isa = PBXFrameworksBuildPhase; 86 | buildActionMask = 2147483647; 87 | files = ( 88 | 9460492878C8FD8ABDB8CE0E44FB4A7F /* Foundation.framework in Frameworks */, 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | 39B4F14F3372A8316B4180C2C6E51780 /* Frameworks */ = { 93 | isa = PBXFrameworksBuildPhase; 94 | buildActionMask = 2147483647; 95 | files = ( 96 | C4C6EFA2FED337008D256536DAD7508E /* Foundation.framework in Frameworks */, 97 | ); 98 | runOnlyForDeploymentPostprocessing = 0; 99 | }; 100 | /* End PBXFrameworksBuildPhase section */ 101 | 102 | /* Begin PBXGroup section */ 103 | 45A721042405B6C492DB103337A76860 /* Support Files */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 3778BBEBFD5222ED2F4231B74499B426 /* AI.modulemap */, 107 | 13685A66D619F25461D01D7C2A946BB8 /* AI.xcconfig */, 108 | 33E16A65DFD48361DF57218F11AB12C6 /* AI-dummy.m */, 109 | 4AF541CA840F52703E2284B44088995B /* AI-prefix.pch */, 110 | 067E39CC0A09D022144B9A57CE49C395 /* AI-umbrella.h */, 111 | FC9D4FEB0CF84CEEB184BED65FC38DF1 /* Info.plist */, 112 | ); 113 | name = "Support Files"; 114 | path = "../Target Support Files/AI"; 115 | sourceTree = ""; 116 | }; 117 | 5102E4B4882249CFF2FBA700A88FA4E2 /* AI */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 30C336FDDBC5E0F1B66FC416EFB921F6 /* AI.swift */, 121 | 9A0012581CA635CE8017997A1E617AB0 /* CallbacksContainer.swift */, 122 | 2E8D970902E7C28694AAA71F8A19FC06 /* Completion.swift */, 123 | 9B05A59B57BD509D28E8F088B69AC1D1 /* Credentials.swift */, 124 | 11592CED473E8F8546494319E8864B2E /* JSON.swift */, 125 | 62BAA1F12470AA918ABA7530C6CD792F /* NSError.swift */, 126 | 47B5419C584433C5EE5B5F4CD7CCFBBA /* PrivateRequest.swift */, 127 | 29BB8EC7F102E667F2A7B91AF2F49E81 /* QueryRequest.swift */, 128 | 7D7CB76878913287A29944BA8530F4D4 /* QueryResponse.swift */, 129 | CD2C902E3D3099F5E86EDE53E876B3FC /* Request.swift */, 130 | 676EB16AA603A833490626C01B92E559 /* RequestUtilites.swift */, 131 | F2074ABA561E448730C7619087A04995 /* ResponseSerialize.swift */, 132 | EC941A5259C71C02B9714D88737D8593 /* Service.swift */, 133 | EB1A5C24C0749B74B4910F77FBD5D893 /* SessionStorage.swift */, 134 | CA56CB7F4E99C3F296B3D91E8F2F0AB3 /* TextQueryRequest.swift */, 135 | E695C12E1D1BC2CDAF665D481435B390 /* UserEntitiesRequest.swift */, 136 | 45A721042405B6C492DB103337A76860 /* Support Files */, 137 | ); 138 | name = AI; 139 | path = AI; 140 | sourceTree = ""; 141 | }; 142 | 7DB346D0F39D3F0E887471402A8071AB = { 143 | isa = PBXGroup; 144 | children = ( 145 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 146 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 147 | D79EF12363733F4E3F0945C8673072A9 /* Pods */, 148 | D6754961DE06A0118C273033CFE96C38 /* Products */, 149 | B350686BEF279CF6CFA26CC4E6D20CC8 /* Targets Support Files */, 150 | ); 151 | sourceTree = ""; 152 | }; 153 | AFDF32B118F9D0146EC42D87021F0D4A /* Pods-SimpleAI */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | D58A05E6415325C79F4396689292BBF4 /* Info.plist */, 157 | E126ECA30E4719071984625DCF8C89E8 /* Pods-SimpleAI.modulemap */, 158 | D5D2D4C5EFCCF024194E9D42377A3DD8 /* Pods-SimpleAI-acknowledgements.markdown */, 159 | 8A7B34E41A1F5EEADA1FE627DD716159 /* Pods-SimpleAI-acknowledgements.plist */, 160 | F3B8AAD8309C2FBD1635B9FCBABF3E84 /* Pods-SimpleAI-dummy.m */, 161 | 831E5B29AD41C11592B8C08DC28C2B43 /* Pods-SimpleAI-frameworks.sh */, 162 | AC24364ED5FEA4398C77244CD60AD3BF /* Pods-SimpleAI-resources.sh */, 163 | 1F57C20127DDC64EA0D35A75545EB8FD /* Pods-SimpleAI-umbrella.h */, 164 | FBC49660AF85EC63F7F3B58CD2979A6A /* Pods-SimpleAI.debug.xcconfig */, 165 | 8AAC4120514B1408F10CD87823DA628B /* Pods-SimpleAI.release.xcconfig */, 166 | ); 167 | name = "Pods-SimpleAI"; 168 | path = "Target Support Files/Pods-SimpleAI"; 169 | sourceTree = ""; 170 | }; 171 | B350686BEF279CF6CFA26CC4E6D20CC8 /* Targets Support Files */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | AFDF32B118F9D0146EC42D87021F0D4A /* Pods-SimpleAI */, 175 | ); 176 | name = "Targets Support Files"; 177 | sourceTree = ""; 178 | }; 179 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | D35AF013A5F0BAD4F32504907A52519E /* iOS */, 183 | ); 184 | name = Frameworks; 185 | sourceTree = ""; 186 | }; 187 | D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, 191 | ); 192 | name = iOS; 193 | sourceTree = ""; 194 | }; 195 | D6754961DE06A0118C273033CFE96C38 /* Products */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | C7EFBFFB1492BDB6CB59ABE1004C9F84 /* AI.framework */, 199 | D44793A178F54795C762FA411134A723 /* Pods_SimpleAI.framework */, 200 | ); 201 | name = Products; 202 | sourceTree = ""; 203 | }; 204 | D79EF12363733F4E3F0945C8673072A9 /* Pods */ = { 205 | isa = PBXGroup; 206 | children = ( 207 | 5102E4B4882249CFF2FBA700A88FA4E2 /* AI */, 208 | ); 209 | name = Pods; 210 | sourceTree = ""; 211 | }; 212 | /* End PBXGroup section */ 213 | 214 | /* Begin PBXHeadersBuildPhase section */ 215 | 216157FD616B8D2DD4965034BFC67075 /* Headers */ = { 216 | isa = PBXHeadersBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | CD8D35FE82052484168C93922409182F /* AI-umbrella.h in Headers */, 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | }; 223 | E123D3CEDBC837F605A70EDE83A4417E /* Headers */ = { 224 | isa = PBXHeadersBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | ADE12C08EE67ECD1BBB395BCA0083655 /* Pods-SimpleAI-umbrella.h in Headers */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | /* End PBXHeadersBuildPhase section */ 232 | 233 | /* Begin PBXNativeTarget section */ 234 | 78DD8D1F1498C2CF966A3E5CF392733E /* AI */ = { 235 | isa = PBXNativeTarget; 236 | buildConfigurationList = 3D739BF45C5A95DFB670B0AEA9CAE3EA /* Build configuration list for PBXNativeTarget "AI" */; 237 | buildPhases = ( 238 | 971738E6EA4155184810FD7C27543219 /* Sources */, 239 | 3490CDD948280567405AB199BD775898 /* Frameworks */, 240 | 216157FD616B8D2DD4965034BFC67075 /* Headers */, 241 | ); 242 | buildRules = ( 243 | ); 244 | dependencies = ( 245 | ); 246 | name = AI; 247 | productName = AI; 248 | productReference = C7EFBFFB1492BDB6CB59ABE1004C9F84 /* AI.framework */; 249 | productType = "com.apple.product-type.framework"; 250 | }; 251 | D48487D345DA2EDE9B2A970C2A662100 /* Pods-SimpleAI */ = { 252 | isa = PBXNativeTarget; 253 | buildConfigurationList = 7F5F221F482A1A85C8A69793F1A2AF94 /* Build configuration list for PBXNativeTarget "Pods-SimpleAI" */; 254 | buildPhases = ( 255 | 135217A977506F94AE81FB8DD038ADE9 /* Sources */, 256 | 39B4F14F3372A8316B4180C2C6E51780 /* Frameworks */, 257 | E123D3CEDBC837F605A70EDE83A4417E /* Headers */, 258 | ); 259 | buildRules = ( 260 | ); 261 | dependencies = ( 262 | 805F6BC400678C752F8C9D96E3AB8DBB /* PBXTargetDependency */, 263 | ); 264 | name = "Pods-SimpleAI"; 265 | productName = "Pods-SimpleAI"; 266 | productReference = D44793A178F54795C762FA411134A723 /* Pods_SimpleAI.framework */; 267 | productType = "com.apple.product-type.framework"; 268 | }; 269 | /* End PBXNativeTarget section */ 270 | 271 | /* Begin PBXProject section */ 272 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 273 | isa = PBXProject; 274 | attributes = { 275 | LastSwiftUpdateCheck = 0930; 276 | LastUpgradeCheck = 0930; 277 | }; 278 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 279 | compatibilityVersion = "Xcode 3.2"; 280 | developmentRegion = English; 281 | hasScannedForEncodings = 0; 282 | knownRegions = ( 283 | en, 284 | ); 285 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 286 | productRefGroup = D6754961DE06A0118C273033CFE96C38 /* Products */; 287 | projectDirPath = ""; 288 | projectRoot = ""; 289 | targets = ( 290 | 78DD8D1F1498C2CF966A3E5CF392733E /* AI */, 291 | D48487D345DA2EDE9B2A970C2A662100 /* Pods-SimpleAI */, 292 | ); 293 | }; 294 | /* End PBXProject section */ 295 | 296 | /* Begin PBXSourcesBuildPhase section */ 297 | 135217A977506F94AE81FB8DD038ADE9 /* Sources */ = { 298 | isa = PBXSourcesBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | 276DBEAD6C839514EA204461B70F69A2 /* Pods-SimpleAI-dummy.m in Sources */, 302 | ); 303 | runOnlyForDeploymentPostprocessing = 0; 304 | }; 305 | 971738E6EA4155184810FD7C27543219 /* Sources */ = { 306 | isa = PBXSourcesBuildPhase; 307 | buildActionMask = 2147483647; 308 | files = ( 309 | 7714E4B71FDF132B34C4C41475D8EF21 /* AI-dummy.m in Sources */, 310 | EFBD974E313FC4D1260C4E43DA331597 /* AI.swift in Sources */, 311 | E5800B20D6A354B34922201B14875F30 /* CallbacksContainer.swift in Sources */, 312 | D49A6650053148F96B6C3180BA3EA293 /* Completion.swift in Sources */, 313 | F8E4D6257EC955C15C95FDBE4EA96B86 /* Credentials.swift in Sources */, 314 | 8AF5FFEFA6B5ACFC3F1F93075CFF4456 /* JSON.swift in Sources */, 315 | 3773861E02CB344AF6E2859CC6ECC2AD /* NSError.swift in Sources */, 316 | D1A15A98A9F7FDEB7523F7238330F7F1 /* PrivateRequest.swift in Sources */, 317 | 177576C7B0A6CDFBED7E7B7DE837DBE5 /* QueryRequest.swift in Sources */, 318 | 060BD7B5223CA8871290F040CEEBD8D6 /* QueryResponse.swift in Sources */, 319 | AABA633E98C048887C3F40DBF800C94E /* Request.swift in Sources */, 320 | 0223332967FCEDE0A0782131C8950111 /* RequestUtilites.swift in Sources */, 321 | 2F58A54C13F6E93011F5C3C2FDC1A747 /* ResponseSerialize.swift in Sources */, 322 | 4EEED2315B427019B578AEEDD9FF608B /* Service.swift in Sources */, 323 | E75DE4E11B693B441F13E90B2C50B9B3 /* SessionStorage.swift in Sources */, 324 | 7EDC593B14D376DA480505ECB7197B19 /* TextQueryRequest.swift in Sources */, 325 | AD077089140895DBA4C3F864F84F9EF7 /* UserEntitiesRequest.swift in Sources */, 326 | ); 327 | runOnlyForDeploymentPostprocessing = 0; 328 | }; 329 | /* End PBXSourcesBuildPhase section */ 330 | 331 | /* Begin PBXTargetDependency section */ 332 | 805F6BC400678C752F8C9D96E3AB8DBB /* PBXTargetDependency */ = { 333 | isa = PBXTargetDependency; 334 | name = AI; 335 | target = 78DD8D1F1498C2CF966A3E5CF392733E /* AI */; 336 | targetProxy = 7C4F5769E91E5D6A7A9E94D17FA51A72 /* PBXContainerItemProxy */; 337 | }; 338 | /* End PBXTargetDependency section */ 339 | 340 | /* Begin XCBuildConfiguration section */ 341 | 05E503760357951F35FEE5415B7CF13D /* Release */ = { 342 | isa = XCBuildConfiguration; 343 | baseConfigurationReference = 8AAC4120514B1408F10CD87823DA628B /* Pods-SimpleAI.release.xcconfig */; 344 | buildSettings = { 345 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 346 | CLANG_ENABLE_OBJC_WEAK = NO; 347 | CODE_SIGN_IDENTITY = ""; 348 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 349 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 350 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 351 | CURRENT_PROJECT_VERSION = 1; 352 | DEFINES_MODULE = YES; 353 | DYLIB_COMPATIBILITY_VERSION = 1; 354 | DYLIB_CURRENT_VERSION = 1; 355 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 356 | INFOPLIST_FILE = "Target Support Files/Pods-SimpleAI/Info.plist"; 357 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 358 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 359 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 360 | MACH_O_TYPE = staticlib; 361 | MODULEMAP_FILE = "Target Support Files/Pods-SimpleAI/Pods-SimpleAI.modulemap"; 362 | OTHER_LDFLAGS = ""; 363 | OTHER_LIBTOOLFLAGS = ""; 364 | PODS_ROOT = "$(SRCROOT)"; 365 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 366 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 367 | SDKROOT = iphoneos; 368 | SKIP_INSTALL = YES; 369 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 370 | TARGETED_DEVICE_FAMILY = "1,2"; 371 | VALIDATE_PRODUCT = YES; 372 | VERSIONING_SYSTEM = "apple-generic"; 373 | VERSION_INFO_PREFIX = ""; 374 | }; 375 | name = Release; 376 | }; 377 | 0E12B7268EF0862DFEEB8B6B0BD7C9F4 /* Debug */ = { 378 | isa = XCBuildConfiguration; 379 | buildSettings = { 380 | ALWAYS_SEARCH_USER_PATHS = NO; 381 | CLANG_ANALYZER_NONNULL = YES; 382 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 383 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 384 | CLANG_CXX_LIBRARY = "libc++"; 385 | CLANG_ENABLE_MODULES = YES; 386 | CLANG_ENABLE_OBJC_ARC = YES; 387 | CLANG_ENABLE_OBJC_WEAK = YES; 388 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 389 | CLANG_WARN_BOOL_CONVERSION = YES; 390 | CLANG_WARN_COMMA = YES; 391 | CLANG_WARN_CONSTANT_CONVERSION = YES; 392 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 393 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 394 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 395 | CLANG_WARN_EMPTY_BODY = YES; 396 | CLANG_WARN_ENUM_CONVERSION = YES; 397 | CLANG_WARN_INFINITE_RECURSION = YES; 398 | CLANG_WARN_INT_CONVERSION = YES; 399 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 400 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 401 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 402 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 403 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 404 | CLANG_WARN_STRICT_PROTOTYPES = YES; 405 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 406 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 407 | CLANG_WARN_UNREACHABLE_CODE = YES; 408 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 409 | CODE_SIGNING_ALLOWED = NO; 410 | CODE_SIGNING_REQUIRED = NO; 411 | COPY_PHASE_STRIP = NO; 412 | DEBUG_INFORMATION_FORMAT = dwarf; 413 | ENABLE_STRICT_OBJC_MSGSEND = YES; 414 | ENABLE_TESTABILITY = YES; 415 | GCC_C_LANGUAGE_STANDARD = gnu11; 416 | GCC_DYNAMIC_NO_PIC = NO; 417 | GCC_NO_COMMON_BLOCKS = YES; 418 | GCC_OPTIMIZATION_LEVEL = 0; 419 | GCC_PREPROCESSOR_DEFINITIONS = ( 420 | "POD_CONFIGURATION_DEBUG=1", 421 | "DEBUG=1", 422 | "$(inherited)", 423 | ); 424 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 425 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 426 | GCC_WARN_UNDECLARED_SELECTOR = YES; 427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 428 | GCC_WARN_UNUSED_FUNCTION = YES; 429 | GCC_WARN_UNUSED_VARIABLE = YES; 430 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 431 | MTL_ENABLE_DEBUG_INFO = YES; 432 | ONLY_ACTIVE_ARCH = YES; 433 | PRODUCT_NAME = "$(TARGET_NAME)"; 434 | STRIP_INSTALLED_PRODUCT = NO; 435 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 436 | SYMROOT = "${SRCROOT}/../build"; 437 | }; 438 | name = Debug; 439 | }; 440 | 26E3A369817494707FFED3A11EC17E5F /* Release */ = { 441 | isa = XCBuildConfiguration; 442 | baseConfigurationReference = 13685A66D619F25461D01D7C2A946BB8 /* AI.xcconfig */; 443 | buildSettings = { 444 | CODE_SIGN_IDENTITY = ""; 445 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 446 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 447 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 448 | CURRENT_PROJECT_VERSION = 1; 449 | DEFINES_MODULE = YES; 450 | DYLIB_COMPATIBILITY_VERSION = 1; 451 | DYLIB_CURRENT_VERSION = 1; 452 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 453 | GCC_PREFIX_HEADER = "Target Support Files/AI/AI-prefix.pch"; 454 | INFOPLIST_FILE = "Target Support Files/AI/Info.plist"; 455 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 456 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 457 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 458 | MODULEMAP_FILE = "Target Support Files/AI/AI.modulemap"; 459 | PRODUCT_MODULE_NAME = AI; 460 | PRODUCT_NAME = AI; 461 | SDKROOT = iphoneos; 462 | SKIP_INSTALL = YES; 463 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 464 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 465 | SWIFT_VERSION = 4.2; 466 | TARGETED_DEVICE_FAMILY = "1,2"; 467 | VALIDATE_PRODUCT = YES; 468 | VERSIONING_SYSTEM = "apple-generic"; 469 | VERSION_INFO_PREFIX = ""; 470 | }; 471 | name = Release; 472 | }; 473 | 41D140B882347E3EAF3B230D26287213 /* Debug */ = { 474 | isa = XCBuildConfiguration; 475 | baseConfigurationReference = 13685A66D619F25461D01D7C2A946BB8 /* AI.xcconfig */; 476 | buildSettings = { 477 | CODE_SIGN_IDENTITY = ""; 478 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 479 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 480 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 481 | CURRENT_PROJECT_VERSION = 1; 482 | DEFINES_MODULE = YES; 483 | DYLIB_COMPATIBILITY_VERSION = 1; 484 | DYLIB_CURRENT_VERSION = 1; 485 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 486 | GCC_PREFIX_HEADER = "Target Support Files/AI/AI-prefix.pch"; 487 | INFOPLIST_FILE = "Target Support Files/AI/Info.plist"; 488 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 489 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 490 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 491 | MODULEMAP_FILE = "Target Support Files/AI/AI.modulemap"; 492 | PRODUCT_MODULE_NAME = AI; 493 | PRODUCT_NAME = AI; 494 | SDKROOT = iphoneos; 495 | SKIP_INSTALL = YES; 496 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 497 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 498 | SWIFT_VERSION = 4.2; 499 | TARGETED_DEVICE_FAMILY = "1,2"; 500 | VERSIONING_SYSTEM = "apple-generic"; 501 | VERSION_INFO_PREFIX = ""; 502 | }; 503 | name = Debug; 504 | }; 505 | 6FF52A021EC54719345C3A7D6D749A00 /* Debug */ = { 506 | isa = XCBuildConfiguration; 507 | baseConfigurationReference = FBC49660AF85EC63F7F3B58CD2979A6A /* Pods-SimpleAI.debug.xcconfig */; 508 | buildSettings = { 509 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 510 | CLANG_ENABLE_OBJC_WEAK = NO; 511 | CODE_SIGN_IDENTITY = ""; 512 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 513 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 514 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 515 | CURRENT_PROJECT_VERSION = 1; 516 | DEFINES_MODULE = YES; 517 | DYLIB_COMPATIBILITY_VERSION = 1; 518 | DYLIB_CURRENT_VERSION = 1; 519 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 520 | INFOPLIST_FILE = "Target Support Files/Pods-SimpleAI/Info.plist"; 521 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 522 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 523 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 524 | MACH_O_TYPE = staticlib; 525 | MODULEMAP_FILE = "Target Support Files/Pods-SimpleAI/Pods-SimpleAI.modulemap"; 526 | OTHER_LDFLAGS = ""; 527 | OTHER_LIBTOOLFLAGS = ""; 528 | PODS_ROOT = "$(SRCROOT)"; 529 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 530 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 531 | SDKROOT = iphoneos; 532 | SKIP_INSTALL = YES; 533 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 534 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 535 | TARGETED_DEVICE_FAMILY = "1,2"; 536 | VERSIONING_SYSTEM = "apple-generic"; 537 | VERSION_INFO_PREFIX = ""; 538 | }; 539 | name = Debug; 540 | }; 541 | CD8324D57CD462761E218EEA4EA91EC7 /* Release */ = { 542 | isa = XCBuildConfiguration; 543 | buildSettings = { 544 | ALWAYS_SEARCH_USER_PATHS = NO; 545 | CLANG_ANALYZER_NONNULL = YES; 546 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 547 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 548 | CLANG_CXX_LIBRARY = "libc++"; 549 | CLANG_ENABLE_MODULES = YES; 550 | CLANG_ENABLE_OBJC_ARC = YES; 551 | CLANG_ENABLE_OBJC_WEAK = YES; 552 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 553 | CLANG_WARN_BOOL_CONVERSION = YES; 554 | CLANG_WARN_COMMA = YES; 555 | CLANG_WARN_CONSTANT_CONVERSION = YES; 556 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 557 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 558 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 559 | CLANG_WARN_EMPTY_BODY = YES; 560 | CLANG_WARN_ENUM_CONVERSION = YES; 561 | CLANG_WARN_INFINITE_RECURSION = YES; 562 | CLANG_WARN_INT_CONVERSION = YES; 563 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 564 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 565 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 566 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 567 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 568 | CLANG_WARN_STRICT_PROTOTYPES = YES; 569 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 570 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 571 | CLANG_WARN_UNREACHABLE_CODE = YES; 572 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 573 | CODE_SIGNING_ALLOWED = NO; 574 | CODE_SIGNING_REQUIRED = NO; 575 | COPY_PHASE_STRIP = NO; 576 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 577 | ENABLE_NS_ASSERTIONS = NO; 578 | ENABLE_STRICT_OBJC_MSGSEND = YES; 579 | GCC_C_LANGUAGE_STANDARD = gnu11; 580 | GCC_NO_COMMON_BLOCKS = YES; 581 | GCC_PREPROCESSOR_DEFINITIONS = ( 582 | "POD_CONFIGURATION_RELEASE=1", 583 | "$(inherited)", 584 | ); 585 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 586 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 587 | GCC_WARN_UNDECLARED_SELECTOR = YES; 588 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 589 | GCC_WARN_UNUSED_FUNCTION = YES; 590 | GCC_WARN_UNUSED_VARIABLE = YES; 591 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 592 | MTL_ENABLE_DEBUG_INFO = NO; 593 | PRODUCT_NAME = "$(TARGET_NAME)"; 594 | STRIP_INSTALLED_PRODUCT = NO; 595 | SYMROOT = "${SRCROOT}/../build"; 596 | }; 597 | name = Release; 598 | }; 599 | /* End XCBuildConfiguration section */ 600 | 601 | /* Begin XCConfigurationList section */ 602 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 603 | isa = XCConfigurationList; 604 | buildConfigurations = ( 605 | 0E12B7268EF0862DFEEB8B6B0BD7C9F4 /* Debug */, 606 | CD8324D57CD462761E218EEA4EA91EC7 /* Release */, 607 | ); 608 | defaultConfigurationIsVisible = 0; 609 | defaultConfigurationName = Release; 610 | }; 611 | 3D739BF45C5A95DFB670B0AEA9CAE3EA /* Build configuration list for PBXNativeTarget "AI" */ = { 612 | isa = XCConfigurationList; 613 | buildConfigurations = ( 614 | 41D140B882347E3EAF3B230D26287213 /* Debug */, 615 | 26E3A369817494707FFED3A11EC17E5F /* Release */, 616 | ); 617 | defaultConfigurationIsVisible = 0; 618 | defaultConfigurationName = Release; 619 | }; 620 | 7F5F221F482A1A85C8A69793F1A2AF94 /* Build configuration list for PBXNativeTarget "Pods-SimpleAI" */ = { 621 | isa = XCConfigurationList; 622 | buildConfigurations = ( 623 | 6FF52A021EC54719345C3A7D6D749A00 /* Debug */, 624 | 05E503760357951F35FEE5415B7CF13D /* Release */, 625 | ); 626 | defaultConfigurationIsVisible = 0; 627 | defaultConfigurationName = Release; 628 | }; 629 | /* End XCConfigurationList section */ 630 | }; 631 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 632 | } 633 | --------------------------------------------------------------------------------