Hi,
I created a multi target static library. I want to add that as a reference to an ios Toffee app. When building for the simulator I get this
Reference 'libMoshine.Api.Location' already was resolved to '/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/Moshine.Api.Location-10910FCD2301720A4FE1D2083C5DB05CA27CC22C/Debug/Toffee.iOS/Device/libMoshine.Api.Location.fx' for target 'Toffee-iOS'.
Reference 'libMoshine.Api.Location' was resolved to '/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/Moshine.Api.Location-10910FCD2301720A4FE1D2083C5DB05CA27CC22C/Debug/Toffee.iOS/Device/libMoshine.Api.Location.fx' for target 'Toffee-iOS' (Device).
E: Could not resolve reference âlibMoshine.Api.Locationâ for target âToffee-iOSâ (Simulator).
Hmm. Topffe doesnt really generate per-arch files (in Bin)? it does in /obj, but the final files ar emerged/.fat binaries. (Island keeps them separate). Can I see an (ideally small) testcase that shows this?
Hmm. (after adjusting the provisioning profile & id), I can switch back and forth between device and sim, just hit Cmd-B, and it builds fine for either
Oh wait, got it. after I clean and delete ./Bin, I now can repo it.
this seems to be a non-fatal error. essentially it just invalidates there cache after an attempted restore because the file insert there, and then reruns the Resolve uncached:
-> Task RemObjects.EBuild.Elements.ElementsResolveReferences started for SimpleApp.
-> Target Toffee-iOS started.
D: Using cached data for ResolveReferences.
-> Task RemObjects.EBuild.Elements.ElementsValidateCachedToffeeReferencesForTarget started for SimpleApp, Toffee-iOS.
E: Cache does not contain resolved reference 'libMoshine.Api.Location' for target 'Toffee-iOS' (Simulator).
<- Task RemObjects.EBuild.Elements.ElementsValidateCachedToffeeReferencesForTarget failed for SimpleApp, Toffee-iOS, took 0.0012s (0.001s).
-> Task RemObjects.EBuild.Elements.ElementsResolveToffeeReferencesForTarget started for SimpleApp, Toffee-iOS.
Project 'Moshine.Api.Location' referenced from 'SimpleApp' is not enabled, reusing cached output.
D: Project Reference 'Moshine.Api.Location' will resolve using target 'Toffee.iOS'.
Project Reference 'Moshine.Api.Location' was resolved to '/Users/mh/Library/Application Support/RemObjects Software/EBuild/Obj/Moshine.Api.Location-7B4646F22B641E6DA6E635E3C34A47097EE30703/Debug/Toffee.iOS/Simulator/libMoshine.Api.Location.fx' via target 'Toffee.iOS' (but is already referenced).
itâs also just a one-time thing after I deleted Bin; after I build both destinations once, it doesnt come backâŚ
I suppose this should not show as an error; will fix!
Ah, that would make sense, as it doesnât rebuilt the project using the new build destination, if itâs not in the solution, and unchanged. Iâll need to think about how to best address this⌠:(. Probably tie the cache to the build destination, or always force all build destinations for the remote referenceâŚ
Hmm, its actually been slightly worse: Since Fire passes the build destination (Sim vs Device) to the build per project, and Fire doesnât know abut the Remote Reference as being a project itself, that ref is only ever being build for Device â even on rebuild.
I propose as solution for EBuild to simply always always force Simulator=True and Device=True to remote projects (and also Mac=True, if (one of) the projects that reference it has Mac Catalyst enabled.
That way we incur some extra built time there first time around, Burt weâre set for good, when switching.
Another problem is that your remote project doesnât define the SubMode for Toffee. Technically, Toffee uses SubMode to set iOS vs macOS vs âŚ, not the SDK; SDK is only used to narrow down to a specific version. The code that synced Sum vs Device up assumed that SubMode was was (Iâm working around that now, but technically that project of tours is still âinvalidâ as it is.
Build for 20201231-121849-elements-develop [water] started on bajor has this fixed (both to match the targets by just the SDK if needed, and to always build Device & Sim (& Mac) for the remote refs).