Q:

Rewrite or delete existing .png file in IOS swift apllication

I would like to add the text on my .png image which exist in my swift application and REPLACE my old image with this edited image. 
But when I am trying to remove old image I am getting the error message :
          Error : Error Domain=NSCocoaErrorDomain Code=513 "“Background.png” 
          couldn’t be removed because you don’t have permission to access it."  
        UserInfo={NSFilePath=/var/containers/Bundle/Application/57134C17-50A5-
    4709-9E3B-8013733175BA/SignatureApp.app/Background.png, NSUserStringVariant=(
                Remove
            ), NSUnderlyingError=0x12cd8c150 {Error 
Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}

Code which I am using to remove my old png file is :
let path = NSBundle.mainBundle().pathForResource("Background", ofType: "png")! 
let fileManager = NSFileManager.defaultManager()
do {
    try fileManager.removeItemAtPath(path)
}
catch let error as NSError {
    print("Error: \(error)")
}

Can anybody give an idea how is it possible to rewrite or delete existing .png file in IOS swift aplication? 

A:

I don't believe you can do this.  The image is part of your app bundle.  You would need to upload a new application. 
Instead you could store the image in the documents or cache directory and in your code check if that file exists and load it instead of Background.png.