Sfoglia il codice sorgente

Cocoapods-based sample that calls the Google Natural Language API.

Tim Burks 7 anni fa
parent
commit
7a07904fa9

+ 403 - 0
Examples/Cocoapods/NaturalLanguage/NaturalLanguage.xcodeproj/project.pbxproj

@@ -0,0 +1,403 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 48;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		9CFA12C004B16D75F64AA152 /* Pods_NaturalLanguage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76B4001D3A14F0270FA6E8E2 /* Pods_NaturalLanguage.framework */; };
+		D35301622097A4DC00727A88 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D35301612097A4DC00727A88 /* AppDelegate.swift */; };
+		D3C78ADC2097AA4700F9AC9A /* annotations.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3C78ADB2097AA4700F9AC9A /* annotations.pb.swift */; };
+		D3C78AE12097AA5000F9AC9A /* language_service.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3C78ADD2097AA5000F9AC9A /* language_service.pb.swift */; };
+		D3C78AE22097AA5000F9AC9A /* language_service.grpc.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3C78ADE2097AA5000F9AC9A /* language_service.grpc.swift */; };
+		D3C78AE32097AA5000F9AC9A /* http.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3C78ADF2097AA5000F9AC9A /* http.pb.swift */; };
+		D3C78AE42097AA5000F9AC9A /* descriptor.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3C78AE02097AA5000F9AC9A /* descriptor.pb.swift */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		0C8CCB511DA8E8B40E1FCF0E /* Pods-NaturalLanguage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NaturalLanguage.debug.xcconfig"; path = "Pods/Target Support Files/Pods-NaturalLanguage/Pods-NaturalLanguage.debug.xcconfig"; sourceTree = "<group>"; };
+		76B4001D3A14F0270FA6E8E2 /* Pods_NaturalLanguage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NaturalLanguage.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		8CE184FFA377D203D2FA7121 /* Pods-NaturalLanguage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NaturalLanguage.release.xcconfig"; path = "Pods/Target Support Files/Pods-NaturalLanguage/Pods-NaturalLanguage.release.xcconfig"; sourceTree = "<group>"; };
+		D353015E2097A4DC00727A88 /* NaturalLanguage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NaturalLanguage.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		D35301612097A4DC00727A88 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+		D353016D2097A4DC00727A88 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		D3C78ADB2097AA4700F9AC9A /* annotations.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = annotations.pb.swift; sourceTree = "<group>"; };
+		D3C78ADD2097AA5000F9AC9A /* language_service.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = language_service.pb.swift; sourceTree = "<group>"; };
+		D3C78ADE2097AA5000F9AC9A /* language_service.grpc.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = language_service.grpc.swift; sourceTree = "<group>"; };
+		D3C78ADF2097AA5000F9AC9A /* http.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = http.pb.swift; sourceTree = "<group>"; };
+		D3C78AE02097AA5000F9AC9A /* descriptor.pb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = descriptor.pb.swift; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		D353015B2097A4DC00727A88 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9CFA12C004B16D75F64AA152 /* Pods_NaturalLanguage.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		3D052FD55FC47A80E6A7AB0A /* Pods */ = {
+			isa = PBXGroup;
+			children = (
+				0C8CCB511DA8E8B40E1FCF0E /* Pods-NaturalLanguage.debug.xcconfig */,
+				8CE184FFA377D203D2FA7121 /* Pods-NaturalLanguage.release.xcconfig */,
+			);
+			name = Pods;
+			sourceTree = "<group>";
+		};
+		8056D5BB75218C1982B22A68 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				76B4001D3A14F0270FA6E8E2 /* Pods_NaturalLanguage.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		D35301552097A4DC00727A88 = {
+			isa = PBXGroup;
+			children = (
+				D35301602097A4DC00727A88 /* NaturalLanguage */,
+				D353015F2097A4DC00727A88 /* Products */,
+				3D052FD55FC47A80E6A7AB0A /* Pods */,
+				8056D5BB75218C1982B22A68 /* Frameworks */,
+			);
+			sourceTree = "<group>";
+		};
+		D353015F2097A4DC00727A88 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				D353015E2097A4DC00727A88 /* NaturalLanguage.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		D35301602097A4DC00727A88 /* NaturalLanguage */ = {
+			isa = PBXGroup;
+			children = (
+				D3C78AE02097AA5000F9AC9A /* descriptor.pb.swift */,
+				D3C78ADF2097AA5000F9AC9A /* http.pb.swift */,
+				D3C78ADE2097AA5000F9AC9A /* language_service.grpc.swift */,
+				D3C78ADD2097AA5000F9AC9A /* language_service.pb.swift */,
+				D3C78ADB2097AA4700F9AC9A /* annotations.pb.swift */,
+				D35301612097A4DC00727A88 /* AppDelegate.swift */,
+				D353016D2097A4DC00727A88 /* Info.plist */,
+			);
+			path = NaturalLanguage;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		D353015D2097A4DC00727A88 /* NaturalLanguage */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = D35301702097A4DC00727A88 /* Build configuration list for PBXNativeTarget "NaturalLanguage" */;
+			buildPhases = (
+				297410882B258F7303730200 /* [CP] Check Pods Manifest.lock */,
+				D353015A2097A4DC00727A88 /* Sources */,
+				D353015B2097A4DC00727A88 /* Frameworks */,
+				D353015C2097A4DC00727A88 /* Resources */,
+				C656FB9F83FB17EE3625C732 /* [CP] Embed Pods Frameworks */,
+				80E1BDF830F9EEC4C0FFA0DA /* [CP] Copy Pods Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = NaturalLanguage;
+			productName = NaturalLanguage;
+			productReference = D353015E2097A4DC00727A88 /* NaturalLanguage.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		D35301562097A4DC00727A88 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastSwiftUpdateCheck = 0920;
+				LastUpgradeCheck = 0920;
+				ORGANIZATIONNAME = Google;
+				TargetAttributes = {
+					D353015D2097A4DC00727A88 = {
+						CreatedOnToolsVersion = 9.2;
+						ProvisioningStyle = Automatic;
+					};
+				};
+			};
+			buildConfigurationList = D35301592097A4DC00727A88 /* Build configuration list for PBXProject "NaturalLanguage" */;
+			compatibilityVersion = "Xcode 8.0";
+			developmentRegion = en;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = D35301552097A4DC00727A88;
+			productRefGroup = D353015F2097A4DC00727A88 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				D353015D2097A4DC00727A88 /* NaturalLanguage */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		D353015C2097A4DC00727A88 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		297410882B258F7303730200 /* [CP] Check Pods Manifest.lock */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+				"${PODS_ROOT}/Manifest.lock",
+			);
+			name = "[CP] Check Pods Manifest.lock";
+			outputPaths = (
+				"$(DERIVED_FILE_DIR)/Pods-NaturalLanguage-checkManifestLockResult.txt",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+			showEnvVarsInLog = 0;
+		};
+		80E1BDF830F9EEC4C0FFA0DA /* [CP] Copy Pods Resources */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "[CP] Copy Pods Resources";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NaturalLanguage/Pods-NaturalLanguage-resources.sh\"\n";
+			showEnvVarsInLog = 0;
+		};
+		C656FB9F83FB17EE3625C732 /* [CP] Embed Pods Frameworks */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${SRCROOT}/Pods/Target Support Files/Pods-NaturalLanguage/Pods-NaturalLanguage-frameworks.sh",
+				"${BUILT_PRODUCTS_DIR}/BoringSSL/openssl.framework",
+				"${BUILT_PRODUCTS_DIR}/SwiftGRPC/SwiftGRPC.framework",
+				"${BUILT_PRODUCTS_DIR}/SwiftProtobuf/SwiftProtobuf.framework",
+				"${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework",
+				"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
+			);
+			name = "[CP] Embed Pods Frameworks";
+			outputPaths = (
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework",
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftGRPC.framework",
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework",
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpc.framework",
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NaturalLanguage/Pods-NaturalLanguage-frameworks.sh\"\n";
+			showEnvVarsInLog = 0;
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		D353015A2097A4DC00727A88 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				D3C78AE32097AA5000F9AC9A /* http.pb.swift in Sources */,
+				D3C78AE22097AA5000F9AC9A /* language_service.grpc.swift in Sources */,
+				D35301622097A4DC00727A88 /* AppDelegate.swift in Sources */,
+				D3C78AE12097AA5000F9AC9A /* language_service.pb.swift in Sources */,
+				D3C78ADC2097AA4700F9AC9A /* annotations.pb.swift in Sources */,
+				D3C78AE42097AA5000F9AC9A /* descriptor.pb.swift in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+		D353016E2097A4DC00727A88 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 11.2;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+			};
+			name = Debug;
+		};
+		D353016F2097A4DC00727A88 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 11.2;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		D35301712097A4DC00727A88 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 0C8CCB511DA8E8B40E1FCF0E /* Pods-NaturalLanguage.debug.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CODE_SIGN_STYLE = Automatic;
+				DEVELOPMENT_TEAM = 6SF6F2622J;
+				INFOPLIST_FILE = NaturalLanguage/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = com.google.NaturalLanguage;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_VERSION = 4.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		D35301722097A4DC00727A88 /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 8CE184FFA377D203D2FA7121 /* Pods-NaturalLanguage.release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CODE_SIGN_STYLE = Automatic;
+				DEVELOPMENT_TEAM = 6SF6F2622J;
+				INFOPLIST_FILE = NaturalLanguage/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = com.google.NaturalLanguage;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_VERSION = 4.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		D35301592097A4DC00727A88 /* Build configuration list for PBXProject "NaturalLanguage" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				D353016E2097A4DC00727A88 /* Debug */,
+				D353016F2097A4DC00727A88 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		D35301702097A4DC00727A88 /* Build configuration list for PBXNativeTarget "NaturalLanguage" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				D35301712097A4DC00727A88 /* Debug */,
+				D35301722097A4DC00727A88 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = D35301562097A4DC00727A88 /* Project object */;
+}

+ 75 - 0
Examples/Cocoapods/NaturalLanguage/NaturalLanguage/AppDelegate.swift

@@ -0,0 +1,75 @@
+/*
+ * Copyright 2018, gRPC Authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import UIKit
+import SwiftGRPC
+
+let GOOGLE_API_KEY = ""
+
+@UIApplicationMain
+class AppDelegate: UIResponder, UIApplicationDelegate {
+
+  var window: UIWindow?
+  var service: Google_Cloud_Language_V1_LanguageServiceServiceClient!
+
+  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
+    // Set up an empty window.
+    self.window = UIWindow(frame:UIScreen.main.bounds);
+    self.window?.rootViewController = UIViewController();
+    self.window?.makeKeyAndVisible();
+    // Signal test start.
+    signal(UIColor.yellow);
+    // Prepare the API client.
+    service = Google_Cloud_Language_V1_LanguageServiceServiceClient(address: "language.googleapis.com")
+    service.metadata = Metadata(["x-goog-api-key": GOOGLE_API_KEY])
+    // Call the API.
+    var document = Google_Cloud_Language_V1_Document()
+    document.type = .plainText
+    document.content = "The Caterpillar and Alice looked at each other for some time in silence: at last the Caterpillar took the hookah out of its mouth, and addressed her in a languid, sleepy voice. `Who are you?' said the Caterpillar."
+    var features = Google_Cloud_Language_V1_AnnotateTextRequest.Features()
+    features.extractSyntax = true
+    features.extractEntities = true
+    features.extractDocumentSentiment = true
+    features.extractEntitySentiment = true
+    features.classifyText = true
+    var request = Google_Cloud_Language_V1_AnnotateTextRequest()
+    request.document = document
+    request.features = features
+    print("REQUEST: \(request)")
+    do {
+      let _ = try service.annotateText(request) {response, callresult in
+        print("RESULT: \(callresult)")
+        if let response = response {
+          print("RESPONSE: \(response)")
+          self.signal(UIColor.green);
+        } else {
+          self.signal(UIColor.red);
+        }
+      }
+    } catch {
+      print("ERROR: \(error)")
+      signal(UIColor.red)
+    }
+    return true
+  }
+
+  func signal(_ c : UIColor) {
+    DispatchQueue.main.async {
+      self.window?.rootViewController?.view?.backgroundColor = c;
+    }
+  }
+}
+

+ 41 - 0
Examples/Cocoapods/NaturalLanguage/NaturalLanguage/Info.plist

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>UIRequiredDeviceCapabilities</key>
+	<array>
+		<string>armv7</string>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+</dict>
+</plist>

+ 10 - 0
Examples/Cocoapods/NaturalLanguage/Podfile

@@ -0,0 +1,10 @@
+# Uncomment this line if you're using Swift
+use_frameworks!
+
+target 'NaturalLanguage' do
+
+  pod 'SwiftGRPC'
+
+end
+
+

+ 24 - 0
Examples/Cocoapods/NaturalLanguage/README.md

@@ -0,0 +1,24 @@
+# Calling the Google Cloud Natural Language API
+
+This directory contains a very simple sample that calls the 
+[Google Cloud Natural Language API](https://cloud.google.com/datastore/docs/reference/rpc/google.datastore.v1).
+Calls are made directly to the Cloud Natural Language RPC interface. 
+In practice, these would be wrapped in idiomatic code.
+
+1. Use [RUNME](RUNME) to generate the necessary Protocol Buffer
+and gRPC support code. It uses protoc and the Swift Protocol
+Buffer and gRPC plugins, so please be sure these are in your
+path. The plugins can be built by running `make` in the 
+top-level grpc-swift directory.
+
+2. Run `pod install` to install the SwiftGRPC pod and its dependencies.
+
+3. Open NaturalLanguage.xcworkspace and set GOOGLE_API_KEY in the application delegate.
+
+4. Run the app.
+
+## Prerequisites
+
+This sample requires a Google Cloud Platform account and an API key
+for the Cloud Natural Language service. 
+Visit [https://cloud.google.com](cloud.google.com) for details.

+ 27 - 0
Examples/Cocoapods/NaturalLanguage/RUNME

@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Use this script to regenerate the Protocol Buffer and gRPC files
+# needed to build the example.
+#
+# Note that it requires protoc, protoc-gen-swift, and
+# protoc-gen-swiftgrpc binaries.
+
+if [ ! -d "googleapis" ]; then
+  curl -L -O https://github.com/googleapis/googleapis/archive/master.zip
+  unzip master.zip
+  rm -f master.zip
+  mv googleapis-master googleapis
+fi
+
+protoc \
+ 	google/cloud/language/v1/language_service.proto \
+	google/api/annotations.proto \
+	google/api/http.proto \
+	google/protobuf/descriptor.proto \
+ 	-Igoogleapis \
+	-I../../Google/common/include \
+	--swift_out=googleapis \
+	--swiftgrpc_out=googleapis
+
+# move Swift files to the sources directory
+find googleapis -name "*.swift" -exec mv {} NaturalLanguage \;