Is it possible to write new file to bundle resource directory in iOS app?

后端 未结 2 1174
时光说笑
时光说笑 2021-01-02 14:38

Is it possible to write new file to bundle resource directory in iOS app?

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-02 15:17

    No there is no way to write in the bundle dir.. because the bundle dir is code signed with SSL certificate and you can't break it. however you can easily write in the documents directory of you iphone application

    You can get the documents directory path using this -

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
    return [paths objectAtIndex:0];
    

提交回复
热议问题