---
layout: "default"
title: "withUnsafePointer"
description: "Swift documentation for 'withUnsafePointer': Invokes body with an UnsafePointer to arg and returns the
result. Useful for calling Objective-C APIs that take &quot;in/out&quot;
parameters (and default-constructible &quot;out&quot; parameters) by pointer."
keywords: "withUnsafePointer,func,swift,documentation"
root: "/v2.0"
---

<div class="declaration" id="func-withunsafepointer-t-result-inout_-t_-unsafepointer-t-throws-result">
<a class="toggle-