Summary of common errors and warnings in development (14)
Third-party class library support
The Swift project canceled precompiled files, and some third-party objective-c libraries did not import the necessary frameworks (such as Uikit) to cause compilation errors
Cocoapods cannot find the. o File
In the Cocoapods project, some of the. o files for some class libraries are not found, leading to the following two types of errors:
A compilation error exists in the class library itself
Swift does not pre-compile, uikit, etc. not imported
Add the code file from this library file directly to the project, compile, and resolve the error.
Jsonmodel Support
Some simple features of Jsonmodel can be used in swift, and some complex data models recommend the use of Objevtive-c
1 Import UIKit 2 @objc (Illoginbean) 3 Public class Illoginbean:jsonmodel {4 var useravatarurl:nsstring? 5 var userphone:nsstring! 6 var uid:nsstring! 7 }
Tips
When Swift uses the Jsonmodel framework, the field can only be a support type in nsfoundation, and the newly added string, Int, array, and so on under swift cannot be used
Friends League statistics
The referenced from error is present in the introduction of the Friends League statistics SDK in the SWIFT project:
Workaround, find other Linker Flags, add-lz
iOS Development--Error summary & common errors and warnings in development summary (14)