mikeash_ says:
Thanks for all the info and for filing feedback on this, everyone. This looks like an Xcode problem and we're investigating. For now, the simplest workaround would be to disable building for iOS 32-bit, as it looks like the problem only affects that slice. To flesh this out a bit, in the build settings of your project, go to "Architectures -> Valid Architectures". For iOS, if you see a bunch of ARM architectures in this field, remove any armv7... ones leaving only arm64.
If no ARM architectures are specified in this field, Xcode will try to build all of them by default, so add a lone arm64 to prevent this.
(For mac builds, by the way, you'll want to do the same thing except make sure you remove any i386 entries and have a single x86_64 in there.)
And make sure you make all these changes in some temporary, easily reversible way! This is not a best practice, but rather a work-around until this gets fixed — hopefully in a future beta release?
Post
Replies
Boosts
Views
Activity
You can use:ForEach(array.indices) { i in
//do stuff
}But be careful. This masks the ID of the underlying value, so should only be used for arrays that don't add or remove items.
the `action:` param is looking for a `()->Void` (a function that takes no params and returns nothing), but you're giving it a statement. You should wrap the statement in a closure to make it fit the requested type:Button(action: {self.x = x + 10}) {
Text("+10")
}