Unrecognized selector sent to class 0x235e7ec

Source: Internet
Author: User

After inferring the probable cause of the problem, it is likely that there is a problem with the setting information of the project. So start a parameter too, at first thought it was search paths the various path configuration errors, later verification is not. Otherwise the compilation should not pass.
Then, set the scope to the linking parameter list under Build settings. Immediately there is a parameter to be greeted: other Linker Flags, no settings. From Google, check the instructions:

-all_load Loads All members of the static archive libraries.

-OBJC Loads All members of the static archive libraries that implement an Objective-c class or category.

-force_load (path_to_archive) Loads all members of the specified static archive library. Note:-all_load forces all members of the all archives to be loaded. This option allows your to target a specific archive.

The-all_load is to load all the members in the static library file, and-OBJC is to load all the members of a class or category in a static library file,-force_load (the path to the package) is all the members in the static library file that will load the specified path. So for the method of reflection invocation using runtime, you should use one of these three to link to ensure that all classes can be loaded into memory for the program to invoke dynamically

Here, the basic understanding is that this parameter is not set the reason. The other Linker flags=-OBJC, and then re-debug, run successfully!

Unrecognized selector sent to class 0x235e7ec

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.