AppCode showing invalid errors/warnings that Xcode does not Follow
I'm using AppCode 2017.3 EAP (Oct 17) and Xcode 9.0.1.
I'm not sure if it's when we switched to using an xcworkspace instead of an xcodeproj, or if it's when I upgraded to Xcode 9, but for the past several weeks AppCode is showing several errors/warnings in every file and Xcode is showing none of these.
(AppCode does compile/run w/o any issues.)
A lot of the errors are like this:
"Can't resolve variable title"
NSString* title = nil;
Please sign in to leave a comment.
Please try File | Invalidate Caches and Restart and let us know if it helps.
that didn't help, unfortunately...
another issue I see a lot of is NSAsserts...
"Error after macro substitution: Can't resolve variable '__assert_file__'"
I believe those are the only 2 types of errors that I'm seeing (hundreds of times throughout the project, so I can't be sure if there aren't other types).
I do see warnings (only in AppCode, not in Xcode) for some imports like "Cannot find protocol 'MyProtocol', conformed by protocol 'MyOtherProtocol'".
Would you be able to submit a sample project with examples of those issues to our support email (firstname.lastname@example.org)?
Also it might be worth to check which Xcode version is selected in Preferences | Tools | Xcode (I presume, that should be 9.0.1), which target the problematic files belong to (i.e. iOS/macOS/etc), what target is selected in Run Configuration dropdown and which resolve context is used ("Context: ..." in bottom right). Logs from Help | Show Log in Finder would be also useful, if you can send them over to support email.
sample project will take time, unfortunately...and yes, the correct Xcode is selected in prefs>tools...thx
AppCode 2018.1.1 还是有不能解析类型、方法等内容。
can not resolve variable
can not find declaration
Help | Show Log in Finder
2018-04-13 14:33:55,846 [ 330991] INFO - cidr.xcode.XcodeBuildFramework - 2018-04-13 14:33:55.843 BuildService[64261:3553242] [MT] IDEIndexing: Disabling index for workspace 'XXXXXXXXX'.
2018-04-13 14:33:55,846 [ 330991] INFO - cidr.xcode.XcodeBuildFramework - 2018-04-13 14:33:55.843 BuildService[64261:3553242] [MT] IDEIndexing: Failed to create IDESourceKitWorkspace: (null)
try File | Invalidate Caches and Restart , but still error.
Please disregard the INFO messages:
They have no relation to the issue you're seeing.
If you're still seeing the problem after invalidating caches - please report an issue in our tracker, include information about selected Xcode (from Preferences | Tools | Xcode) and sample project where you see that persistently (any basic project created from scratch), if possible. Also would be useful to attach idea.log (Help | Show Log in Finder).
This also happened to me after upgrading to AppCode.2018.3 from AppCode.2018.2 this morning.
I have a xcworkspace with a pods project and my app project. One of the pods is a development pod. The types in the development pod are resolved fine. But the framework types in my app can't resolve.
It can't resolve any framework type.
can't resolve class 'NSObject'
I tried the following and nothing seems to work:
Could you please contact our support: email@example.com, attach a couple of screenshots that demo the problem, and your Podfile contents (if there is any sensitive information, please strip it out).
Just sent it.
What was the issue? It would be nice to know :)
The root cause was that I'm not using "use_frameworks!" in my pod file (and I'd like to keep it that way).
They gave me a workaround. Build your app for the "iOS Device" target instead of simulator and restart AppCode. Had to do it once or twice since.
The issue is tracked here: https://youtrack.jetbrains.com/issue/OC-18010