Fixed. An explicit “Mode” set on project level now takes precedence over the target name.
Well, you need a mode specified in one of three places:
a) a (legacy) targets import with a platform name on it (like Elements.Toffee.targets)
b) a Mode set on project level
c) one or more explicitly defined EBuild Targets (not to be confused with “.targets”) that specify their own Mode
the bug was that when both (a) and (b) were present, (a) took precendence; no (b) does.
So future-facing the best way is to just use “RemObjects.Elements.targets” (or really, no target at all, unless you need MSBuild compatibility)*, and define the Mode as setting. But the fallback to reading the mode from the Import will always continue to work.
When using EBuild, the Import really does nothing but have its name parsed to determine the platform. When using MSBuild, that .targets file still needs is loaded and does all the processing; all the target files (except Echoes.Legacy.targets) actually have the same content, and just hoist up EBuild inside of MSBuild. See the bottom section of Building Projects w/ EBuild.
Addendum: For Island and Toffee, if Mode is set but SubMode is not, it will go back to looking at the .targets (and potentially override mode and submode from there), because SubMode is required for those and my change just broke the build on a bunch of projects
So the importsolution builds but I get these errors when I build an ios app
E: Could not resolve reference ‘Realm’ for target ‘Toffee-iOS’ (Simulator-x86_64).
Reference ‘PureLayout’ already was resolved to ‘/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/PureLayout-D467762E624A80E379075F9733F7E210AE82EDD8/Unknown/Island-Darwin/Device/arm64/PureLayout.fx’ for target ‘Toffee-iOS’.
E: Could not resolve reference ‘PureLayout’ for target ‘Toffee-iOS’ (Simulator-x86_64).
Reference ‘AppAuth’ already was resolved to ‘/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/AppAuth-4A669BEDC40105DBBC008A6DB05F633A59A1C1E8/Unknown/Island-Darwin/Device/arm64/AppAuth.fx’ for target ‘Toffee-iOS’.
E: Could not resolve reference ‘AppAuth’ for target ‘Toffee-iOS’ (Simulator-x86_64).
Reference ‘MDFTextAccessibility’ already was resolved to ‘/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/MDFTextAccessibility-4F2031FA0748956CD91DE5C20045AA5719B7511C/Unknown/Island-Darwin/Device/arm64/MDFTextAccessibility.fx’ for target ‘Toffee-iOS’.
E: Could not resolve reference ‘MDFTextAccessibility’ for target ‘Toffee-iOS’ (Simulator-x86_64).
Reference ‘MaterialComponents’ already was resolved to ‘/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/MaterialComponents-EF18BCD0B7C2823735C80911DA263C7C4E3F1148/Unknown/Island-Darwin/Device/arm64/MaterialComponents.fx’ for target ‘Toffee-iOS’.
E: Could not resolve reference ‘MaterialComponents’ for target ‘Toffee-iOS’ (Simulator-x86_64).
Reference ‘MaterialComponentsBeta’ already was resolved to ‘/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/MaterialComponentsBeta-A050A6FFE477146B10DA670A0C9D8F0C590F36B8/Unknown/Island-Darwin/Device/arm64/MaterialComponentsBeta.fx’ for target ‘Toffee-iOS’.
E: Could not resolve reference ‘MaterialComponentsBeta’ for target ‘Toffee-iOS’ (Simulator-x86_64).
I was looking at the elements file for the ios app and it has
It looks to me as though setting use toffee v1 to false works until I need to reference my import projects. If I just have that then an island import project creates this error
E: Could not resolve reference ‘MaterialComponents’ for target ‘Toffee-iOS’ (Simulator-x86_64).
Reference ‘MotionAnimator’ already was resolved to ‘/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/MotionAnimator-B5D39ABECA1829F5B7A1AF05752E3A4A0D6112FA/Unknown/Island-Darwin/Device/arm64/MotionAnimator.fx’ for target ‘Toffee-iOS’.
E: Could not resolve reference ‘MotionAnimator’ for target ‘Toffee-iOS’ (Simulator-x86_64).
Reference ‘MaterialComponentsBeta’ already was resolved to ‘/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Obj/MaterialComponentsBeta-A050A6FFE477146B10DA670A0C9D8F0C590F36B8/Unknown/Island-Darwin/Device/arm64/MaterialComponentsBeta.fx’ for target ‘Toffee-iOS’.
E: Could not resolve reference ‘MaterialComponentsBeta’ for target ‘Toffee-iOS’ (Simulator-x86_64).
Am I meant to be editing the elements project file myself ?
Ok, then I;m not sure how the .Toffee.targets got into the project, coz (I just checked to make sure), the template doesn’t haver it.
In any case, you need to set Mode or keep Toffee.targets/Island.Darwin.targets in the project one (or both, since I fixed the precedence), but not neither.
If you send me your project, I can fix it for you.
Im starting off with the SimpleApplication iOS in Fire. I’m not really sure if I should be starting a new thread because Im just trying to to use the Island Import Projects I have.
I edited the ios app myself and it builds but with import project references it doesn’t. Do you want me to start a new thread for that ?