addEntry adds a file but the entry contains slightly different data or corrupted data
Steps to Reproduce
When adding entry to an archive, if the file is a plist file with no extension (ex. "data") and has a [String : Any] dictionary and one of the key of the dictionary contains number, addEntry adds the file but the data of the entry is slightly different or corrupted.
If no key in the dictionary contains number, addEntry works perfectly so I don't think my code is the problem probably
But if a key contains number, addEntry changes the dictionary's keys and values
example -
original dictionary on document
"f1" = 0, "abc" = 123, "cde" = 321, "abc123" = 123
Summary
addEntry adds a file but the entry contains slightly different data or corrupted data
Steps to Reproduce
When adding entry to an archive, if the file is a plist file with no extension (ex. "data") and has a [String : Any] dictionary and one of the key of the dictionary contains number, addEntry adds the file but the data of the entry is slightly different or corrupted. If no key in the dictionary contains number, addEntry works perfectly so I don't think my code is the problem probably But if a key contains number, addEntry changes the dictionary's keys and values
example -
original dictionary on document "f1" = 0, "abc" = 123, "cde" = 321, "abc123" = 123
dictionary from entry "f2" = 1, "abc" = 123, "cde" = 321
"f1" became "f2" and "abc123" is missing
Expected Results
The data of the plist file on document bplist00ÑRf1
the key of the dictionary is "f1"
Actual Results
The data of the plist file of the entry bplist00ÑRf0
The key of the dictionary is "f0"
Regression & Version
Xcode 16.0, swift 5
Related Link