{"id":64010,"date":"2024-08-23T11:15:54","date_gmt":"2024-08-23T05:45:54","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=64010"},"modified":"2024-08-26T11:31:41","modified_gmt":"2024-08-26T06:01:41","slug":"live-activities-introduction-and-setup-part-1","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/live-activities-introduction-and-setup-part-1\/","title":{"rendered":"Live Activities Introduction and Setup \u2013 Part 1"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>As iOS users, we are all familiar with live activity. When we buy a pizza through one of the ordering apps, live activity pops up (either on the lock screen or \u00a0in the dynamic island region) and shows the updated status of our order. Their purpose is to display the most recent data from our apps and update their content.<\/p>\n<p>In this blog, we will focus on live activities from a technical perspective with a deep dive example.<\/p>\n<ul>\n<li>It doesn\u2019t matter if you are an iOS developer, designer, or anyone else. If you are looking for a live activities inspiration \u2013 this is a good place.<\/li>\n<li>I prepared for you some other content you can enjoy: troubleshooting tips, testing, limitations, and some cool live activity screenshots.<\/li>\n<\/ul>\n<div id=\"attachment_64003\" style=\"width: 488px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-64003\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-64003 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-13-at-11.47.14\u202fAM-478x1024.png\" alt=\"Live Activity Example\" width=\"478\" height=\"1024\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-13-at-11.47.14\u202fAM-478x1024.png 478w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-13-at-11.47.14\u202fAM-140x300.png 140w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-13-at-11.47.14\u202fAM-624x1337.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-13-at-11.47.14\u202fAM.png 628w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><p id=\"caption-attachment-64003\" class=\"wp-caption-text\">Live Activity Example<\/p><\/div>\n<h2>Constraints<\/h2>\n<p><span style=\"font-size: 16px;\">Given that we\u2019re all part of the Apple ecosystem, it is No surprise that most of the things from Apple comes with their own limitations.<\/span><\/p>\n<ul>\n<li>These limitations start with the ActivityKit framework, which is available from iOS 16.1 onwards. Live Activities pop up on compatible devices, appearing on the dynamic island and at the top of the lock screen notifications list. For devices that don\u2019t have a dynamic island, they appear on the lock screen only.<\/li>\n<li>The only way to update live activity UI is by ActivityKit framework or by push notifications. It means we cannot perform any operations inside live activity e.g. network requests and then update the UI.<\/li>\n<li>The live activity image size must not exceed the whole size of the presentation mode it\u2019s displayed in. In minimal presentation mode, the image must have the maximum size of the minimal presentation view. If it\u2019s bigger, it won\u2019t be displayed.<\/li>\n<li>Live activities have a finite lifespan. If the user or the app doesn\u2019t end the live activity, it remains visible for 8 hours. After that, the system removes them from the dynamic island. On the lock screen, the live activity can be displayed for an additional 4 hours if the user doesn\u2019t manually remove it.<\/li>\n<li>The live activity dynamic data, which represents the updated data, must be kept small, with a maximum size of 4 KB.<\/li>\n<\/ul>\n<h2>Initial Setup :<\/h2>\n<p>The first step in introducing the live activity in our app is to create a <strong>Widget Extension<\/strong>. To create a new widget extension, follow these steps: File \u2192 New \u2192 Target \u2192 Widget extension.<\/p>\n<p>The next step is to look into the Info.plist configuration. The <strong>Support live activities<\/strong> option in the Widget target and App target has to be enabled.<\/p>\n<div id=\"attachment_64009\" style=\"width: 1354px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-64009\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-64009 size-full\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/08\/image14-1344x1102-2.webp\" alt=\"Support Live Activities configuration in Xcode\" width=\"1344\" height=\"1102\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/08\/image14-1344x1102-2.webp 1344w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/image14-1344x1102-2-300x246.webp 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/image14-1344x1102-2-1024x840.webp 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/image14-1344x1102-2-768x630.webp 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/image14-1344x1102-2-624x512.webp 624w\" sizes=\"(max-width: 1344px) 100vw, 1344px\" \/><p id=\"caption-attachment-64009\" class=\"wp-caption-text\">Support Live Activities configuration in Xcode<\/p><\/div>\n<p>Our live activity supports push notifications updates. We have to make sure that push notifications are configured properly in our app. Push notifications and their setup are beyond the scope of this blog, so if you have any doubts, you can refer to Apple\u2019s documentation: <a href=\"https:\/\/developer.apple.com\/documentation\/usernotifications\/registering_your_app_with_apns\">https:\/\/developer.apple.com\/documentation\/usernotifications\/registering_your_app_with_apns<\/a><\/p>\n<h2>Code<\/h2>\n<p>To display live activity data, we create a struct <strong>LiveMatchScoreAttributes<\/strong> that conforms to <strong>ActivityAttributes<\/strong> protocol. Within the live activity, we have two kinds of data:<\/p>\n<ul>\n<li>Static data \u2013 \u00a0As the name suggests, it is used to display the data which once displayed, does not change example: order content like pizza, name of the match being played, etc.<\/li>\n<li>Dynamic data \u2013 The data that keeps on changing in the app example order status, runs in a game, etc.<\/li>\n<\/ul>\n<p>The dynamic data is defined by using an inner type of the <strong>ActivityAttributesprotocol<\/strong>, which we call <strong>ContentState<\/strong>. This ContentState type needs to be a struct that conforms to the <strong>Codable<\/strong> and <strong>Hashable<\/strong> protocols. So, to handle dynamic data, we create a structure of this type within the implementation of <strong>ActivityAttributes<\/strong>.<\/p>\n<p>The static data is any information within <strong>LiveMatchScoreAttributes<\/strong> that isn\u2019t part of the ContentState.<\/p>\n<p>In our case, we want to have static: title, teamOneName, and teamTwoName. The rest of the data should be dynamic. This is what our live activity data representation looks like:<\/p>\n<div id=\"attachment_64014\" style=\"width: 1264px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-64014\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-64014 size-full\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-13-at-4.15.12\u202fPM.png\" alt=\"Match Activity Attributes\" width=\"1254\" height=\"850\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-13-at-4.15.12\u202fPM.png 1254w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-13-at-4.15.12\u202fPM-300x203.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-13-at-4.15.12\u202fPM-1024x694.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-13-at-4.15.12\u202fPM-768x521.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-13-at-4.15.12\u202fPM-624x423.png 624w\" sizes=\"(max-width: 1254px) 100vw, 1254px\" \/><p id=\"caption-attachment-64014\" class=\"wp-caption-text\">Match Activity Attributes<\/p><\/div>\n<h2>Live Activity UI Design<\/h2>\n<p>Now, let\u2019s start the process of creating the live activity interface. Our goal is to display updates about the match scores directly on lock screen and dynamic island. Hence, let\u2019s walk through the steps to create this presentation for both locations.<\/p>\n<p><strong>Dynamic Island has three presentation modes:<\/strong><\/p>\n<ol>\n<li><strong>Compact<\/strong> \u2013 This is the standard presentation. Live activity occupies leading and trailing space between the true depth camera.<\/li>\n<li><strong>Minimal<\/strong> \u2013 If multiple live activities are running, the system decides which two live activities display. One is displayed on the leading side, attached to the dynamic island. The second is displayed on the trailing side, detached from the dynamic island.<\/li>\n<li><strong>Expanded<\/strong> \u2013 If the compact or minimal mode is long-tapped this mode is shown.<\/li>\n<\/ol>\n<div id=\"attachment_64131\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-64131\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-64131 size-full\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/08\/live-activities-compact-1024x256-1.png\" alt=\"Dynamic Island\" width=\"1024\" height=\"256\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/08\/live-activities-compact-1024x256-1.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/live-activities-compact-1024x256-1-300x75.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/live-activities-compact-1024x256-1-768x192.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/live-activities-compact-1024x256-1-624x156.png 624w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><p id=\"caption-attachment-64131\" class=\"wp-caption-text\">Dynamic Island<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>Let\u2019s discuss<strong> how to build all those presentations :<\/strong><\/p>\n<ol>\n<li>\u00a0We create a structure that conforms to <strong>Widget<\/strong> protocol. Let\u2019s name it <strong>LiveMatchScoreActivity<\/strong>.<\/li>\n<li>To set up presentations we use the <strong>ActivityConfiguration<\/strong> structure and specify <strong>ActivityAttributes<\/strong> type, in our case, it\u2019s <strong>LiveMatchScoreAttributes<\/strong>. As you can see in the code, each presentation has access to context. This gives us static and dynamic data of the live activity.<\/li>\n<\/ol>\n<div id=\"attachment_64143\" style=\"width: 2210px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-64143\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-64143 size-full\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-1.31.22\u202fPM.png\" alt=\"Live Activity UI Design\" width=\"2200\" height=\"1272\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-1.31.22\u202fPM.png 2200w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-1.31.22\u202fPM-300x173.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-1.31.22\u202fPM-1024x592.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-1.31.22\u202fPM-768x444.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-1.31.22\u202fPM-1536x888.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-1.31.22\u202fPM-2048x1184.png 2048w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-1.31.22\u202fPM-624x361.png 624w\" sizes=\"(max-width: 2200px) 100vw, 2200px\" \/><p id=\"caption-attachment-64143\" class=\"wp-caption-text\">Live Activity UI Design<\/p><\/div>\n<p>We can specify how our live activity looks when displayed in different modes like expanded, compact and minimal. We define the compact view using the <strong>compactLeading<\/strong> and <strong>compactTrailing<\/strong> closures. We should pass the SwiftUI view declarations here. It\u2019s the same for the minimal presentation \u2013 we defined it within the <strong>minimal<\/strong> closure.<\/p>\n<p>For the expanded presentation, things get a little more complex. We divide the view into different regions and decide what goes where. For example, we might want to put our brand logo in one region and the main content in another. Check out those regions in the image below.<\/p>\n<div id=\"attachment_64144\" style=\"width: 1002px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/developer.apple.com\/documentation\/activitykit\/displaying-live-data-with-live-activities\"><img aria-describedby=\"caption-attachment-64144\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-64144 size-full\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/08\/image12-2.png\" alt=\"Expanded UI\" width=\"992\" height=\"500\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/08\/image12-2.png 992w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/image12-2-300x151.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/image12-2-768x387.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/image12-2-624x315.png 624w\" sizes=\"(max-width: 992px) 100vw, 992px\" \/><\/a><p id=\"caption-attachment-64144\" class=\"wp-caption-text\">Expanded UI Source: <a href=\"https:\/\/developer.apple.com\/documentation\/activitykit\/displaying-live-data-with-live-activities\">https:\/\/developer.apple.com\/documentation\/activitykit\/displaying-live-data-with-live-activities<\/a><\/p><\/div>\n<p>We need to ensure that the widget extension recognises our newly created widget.<\/p>\n<p>If the widget is the only one in the extension, we can add the @main attribute to it. This informs the extension that the widget is the only one and serves as the starting point. In case of multiple widgets, we create a WidgetBundle. This bundle comprises all the widgets we have, including the live activity one.<\/p>\n<div id=\"attachment_64145\" style=\"width: 1144px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-64145\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-64145 size-full\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-6.06.58\u202fPM.png\" alt=\"Widget Bundle\" width=\"1134\" height=\"486\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-6.06.58\u202fPM.png 1134w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-6.06.58\u202fPM-300x129.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-6.06.58\u202fPM-1024x439.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-6.06.58\u202fPM-768x329.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-16-at-6.06.58\u202fPM-624x267.png 624w\" sizes=\"(max-width: 1134px) 100vw, 1134px\" \/><p id=\"caption-attachment-64145\" class=\"wp-caption-text\">Widget Bundle<\/p><\/div>\n<h2>Live Activity lifecycle<\/h2>\n<ul>\n<li>Managing the lifecycle of a live activity involves starting, updating, and ending. This can be done within the app using the ActivityKit framework or through push notifications.<\/li>\n<li>For devices running iOS 17.2 and newer, we can start a live activity through push notifications. On older iOS versions, it can only be started using the ActivityKit framework.<\/li>\n<\/ul>\n<h2><strong>Using ActivityKit framework for lifecycle operations<\/strong><\/h2>\n<p>To start a live activity with the <strong>ActivityKit framework<\/strong>, we use the request function from the Activity class. We provide the static data as the first parameter. The second parameter is the contentState, which is the dynamic data initial state. Lastly, we provide the optional pushType parameter. If we want to enable push notifications updates, it should be set to <strong>PushType.token<\/strong>.<\/p>\n<div id=\"attachment_64253\" style=\"width: 2476px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-64253\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-64253 size-full\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-21-at-5.05.28\u202fPM.png\" alt=\"Start Activity\" width=\"2466\" height=\"822\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-21-at-5.05.28\u202fPM.png 2466w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-21-at-5.05.28\u202fPM-300x100.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-21-at-5.05.28\u202fPM-1024x341.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-21-at-5.05.28\u202fPM-768x256.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-21-at-5.05.28\u202fPM-1536x512.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-21-at-5.05.28\u202fPM-2048x683.png 2048w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-21-at-5.05.28\u202fPM-624x208.png 624w\" sizes=\"(max-width: 2466px) 100vw, 2466px\" \/><p id=\"caption-attachment-64253\" class=\"wp-caption-text\">Start Activity<\/p><\/div>\n<h2><\/h2>\n<p>We should use the<strong> update function<\/strong> on the activity instance to update the live activity. We got it when the live activity started. When updating, the new dynamic data should be specified.<\/p>\n<div id=\"attachment_64283\" style=\"width: 2462px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-64283\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-64283 size-full\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.49.14\u202fAM.png\" alt=\"update live activity\" width=\"2452\" height=\"906\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.49.14\u202fAM.png 2452w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.49.14\u202fAM-300x111.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.49.14\u202fAM-1024x378.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.49.14\u202fAM-768x284.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.49.14\u202fAM-1536x568.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.49.14\u202fAM-2048x757.png 2048w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.49.14\u202fAM-624x231.png 624w\" sizes=\"(max-width: 2452px) 100vw, 2452px\" \/><p id=\"caption-attachment-64283\" class=\"wp-caption-text\">update live activity<\/p><\/div>\n<p>The end can be done by calling the end on the activity instance. You can also provide the final state for the activity, which will be shown to the user before the system removes the live activity.<\/p>\n<p>The dismissal policy determines when the live activity gets removed. The default dismissal policy allows the live activity to remain on the lock screen for a maximum of 4 hours if not manually removed by the user. Additionally, you can specify the after(_ date: Date) policy, which removes the live activity at a specified date but within a 4-hour window.<\/p>\n<div id=\"attachment_64284\" style=\"width: 2480px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-64284\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-64284 size-full\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.51.42\u202fAM.png\" alt=\"End Live Activity\" width=\"2470\" height=\"852\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.51.42\u202fAM.png 2470w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.51.42\u202fAM-300x103.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.51.42\u202fAM-1024x353.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.51.42\u202fAM-768x265.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.51.42\u202fAM-1536x530.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.51.42\u202fAM-2048x706.png 2048w, \/blog\/wp-ttn-blog\/uploads\/2024\/08\/Screenshot-2024-08-22-at-10.51.42\u202fAM-624x215.png 624w\" sizes=\"(max-width: 2470px) 100vw, 2470px\" \/><p id=\"caption-attachment-64284\" class=\"wp-caption-text\">End Live Activity<\/p><\/div>\n<p>&nbsp;<\/p>\n<h2>Conclusion<\/h2>\n<p>That&#8217;s it in this part. We learned about how we can manage the live activity life cycle through our app with the help of ActivityKit. In the next part, we will see the magic of push notifications. How we can start, update, and end live activity through a push notification. See you in the next part of this series. Cheers ..!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction As iOS users, we are all familiar with live activity. When we buy a pizza through one of the ordering apps, live activity pops up (either on the lock screen or \u00a0in the dynamic island region) and shows the updated status of our order. Their purpose is to display the most recent data from [&hellip;]<\/p>\n","protected":false},"author":1783,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":222},"categories":[1400],"tags":[4848,6253,6288,6289],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/64010"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1783"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=64010"}],"version-history":[{"count":12,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/64010\/revisions"}],"predecessor-version":[{"id":64566,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/64010\/revisions\/64566"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=64010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=64010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=64010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}