Summary
The Swift SDK (CZiti) has no way to specify a terminator identity at dial time, so it cannot reach services that use addressable terminators. The Kotlin/Android SDK can, and the underlying ziti-sdk-c already supports it (ziti_dial_with_options / ziti_dial_opts.identity) — it just isn't surfaced in the Swift API. Please add a Swift dial API that accepts dial options (terminator identity).
Environment
ziti-sdk-swift/CZiti0.41.55 (xcframework), iOS, embedded SDK (not the tunnel).
Use case
We have a wildcard/addressable service (one service, many terminators addressed by destination hostname; the service’s intercept.v1 carries dialOptions.identity). On Android we dial it successfully with:
ctx.dial(ZitiAddress.Dial(service = "PORT", identity = "address"))
On iOS, the only available Swift call is:
conn.dial("PORT", onConn, onData) // no way to pass a terminator identity
Dialing by service name alone fails at connect time with ZITI_CONN_CLOSED (-24) — the router has no terminator for the (missing) instanceId. ZitiConnection.dial, Ziti.createConnection, and even the private swiftinterface expose no dial-options/identity parameter. ZitiInterceptConfigV1.DialOptions.identity exists but is read-only (from the service config), with no way to pass it into a dial.
What already exists underneath
ziti-sdk-c (statically linked into CZiti, symbols exported) already has:
int ziti_dial_with_options(ziti_connection conn, const char *service,
ziti_dial_opts *dial_opts, // .identity = terminator
ziti_conn_cb, ziti_data_cb);
void ziti_dial_opts_for_addr(ziti_dial_opts *opts, const char *addr);
So the capability is present in the C layer; only the Swift wrapper is missing it.
Request
Add a Swift dial overload that takes dial options, e.g.:
public func dial(_ service: String,
dialOptions: ZitiDialOptions?, // {identity, appData, connectTimeout}
_ onConn: @escaping ConnCallback,
_ onData: @escaping DataCallback)
(or an identity:/appData: parameter, or a public Ziti.dial(...) mapping to ziti_dial_with_options). This would give iOS parity with Android for addressable terminators from the embedded SDK, without needing a packet-tunnel Network Extension.
Thanks!