Lost completion in #import “myFile.h”
Since I had Xcode 4.4, I have lost the completion when I want to import file on my classes. I have to write the file entirely (The problem appears only in the import scope, it works elsewhere)
Has anyone the same problem and know how to figure out ?
- UIImagePickerController custom FlashMode button is not working on IOS 10 (swift)
- Removing WKWebView Accesory bar in Swift
- Using .pch file to include applcation files
- iOS presenting view controller animated as 'Push' (right-left animation)
- How to check whether the date & time of a limit overlaps another limit or not?
- API JSON & UIPageViewController optional Nil
2 Solutions Collect From Internet About “Lost completion in #import “myFile.h””
Go to your project –> build settings –> User Header Search Paths and add
That works for me.
Edit (another solution) :
Sometimes I lost autocompletion randomly in my import scope. I fix it by typing the double quotes
#import "" before typing my class between with the autocompletion.
Apparently this is related to having your files inside subfolders. It seems that while previous versions of Xcode’s codesense would list any headers added to your project, version 4.4 only lists the ones in the topmost folder in your project…
The solution I’ve found is to include those subfolders in the project’s “User Header Search Paths”.
For example, if you have a folder structure like this:
Source/ Example/ Util/ util.h Example.xcodeproj
By default, when you type
you’ll get the suggestion for the Util folder. If you let it complete that and continue typing:
you’ll get the util.h suggestion.
To get the usual autocomplete behavior, go to your project –> build settings –> User Header Search Paths and add Example to the list (double click on the setting, click the “+” button, write Example and make sure to turn on the checkbox to the left). When you close the little pop up, your setting should read something like Example/**, which means it’s including Example and every subfolder.
The new behavior (feature? bug?) was driving me crazy. Hope that helps.
- IOS project showing error “An internal error occurred. Editing functionality may be limited” on xcode 7.1
- Getting An Assertion Failure Error
- Realm retrieving specific data
- dyld symbol not found DictionaryGenerator (IOS Xcode6 Beta4)
- How to turn off NSZombieEnabled in Xcode 4
- Automatic scrolling scrollview
- Apple Watch pre-build action to change storyboard customModule references
- Warning from iOS “Do not add subviews directly to the visual effect view itself”
- Will fork() in iOS app likely be rejected by Apple's vetting process?
- Swift giving Optional(3) instead of 3 for .toInt
- How can I send a UILongPressGesture programmatically?
- How can I receive push notifications of an other app?
- Looping using NSRange
- How to get current language code with Swift?
- How to Load large HTML string in WebView with LoadHTMLString method?