I am using XCode 7.2 and Swift 2.2. I have a function that accepts a dictionary([NSObject : AnyObject]) as a parameter. However, I want to call this function without using that dictionary or in other words by making the parameter nil. If I do that, this is thrown:
nil is not compatible with the expected argument type '[NSObject : AnyObject]'
My code is
self.silentPostData(
persist.getObject(
mdmiosagent_Constants.SERVERNAMEKEY) as String,
serverport: persist.getObject(mdmiosagent_Constants.SERVERPORTKEY) as String,
serverurl: mdmiosagent_Constants.NATIVE_APP_SERVLET,
parameters: nil ,
urldata: jsonData
)
)
The parameter in conflict is named parameters in the code. Thank you in advance.