Hello Ali,
That seems more like an iOS Code/Bug Problem, more than a SMP Connection Problem.
Try to access the server via Safari on the simulator to see if you can access it, only then start with the coding.
Also what kind of XCode, iOS Version Simulator, and SMP version are you using?
Regards,
Daniel