Unable to activate constraints in iOS

really great work
i just tested the ios companion app and it showed this error -

Error from Companion: error: Unable to activate constraint with anchors and because they have no common ancestor. Does the constraint or its anchors reference items in different view hierarchies? That's illegal..

but same thing in android companion works

Would you mind sharing the AIA file here or PMing it to me so that we can take a look?

pls check this aia - FruitGame.aia (1.6 MB)

Thanks. I've set up an issue on our internal iOS issue tracker and we'll work on a fix.

1 Like

great hope you will fix this soon
best of luck

I think I could narrow the problem down. It has to do with nested arrangements. These must not have any percentage values (height or width) if the superordinate arrangement (here: Var2) is NOT visible.
iOS_harVar.aia (2.2 KB)

To check this, set the Var2 (green) Visible to false:

Btw, what about this?

EDIT: These are the blocks in my test aia to avoid this:

I everyone.

First, I want to thank and give all my recognition to iOS App Inventor Team, for such an important achievement.

Second, I tried to use it with my two apps, but one of them reloads the first screen every time I push a button in main menu, and the second one, crashes with the message attached.

I share this, because I think it migth help to find bugs, but, for me, it's an awesome step to see my app in an iOS device.

Thank you very much for your effort.

Carlos Pérez

did you see this - Unable to activate constraints in iOS
this error is already reported by me

Thank you, Aarush_Kumar, I didn't see it.

Hi @Anke,

I'm not sure exactly what I'm supposed to be understanding from your blocks screenshot. Could you elaborate?

I actually thought I explained and illustrated it pretty clearly.

If there is another Arrangement2 in Arrangement1, then the height or width of Arrangement2 must NOT have any percentage values if Arrangement1 is set to not visible.
In other words: As soon as the Arrangement1 is set to Visible=false, the error occurs.

EDIT: Ah, I just see you talking about my second post, sorry. I'll answer that in a moment ...

Yes, I understood the first post just fine and I think we may have a way of fixing that issue.

Height Automatic appears to act like FillParent.

The problem arises if there are further arrangements among each other and then the height of individual arrangements is changed. This in turn changes the heights of the other arrangements.

But the good thing is that these problems disappear after restarting Companion, as long as something is not changed again in the height of the arrangements.

@ewpatton I updated this post: