iPhone (iOS): copying files from main bundle to documents folder causes crash

后端 未结 6 1810
日久生厌
日久生厌 2020-12-10 03:46

I am trying to set up my application so that on first launch, a series of files located in the \"Populator\" folder in the main bundle are copied into the documents director

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-10 03:58

    You log an error before you know that there is an error

    put the code in an if-block

    if(error)
    {
     NSLog(@"Error description-%@ \n", [error localizedDescription]);
     NSLog(@"Error reason-%@", [error localizedFailureReason]);
    }
    

    To describe your problem in more detail: the pointer of error points ANYWHERE and that object does not recognize that message. Therefore you get an exception

提交回复
热议问题