From 8fd6b85f53be0c5d82317d2e71843fb350796093 Mon Sep 17 00:00:00 2001 From: Robin Oster Date: Mon, 24 Oct 2016 14:27:00 +0200 Subject: [PATCH] Make the constructor accessable from the outside --- ROGoogleTranslate.podspec | 21 +++++++++++++++++++++ ROGoogleTranslate.xcodeproj/project.pbxproj | 8 ++++---- ROGoogleTranslate/Info.plist | 2 +- ROGoogleTranslate/ROGoogleTranslate.swift | 9 ++++++++- 4 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 ROGoogleTranslate.podspec diff --git a/ROGoogleTranslate.podspec b/ROGoogleTranslate.podspec new file mode 100644 index 0000000..41f001a --- /dev/null +++ b/ROGoogleTranslate.podspec @@ -0,0 +1,21 @@ +# +# Be sure to run `pod lib lint ROGoogleTranslate.podspec' to ensure this is a +# valid spec and remove all comments before submitting the spec. +# +# Any lines starting with a # are optional, but encouraged +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html +# + +Pod::Spec.new do |spec| + spec.name = 'ROGoogleTranslate' + spec.version = '0.0.2' + spec.license = { :type => 'MIT' } + spec.homepage = 'https://github.com/prine/ROGoogleTranslate' + spec.authors = { 'Robin Oster' => 'work@prine.ch' } + spec.summary = 'Simplifies the usage of the Google Translate API via Swift' + spec.source = { :git => 'https://github.com/prine/ROGoogleTranslate.git', :tag => "0.0.2" } + spec.source_files = 'Source/**/*' + spec.framework = 'SystemConfiguration' + spec.ios.deployment_target = '9.0' +end diff --git a/ROGoogleTranslate.xcodeproj/project.pbxproj b/ROGoogleTranslate.xcodeproj/project.pbxproj index 25407c1..90c552d 100644 --- a/ROGoogleTranslate.xcodeproj/project.pbxproj +++ b/ROGoogleTranslate.xcodeproj/project.pbxproj @@ -7,16 +7,17 @@ objects = { /* Begin PBXBuildFile section */ + CB46171F1DBE32740066AD96 /* ROGoogleTranslate.podspec in Resources */ = {isa = PBXBuildFile; fileRef = CB46171E1DBE32740066AD96 /* ROGoogleTranslate.podspec */; }; CBCA3FBD1DB90B850025D8E4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBCA3FBC1DB90B850025D8E4 /* AppDelegate.swift */; }; CBCA3FBF1DB90B850025D8E4 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBCA3FBE1DB90B850025D8E4 /* ViewController.swift */; }; CBCA3FC21DB90B850025D8E4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CBCA3FC01DB90B850025D8E4 /* Main.storyboard */; }; CBCA3FC41DB90B850025D8E4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CBCA3FC31DB90B850025D8E4 /* Assets.xcassets */; }; CBCA3FC71DB90B850025D8E4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CBCA3FC51DB90B850025D8E4 /* LaunchScreen.storyboard */; }; - CBCA3FD01DB90C280025D8E4 /* ROGoogleTranslate.podspec in Resources */ = {isa = PBXBuildFile; fileRef = CBCA3FCF1DB90C280025D8E4 /* ROGoogleTranslate.podspec */; }; CBCA3FD21DB90F970025D8E4 /* ROGoogleTranslate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBCA3FD11DB90F970025D8E4 /* ROGoogleTranslate.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + CB46171E1DBE32740066AD96 /* ROGoogleTranslate.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ROGoogleTranslate.podspec; sourceTree = SOURCE_ROOT; }; CBCA3FB91DB90B850025D8E4 /* ROGoogleTranslate.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ROGoogleTranslate.app; sourceTree = BUILT_PRODUCTS_DIR; }; CBCA3FBC1DB90B850025D8E4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; CBCA3FBE1DB90B850025D8E4 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -24,7 +25,6 @@ CBCA3FC31DB90B850025D8E4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; CBCA3FC61DB90B850025D8E4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; CBCA3FC81DB90B850025D8E4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - CBCA3FCF1DB90C280025D8E4 /* ROGoogleTranslate.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ROGoogleTranslate.podspec; sourceTree = ""; }; CBCA3FD11DB90F970025D8E4 /* ROGoogleTranslate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ROGoogleTranslate.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -66,6 +66,7 @@ CBCA3FBB1DB90B850025D8E4 /* ROGoogleTranslate */ = { isa = PBXGroup; children = ( + CB46171E1DBE32740066AD96 /* ROGoogleTranslate.podspec */, CBCA3FCE1DB90B8C0025D8E4 /* Source */, CBCA3FBC1DB90B850025D8E4 /* AppDelegate.swift */, CBCA3FBE1DB90B850025D8E4 /* ViewController.swift */, @@ -73,7 +74,6 @@ CBCA3FC31DB90B850025D8E4 /* Assets.xcassets */, CBCA3FC51DB90B850025D8E4 /* LaunchScreen.storyboard */, CBCA3FC81DB90B850025D8E4 /* Info.plist */, - CBCA3FCF1DB90C280025D8E4 /* ROGoogleTranslate.podspec */, ); path = ROGoogleTranslate; sourceTree = ""; @@ -147,7 +147,7 @@ buildActionMask = 2147483647; files = ( CBCA3FC71DB90B850025D8E4 /* LaunchScreen.storyboard in Resources */, - CBCA3FD01DB90C280025D8E4 /* ROGoogleTranslate.podspec in Resources */, + CB46171F1DBE32740066AD96 /* ROGoogleTranslate.podspec in Resources */, CBCA3FC41DB90B850025D8E4 /* Assets.xcassets in Resources */, CBCA3FC21DB90B850025D8E4 /* Main.storyboard in Resources */, ); diff --git a/ROGoogleTranslate/Info.plist b/ROGoogleTranslate/Info.plist index 16c67d8..66ac768 100644 --- a/ROGoogleTranslate/Info.plist +++ b/ROGoogleTranslate/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.0.1 + 0.0.2 CFBundleVersion 16298 LSRequiresIPhoneOS diff --git a/ROGoogleTranslate/ROGoogleTranslate.swift b/ROGoogleTranslate/ROGoogleTranslate.swift index 643ea5f..6cab023 100644 --- a/ROGoogleTranslate/ROGoogleTranslate.swift +++ b/ROGoogleTranslate/ROGoogleTranslate.swift @@ -19,7 +19,14 @@ public struct ROGoogleTranslateParams { open class ROGoogleTranslate { /// Store here the Google Translate API Key - var apiKey = "" + public var apiKey = "" + + /// + /// Initial constructor + /// + public init() { + + } /// /// Translate a phrase from one language into another