Reputation: 41
My application was previously working on the device before the swift 3 conversion. It still works on simulator. Game loads on device and then after 5-6 seconds crashes.
Running 10.12.1 Beta (16B2333a), device: 10.0.2
Errors:
Metal API Validation Enabled/BuildRoot/Library/Caches/com.apple.xbs/Sources/Metal/Metal-85.83/ToolsLayers/Debug/MTLDebugRenderCommandEncoder.mm:130: failed assertion `indexBufferOffset(12) + (indexCount(372) * 2) must be <= [indexBuffer length](240).
Whether my sprite is moving or not the obstacle.sks gets halfway on to the frame before crashing. I'm aware I am going beyond my index bounds and it looks like it's having trouble reaching my metal file? I'm just not sure what to do about it. Help appreciated!
Upvotes: 1
Views: 446
Reputation: 41
This worked for me. I had to disable Metal verification by editing the scheme (Command-Option-R) is one way to get there, go to the Options tab. Set Metal API Validation to Disabled.
Upvotes: 3
Reputation: 2307
If you are using an Xcode beta version, then it's best to be running the same iOS beta on your device e.g. if you are making the app with Xcode public beta 2, then install iOS public beta 2 on your device.
Upvotes: 1