Using the Preview feature in Xcode allows you to display the latest view content without using actual devices or simulators, which is convenient for developing screens through code.
However, in actual projects that involve adding multiple libraries and have long build times, sometimes it is faster to build on a real device. Therefore, I think this feature is mainly convenient for projects with shorter build times.
This feature is commonly used in SwiftUI, and although there is a method for using it in UIKit, it requires adopting a protocol and implementing it, leading to the inconvenience of adding code every time a new project is created.
Starting from iOS 17, you can use Swift Macro functionality to easily utilize this feature in UIKit as well, which I organized on my blog.
When the footer of a UITableView changes based on status, the height of the footer must be dynamically adjusted. Therefore, I used the method systemLayoutSizeFitting(_:withHorizontalFittingPriority:verticalFittingPriority:) to return the optimal size and determine the height, but I encountered an issue where the content area was being cut off.
The reason is that while it is possible to calculate the optimal size even when only the targetSize is specified, I set the parameter values for the vertical constraints to obtain a more accurate size.
By default, iOS can receive remote notifications through APNs to display push notifications.
Thus, when sending to APNs, you provide the necessary settings and information in the payload.
I wanted to implement a feature that groups notifications by type and removes previous notifications when a new one arrives. I checked if this could be applied using an extension, but I found that this task can only be done through payload settings when the server delivers data.
Upon learning this, I explored the tasks that can be performed using Service Extension.
In summary, it is responsible for changing the content delivered to the alert (changing text and adding images).