Working sync main queue for iphone