Hi!
There are couple of options how to load a layer and add it to the map.
You can create a layer with service URL:
let tiledLayer = AGSArcGISTiledLayer(url: URL(string: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer")!)
Or with the portal item URL
let tiledLayer = AGSArcGISTiledLayer(url: URL(string: "https://www.arcgis.com/home/item.html?id=3b93337983e9436f8db950e38a8629af")!)
Or you can create a portal Item from portalItem string "3b93337983e9436f8db950e38a8629af"
And then create your layer with portal item:
let tiledLayer = AGSArcGISTiledLayer(item: portalItem)
When you have the layer you can add them to new or existing map/webmap:
self.map.basemap.baseLayers.add(tiledLayer)
In this case it is going to be added to basemap group. If you have operational layer(s) you can add them to operationalLayers group. This is where your KML, FeatureLayers would go.
Let me know if this answers your question,
David