4

I have a simple, brand new Objective-C project for iOS on OSX El Capitan 10.11.4. I am using Cocoapods, so I created my Podfile with the following 3 pods: Firebase, UALogger, and AFNetworking 3.0. I installed my Pods, and then opened up the .xcworkspace. So far so good.

I have one View Controller and a subclassed UITableView, and in the VC's .m, I import Firebase, UALogger, AFNetworking, and my tableview as such:

// MyViewController.m
#import "MyTableView.h"
#import <AFNetworking.h>
#import <Firebase/Firebase.h>
#import <UALogger/UALogger.h>
...
@property (strong, nonatomic) MyTableView *tableView;

I then go to my viewDidLoad method, and attempt to do a simple alloc/init of Firebase and create my tableview:

// MyViewController viewDidLoad
Firebase *firebase = [[Firebase alloc] initWithUrl:@"myurl...";
self.tableView = [[MyTableView alloc] init];

Here's what happens:

  • The Firebase class is not auto-suggested, so I have to manually type that out in both locations, but, the initWithUrl... is surprisingly auto-suggested.

  • UALogger works as expected all the time – i.e., any time I begin typing UA..., it suggests the appropriate completions.

  • AFNetworking classes are not auto-suggested and I have to manually type them out, but as with Firebase, the method names are auto-suggested.

  • When I begin to create my tableview, the MyTableView class is not auto-suggested. That's no surprise at this point, but the notable part of this is that it is my own file, not a pod.

  • As far as I can tell, Apple standard library methods are all auto-suggested as normal.

And, to really confuse me even further:

  • If I type an F during mid-build (i.e., after I click the run button, but before the project finishes building), Firebase will be autosuggested. However, once the build has finished, if I backspace and then retype the letter F, it is no longer a suggestion. The same effect does not happen for AFNetworking or the others.

To be clear: Everything complies, and my app runs perfectly with no warnings and no errors.

What I've tried thus far:

  • Setting User Header Search Paths in Build Settings to $(SRCROOT)/** (and also "$(SRCROOT)/**" and also $(SRCROOT)) along with it set to recursive
  • Clearing out the Header Search Paths (and they reset to what they were before I cleared them out)
  • Setting Always Search User Paths to Yes
  • Ensuring the Pod public header files are in tact and correct
  • Ensuring my files are part of Target Membership
  • Deleted derived data
  • Restarting the computer
  • Cleaning the project
  • Re-deleting derived data
  • Re-cleaning the project
  • Re-restarting the computer
  • Uninstalling all pods, and reinstalling them
  • Creating a second, new yet identical project, and repeating the above steps
  • Uninstalling Xcode, and reinstalling it

None of this worked, and now I'm here.

The good news is that this hypothetically isn't that big of a deal – I just have to type more and work my little fingers to the bone.

The bad news is that I have no clue why this is happening and have to type more and work my little fingers to the bone.

If there is a solution to this that I have yet to try, please let me know. Thanks.

Friendly King
  • 2,396
  • 1
  • 23
  • 40
  • see this link http://stackoverflow.com/questions/37152726/first-time-class-name-doest-not-exist-in-autocomplete-box-in-xcode-7-3 – Jigar May 12 '16 at 03:23
  • I'm voting to close this question as off-topic because bug reports for Xcode go to Apple. – Avi May 12 '16 at 04:46
  • @Avi I'm fine with having this closed if it is, in the opinion of the SO community, a legitimate bug report for Apple. But based off many of the other questions, these types of problems do appear to end up being either a misconfiguration by the user or something "fixable" of that nature – albeit completely esoteric. So I was hoping it was the latter, but if it's the former, then yes you're correct. – Friendly King May 12 '16 at 12:06

1 Answers1

0

Try cleaning your project and remove derive data. You can force the Xcode to show suggestions manually by pressing ctrl button + space bar.

Akash KR
  • 778
  • 3
  • 11
  • Hi, thanks for the suggestion, but I was unable to get this to work ;( – Friendly King May 12 '16 at 12:16
  • Sorry..its ctrl + space bar – Akash KR May 12 '16 at 12:33
  • 1
    The problem is that the auto-suggestion list does appear, but it fails to provide relevant suggestions based off what I type. The Crtl+Spacebar does force the suggestion view to appear, but it does not force the correct suggestions to be displayed. – Friendly King May 12 '16 at 12:47