I'd use baseUrl = [baseUrl stringByReplacingOccurrenceOfString:@"http://" withString:@"https://"], but that's a minor issue.