简体   繁体   中英

ERROR LOADING FILES IN XCODE 7.2 AND CRASHING

I just started working on a new version of my app. I opened the project and ran the game on the simulator and got constant errors in the debug console. "sound file could not be loaded "example.wav"" and the same with images.

  • I changed nothing at all, however I believe I got an XCode update just before I started on this. (To version 7.2)
  • I also get the same problem after numerous days of testing, on every simulator and device. The images and sounds that it lists do not display/play, sprites instead display as white squares.
  • After a faulty image/sound has been loaded (ie. a white square has appeared) if it is interacted with or if the scene changes the app will crash.

What the heck is going on?

I figured out the reason I was getting all the many errors. Firstly a lot of them were random (harmless) XCode 7.2 errors, but the errors that were causing the crashing and incorrect loading of files were caused by: I was accidentally loading a sound file in the Update function. I moved this out of that void and it began working perfectly. It must've been loading over and over and causing the error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM