Posts

Post marked as solved
2 Replies
577 Views
I am seeing the following log in the console in Xcode Version 15.0.1 (15A507): Cannot use inflection engine (Checking that the token is the correct type): I am able to reproduce the issue using Apple's own sample code, "Building a Localized Food-Ordering App" associated with WWDC21 Session 10109: What's New In Foundation, simply by building and running the sample code. That log message immediately appears a few times in the console when running that sample project. I'm assuming given it is happening in Apple's own sample project, that this is merely console noise and basically something out of my control.
Posted
by JohnC2.
Last updated
.
Post marked as solved
4 Replies
948 Views
I'm seeing a strange issue in which my @IBDesignable class fail to render in Interface Builder unless I make a change to the underlying class file. To elaborate on what I mean by that, Create a subclass of UIButton and mark the class as @IBDesignable Add some @IBInspectable properties. Switch over to Interface Builder, go to the Library and drag an instance of a Button onto your Interface Builder canvas. Go to the Identity Inspector and change the class type from UIButton to your custom UIButton subclass. Go back to the Attributes Inspector. At this point, I do see all my @IBInspectable properties in the Attributes Inspector, and Interface Builder properly puts my custom class name above my defined inspectable properties. Everything looks normal except for the fact that the UI above my Inspectable that typically reads "Designables Up to date" does not show at all. I then proceed to change and modify the Inspectable properties only to see that the button in the canvas does not update or change at all. At this point, I go back to my class file, and make a modification. Any modification at all, even just adding a single space to a comment, and when I go back to Interface Builder, everything is working. I see the "Designables Up to date" UI showing, my button is displaying with my custom styling, etc. If I interact with, and make changes to my Inspectable properties in the Attributes Inspector, my button also properly updates in real time. While an annoyance during the development process, I do see this becoming a bit of more significant issue given the fact that the components I am building into a Framework are to be distributed to 3rd party developers in the form of XCFramework binary in a Swift Package. A third party developer won't be able to say, go to the class file and make a modification, nor would I want them to. The only other work around I found is after changing the class type to your custom @IBDesignable class, to then just quit and reboot Xcode. And when after relaunching the @IBDesignable appears and works correctly. Obviously, I don't want to add to my documentation to reboot Xcode after dragging a UI component to your canvas. I've never seen this issue before, has anyone else seen anything like this? I am currently running Xcode 13.4.1 (13F100), still haven't had a chance to update to the latest Xcode. I will also try upgrading later this afternoon to the latest Xcode 14 release but I'm not seeing anything in the Release Notes that might indicate anything that would address this issue if it had been previously identified.
Posted
by JohnC2.
Last updated
.