0

I am creating an app where a user signs in and uploads a profile image from the photo library, the image displays fine where i want it to but as soon as the simulator is stopped and the app is run again the image dissapears. I have done a lot of searching and have found code that looks like what i need but i can not get this line of code to work in swift 3.0 xcode 8 beta 3:

data.writeToFile(localPath, atomically: true)

Does anybody know the updated syntax?

Leo Dabus
  • 229,809
  • 59
  • 489
  • 571
  • Xcode knows, why don't you use code completion? Of course you have to type something, but `data.wr` is sufficient. Alternatively look into the documentation. – vadian Sep 02 '16 at 04:25
  • Completely unrelated, but I'd suggest getting a newer beta. There's been a ton of changes since beta 3. See the [release notes](https://developer.apple.com/go/?id=xcode-8-beta-rn), at the very least. – Rob Sep 02 '16 at 04:29
  • I tried, XCode didnt know... I cant update for another 2 weeks, am sure that would fix the issue. I work offshore and it would take a month to do a 3gb download, i will never download a beta of anything ever again.... – Fontaine Denton Sep 03 '16 at 06:00

0 Answers0