I am following this example: https://developers.arcgis.com/ios/latest/swift/sample-code/generate-offline-map/ for downloading a map to an iOS device as a mobile map package. Rather than using a portal item like this:

I want to use a regular map from a map view (my particular use case has the map being created in iOS, with the llayers added on programmatically. This means it would look like this:

The issue I am having is that the parameters in the offline map task are empty when using an online map, whereas they are populated when using a portal item:

I am not sure why this is, any help would be greatly appreciated.