Swift Struct and Class Difference

Struct Value type Copied when passed or assigned Copy on write Functional programming No inheritance “Free” init initializes ALL vars Mutability must be explicitly stated Your “go-to” data structure Class Reference type Passed around via pointers Automatically reference counted Object-oriented programming Inheritance (single) “Free” init initializes NO vars Always mutable Used in specific circumstances The… Read More Swift Struct and Class Difference

Fix Swift Framework Error: Module compiled with Swift 5.1.3 cannot be imported by the Swift 5.2.4 compiler:

Chances are you upgraded to the latest Xcode and along with it, your Swift compiler is updated as well. Then existing projects using a particular project have stopped working with similar error such as. Or you are checking out some hosted on code on Github using some framework, the framework might have been built using… Read More Fix Swift Framework Error: Module compiled with Swift 5.1.3 cannot be imported by the Swift 5.2.4 compiler: