From 8ea384b85583f722697c9b58f1afa6c5a81d968e Mon Sep 17 00:00:00 2001 From: Pedro Vieira Date: Thu, 25 Jun 2015 10:33:56 +0100 Subject: [PATCH 1/4] Imported UIKit into HOKSwizzling.m --- Hoko/HOKSwizzling.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Hoko/HOKSwizzling.m b/Hoko/HOKSwizzling.m index b4a5dc3..4fadc8b 100644 --- a/Hoko/HOKSwizzling.m +++ b/Hoko/HOKSwizzling.m @@ -9,6 +9,7 @@ #import "HOKSwizzling.h" #import +#import #import "Hoko.h" #import "HOKError.h" From 9ce00439374a7530dd25515a098430b3e0839177 Mon Sep 17 00:00:00 2001 From: Pedro Vieira Date: Thu, 25 Jun 2015 10:39:21 +0100 Subject: [PATCH 2/4] Imported UIKit into HOKDeeplinking.h --- Hoko/HOKDeeplinking.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Hoko/HOKDeeplinking.h b/Hoko/HOKDeeplinking.h index 2ea1feb..5953b63 100755 --- a/Hoko/HOKDeeplinking.h +++ b/Hoko/HOKDeeplinking.h @@ -6,8 +6,9 @@ // Copyright (c) 2015 Hoko, S.A. All rights reserved. // -#import "HOKDeeplink.h" +#import +#import "HOKDeeplink.h" #import "Hoko+Nullability.h" /** From e16b04c63d811e770226dfba3af5fc565b70ac44 Mon Sep 17 00:00:00 2001 From: Pedro Vieira Date: Thu, 25 Jun 2015 11:07:02 +0100 Subject: [PATCH 3/4] Added Section 'Integrating the SDK with your Swift project' --- DOCUMENTATION.md | 14 ++++++++++++++ README.md | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index d101632..a5a4539 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -25,6 +25,20 @@ With HOKO, you can aggregate all the platforms where your App is available. Each 3. Run `pod install` and wait for CocoaPod to install HOKO SDK. From this moment on, instead of using `.xcodeproj` file, you should start using `.xcworkspace`. +### Integrating the SDK with your Swift project + +Because the HOKO SDK is written in `Objective-C`, you'll have to manually add a `Bridging Header file` into your project in order to use it with your Swift code: + +* `File` > `New` > `File...` > `iOS` > `Source` > `Header File` + +* Name that header file `YourAppName-Bridging-Header.h` + +* Inside that header file, import `#import "Hoko.h"` + +* Go to your project > `Build Settings` > `Objective-C Bridging Header` > add the path to your bridging header file, from your root folder (e.g. `MyApp/MyApp-Bridging-Header.h`) + +* Get Swifty! + ### Framework 1. Download the [Hoko SDK](https://github.com/hokolinks/hoko-ios/archive/master.zip). diff --git a/README.md b/README.md index bd75cc4..82ff348 100755 --- a/README.md +++ b/README.md @@ -39,6 +39,20 @@ To integrate HOKO in your app, simply follow the 3 simple steps below after addi 2. Drag the `Hoko` folder to your project. 3. Be sure to also add `SystemConfiguration.framework` and `zlib.dylib` in case your project does not include it already. +### Integrating the SDK with your Swift project + +Because the HOKO SDK is written in `Objective-C`, you'll have to manually add a `Bridging Header file` into your project in order to use it with your Swift code: + +* `File` > `New` > `File...` > `iOS` > `Source` > `Header File` + +* Name that header file `YourAppName-Bridging-Header.h` + +* Inside that header file, import `#import "Hoko.h"` + +* Go to your project > `Build Settings` > `Objective-C Bridging Header` > add the path to your bridging header file, from your root folder (e.g. `MyApp/MyApp-Bridging-Header.h`) + +* Get Swifty! + ## SDK Setup Add the following line to your `applicationDidFinishLaunching` method in your `AppDelegate` class (don't forget to import the HOKO class by using `#import ` if you're working with `Objective-C`). From 47283c7183dc305e056722a2f4952562b942f572 Mon Sep 17 00:00:00 2001 From: Ivan Bruel Date: Mon, 29 Jun 2015 10:35:47 +0100 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 82ff348..ff15a82 100755 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Because the HOKO SDK is written in `Objective-C`, you'll have to manually add a * Name that header file `YourAppName-Bridging-Header.h` -* Inside that header file, import `#import "Hoko.h"` +* Inside that header file, import `#import ` * Go to your project > `Build Settings` > `Objective-C Bridging Header` > add the path to your bridging header file, from your root folder (e.g. `MyApp/MyApp-Bridging-Header.h`)