I am trying to add a secure FeatureService layer to my map, eventually I also want to take the data offline for editing as well. I am unable to do this using embedded usercredentials as below. I have double checked and triple checked the credentials and it works in other places just not here.
url: "http://domain.com/service/FeatureServer/0" // replacing with dummy layer
In my Map I have
// also tried to use credentials: userCredentials here.
The error log is
ArcGIS.Runtime.Feature: void __cdecl QmlFeatureTable::onInitializeComplete(const class QString &) EsriRuntimeQt::GeodatabaseFeatureServiceTable(0x1c7913c1e0)
ArcGIS.Runtime.Layer: void __cdecl QmlLayer::onLayerCreateError(const class QString &) QmlFeatureLayer_QML_52 "" "You are not authorized to access this information"