Problem with highlighting errors/ warnings in sorce editor.
Answered
Hi,
I would like to know why AppCode is not highlighting errors/warning messages (nor swiftLint errors) directly in source editor; only after running the app errors/warnings are shown in Messages panel.
https://i.stack.imgur.com/xQDNN.png
https://i.stack.imgur.com/cOqqr.png
Please sign in to leave a comment.
Hi,
Try building the target against device (instead of simulator) and reopen .swift file: in-editor warnings should work after that. Please get back to us if it doesn't help.
Thanks for your response. Indeed, it worked once (very slowly turned this line into an error) but now it's not working again (I think beacuse of appcode reset). Do I need to run it on device every single time to get it working?
Could you please clarify what exactly do you mean by "appcode reset"? Did you invalidate caches or delete AppCode DerivedData folder? In general, after building against device in-editor warnings should work unless you remove caches/DerivedData.
I meant restarting. Ok, one more question is there any pernament solution solving this problem?
After you build for a device once simple restarting should not break the error higlighting, only clean or significant changes to the project can do that.
We're working on improving that, but unfortunately there is no better solution at the moment.
Ok, thanks for your responses. Appreciate it. Keep up the good work and make this IDE even better! It's already 1000x better than Xcode.
Any update on this?
Maciej,
If you're referring to the need for building project once for a device (or, alternatively, "iOS Device" placeholder) - then things didn't change. It is still required.
If you're experiencing other issues - please file a ticket in our tracker with necessary details.
Hi, i have faced the same problem with AppCode 2019.1. My problem is that i can't build it with a device or the placeholder ios deivce because i don't have provisioning profiles for that app! And the company may not register my iPhone. Is there any other option? Thank you
Tomislav,
Since AppCode 2019.1 building for device is no longer necessary to get in-editor errors/warnings. Have you tried to build for simulator? If yes, and you're still experiencing the issue - please file a ticket in our tracker, provide all required info: screenshots/screencast, logs (Help | Show Log in Finder), sample project (if possible).
Thank you for quick response! i've created an issue here: https://youtrack.jetbrains.com/issue/OC-18610