iOS Development--Error summary & common errors and warnings in development summary (14)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.