lwm2m: software management: Fix URI value not being written

Create the URI resource when creating the object if
PULL support is enabled.

URI write callback should be post-write instead to ensure
the URI value is updated for the resource.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
diff --git a/subsys/net/lib/lwm2m/lwm2m_obj_swmgmt.c b/subsys/net/lib/lwm2m/lwm2m_obj_swmgmt.c
index 55d084e..4aa9735 100644
--- a/subsys/net/lib/lwm2m/lwm2m_obj_swmgmt.c
+++ b/subsys/net/lib/lwm2m/lwm2m_obj_swmgmt.c
@@ -700,8 +700,8 @@
 
 #ifdef CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT
 	INIT_OBJ_RES(SWMGMT_PACKAGE_URI_ID, res[index], res_idx, res_inst[index], res_inst_idx, 1,
-		     true, false, instance->package_uri, PACKAGE_URI_LEN, NULL, NULL,
-		     package_uri_write_cb, NULL, NULL);
+		     true, true, instance->package_uri, PACKAGE_URI_LEN, NULL, NULL, NULL,
+		     package_uri_write_cb, NULL);
 #else
 	INIT_OBJ_RES_OPT(SWMGMT_PACKAGE_URI_ID, res[index], res_idx, res_inst[index], res_inst_idx,
 			 1, true, false, NULL, NULL, package_uri_write_cb, NULL, NULL);