Commit Graph

6 Commits (2ee1fa01253e4f25da381e9833c16b1b11835434)

Author SHA1 Message Date
Morgan Pretty 1396652698 Refactored the DSL for interacting with C structs
There were a few logs related to bad memory access within libSession and the `toLibSession` convention which we'd originally setup made me nervous as C-friendly objects would be allocated in Swift and then assigned to C struct properties but I'm not sure how the memory would actually behave in this case.

This updated approach unfortunately involves a bunch of duplicate code within 'TypeConversion+Utilities' (and some horrible type aliases for tuples) but as a result we now have compile-time safe 'get' and 'set' functions for any C struct which conforms to `CAccessible` and `CMutable`. The other nice benefit about this change is that the new `set` functions copy memory across into the C structs so we can have more confidence that the memory ownership has shifted to the libSession side of things.
8 months ago
Morgan Pretty bef27ee0c7 Fixed build issues resulting from rebase after Onboarding 9 months ago
Morgan Pretty ce01f128f3 Replaced Cocoapods with Swift Package Manager for dependency management 9 months ago
Morgan Pretty b0eec5a4c2 Updated to the latest libSession and updated it's error handling 11 months ago
Morgan Pretty 733694d464 Defensive coding for C API conversation, threading & logging tweaks
• Reworked some of the C API conversions to try to prevent invalid cases
• Tweaked the threading around libSession networking callbacks to minimise Swift code blocking libSession threads
• More logging tweaks
11 months ago
Morgan Pretty c065abc584 Cleaned up a bunch of warnings, renamed a couple of folders 1 year ago