Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Change Log
==========
Version 1.3.0 (17 April, 2026)
-----------------------------------------------
- **Image with CTA:** Adds a new `Vertical Image` push notification template - support images and GIF.

Version 1.2.0 (19 Feb, 2026)
-----------------------------------------------
- Adds support to display GIFs in `Basic`, `Timer`, `Zero Bezel` and `Rating` templates.
Expand Down
2 changes: 1 addition & 1 deletion CTNotificationContent.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "CTNotificationContent"
s.version = "1.2.0"
s.version = "1.3.0"
s.summary = "A Notification Content Extension class to display custom content interfaces for iOS 10 push notifications"
s.homepage = "https://github.com/CleverTap/CTNotificationContent"
s.license = "MIT"
Expand Down
36 changes: 34 additions & 2 deletions CTNotificationContent.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
A1B2C3D4E5F60001A1B2C3D4 /* SDWebImage in Frameworks */ = {isa = PBXBuildFile; productRef = A1B2C3D4E5F60002A1B2C3D4 /* SDWebImage */; };
0B0115BE2CAFFD8C00985815 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B0115BD2CAFFD8900985815 /* Extensions.swift */; };
3270BFDA28E4D80E003528ED /* CTProductDisplayVerticalViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3270BFD328E4D80E003528ED /* CTProductDisplayVerticalViewController.swift */; };
3270BFDB28E4D80E003528ED /* CTProductDisplayLinearViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3270BFD428E4D80E003528ED /* CTProductDisplayLinearViewController.swift */; };
Expand Down Expand Up @@ -40,11 +39,14 @@
488F31BD2817009900AE3AC8 /* BaseCTNotificationContentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 488F31BC2817009900AE3AC8 /* BaseCTNotificationContentViewController.m */; };
488F31BF2817011100AE3AC8 /* CTNotificationViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 488F31BE2817011100AE3AC8 /* CTNotificationViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
488F31C12817012500AE3AC8 /* CTNotificationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 488F31C02817012500AE3AC8 /* CTNotificationViewController.m */; };
48D6ACBA2F9248BF00A17777 /* VerticalImageProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48D6ACB72F9248BF00A17777 /* VerticalImageProperties.swift */; };
48D6ACBB2F9248BF00A17777 /* CTVerticalImageController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48D6ACB52F9248BF00A17777 /* CTVerticalImageController.swift */; };
4E6CACEA28FE826800FD7E97 /* CTWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E6CACE728FE826800FD7E97 /* CTWebViewController.swift */; };
4E6CACEB28FE826800FD7E97 /* WebViewProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E6CACE928FE826800FD7E97 /* WebViewProperties.swift */; };
525715EE1E67B8C0000E455B /* CTNotificationContent.h in Headers */ = {isa = PBXBuildFile; fileRef = 525715EC1E67B8C0000E455B /* CTNotificationContent.h */; settings = {ATTRIBUTES = (Public, ); }; };
525715F71E67B990000E455B /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 525715F51E67B990000E455B /* UserNotifications.framework */; };
525715F81E67B990000E455B /* UserNotificationsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 525715F61E67B990000E455B /* UserNotificationsUI.framework */; };
A1B2C3D4E5F60001A1B2C3D4 /* SDWebImage in Frameworks */ = {isa = PBXBuildFile; productRef = A1B2C3D4E5F60002A1B2C3D4 /* SDWebImage */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -80,6 +82,8 @@
488F31BC2817009900AE3AC8 /* BaseCTNotificationContentViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseCTNotificationContentViewController.m; sourceTree = "<group>"; };
488F31BE2817011100AE3AC8 /* CTNotificationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CTNotificationViewController.h; sourceTree = "<group>"; };
488F31C02817012500AE3AC8 /* CTNotificationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CTNotificationViewController.m; sourceTree = "<group>"; };
48D6ACB52F9248BF00A17777 /* CTVerticalImageController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CTVerticalImageController.swift; sourceTree = "<group>"; };
48D6ACB72F9248BF00A17777 /* VerticalImageProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VerticalImageProperties.swift; sourceTree = "<group>"; };
48F39FDC2857766000810877 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4E6CACE728FE826800FD7E97 /* CTWebViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CTWebViewController.swift; sourceTree = "<group>"; };
4E6CACE928FE826800FD7E97 /* WebViewProperties.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebViewProperties.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -176,6 +180,7 @@
32DFD82928BCCCBB00E72588 /* Templates */ = {
isa = PBXGroup;
children = (
48D6ACB92F9248BF00A17777 /* VerticalImage */,
4E6CACE528FE826800FD7E97 /* WebView */,
3270BFE928E4D89C003528ED /* Rating */,
3270BFD128E4D80E003528ED /* ProductDisplay */,
Expand Down Expand Up @@ -329,6 +334,31 @@
path = Resources;
sourceTree = "<group>";
};
48D6ACB62F9248BF00A17777 /* Controller */ = {
isa = PBXGroup;
children = (
48D6ACB52F9248BF00A17777 /* CTVerticalImageController.swift */,
);
path = Controller;
sourceTree = "<group>";
};
48D6ACB82F9248BF00A17777 /* Model */ = {
isa = PBXGroup;
children = (
48D6ACB72F9248BF00A17777 /* VerticalImageProperties.swift */,
);
path = Model;
sourceTree = "<group>";
};
48D6ACB92F9248BF00A17777 /* VerticalImage */ = {
isa = PBXGroup;
children = (
48D6ACB62F9248BF00A17777 /* Controller */,
48D6ACB82F9248BF00A17777 /* Model */,
);
path = VerticalImage;
sourceTree = "<group>";
};
4E6CACE528FE826800FD7E97 /* WebView */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -499,6 +529,8 @@
488F31AF2817000200AE3AC8 /* CTCaptionedImageView.swift in Sources */,
32C575EE28F744E600BF0A3F /* CTRatingsViewController.swift in Sources */,
32DFD85128BCCCBB00E72588 /* CTUtility.swift in Sources */,
48D6ACBA2F9248BF00A17777 /* VerticalImageProperties.swift in Sources */,
48D6ACBB2F9248BF00A17777 /* CTVerticalImageController.swift in Sources */,
32DFD84928BCCCBB00E72588 /* TimerTemplateProperties.swift in Sources */,
488F31BD2817009900AE3AC8 /* BaseCTNotificationContentViewController.m in Sources */,
32DFD85028BCCCBB00E72588 /* GlobalConstants.swift in Sources */,
Expand Down
11 changes: 10 additions & 1 deletion CTNotificationContent/CTNotificationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ typedef NS_ENUM(NSInteger, CTNotificationContentType) {
CTNotificationContentTypeZeroBezel = 6,
CTNotificationContentTypeWebView = 7,
CTNotificationContentTypeProductDisplay = 8,
CTNotificationContentTypeRating = 9
CTNotificationContentTypeRating = 9,
CTNotificationContentTypeVerticalImage = 10
};

static NSString * const kTemplateId = @"pt_id";
Expand All @@ -37,6 +38,7 @@ typedef NS_ENUM(NSInteger, CTNotificationContentType) {
static NSString * const kTemplateWebView = @"pt_web_view";
static NSString * const kTemplateProductDisplay = @"pt_product_display";
static NSString * const kTemplateRating = @"pt_rating";
static NSString * const kTemplateVerticalImage = @"pt_vertical_img";

@interface CTNotificationViewController () <UNNotificationContentExtension>

Expand Down Expand Up @@ -153,6 +155,11 @@ - (void)didReceiveNotification:(UNNotification *)notification {
[self setupContentController:contentController];
}
break;
case CTNotificationContentTypeVerticalImage: {
CTVerticalImageController *contentController = [[CTVerticalImageController alloc] init];
[self setupContentController:contentController];
}
break;
default:
break;
}
Expand Down Expand Up @@ -201,6 +208,8 @@ - (void)updateContentType:(NSDictionary *)content {
self.contentType = CTNotificationContentTypeProductDisplay;
}else if ([content[kTemplateId] isEqualToString:kTemplateRating]) {
self.contentType = CTNotificationContentTypeRating;
}else if ([content[kTemplateId] isEqualToString:kTemplateVerticalImage]) {
self.contentType = CTNotificationContentTypeVerticalImage;
} else {
// Invalid pt_id value fallback to basic.
self.contentType = CTNotificationContentTypeBasicTemplate;
Expand Down
Loading