Edit: The "proof" of (1) as given below is flawed as Monroe pointed out in the comments, but it seems that the answer to Monroe's question is yes under GCH. The idea is to use a result of K. Bozeman connecting weak density and density of boolean algebras (see the reference) which in our context implies that for a dense set of $p \in B$, (1) holds with $B$ replaced by $B \upharpoonright p = \{a \in B : a \leq p\}$. See proposition 6.53 here. A consistent counterexample is still possible when $\kappa = \omega_2$. We will have to look at boolean algebras in which weak density is strictly less than density.

Let $B$ be a complete boolean algebra with density $\kappa$ everywhere. The following hold:

(1) For every $F \in [B]^{< \kappa}$, there exists a $p \in B$ that splits every (nonzero) condition in $F$ - i.e., for every $q \in F$, both $p \cap q$ and $\overline{p} \cap q$ are nonzero.

Proof: List $F = \{ p_i : i < \lambda \}$, $\lambda < \kappa$. Using the fact that $B$ has density $\kappa$ below $p_0$, get $q_0 \leq p_0$ such that each $p_i$ satisfies $p_i \cap q_0 = 0$ or $q_0 \subseteq p_i$ for $i \geq 1$. Split $q_0$, remove each $p_i$ in $F$ above $q_0$ and continue.

(2) There is a sequence $\langle p_i : i < \kappa \rangle$ such that for every $p \in B$, there exists $j < \kappa$ such that $p_i$ splits $p$ for every $i > j$.

Proof: Use (1) to construct such a sequence.

(3) Let $X$ be $B$-name for a subset of $\kappa$ defined by letting the boolean value of $i \in X$ to be $p_i$. Then $X$ splits every unbounded subset of $\kappa$ in $V$.

Proof: Let $Y$ be an unbounded subset of $\kappa$ in $V$. Suppose some $p \in B$ forces $Y$ to be disjoint with $X$. Get $i \in Y$ large enough such that $p_i$ splits $p$. Then $p \cap p_i$ forces $i \in X$ - contradiction. Similarly no $p \in B$ can force $Y$ to be contained in $X$.

Theorem.Suppose $B$ is a complete Boolean algebra. The following are equivalent: 1) Forcing with $B$ does not adds an independent subset of $\kappa.$ 2) $B$ is $\kappa-$dependent i.e. for all $⟨b_\beta: \beta<\kappa⟩$ of elements of $B$, there exists a partition $P$ of unity such that for all $p∈P$, $p≤b_\beta$ or $p≤−b_\beta$ for $\kappa-$many $\beta<\kappa.$ $\endgroup$