Skip to content

Commit

Permalink
Release v2.2.1 (#157)
Browse files Browse the repository at this point in the history
* ChangeLog Updated

* Pod Spec Updated

* Example Projects Updated

* Build Artifacts Updated
  • Loading branch information
iamsimranjot authored Feb 6, 2020
1 parent c69cde9 commit e1c1218
Show file tree
Hide file tree
Showing 49 changed files with 539 additions and 686 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.2.1] - (05/02/20) - C iOS

### Features
- Allow custom data requests before chat initiation

### Enhancements
- Deprecated user details and settings scene

### Bugs
- Device Token not parsed correctly is fixed
---

## [2.2.0] - (13/01/20) - A iOS

### Features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import UIKit
import HaptikLib
import HaptikBase
import UserNotifications;

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
Expand All @@ -31,13 +32,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

return true
}
}


// MARK: Notification Helpers

extension AppDelegate {

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

// You need to pass the Device Token after the user successfully signs up in Haptik. Till that you need to store it in your application.

UserDefaults.standard.set(deviceToken, forKey: "kDeviceToken")
UserDefaults.standard.synchronize()

Haptik.sharedSDK().setDeviceToken(deviceToken)
}

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {
Expand All @@ -52,6 +61,23 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
handleNotificationInteraction(userInfo as! [String : Any])
}
}

@available(iOS 10.0, *)
func userNotificationCenter(_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandler completionHandler: @escaping () -> Void) {

// Check if the notification received belongs to haptik and take action accordingly

let userInfo = response.notification.request.content.userInfo as! [String : Any]
let isHaptikNotification = Haptik.sharedSDK().canHandleNotification(userInfo: userInfo)

if isHaptikNotification {

print("Do Housekeeping")
handleNotificationInteraction(userInfo)
}
}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ class RootViewController: UIViewController {

if success {

// From here you can either push to the specific conversation controller if you pass in the via name in the builder
let deviceToken = UserDefaults.standard.object(forKey: "kDeviceToken") as! Data
Haptik.sharedSDK().setDeviceToken(deviceToken)

// 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)
}
Expand Down
10 changes: 5 additions & 5 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 (2.2.0):
- HaptikLib/Core (= 2.2.0)
- HaptikLib/Base (2.2.0):
- HaptikLib (2.2.1):
- HaptikLib/Core (= 2.2.1)
- HaptikLib/Base (2.2.1):
- PINRemoteImage (= 3.0.0-beta.13)
- PINRemoteImage/WebP (= 3.0.0-beta.13)
- HaptikLib/Core (2.2.0):
- HaptikLib/Core (2.2.1):
- HaptikLib/Base
- libwebp (1.0.0):
- libwebp/core (= 1.0.0)
Expand Down Expand Up @@ -71,7 +71,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
FLAnimatedImage: 4a0b56255d9b05f18b6dd7ee06871be5d3b89e31
HaptikLib: 7c97bb487cc4367ef3de74b22e23476d7e244968
HaptikLib: f9d55650b8637da017981471922b846f25ea77c0
libwebp: d7e0c95fe97245c97e08101eba10702ebb0f6101
PINCache: d195fdba255283f7e9900a55e3cced377f431f9b
PINOperation: a6219e6fc9db9c269eb7a7b871ac193bcf400aac
Expand Down
26 changes: 26 additions & 0 deletions Examples/Swift-Example/Swift-Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import UIKit
import HaptikLib
import HaptikBase
import UserNotifications;

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
Expand All @@ -31,13 +32,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

return true
}
}


// MARK: Notification Helpers

extension AppDelegate {

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

// You need to pass the Device Token after the user successfully signs up in Haptik. Till that you need to store it in your application.

UserDefaults.standard.set(deviceToken, forKey: "kDeviceToken")
UserDefaults.standard.synchronize()

Haptik.sharedSDK().setDeviceToken(deviceToken)
}

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {
Expand All @@ -52,6 +61,23 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
handleNotificationInteraction(userInfo as! [String : Any])
}
}

@available(iOS 10.0, *)
func userNotificationCenter(_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandler completionHandler: @escaping () -> Void) {

// Check if the notification received belongs to haptik and take action accordingly

let userInfo = response.notification.request.content.userInfo as! [String : Any]
let isHaptikNotification = Haptik.sharedSDK().canHandleNotification(userInfo: userInfo)

if isHaptikNotification {

print("Do Housekeeping")
handleNotificationInteraction(userInfo)
}
}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ class RootViewController: UIViewController {

if success {

// From here you can either push to the specific conversation controller if you pass in the via name in the builder
let deviceToken = UserDefaults.standard.object(forKey: "kDeviceToken") as! Data
Haptik.sharedSDK().setDeviceToken(deviceToken)

// 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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>2.2.0</string>
<string>2.2.1</string>
<key>CFBundleVersion</key>
<string>17</string>
<string>19</string>
</dict>
</plist>
Git LFS file not shown
Git LFS file not shown
Binary file modified Frameworks/Analytics/HaptikAnalytics.framework/Info.plist
Binary file not shown.
4 changes: 2 additions & 2 deletions Frameworks/Base/HaptikBase.framework.dSYM/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>2.2.0</string>
<string>2.2.1</string>
<key>CFBundleVersion</key>
<string>42</string>
<string>44</string>
</dict>
</plist>
Binary file not shown.
Binary file modified Frameworks/Base/HaptikBase.framework/HaptikBase
Binary file not shown.
Binary file modified Frameworks/Base/HaptikBase.framework/Info.plist
Binary file not shown.
Loading

0 comments on commit e1c1218

Please sign in to comment.