You can follow this example. GenerateOfflineMapViewController.swift
//instantiate offline map task
self.offlineMapTask = AGSOfflineMapTask(portalItem: self.portalItem)
Use the AGSOfflineMapTask to take maps offline. The sample creates a
portal item object using a web map’s ID. This portal item is used to
initialize an AGSOfflineMapTask object.
Can you specify what mean "Now I want to save these layers and their data" ?
You also need to edit the map? If yes this is called redlining
A feature collection provides a way of grouping logically-related
feature collection tables. Redlining information (called "Map Notes"
in ArcGIS Online), for example, may contain points, lines, polygons,
and associated text to describe things in the map.
Also remember that your services should be enabled for offline use. Client side you will need to create a GeoDatabase
Obtain a job to generate and download the geodatabase by passing the
AGSGenerateGeodatabaseParameters to the generateJob method on the
AGSGeodatabaseSyncTask. Run the job to generate and download the
geodatabase to the device.