Post

Replies

Boosts

Views

Activity

Reply to Importing data via .csv file
Hi @Josedv I'm working on an app with csv read functionality (tapping on a button to open share extension and read a file from Files/...). I managed to find the following in some other thread, which works(ish) for me (I'll explain the ish). I totally agree with @eskimo that you should enforce some sort of formatting rule wherever csv files are generated (this was an ongoing pain at one of my previous jobs), and another pain was to verify the validity of the content, but I guess that's another conversation? It's available from https://github.com/ahltorp/csvparser I used it with Swift 5, and it reads my csv file properly. My csv file was generated using commas as delimiter, nested data as header/detail report style and column order as original. So the ish part, it generates an array of arrays of String ([[String]]), with the first item being the titles for each column (this is particularly useful because this determines the number of columns too, even if one of the rows in that column has an invalid value, I think). I had to create some sort of verifier (to determine whether we have correct number of Strings in each row), and an adaptor for iterating through each inner array items and create my objects from it. I guess the above link can be further improved by compiling data received into dictionaries/json which can then be converted to Data, and that data can then be provided in a generic form. I'll try to do that and put it on Github, but this should unblock you (not sure if it's any longer relevant). Best wishes, and if you have any further updates, please let me know
Dec ’20
Reply to Xcode 15.0 Beta 5, Symbol not found: _$s9SwiftData014DefaultBackingB0C3forACyxGxm_tcfC
Hi, I'm getting the same issue: dyld[927]: Symbol not found: _$sSo24OS_dispatch_queue_serialC8DispatchE5label3qos10attributes20autoreleaseFrequency6targetABSS_AC0E3QoSVAbCE10AttributesVSo0a1_b1_C0CACE011AutoreleaseJ0OANSgtcfC Referenced from: <D5B497B4-6F51-387D-827C-85E82B1A6C68> /private/var/containers/Bundle/Application/56AAEC63-6AD9-4812-ABAB-CF945F502593/PanzerPower.app/PanzerPower Expected in: <5D28AD50-9087-35F4-B443-436779FBCC38> /usr/lib/swift/libswiftDispatch.dylib I'm running Sonoma 14.0 Beta (23A5312d), and Xcode 15.0 beta 8. I wondered if this is because of some of my libraries I'm using, but I've re-added all my deps using spm again, and still experiencing this. This is my bt dump: * thread #1, stop reason = signal SIGABRT * frame #0: 0x00000001cfcecee4 dyld`__abort_with_payload + 8 frame #1: 0x00000001cfcf6bcc dyld`abort_with_payload_wrapper_internal + 100 frame #2: 0x00000001cfcf6bfc dyld`abort_with_payload + 12 frame #3: 0x00000001cfc9ff1c dyld`dyld4::halt(char const*) + 324 frame #4: 0x00000001cfc9e468 dyld`dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 3540 frame #5: 0x00000001cfc9c2e0 dyld`start + 1760 Thought to provide it here just in case it's of any help to someone.
Sep ’23