Kolos65 / Mockable

A Swift macro driven auto-mocking library.
MIT License
203 stars 16 forks source link

App doesn't compile with generic destination on xcodebuild #11

Closed emadhegab closed 3 months ago

emadhegab commented 6 months ago

I try to compile my app using this command xcodebuild -scheme 'MyApp' -sdk 'iphonesimulator' -destination 'generic/platform=iOS Simulator'

but it gives me error always

protocos/MyAppService.swift:5:17: external macro implementation type 'MockableMacro.MockableMacro' could not be found for macro 'Mockable()'

It will run fine if changed the destination into -destination 'platform=iOS Simulator,name=iPhone' but that will prevent me from using the .app file it generates in the E2E testing i have.

Kolos65 commented 6 months ago

I can repro this on an example project, will update you if I find anything.

Kolos65 commented 6 months ago

Not sure why, but what I have found so far is that if you omit the -sdk 'iphonesimulator' flag, it compiles: xcodebuild -scheme 'MyApp' -destination 'generic/platform=iOS Simulator' Are you sure you need to specify the base SDK explicitly?

emadhegab commented 6 months ago

I tried. but it crash when dragging the .app to simulator and try to run it. i think without sdk it takes the default which is probably the real device

Kolos65 commented 3 months ago

@emadhegab I will close this for now due to inactivity, will reopen if needed.