Completed Report Module
This commit is contained in:
@@ -10,8 +10,8 @@ import CoreData
|
||||
|
||||
/**
|
||||
Hey there, I hope you enjoyed the video, if you have any questions then please feel free to ask I will be happy to answer them.
|
||||
|
||||
Do share this with your iOS group on whatsapp or facebook or anyone who wants to learn iOS*/
|
||||
Do share this with your iOS group on whatsapp or facebook or anyone who wants to learn iOS
|
||||
*/
|
||||
|
||||
enum PersistentStorageEnum : String{
|
||||
case UserClicks
|
||||
@@ -40,6 +40,7 @@ enum PostType: Int {
|
||||
case others = 15
|
||||
case home = 16
|
||||
}
|
||||
|
||||
//enum PostType: String {
|
||||
// case series = "1"
|
||||
// case season = "2"
|
||||
@@ -199,14 +200,13 @@ final class PersistentStorage
|
||||
|
||||
// fetchRequests.fetchLimit = 1
|
||||
// fetchRequests.sortDescriptors = [NSSortDescriptor.init(key: "uuid", ascending: false)]
|
||||
|
||||
do {
|
||||
guard let result = try managedContext.fetch(fetchRequest) as? [UserClicks] else {return}
|
||||
result.forEach { clicks in
|
||||
print("ID:-" , PostType(rawValue: Int(clicks.post_type))!, "CatID:- ", clicks.category_id, "PostID:- ", clicks.post_id , "Count:-", clicks.click_counts)
|
||||
}
|
||||
|
||||
} catch let error
|
||||
}
|
||||
catch let error
|
||||
{
|
||||
debugPrint(error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user