8

I have been trying to fix this a few days before. I was adding JSQMessagesViewController to my iOS project. Added the library manually by dragging and dropping the JSQMessagesViewController folder downloaded from Github. tried to add a Bridging header for jsqmessagesviewcontroller. tried to add

#import JSQMessagesViewController 
#import JSQMessages.h 

later then when I build the project I found this error message

error: failed to remove /Users/user/Library/Developer/Xcode/DerivedData/CHATAPP-gcvyuyhkvbxvnlfnrrbmaebxevhx/Build/Products/Debug-iphonesimulator/CHATAPP.app/Info.plist: “Info.plist” couldn’t be removed.

I tried searching but didn't help any... what went wrong? How Can I remove this error ? using swift 2.2 and xcode 7.2

Joker
  • 830
  • 2
  • 14
  • 30
  • 1
    Did you managed to found the solution ? I have a pretty similar issue with another library (Siesta, using Jenkins to build from command line) – Jissay Jul 19 '16 at 15:51
  • For me this issue happened when the "iphone 8 simulator" of Xcode 9.3 was open, and i was trying to run the project from in the same simulator with xcode 9.4.1. So if you running your project with the new Xcode then first close the previous/old Xcode simulator and then Run. – Ariven Nadar Jul 26 '18 at 09:30

5 Answers5

14

I began experiencing this issue right after making a pod install with Fabric (that made some changes to Info.plist). Then I realized that there was two Info.plist references in my project.

To solve the problem I just removed one of them, cleaned my project (Cmd + Shift + K) and built it again.

Hope this helps.

felippeduran
  • 346
  • 3
  • 6
9

I fixed the similar issue by removing info.plist from BuildPhases-> Copy bundle resources -> "info.plist"

remove error specific .plist file from "Copy bundle resources" (in my case info.plist in MGSwipeTableCell creating issue)

enter image description here

Meghs Dhameliya
  • 2,406
  • 24
  • 29
2

you may need to add the files to your project. While in XCode right click on your files and select "add files to project" navigate to your project folder and select JSQMessagesViewController files then build.

You may also want to clean your derived data if you press Command Option Shift K then build the project again.

Dan Leonard
  • 3,325
  • 1
  • 20
  • 32
1

Removed those manually added files from my Project then made a fresh install using Pod now I don't have that error.

Joker
  • 830
  • 2
  • 14
  • 30
0

i recommend to you use pod to your project or drag and drop only require files from JSQMessagesViewController you should don't import another project completely.

conclusion :

use pod for using JSQMessagesViewController because it has some dependency

Mo Farhand
  • 1,144
  • 8
  • 21
  • @Mohmad Farhand ... I am new to iOS... that's why I manually added jSQMessagesViewController . I don't know how to use pod or what pod is for ...!!! – Joker Jan 21 '16 at 04:05