Skip to content

Commit 66b00d8

Browse files
committed
Fix crash in ContentstackLogger and improve async/await handling for cache policies
- Updated CHANGELOG for version 2.5.1 with bug fixes related to ContentstackLogger and cache policies. - Added a new test plan for iOS to ensure proper testing configurations. - Removed outdated iOS test scheme files and replaced them with a new test plan. - Enhanced async/await APIs to handle cache policies correctly, specifically converting `CachePolicy.cacheThenNetwork` to `CachePolicy.cacheElseNetwork`. - Improved logging in ContentstackLogger to prevent crashes when using percent-encoded URLs as format strings. - Added regression tests to ensure proper logging behavior and prevent crashes related to format specifiers. - Updated documentation in README and CSDefinitions to clarify cache policy behaviors and logging practices.
1 parent 7ac37d6 commit 66b00d8

16 files changed

Lines changed: 392 additions & 514 deletions

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# CHANGELOG
22

3+
## v2.5.1
4+
5+
### Date: 17-Aug-2026
6+
7+
### Bug Fixes
8+
9+
- Fixed a crash in `ContentstackLogger` caused by passing the log message to `NSLog` as the format string. Affects the default logger configuration (`logType = .nsLog`, `logLevel = .error`).
10+
- `CachePolicy.cacheThenNetwork` no longer crashes the `async`/`await` APIs; it is served as `CachePolicy.cacheElseNetwork`. The completion-handler APIs are unchanged.
11+
- `CachePolicy.networkElseCache` set per request now falls back to the cache on transport errors.
12+
- A response with neither data nor an error no longer leaves an `async` call suspended indefinitely.
13+
314
## v2.5.0
415

516
### Date: 27-Jul-2026

ContentstackSwift.xcodeproj/xcshareddata/xcschemes/Contentstack iOS Tests.xcscheme

Lines changed: 0 additions & 59 deletions
This file was deleted.

ContentstackSwift.xcodeproj/xcshareddata/xcschemes/Contentstack iOS.xcscheme

Lines changed: 0 additions & 67 deletions
This file was deleted.

ContentstackSwift.xcworkspace/xcshareddata/xcschemes/Contentstack iOS.xcscheme

Lines changed: 0 additions & 78 deletions
This file was deleted.

ContentstackSwift.xcworkspace/xcshareddata/xcschemes/Contentstack macOS Tests.xcscheme

Lines changed: 0 additions & 54 deletions
This file was deleted.

ContentstackSwift.xcworkspace/xcshareddata/xcschemes/Contentstack macOS.xcscheme

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)