Xcode error with Cocoapod: “The document could not be saved. The file doesn’t exist”
I’ve added the
SPGooglePlacesAutocomplete cocoapod to my project — and I’m getting a really weird issue. When I try to run my project, Xcode says there’s an error in one of the Pod’s headers:
SPGooglePlacesAutocompleteQuery.h:65:23: Unknown type name 'CGFloat'
Attempting to adjust anything in that file – such as importing UIKit – results in an error: “The document SPGooglePlacesAutocompleteQuery.h could not be saved. The file doesn’t exist”
What could be making Xcode thing this file is non-existent?
- Spritekit scale full game to iPad
- Can't instantiate subclass of NSManagedObject
- Connect Objective C framework to Swift iOS 8 app (Parse framework)
- GM release of Xcode 6 compile
- C++11 on Mac with Clang or GCC
- steps to add tabbarcontroller to AppDelegate using Interface Builder in XCode 4.2 Empty Application template
5 Solutions Collect From Internet About “Xcode error with Cocoapod: “The document could not be saved. The file doesn’t exist””
For what it’s worth, in my case the error came up when I was trying to edit a file pointed to by the warning/error pane in Xcode.
Not sure if that’s cocoa pod related but I happen to be using pods also.
Basically you get an error, click on it and try to modify the file to fix the error and sometimes, not sure how, Xcode produces this error.
Since Xcode is stuck trying to save the changes to the file, you have to undo any changes you’re made to the file in the error browser. Then editing the file by clicking on it in the regular browser instead of the warning/error pane will let you modify the file and save it.
I’m running Xcode 6.1.1 and Cocoapods 0.36.0.rc.1 and this happens when trying to modify a file from a pod added as a development pod (i.e. from a local directory).
I’m running Xcode 7.3 and CocoaPods 1.0.0. and this happens when trying to modify a file from a pod added as a development pod (i.e. from a local directory).
I just pod update again, when pod finished, Xcode will show an alert “The document has previously unsaved changes.”, then click “Re-Save”. that fix my issue.
I was facing this problem while I was developing objective-c pod and one of the file(say xx.h &.m) in Classes folder was giving this error prompt. I did following approach:
- I copied xx(.h&.m) some where else (say Desktop)
- Delete xx(.h&.m) completely from classes folder .
- Force quit Xcode
- Reopen the project
- Drag the file xx(.h&.m) . Select ‘copy item if needed‘ and ‘target‘.
I have face this issue many times. I followed below steps to fixed this.
- Select file->Show in Finder
- Copy the file and paste it in a different location.
- Remove the original file from Xcode by selecting show in finder
- Re-add the file that you copied from a destination and drag it into Xcode file pane where it was before.
- Clean and run the code.
delete the generated pod folder, pod install again. solve my problem
- Call CGPatternCreate in Swift
- swift multiple cell subclasses in UITableViewCOntroller
- NSString stringWithFormat swizzled to allow missing format numbered args
- How to make UITextField behave like a UISearchBar in Swift?
- Add one row to TableView each day app used
- Parsing links from XML file and pushing it to a UIWebView
- Problem setting Value for UILabel (iPhone SDK)
- Objective C: How to present modal view controller from appdelegate?
- Xcode – how to include c library and header file to cocoa project?
- change application language setting in iOS not the whole device
- Implement UITouchDown for UIImageView
- I won't be able to return a value with Alamofire in Swift
- Dynamic Height of UITableViewCell
- Using the same file with different flags in WatchKit and host App