Manos Chorianopoulos

xib bundling issue fix2

# @objc Attributes Fix for SPM Class Resolution
## Problem
XIB files in SPM couldn't find Swift classes due to name mangling differences between CocoaPods and SPM, causing:
```
Unknown class _TtC41SwiftWarplyFramework_SwiftWarplyFramework40MyRewardsBannerOffersScrollTableViewCell in Interface Builder file.
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UITableViewCell 0x105f2d060> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key collectionView.'
```
## Solution
Added explicit `@objc(ClassName)` attributes to all cell classes to provide stable, predictable class names for XIB file instantiation.
## Classes Updated
### Table View Cells:
1. **MyRewardsBannerOffersScrollTableViewCell** - `@objc(MyRewardsBannerOffersScrollTableViewCell)`
2. **MyRewardsOffersScrollTableViewCell** - `@objc(MyRewardsOffersScrollTableViewCell)`
3. **ProfileCouponFiltersTableViewCell** - `@objc(ProfileCouponFiltersTableViewCell)`
4. **ProfileHeaderTableViewCell** - `@objc(ProfileHeaderTableViewCell)`
5. **ProfileQuestionnaireTableViewCell** - `@objc(ProfileQuestionnaireTableViewCell)`
6. **ProfileCouponTableViewCell** - `@objc(ProfileCouponTableViewCell)`
### Collection View Cells:
7. **MyRewardsOfferCollectionViewCell** - `@objc(MyRewardsOfferCollectionViewCell)`
8. **MyRewardsBannerOfferCollectionViewCell** - `@objc(MyRewardsBannerOfferCollectionViewCell)`
9. **ProfileFilterCollectionViewCell** - `@objc(ProfileFilterCollectionViewCell)`
## What This Fix Does
### Before:
- Swift name mangling in SPM: `_TtC41SwiftWarplyFramework_SwiftWarplyFramework40MyRewardsBannerOffersScrollTableViewCell`
- XIB files couldn't find the class
- Fell back to generic `UITableViewCell`
- Crashed when trying to connect `collectionView` outlet
### After:
- Explicit Objective-C name: `MyRewardsBannerOffersScrollTableViewCell`
- XIB files can reliably find the class
- Proper class instantiation
- All outlets connect correctly
## Benefits
1. **Stable Class Names** - XIB files always find the correct class regardless of Swift name mangling
2. **SPM Compatibility** - Works consistently in SPM environments
3. **CocoaPods Compatibility** - Maintains backward compatibility
4. **No Swift Regression** - All Swift features and improvements remain intact
5. **Industry Standard** - Common practice for Swift frameworks using XIB files
## Testing
After this fix, you should see:
- No more "Unknown class" errors
- Successful XIB instantiation
- Proper outlet connections
- No crashes related to key-value coding compliance
## Files Modified
1. `SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsBannerOffersScrollTableViewCell/MyRewardsBannerOffersScrollTableViewCell.swift`
2. `SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsOffersScrollTableViewCell/MyRewardsOffersScrollTableViewCell.swift`
3. `SwiftWarplyFramework/SwiftWarplyFramework/cells/ProfileCouponFiltersTableViewCell/ProfileCouponFiltersTableViewCell.swift`
4. `SwiftWarplyFramework/SwiftWarplyFramework/cells/ProfileHeaderTableViewCell/ProfileHeaderTableViewCell.swift`
5. `SwiftWarplyFramework/SwiftWarplyFramework/cells/ProfileQuestionnaireTableViewCell/ProfileQuestionnaireTableViewCell.swift`
6. `SwiftWarplyFramework/SwiftWarplyFramework/cells/ProfileCouponTableViewCell/ProfileCouponTableViewCell.swift`
7. `SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsOfferCollectionViewCell/MyRewardsOfferCollectionViewCell.swift`
8. `SwiftWarplyFramework/SwiftWarplyFramework/cells/MyRewardsBannerOfferCollectionViewCell/MyRewardsBannerOfferCollectionViewCell.swift`
9. `SwiftWarplyFramework/SwiftWarplyFramework/cells/ProfileFilterCollectionViewCell/ProfileFilterCollectionViewCell.swift`
This fix should resolve the XIB class resolution issue and eliminate the `NSUnknownKeyException` crashes in SPM environments.
......@@ -7,7 +7,8 @@
import UIKit
@objc public class MyRewardsBannerOfferCollectionViewCell: UICollectionViewCell {
@objc(MyRewardsBannerOfferCollectionViewCell)
public class MyRewardsBannerOfferCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var backgroundImage: UIImageView!
public override func awakeFromNib() {
......
......@@ -12,7 +12,8 @@ protocol MyRewardsBannerOffersScrollTableViewCellDelegate: AnyObject {
func didTapProfileButton()
}
@objc public class MyRewardsBannerOffersScrollTableViewCell: UITableViewCell {
@objc(MyRewardsBannerOffersScrollTableViewCell)
public class MyRewardsBannerOffersScrollTableViewCell: UITableViewCell {
@IBOutlet weak var tagView1: UIView!
@IBOutlet weak var tagLabel1: UILabel!
@IBOutlet weak var tagView2: UIView!
......
......@@ -7,7 +7,8 @@
import UIKit
@objc public class MyRewardsOfferCollectionViewCell: UICollectionViewCell {
@objc(MyRewardsOfferCollectionViewCell)
public class MyRewardsOfferCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var parentView: UIView!
@IBOutlet weak var bannerImage: UIImageView!
@IBOutlet weak var favoriteImage: UIImageView!
......
......@@ -11,7 +11,8 @@ protocol MyRewardsOffersScrollTableViewCellDelegate: AnyObject {
func didSelectOffer(_ offer: OfferModel)
}
@objc public class MyRewardsOffersScrollTableViewCell: UITableViewCell {
@objc(MyRewardsOffersScrollTableViewCell)
public class MyRewardsOffersScrollTableViewCell: UITableViewCell {
@IBOutlet weak var categoryLabel: UILabel!
@IBOutlet weak var allButtonView: UIView!
@IBOutlet weak var allButtonLabel: UILabel!
......
......@@ -11,7 +11,8 @@ protocol ProfileCouponFiltersTableViewCellDelegate: AnyObject {
func didSelectFilter(_ filter: CouponFilterModel)
}
@objc public class ProfileCouponFiltersTableViewCell: UITableViewCell {
@objc(ProfileCouponFiltersTableViewCell)
public class ProfileCouponFiltersTableViewCell: UITableViewCell {
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var collectionView: UICollectionView!
......
......@@ -7,7 +7,8 @@
import UIKit
@objc public class ProfileCouponTableViewCell: UITableViewCell {
@objc(ProfileCouponTableViewCell)
public class ProfileCouponTableViewCell: UITableViewCell {
@IBOutlet weak var parentView: UIView!
@IBOutlet weak var bannerImage: UIImageView!
@IBOutlet weak var favoriteImage: UIImageView!
......
......@@ -7,7 +7,8 @@
import UIKit
@objc public class ProfileFilterCollectionViewCell: UICollectionViewCell {
@objc(ProfileFilterCollectionViewCell)
public class ProfileFilterCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var parentView: UIView!
@IBOutlet weak var titleLabel: UILabel!
......
......@@ -7,7 +7,8 @@
import UIKit
@objc public class ProfileHeaderTableViewCell: UITableViewCell {
@objc(ProfileHeaderTableViewCell)
public class ProfileHeaderTableViewCell: UITableViewCell {
@IBOutlet weak var tagView1: UIView!
@IBOutlet weak var tagLabel1: UILabel!
@IBOutlet weak var tagView2: UIView!
......
......@@ -7,7 +7,8 @@
import UIKit
@objc public class ProfileQuestionnaireTableViewCell: UITableViewCell {
@objc(ProfileQuestionnaireTableViewCell)
public class ProfileQuestionnaireTableViewCell: UITableViewCell {
@IBOutlet weak var questionnaireBannerImage: UIImageView!
public override func awakeFromNib() {
......