Closed Boowman closed 5 months ago
I cant reproduce this, your example is working fine on my end... Can you share your full test case? Do you always get BAD_ACCESS or just every other run?
I get it every run, I tried it in a blank project, same issue. If it helps I can upload a Github repo and share it with you as it doesn't really make sense why it would crash to be fair.
Please send me a link to an example project, I still cannot repro this. What version of Xcode are you using?
Link to a test project: https://github.com/Boowman/PlayWorld I am running Xcode 15.2, tested it on 15.0 and I get the same thing.
I found it:
Under the General settings of your PlayWorldTests target, go to Frameworks and Libraries and remove Mockable (keeping MockableTest).
MockableTest also includes Mockable so you only need to add MockableTest to your test targets. See the docs for more info.
Well, I have good news and bad news:
clean + reset packages cache + delete derived data + reopen xcode
That did not seem to work, I am wondering if there is something I have to have enabled. I remember in other new projects I would get a popup on the side to allow macros. I didn't get it this time as it was an older project.
If I expand the macro I can see it getting created so I doubt it has anything to do with Allow & Trust
I have imported
MockableTest
into my test file, I have addedMOCKING
under Custom Flags for Debug and I added Mockable into my main target.