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, theinitWithUrl...
is surprisingly auto-suggested.UALogger
works as expected all the time – i.e., any time I begin typingUA...
, 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 torecursive
- Clearing out the
Header Search Paths
(and they reset to what they were before I cleared them out) - Setting
Always Search User Paths
toYes
- 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.