I'm developing a website and would like to implement Safari Push Notification support to it. I've gone through this tutorial by Apple. They wrote once there is a hit at webServiceURL/version/pushPackages/websitePushID
we have to deliver our pushPackage, but they haven't mentioned clearly on where it should be delivered and stored. Do we have to code on the client side to save that package somewhere safe? or Safari itself would just handle the package?
And a bonus question, would the following code work just fine to deliver the package?
@GET
@Path("/zip")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
public Response downloadFile() {
File file = new File("/../pushPackage.zip");
ResponseBuilder response = Response.ok((Object) file);
response.header("Content-Disposition", "attachment;filename=pushPackage.zip");
return response.build();
}