Swift and OBJECTC mixed module-swift.h file not found

Source: Internet
Author: User

As we all know, the system automatically generates a swift.h file when Swift and objective-c are mixed. Not the bridge file, which was used to import the Objective-c class into Swift, said to be used to guide Swift in Objective-c. At that time on my own computer run no problem, git upload after someone else update alive hint Xxx-swift.h file not found. We all know now that Swift has just come out, is a pit, at that time was afraid of Swift has any special settings, a variety of svn,git,swift search. No results, and various path search, there is no result. and then use

$find ~/library/developer/xcode/deriveddata-name "*swift.h"

On the other end of the run, obediently, the file is there. But it's still a hint that I can't find it. Finally found that the problem is a oolong, human computer settings are case-sensitive, mine is not case-sensitive. Found in the folder is "Xxx-swift.h", and the class is imported "Xxx-swift.h" make a joke, the lower case to uppercase is OK.

Of course. If

Project must has a Module Name not including spaces. Defines Module must is set to Yes in Build Settings, under packaging.

These two points are not set, will not make this joke, because you on your own computer can not generate this file. Add a sentence, the module name is best set to "" Xxx-swift.h, XXX for its own project name, not if the project name has spaces, do not use a space, with an underscore instead, such as "My Project" is "My_project-swift.h" the best

Swift and OBJECTC mixed module-swift.h file not found

Related Article

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.