ios - SWIFT code dataWithContentsOfFile broken with update to XCode 6.1 -


Since the following two lines of code are compiled errors in the latest update of XCode, do I re-compile and run the program Can advise to make adjustments for?

  var view data = NSData.dataWithContentsOfFile (path, option: .dataReadingMappedIfSafe, error: zero) var archiver = NSKeyedUnarchiver (forReadingWithData: sceneData) archiver.setClass (for self.classForKeyedUnarchiver () Classname: "SKNN")  

Any help would be appreciated, thanks.

you (iOS <8.0)

  NSData.dataWithContentsOfMappedFile (Path) can use  

or (iOS> = 7.0)

  var ViewData = NSDTA (contentoffile: path, option: .dataindingmapIsF, Error: Zero)  

If you create a new Spritekit sample project in XCode 6.1, you will see the change.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -