Skip to content

Commit

Permalink
Release 2.0.1 (#153)
Browse files Browse the repository at this point in the history
* Updated Release Artifacts

* Updated example projects
  • Loading branch information
iamsimranjot authored Nov 19, 2019
1 parent 4e88dc5 commit cb337ae
Show file tree
Hide file tree
Showing 39 changed files with 820 additions and 801 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Required at the Initial Launch of the Application
Haptik.sharedSDK().notify(application, launchedWithOptions: launchOptions)

// Required for Enterprise Clients
HPConfiguration.shared().useInbox = false;

//


// If you need the callbacks of the analytics data that haptik sends
HPConfiguration.shared().analyticsCallbackObject = self;

// If you don't need the mic button
HPConfiguration.shared().useVoice = false;

// Setup UI Theme for Haptik
setHaptikTheme()

// Interactive Pop Gesture

// This BOOL controls the functionality of the EdgePanGestureRecognizer feature of UINavigationController
// that allows to set the slide to go back functionality for Haptik Screens. By default the value will be true.

HPConfiguration.shared().useInteractivePopGesture = true

return true
}

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {

// Let Haptik handle the redirect if required

let isHandledByHaptik = Haptik.sharedSDK().isRedirectHandled(url, options: options)
return isHandledByHaptik
}
}

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ class RootViewController: UIViewController {

if Haptik.sharedSDK().isUserSignedUp() {

// NOTE: For Publishers:
// initialVC gives a list of channels that are available to that client
// Option A

// Haptik.sharedSDK().getInitialVC() gives you the initialVC that you can push on your stack
/*Haptik.sharedSDK().launchChannel(with: "channel_via_name",
message: "any_message_you_wanna_start_With",
controller: self);*/

// NOTE: For Enterprise:
// You don't need to push to the initialVC that Haptik gives. You need to directly go to the conversation channel with the "viaName" that will be provided to you.
// You can use:
// Option B

/*Haptik.sharedSDK().launchChannel(with: "provided_via_name",
message: "any_message_you_wanna_start_With",
controller: <#instance_of_vc_from_which_the_conversationVC_is_pushed#>)*/
let conversation = try? Haptik.sharedSDK().getConversationFor(viaName: "channel_via_name")
if let conversation = conversation {
present(conversation, animated: true, completion: nil)
}
}
else {

Expand All @@ -52,6 +52,7 @@ class RootViewController: UIViewController {
let signupObject = HPSignUpObject.build(withAuthType: "basic") { (builder) in

builder.userFullName = "Simranjot"
builder.viaName = "channel_via_name"

// You can set more properties on the builder according to the requirements
}
Expand All @@ -60,7 +61,14 @@ class RootViewController: UIViewController {

if success {

// From here you can either push to the specific conversation controller or to the list of channel controller according to your requirements
// From here you can either push to the specific conversation controller if you pass in the via name in the builder

if let initialVC = initialVC {
self.present(initialVC, animated: true, completion: nil)
}
else {
// Handle Error here
}
}
else {

Expand Down
12 changes: 6 additions & 6 deletions Examples/Swift-Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
PODS:
- FLAnimatedImage (1.0.12)
- HaptikLib (1.8.1):
- HaptikLib/Core (= 1.8.1)
- HaptikLib/Base (1.8.1):
- HaptikLib (2.0.1):
- HaptikLib/Core (= 2.0.1)
- HaptikLib/Base (2.0.1):
- PINRemoteImage (= 3.0.0-beta.13)
- PINRemoteImage/WebP (= 3.0.0-beta.13)
- HaptikLib/Core (1.8.1):
- HaptikLib/Core (2.0.1):
- HaptikLib/Base
- libwebp (1.0.0):
- libwebp/core (= 1.0.0)
Expand Down Expand Up @@ -71,12 +71,12 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
FLAnimatedImage: 4a0b56255d9b05f18b6dd7ee06871be5d3b89e31
HaptikLib: 65a97eefa623b438aff07d06f1189e5d0142213f
HaptikLib: 7f4570b033bb411bdae685742dcbc4eabdb91be9
libwebp: d7e0c95fe97245c97e08101eba10702ebb0f6101
PINCache: d195fdba255283f7e9900a55e3cced377f431f9b
PINOperation: a6219e6fc9db9c269eb7a7b871ac193bcf400aac
PINRemoteImage: d6d51c5d2adda55f1ce30c96e850b6c4ebd2856a

PODFILE CHECKSUM: af48b7d0fe816286c0ab0aceecab9a38fe7f58a7

COCOAPODS: 1.8.1
COCOAPODS: 1.8.4
23 changes: 4 additions & 19 deletions Examples/Swift-Example/Swift-Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Required at the Initial Launch of the Application
Haptik.sharedSDK().notify(application, launchedWithOptions: launchOptions)

// Required for Enterprise Clients
HPConfiguration.shared().useInbox = false;

// If you need the callbacks of the analytics data that haptik sends
HPConfiguration.shared().analyticsCallbackObject = self;

// If you don't need the mic button
HPConfiguration.shared().useVoice = false;

// Setup UI Theme for Haptik
setHaptikTheme()

// Interactive Pop Gesture

// This BOOL controls the functionality of the EdgePanGestureRecognizer feature of UINavigationController
// that allows to set the slide to go back functionality for Haptik Screens. By default the value will be true.

HPConfiguration.shared().useInteractivePopGesture = true

return true
}

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {

// Let Haptik handle the redirect if required

let isHandledByHaptik = Haptik.sharedSDK().isRedirectHandled(url, options: options)
return isHandledByHaptik
}
}

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ class RootViewController: UIViewController {

if Haptik.sharedSDK().isUserSignedUp() {

// NOTE: For Publishers:
// initialVC gives a list of channels that are available to that client
// Option A

// Haptik.sharedSDK().getInitialVC() gives you the initialVC that you can push on your stack
/*Haptik.sharedSDK().launchChannel(with: "channel_via_name",
message: "any_message_you_wanna_start_With",
controller: self);*/

// NOTE: For Enterprise:
// You don't need to push to the initialVC that Haptik gives. You need to directly go to the conversation channel with the "viaName" that will be provided to you.
// You can use:
// Option B

/*Haptik.sharedSDK().launchChannel(with: "provided_via_name",
message: "any_message_you_wanna_start_With",
controller: <#instance_of_vc_from_which_the_conversationVC_is_pushed#>)*/
let conversation = try? Haptik.sharedSDK().getConversationFor(viaName: "channel_via_name")
if let conversation = conversation {
present(conversation, animated: true, completion: nil)
}
}
else {

Expand All @@ -52,6 +52,7 @@ class RootViewController: UIViewController {
let signupObject = HPSignUpObject.build(withAuthType: "basic") { (builder) in

builder.userFullName = "Simranjot"
builder.viaName = "channel_via_name"

// You can set more properties on the builder according to the requirements
}
Expand All @@ -60,7 +61,14 @@ class RootViewController: UIViewController {

if success {

// From here you can either push to the specific conversation controller or to the list of channel controller according to your requirements
// From here you can either push to the specific conversation controller if you pass in the via name in the builder

if let initialVC = initialVC {
self.present(initialVC, animated: true, completion: nil)
}
else {
// Handle Error here
}
}
else {

Expand Down
Loading

0 comments on commit cb337ae

Please sign in to comment.