Skip to content

Commit 08654d6

Browse files
cbushdacharyc
andauthored
(DOCSP-14655): Port current limitations to iOS sections (#1026)
* (DOCSP-14655): Port current limitations to iOS sections * Address some comments * Update source/includes/string-sort-and-query-limitations-note.rst Co-authored-by: Dachary <dc@dacharycarey.com> * Address more comments Co-authored-by: Dachary <dc@dacharycarey.com>
1 parent d8124d0 commit 08654d6

File tree

6 files changed

+46
-2
lines changed

6 files changed

+46
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. note::
2+
3+
String sorting and case-insensitive queries are only supported for
4+
character sets in 'Latin Basic', 'Latin Supplement', 'Latin Extended
5+
A', and 'Latin Extended B' (UTF-8 range 0-591).

source/sdk/ios/data-types/supported-property-types.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ Property Cheat Sheet
145145
``CGFloat`` properties are discouraged, as the type is not
146146
platform independent.
147147

148+
148149
Unique Identifiers
149150
------------------
150151

@@ -202,3 +203,22 @@ When using the ``AnyRealmValue`` mixed data type, keep these things in mind:
202203
- String properties do not match numeric queries. For example, in a mixed
203204
type field, 1 does not match "1". "1" does not match 1, 1.0, or true.
204205

206+
.. _ios-size-limitations:
207+
208+
Size Limitations
209+
----------------
210+
211+
Data and string properties cannot hold more than 16MB. To store
212+
larger amounts of data, either:
213+
214+
- Break the data into 16MB chunks, or
215+
- Store data directly on the file system and store paths to the files in the {+realm+}.
216+
217+
{+service-short+} throws a runtime exception if your app attempts to
218+
store more than 16MB in a single property.
219+
220+
To avoid size limitations and a performance impact, it is best not to
221+
store large blobs, such as image and video files, directly in a
222+
{+realm+}. Instead, save the file to a file store and keep only the
223+
location of the file and any relevant metadata in the {+realm+}.
224+

source/sdk/ios/examples/define-a-realm-object-model.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ Define a New Object Type
4848
.. literalinclude:: /examples/generated/code/start/ObjectModels.codeblock.define-a-model.m
4949
:language: objectivec
5050

51+
.. note::
52+
53+
Class names are limited to a maximum of 57 UTF-8 characters.
54+
5155
.. _ios-declare-a-property:
5256

5357
Declare Properties
@@ -90,6 +94,10 @@ Declare Properties
9094
.. literalinclude:: /examples/generated/code/start/ObjectModels.codeblock.array-declaration.m
9195
:language: objectivec
9296

97+
.. note::
98+
99+
Property names are limited to a maximum of 63 UTF-8 characters.
100+
93101
.. _ios-specify-an-optional-required-property:
94102

95103
Specify an Optional/Required Property

source/sdk/ios/examples/filter-data.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ Regex-like wildcards allow more flexibility in search.
383383
.. literalinclude:: /examples/generated/code/start/QueryEngine.codeblock.string-operators.swift
384384
:language: swift
385385

386+
.. include:: /includes/string-sort-and-query-limitations-note.rst
386387

387388
Aggregate Operators
388389
~~~~~~~~~~~~~~~~~~~

source/sdk/ios/examples/read-and-write-data.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ guarantees a consistent order of results if you explicitly sort them.
191191
<Classes/RLMResults.html#/c:objc(cs)RLMResults(im)sortedResultsUsingKeyPath:ascending:>`
192192
with the desired key path to sort by.
193193

194-
195194
.. literalinclude:: /examples/generated/code/start/ReadWriteData.codeblock.sort.m
196195
:language: objectivec
197196

@@ -202,6 +201,8 @@ guarantees a consistent order of results if you explicitly sort them.
202201
<ios-declare-relationship-properties>`, use dot-notation as if it
203202
were in a regular, nested object.
204203

204+
.. include:: /includes/string-sort-and-query-limitations-note.rst
205+
205206
.. _ios-query-a-relationship:
206207

207208
Query a Relationship

source/sdk/ios/fundamentals/realms.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,19 @@ comparable SQLite database. Unexpected file growth may be related to the
188188
.. tip:: Avoid pinning old Realm transactions
189189

190190
{+backend-short+} ties read transaction lifetimes to the memory lifetime
191-
of {+backend-short+} instances. Avoid pinning old Realm transactions.
191+
of {+backend-short+} instances. Avoid "pinning" old Realm transactions.
192192
Use auto-refreshing {+backend-short+}s, and wrap the use of Realm APIs
193193
from background threads in explicit autorelease pools.
194194

195+
.. note::
196+
197+
A large {+realm+} file can impact the performance and reliability of
198+
your app. Any single {+realm+} file cannot be larger than the amount
199+
of memory your application would be allowed to map in iOS. This limit
200+
depends on the device and on how fragmented the memory space is at
201+
that point in time. If you need to store more data, you can map it
202+
over multiple {+realm+} files.
203+
195204
Threading
196205
~~~~~~~~~
197206

0 commit comments

Comments
 (0)