# \#data

**URL:** https://forums.swift.org/tag/data/123.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [\[Pitch\] Data Manipulation with Spans](https://forums.swift.org/t/pitch-data-manipulation-with-spans/87952)

<div class="topic-metadata">

**Author:** [@jmschonfeld](https://forums.swift.org/u/jmschonfeld)\
**Replies:** 3\
**Last updated:** [July 6, 2026, 11:28pm UTC](https://forums.swift.org/t/pitch-data-manipulation-with-spans/87952 "2026-07-06T23:28:05Z")

</div>

Hi Swift community! I have a a new pitch for adding APIs to Data that mirror those of the new UniqueArray type that allow for manipulating its contents via the various span types (as opposed to generic Collections or un…

---

## [\[Discussion\] Bag of Bytes Types](https://forums.swift.org/t/discussion-bag-of-bytes-types/86983)

<div class="topic-metadata">

**Author:** [@jmschonfeld](https://forums.swift.org/u/jmschonfeld)\
**Replies:** 33\
**Last updated:** [July 3, 2026, 11:21am UTC](https://forums.swift.org/t/discussion-bag-of-bytes-types/86983 "2026-07-03T11:21:49Z")

</div>

Hi everyone, For Swift 6.4, I’ve spent a fair amount of time working on bag of bytes types (including Data in particular). Based on community feedback and some performance investigations, Data has now gained some fairly…

---

## [New Approach to Data Concurrency with Forked](https://forums.swift.org/t/new-approach-to-data-concurrency-with-forked/76624)

<div class="topic-metadata">

**Author:** [@drewmccormack](https://forums.swift.org/u/drewmccormack)\
**Replies:** 4\
**Last updated:** [December 16, 2024, 7:33pm UTC](https://forums.swift.org/t/new-approach-to-data-concurrency-with-forked/76624 "2024-12-16T19:33:52Z")

</div>

I've just launched Forked, a new open source Swift framework for managing data concurrency, both on device and across networks. Forked is Git for Shared Data in Swift You can think of Forked as being like Git for Swift…

---

## [String.UTF8View conformance to DataProtocol](https://forums.swift.org/t/string-utf8view-conformance-to-dataprotocol/76065)

<div class="topic-metadata">

**Author:** [@dimi](https://forums.swift.org/u/dimi)\
**Replies:** 3\
**Last updated:** [November 18, 2024, 8:59am UTC](https://forums.swift.org/t/string-utf8view-conformance-to-dataprotocol/76065 "2024-11-18T08:59:04Z")

</div>

Any reason String.UTF8View doesn't conform to DataProtocol? I noticed it when dealing with CryptoKit, and I needed to cast it using Array or Data (which is better to use in this scenario is entirely unclear!). let diges…

---

## [Internal inconsistency error (didStartTask)](https://forums.swift.org/t/internal-inconsistency-error-didstarttask/61194)

<div class="topic-metadata">

**Author:** [@cocoaphony](https://forums.swift.org/u/cocoaphony)\
**Replies:** 34\
**Last updated:** [June 10, 2024, 8:26pm UTC](https://forums.swift.org/t/internal-inconsistency-error-didstarttask/61194 "2024-06-10T20:26:35Z")

</div>

When running some async unit tests, we sometimes see some errors spit out that don't fail our build. Examples look like: Internal inconsistency error (didStartTask): targetID (174) not found in \_activeTargets. Internal …

---

## [Converting Class objects into Data to serialise as .dat file](https://forums.swift.org/t/converting-class-objects-into-data-to-serialise-as-dat-file/62127)

<div class="topic-metadata">

**Author:** [@Simon](https://forums.swift.org/u/Simon)\
**Replies:** 28\
**Last updated:** [February 20, 2023, 2:18am UTC](https://forums.swift.org/t/converting-class-objects-into-data-to-serialise-as-dat-file/62127 "2023-02-20T02:18:02Z")

</div>

Hi everyone, I am trying to convert a class object into Data and then serialise it into a dat file, and then be able to convert the .dat file back into data and then back into an object to use. I have been working with…

---

## [Data subscript](https://forums.swift.org/t/data-subscript/57195)

<div class="topic-metadata">

**Author:** [@tera](https://forums.swift.org/u/tera)\
**Replies:** 4\
**Last updated:** [May 8, 2022, 11:53am UTC](https://forums.swift.org/t/data-subscript/57195 "2022-05-08T11:53:28Z")

</div>

The following fragment crashes: import Foundation let foo = Data(\[0, 1, 2, 3, 4, 5, 6, 7, 8, 9\]) print(foo.indices) // 0..\<10 var bar: Data = foo\[5...7\] print(bar.indices) // 5..\<8 assert(bar.count == 3) let fix = fa…

---

## [Base64 Encoding RFC](https://forums.swift.org/t/base64-encoding-rfc/56836)

<div class="topic-metadata">

**Author:** [@brevansio](https://forums.swift.org/u/brevansio)\
**Replies:** 0\
**Last updated:** [April 20, 2022, 6:40am UTC](https://forums.swift.org/t/base64-encoding-rfc/56836 "2022-04-20T06:40:13Z")

</div>

I found that Swift doesn't specify an RFC in the documentation like the other specs sometimes do. I am pretty sure from the implementation and the options that we're using RFC 4648. Is that correct? Second, is it worth …

---

## [Reusable UITableView for Varying Data Input - Swift/Xcode](https://forums.swift.org/t/reusable-uitableview-for-varying-data-input-swift-xcode/55523)

<div class="topic-metadata">

**Author:** [@cj.whitaker](https://forums.swift.org/u/cj.whitaker)\
**Replies:** 6\
**Last updated:** [February 25, 2022, 2:19am UTC](https://forums.swift.org/t/reusable-uitableview-for-varying-data-input-swift-xcode/55523 "2022-02-25T02:19:52Z")

</div>

I have a TableView that I want to reuse for different categories of data (essentially as plugins.. the tableView being a skeleton and being filled with whatever I want it to be). The TableView is filled with different ca…

---

## [Data type returning wrong index values when sliced](https://forums.swift.org/t/data-type-returning-wrong-index-values-when-sliced/50790)

<div class="topic-metadata">

**Author:** [@quasarsunnix](https://forums.swift.org/u/quasarsunnix)\
**Replies:** 7\
**Last updated:** [August 2, 2021, 1:11pm UTC](https://forums.swift.org/t/data-type-returning-wrong-index-values-when-sliced/50790 "2021-08-02T13:11:49Z")

</div>

I'm trying to decode some binary chunks into various fixed width integers in iOS. The format of the abridged data features 5 UInt32s, followed by n amount of Int16s. Each chunk I receive features 1 initial byte of UInt8…

---

## [Unable to pass data between view controllers](https://forums.swift.org/t/unable-to-pass-data-between-view-controllers/46804)

<div class="topic-metadata">

**Author:** [@comp13x](https://forums.swift.org/u/comp13x)\
**Replies:** 0\
**Last updated:** [March 22, 2021, 7:46am UTC](https://forums.swift.org/t/unable-to-pass-data-between-view-controllers/46804 "2021-03-22T07:46:59Z")

</div>

import UIKit import MapKit class SearchViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, UISearchBarDelegate, CLLocationManagerDelegate { private var tableView: UITableView! var …

---

## [The \`Data.init(bytesNoCopy:count:deallocator:)\` does not work as expected when \`Data\` is of representation of \`InlineData\`](https://forums.swift.org/t/the-data-init-bytesnocopydeallocator-does-not-work-as-expected-when-data-is-of-representation-of-inlinedata/40996)

<div class="topic-metadata">

**Author:** [@ylorn](https://forums.swift.org/u/ylorn)\
**Replies:** 12\
**Last updated:** [October 8, 2020, 7:23pm UTC](https://forums.swift.org/t/the-data-init-bytesnocopydeallocator-does-not-work-as-expected-when-data-is-of-representation-of-inlinedata/40996 "2020-10-08T19:23:52Z")

</div>

When the count of the bytes is no greater than 14 in a 64 system, or 6 in a 32 system, the initializer of Data.init(bytesNoCopy:count:deallocator:) does not work as expected as the label suggests: it makes a copy instead…

---

## [String(decoding: , as: ) with as: not UTF8.self and not ASCII.self](https://forums.swift.org/t/string-decoding-as-with-as-not-utf8-self-and-not-ascii-self/40464)

<div class="topic-metadata">

**Author:** [@PatrickA](https://forums.swift.org/u/PatrickA)\
**Replies:** 6\
**Last updated:** [September 21, 2020, 7:01pm UTC](https://forums.swift.org/t/string-decoding-as-with-as-not-utf8-self-and-not-ascii-self/40464 "2020-09-21T19:01:50Z")

</div>

Is there a way to use String(decoding: , as: ) with as: being another encoding that UTF8 or ASCII? I would like to be able decode an Windows 1252 byte array and display the EncodedReplacementCharacter for the character…

---

## [Beginner Question: iOS/Swift apps database/SQL options?](https://forums.swift.org/t/beginner-question-ios-swift-apps-database-sql-options/30932)

<div class="topic-metadata">

**Author:** [@JamesH](https://forums.swift.org/u/JamesH)\
**Replies:** 2\
**Last updated:** [November 19, 2019, 10:26pm UTC](https://forums.swift.org/t/beginner-question-ios-swift-apps-database-sql-options/30932 "2019-11-19T22:26:24Z")

</div>

Hi all, I'm just starting out learning Swift, so I'm looking to find the best way to use a database in an app that I am looking to develop that needs to store and summarize financial data… I can easily create the databa…

---

## [Stream: A simple data processing library for Swift](https://forums.swift.org/t/stream-a-simple-data-processing-library-for-swift/27033)

<div class="topic-metadata">

**Author:** [@cgarciae](https://forums.swift.org/u/cgarciae)\
**Replies:** 0\
**Last updated:** [July 16, 2019, 6:50pm UTC](https://forums.swift.org/t/stream-a-simple-data-processing-library-for-swift/27033 "2019-07-16T18:50:56Z")

</div>

I come from Python where I do Machine Learning stuff but Swift for TensorFlow caught my attention. I've been loving swift, feels amazing to have a compiler again but still be able to get things done without much hassle. …
