Nightsd01 Sdk improvements (#350)
* Date Handling

• Some users were trying to use the `send_after` field to set delay dates for notifications, and were using NSDate objects to specify the date
• NSJSONSerialization cannot automatically convert dates to strings, so this commit adds automatic date conversion for the `postNotification()` method.

* Fix Dates Test Issue

• The UnitTests target did not have the correct file permission to use the new date conversion NSMutableDictionary category...

* Case Insensitive Email Auth Hash Strings

• Changes the SDK to always convert email auth hash tokens to be lowercase to prevent issues.

* Remove Lowercase Hash Token

• It's been decided to perform case insensitive hash token comparisons on the backend instead of performing this conversion on the SDK.
• Removed the lowercase string conversion. This also broke some tests in the previous commit which weren't changed to convert the hash token to be lowercase before comparing.

* Add Deprecation Notice to syncHashedEmail()

• We are deprecating (and will soon remove) the syncHashedEmail() method from the SDK.

* PostNotification() Callback Response Thread

• Changed the SDK to ensure that PostNotification() callbacks are always called on the main thread to help developers prevent UI bugs

* Add Test for Email Subscription State Description

• Adds a test to verify that the OSEmailSubscriptionState and OSEmailSubscriptionStateChanges instance description strings are properly formatted

* * Fixes two issues that would have crashed the iOS SDK in iOS 7
* Fixes an issue parsing the new notification payload format
* Adds a new setting, kOSSettingsKeyPromptBeforeOpeningPushURL. This setting determines what happens when the user taps a push notification containing a launch URL. If the setting = true, the SDK will show a popup asking if the user wants to open the URL.
* Fixes an issue with the Swift demo where all tapped notifications would always open the Red view controller (which should only happen in response to tapping a button with id = id1)

* Remove Private API

• As a convenience, the SDK used to call some deprecated AppDelegate methods (such as application:didReceiveLocalNotification:).
• However some developers have raised concerns that this requires the use of private API's
• Since this should be relatively rare, we are removing this functionality and will print warnings whenever a developer implements these methods

* Fix Web Alert

• Fixes the alert so that instead of printing the entire URL address (which could be quite long), it prints only the scheme and the host (ie. http://google.com).
• Using localized strings

* Cleanup

• Fix NSMutableDictionary category copyright
• Cleans up unnecessary log statements

* Cleanup - Chapter 2

• Remove an unnecessary log statement
Latest commit 5ed4ff3 Mar 13, 2018
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
ObjectiveCExample Improves Email Demos (#344) Mar 1, 2018
SwiftExample Sdk improvements (#350) Mar 13, 2018
.gitignore Repo restructure (#203) Mar 10, 2017
README.md Repo restructure (#203) Mar 10, 2017

README.md

Running Example projects.

  1. Open ObjectiveCExample or SwiftExample in your terminal.
  2. Run sudo gem install cocoapods to install Cocoapods.
  3. Run pod repo update to make sure you get the latest OneSignal version.
  4. Run pod install
  5. Open OneSignalDemo.xcworkspace
  6. Under General in Xcode Change the Bundle identifier to yours.
  7. Also change your Team under signing below this.
  8. Open AppDelegate and change the appId passed to OneSignal initWithLaunchOptions to yours.