Commit 5ed4ff3
authored
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 statement1 parent 552c84d commit 5ed4ff3
File tree
15 files changed
+389
-96
lines changed- Examples/SwiftExample/OneSignalDemo
- iOS_SDK/OneSignalSDK
- OneSignal.xcodeproj
- Source
- UnitTests
15 files changed
+389
-96
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 64 | | |
74 | 65 | | |
75 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
| |||
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
147 | 154 | | |
148 | 155 | | |
149 | 156 | | |
| |||
267 | 274 | | |
268 | 275 | | |
269 | 276 | | |
| 277 | + | |
| 278 | + | |
270 | 279 | | |
271 | 280 | | |
272 | 281 | | |
| |||
277 | 286 | | |
278 | 287 | | |
279 | 288 | | |
| 289 | + | |
| 290 | + | |
280 | 291 | | |
281 | 292 | | |
282 | 293 | | |
| |||
457 | 468 | | |
458 | 469 | | |
459 | 470 | | |
| 471 | + | |
| 472 | + | |
460 | 473 | | |
461 | 474 | | |
462 | 475 | | |
| |||
472 | 485 | | |
473 | 486 | | |
474 | 487 | | |
| 488 | + | |
| 489 | + | |
475 | 490 | | |
476 | 491 | | |
477 | 492 | | |
| |||
554 | 569 | | |
555 | 570 | | |
556 | 571 | | |
| 572 | + | |
557 | 573 | | |
558 | 574 | | |
559 | 575 | | |
| |||
705 | 721 | | |
706 | 722 | | |
707 | 723 | | |
| 724 | + | |
708 | 725 | | |
709 | 726 | | |
710 | 727 | | |
| |||
717 | 734 | | |
718 | 735 | | |
719 | 736 | | |
| 737 | + | |
720 | 738 | | |
721 | 739 | | |
722 | 740 | | |
| |||
741 | 759 | | |
742 | 760 | | |
743 | 761 | | |
| 762 | + | |
744 | 763 | | |
745 | 764 | | |
746 | 765 | | |
| |||
753 | 772 | | |
754 | 773 | | |
755 | 774 | | |
| 775 | + | |
756 | 776 | | |
757 | 777 | | |
758 | 778 | | |
| |||
797 | 817 | | |
798 | 818 | | |
799 | 819 | | |
| 820 | + | |
| 821 | + | |
800 | 822 | | |
801 | 823 | | |
802 | 824 | | |
| |||
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
| |||
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
309 | 313 | | |
310 | 314 | | |
311 | 315 | | |
| |||
364 | 368 | | |
365 | 369 | | |
366 | 370 | | |
367 | | - | |
| 371 | + | |
368 | 372 | | |
369 | 373 | | |
370 | 374 | | |
| |||
0 commit comments