"help to fix ' error: unable to read property list from file: info.plist - ios

I added Admob Google extension in to my Game Maker 2 project, when I try to test it on xcode for iOS, I am getting the error from xcode : unable to read property list from file: ...
Tried to fiddle around with the build settings in Xcode for plist to make it XML/Binary and same as input but nothing helped.
Made sure that the extensions in game maker have IOS enabled
Tried to clean build folder
Changed Locations: of Derived data to Relative
Looked for similar problems on google and stack overflow, but nothing exactly with the same issue
Below is the code given by Gamemaker
if os_type == os_ios
{
ads_app_id = "ca-app-pub-4724502015965127~5126911475";
banner_id = "ca-app-pub-4337965814269841/5893054134";
interstitial_id = "ca-app-pub-4724502015965127/8852681295";
rewarded_id = "ca-app-pub-4724502015965127/3717109960";
}
else
{
ads_app_id = "ca-app-pub-4337965814269841~8766033395";
banner_id = "ca-app-pub-4337965814269841/5893055122";
interstitial_id = "ca-app-pub-4337965814269841/5893055258";
rewarded_id = "ca-app-pub-4337965814269841/5893055399";
}
GoogleMobileAds_Init(interstitial_id, ads_app_id);
GoogleMobileAds_LoadInterstitial();
interstitial_loaded = false;
error:
unable to read property list from file:
/Users/faisalnaamani/GameMakerStudio2/iOS/GMS2IOS/Pixel_Bricks_iOS/Pixel_Bricks_iOS/Pixel_Bricks_iOS/Supporting
Files/Pixel_Bricks_iOS-Info.plist: The operation couldn’t be
completed. (XCBUtil.PropertyListConversionError error 1.)
The error is happening at Build time

I opened the plist file with ATOM, the one generated by GameMaker Studio when I noticed xcode could not read it. I noticed a bit of code that was causing an error and when I deleted it xcode was able to build. The code is below:
<key>NSAppTransportSecurity</key>\n\r<dict>\n\r
<key>NSAllowsArbitraryLoads</key>\n\r <true/>\n\r
<key>NSAllowsArbitraryLoadsForMedia</key>\n\r <true/>\n\r
<key>NSAllowsArbitraryLoadsInWebContent</key>\n\r <true/>\n\r</dict>
But I am not sure how to fix it to make it look correct. I am afraid if I delete it somehow the code will not be correct. Does anyone have a solution? And how would I fix it from GameMaker.

As Faisal suggested, the file cannot be read if it's malformed.
Trying to open the file with Xcode helped me find the problem: a syntax error. Xcode was very explicit about where the error might be: at line 32.
After fixing the error in another IDE I was able to open the file with Xcode and build/run my app.

Related

UnityEditor.BuildPlayerWindow+BuildMethodException: when building Unity project for iOS

I am using Unity 2017.1.Op4 and I keep getting the following error when building the project for iOS:
UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:162
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:83
UnityEditor.HostView:OnGUI()
The build folder is also empty.
After making a Google search, a few recommended that I change the Product Name in the Player Settings.
Another workaround suggested: Clearing all errors and switching inspector to show Camera's components (it doesn't matter as long as it is not Player Settings window).
Both suggestions didn't work. How can I resolve this issue?
I just had this problem and solved. I hope this helps the next person with this problem.
My code contained wrong code like here:
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
Correct Code Hear
#elif UNITY_ANDROID || UNITY_IPHONE
Compiled Error Code Hear
#else
#endif

Use of unresolved identifier false warning Swift 3 xcode

So I edited my post to be more clear. I am new in xcode and Swift 3 and I am facing to a strange problem. My project contains several swift files. I put all my simple common methods to Utils.swift, for instance simple string functions, etc. For many days I had no problems but after a point xcode is all the time complaining with red exclamation marks in all the files where I use my method if I am calling my methods from Utils.swift file: "Use of unresolved identifier 'xxx'".
// debug is a bool variable declared before
Utils.swift:
func log(_ message: String) {
if debug {
print(message)
}
}
ViewController.swift:
log("Error happened")
This gives an error "Use of unresolved identifier 'Log' ". Obviously the function is there so I don't understand why I get this red warning with exclamation mark during coding however when I click on Build, it is successful, and it runs perfectly and the warning is gone. As soon as I start typing again in the code area, the red error comes back. If I build it once more it is successful again. It doesn't make any sense to me.
I thought it is maybe a cache problem, xcode live issues function doesn't recognise my Utils.swift or something like this... so I cleaned the build folder (cmd + shift + option + K), I cleaned the project (Product > Clean), restarted xcode, restarted Mac, removed Utils.swift, re-added Utils.swift to the project but can not get rid of these false warnings during coding but if build the project it is OK. I don't have this problem in my other projects. Any idea?
Okay I found the answer myself. Clicking on the swift file (now Utils.swift) I had to select "Location Relative to Group" in file inspector and set the appropriate target memberships as well.
It is weird that despite the previous 'wrong' settings the build completes with success however it gives an error in the code area.

Xcode 6.0.1 Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

I am getting this error on archive:
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
How to solve it?
Please see the screenshot.
This problem occurs when the Swift optimization level is not set to None for Release. Set the value to None and the issue goes away.
Open up your project and click on the projects root directory.
Click the build settings tab.
Search for Swift Compiler - Code Generation and under Optimization Level make sure Release is set to None.
EDIT
After upgrading to Xcode 6.1 these instructions caused other issues when archiving (building for debug/device worked fine). Setting the optimization to Fastest allowed me to archive again. There are apparent issues with Swift compiling still (archiving specifically).
Can't archive working 6.0.1 Swift project in Xcode 6.1 / Segmentation fault: 11
EDIT
I was not able to fund the Build Settings tab, until I read this answer.
how to find the build settings tab
This occurred for me when I had two of the exact same files, and also when I was missing I file I didn't know I had deleted. I clicked on the error message, and just above the error, it shows you what file you have more than 1 of or are missing.
You can click the Product in the navigation and choose the "Clean" button; it will clean all compile error in your project. Then, you can debug for the latest error.
Deleted files reference keep in Build Phase and that's why it gives this error. Remove reference from there as well.
Project> Target > Build Phase
Under this section you will find your deleted files in red colour. Remove these files error will resolve.
I am not sure if it has one solution.
I recommend you to check the differences between your last git commit, and comment on/off the changes.
In my case, my code was
let anArray = ResultDict["ResultSet"] as [[NSDictionary : AnyObject]]
for aDict : NSDictionary in anArray {
let anObject = ObjectType(ObjectDict: aDict)
objectList.addObject(aDict)
}
no warning on the line, i got the same exit 1 compile error
then i changed it to the below it has compiled.
let anArray = ResultDict["ResultSet"] as [[NSDictionary : AnyObject]]
for aDict in anArray {
let anObject = ObjectType(ObjectDict: aDict)
objectList.addObject(aDict)
}
I don't know if this is really an answer, but...
I had the same issue. App worked when building/running, but archiving failed with "...swiftc failed with exit code 1", with no other helpful message at all. Luckily, when I tried to build my app with Nomad's ipa build, I got:
The following build commands failed:
CompileSwift normal arm64 /path/to/erroneous/TableViewController.swift
So I started commenting out sections of that file and tracked the problem down to a tuple assignment.
// MARK: - Table Data
private var tableData: [(sectionName: String, item:ListItem)] = []
private func refreshTableData() {
// let labor = ("Labor", laborListItem) // DOESN'T ARCHIVE
let labor = (sectionName: "Labor", item: laborListItem) // ARCHIVES
tableData = [labor]
tableView.reloadData()
}
So apparently the compiler wanted the elements in thast tuple named (as defined by the type of tableData).. but only for archiving? The Dumb thing is, I use this same pattern in other view controllers, and the compiler seems to be fine with those.
For the record my Code Generation -> Optimization Level was set to None for debug and release.
Hope this helps someone! It took hours to figure this out.
It happened to me when I didn't put the parenthesis at the end of a call of a function:
let var = self.getNextPrimeNumber
solved it by:
let var = self.getNextPrimeNumber()
In my case, it was caused by duplicate files, using the same name, in my project directory. As soon as I removed them, the error was gone.
This happened to me when I used static inline function from swift file
The function looks like this
static inline void openURLInSafari(NSString * _Nonnull urlString) {
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:urlString]];}
I just had the same thing occur. I hunted down the cause to one file that caused the error even when empty. Examining the file, I discovered it had the wrong character set. When I set it to UTF-8, the error vanished. I think that it was decoding it with the wrong character set.
From this I surmise that the error simply indicates that something has happened that the compiler was unprepared for. Sorry that isn't very helpful to most people, but it may help to check your characters sets.
one more case that can lead to this error which just took me hours to track down: a failable initializer that always returns nil.
i had an initializer that looked like this:
init?(object: MyObject) {
if object.importantProperty {
// initialize
}
return nil
}
when what i meant was:
init?(object: MyObject) {
if object.importantProperty {
// initialize
}
else {
return nil
}
}
fixing the initializer made the error go away.
If using Core Data:
I had a Core Data entity for which I created the NSManagedObject subclasses (with Xcode's help). In addition, the entity was configured to generate code automatically (see screenshot), so basically 2 classes existed during runtime. Just switch the option to Manual/None and it won't generate it.
This error occurred for me after I noticed that a few of my .swift files were inexplicably in the wrong directory -- one level above my Xcode project directory. When I noticed this, I moved them into the main project directory and cleaned the project, thinking everything would be fine. However, upon building the project I got the above-mentioned "failed with exit code 1" error. Just above the error message it listed the files I had just moved, indicating that it couldn't find them in the directory where they used to be. In addition to the error message, the files I moved were now showing up as red in the file navigation pane.
For each of the files in question what I did to resolve this was:
- Select the file from the list of files in the Xcode file navigation pane,
- Click on the little page icon in the rightmost pane of Xcode, which opens a file attributes pane,
- Click on the little folder icon underneath where it says "Location" in the file attributes pane,
- Choose the new location for the file,
- RESTART Xcode for the above changes to really do anything.
this error comes from missing files so the compiler couldn't find the files and keep alerting.
Follow these steps to rebuild your app:
Look up for the red and invisible files within workspace
Remove their reference
Re-add files
Re-compile
I experienced this error after performing a git merge. I solved new Xcode warnings and the project can be compiled.
Xcode 7.2.1 is used in my case.
In my way the error was due to UIDevice.currentDevice() in ((UIDevice.currentDevice().systemVersion as NSString).floatValue >= 8.0)
After commenting this all starts work fine.
XCode 7.2
in my case , at your project target Build Setttings, in Other Swift Flags,jsut delete the String "-serialize-debuggin-options"
enter image description here
I had a resolution very similar to RyanM, where with an excess of hubris I tried to assign a variable to the default value of an inner function:
Fails to compile (though does not crash SourceKit):
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
func itemCell(_ indexPath: IndexPath = indexPath) -> UITableViewCell {//...}
Succeeds:
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
func itemCell(_ indexPath: IndexPath) -> UITableViewCell {//...}
One possible reason that this can happen is perhaps because you have deleted a file but not removed references to it. This will mess up the pbxproj file. I would check to see if that is the case.
check "Development Pods" Folder all listed Frameworks path.
In my case swift development snapshot was selected instead of xcode 9.2. here are the steps and image.
keep xcode on screen and click on xcode top menu bar.
Than go to toolchains option and check on xcode 9.2. thats it.
Happy Coding!!!
So, I had the above and narrowed it down to a TFS issue with locking the file but only when I pasted or did any other edits besides small copies or manual typing. I noticed the original file would compile, but my edits wouldn't, even though they were syntactic OK. Also related is unable to save document: xcode The document "..." could not be saved
The fix for both was:
Duplicate working version.
Paste fully-merged new code into duplicate.
Copy and paste old file over new one. (I personally just renamed the old one to something else, then pasted duplicate and renamed it, too. Guessing both work since I pasted directly earlier for reverts during tests to see).
Voila. Lazy way to bypass merge-locking issue. Apparently full file-pastes are just fine, while edits aren't. Shared since the other answers don't seem to be as lazy as this. ;)
Note: I am suspecting a non-UTF-8 character made its way somewhere, but pastes worked in older versions so I don't know where, or if relevant.
In my case, the error was the result of missing files that were generated by Xcode. I tried the regular clean Opt+Shift+K and it didn't clean up all the errors. I found a post on the Apple Developer site that recomended going to the Product Menu in Xcode, holding down the opt key, and selecting Clean Build Folder. This appears to be a more comprehensive build as it pops up a modal dialog for you to confirm.
Just go to the "project setting" and click on the "build phaces" after that you will find targets in that u have to delete the test file like my project name "WER" so its showing like this WER&TEST so just delete that and clean ur project and run .........

Duplicate symbols for architecture x86_64 under Xcode

I now have the same question with above title but have not found the right answer yet. I got the error:
/Users/nle/Library/Developer/Xcode/DerivedData/TestMoboSDK-Client-cgodalyxmwqzynaxfbbewrooymnq/Build/Intermediates/TestMoboSDK-Client.build/Debug-iphonesimulator/TestMoboSDK-Client.build/Objects-normal/x86_64/MoboSDK.o
/Users/nle/Library/Developer/Xcode/DerivedData/TestMoboSDK-Client-cgodalyxmwqzynaxfbbewrooymnq/Build/Products/Debug-iphonesimulator/libMoboSDK.a(MoboSDK.o)
duplicate symbol _OBJC_METACLASS_$_MoboSDK in:
/Users/nle/Library/Developer/Xcode/DerivedData/TestMoboSDK-Client-cgodalyxmwqzynaxfbbewrooymnq/Build/Intermediates/TestMoboSDK-Client.build/Debug-iphonesimulator/TestMoboSDK-Client.build/Objects-normal/x86_64/MoboSDK.o
/Users/nle/Library/Developer/Xcode/DerivedData/TestMoboSDK-Client-cgodalyxmwqzynaxfbbewrooymnq/Build/Products/Debug-iphonesimulator/libMoboSDK.a(MoboSDK.o)
ld: 75 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any help is appreciated.
Finally I find out the reason of this error cause I added -ObjC to the Other Linker Flags. After remove this value then I can build my project successfully, but I don't know why. Can anyone explain this?
For me, changing 'No Common Blocks' from Yes to No ( under Targets->Build Settings->Apple LLVM - Code Generation ) fixed the problem.
Stupid one, but make sure you haven't #imported a .m file by mistake somewhere
75 duplicate symbols for architecture x86_64
Means that you have loaded same functions twice.
As the issue disappear after removing -ObjC from Other Linker Flags,
this means that this option result that functions loads twice:
from Technical Q&A
This flag causes the linker to load every object file in the library
that defines an Objective-C class or category. While this option will
typically result in a larger executable (due to additional object code
loaded into the application), it will allow the successful creation of
effective Objective-C static libraries that contain categories on
existing classes.
https://developer.apple.com/library/content/qa/qa1490/_index.html
In my case, I just created a header file to define constant strings like this:
NSString *const AppDescriptionString = #"Healthy is the best way to keep fit";
I solved this scenario by using static:
static NSString *const AppDescriptionString = #"Healthy is the best way to keep fit";
Happens also when you declare const variables with same name in different class:
in file Message.m
const int kMessageLength = 36;
#implementation Message
#end
in file Chat.m
const int kMessageLength = 20;
#implementation Chat
#end
I have same problem.
In Xcode 7.2 in path Project Target > Build Setting > No Common Blocks, i change it to NO.
I found the accepted answer touches on the problem but didn't help me solve it, hopefully this answer will help with this very frustrating issue.
duplicate symbol _OBJC_IVAR_$_BLoginViewController._hud in:
17 duplicate symbols for architecture x86_64
"Means that you have loaded same functions twice. As the issue disappear after removing -ObjC from Other Linker Flags, this means that this option result that functions loads twice:"
In layman's terms this means we have two files in our project with exactly the same name. Maybe you are combining one project into another one? Have a look at the errors above the "duplicate symbols" error to see which folder is duplicated, in my case it was BLoginViewController.
For example, in the image below you can see I have two BImageViewControllers, for me this is what was causing the issue.
As soon as I deleted one then the issue vanished :)
This occurred on me when I accepted "recommended settings" pop-up on a project that I develop two years ago in Objective-C.
The problem was that when you accepted the "recommended settings" update, Xcode automatically changed or added some build settings, including GCC_NO_COMMON_BLOCKS = YES;.
This made the build failed with the duplicate symbol error in my updated project. So I changed No Common Block to NO in my build settings and the error was gone.
I experienced this issue after installing Cocoapods. Now happens everytime I update some pods. Solution I've found:
Go to terminal:
1) pod deintegrate
2) pod install
Also, check the item "Always Embed Swift Libraries" in your Build Settings. It should be "faded" indicating it is using the default configuration. If its set to a manual YES, hit delete over it to revert it to the default configuration. This stopped the behavior.
Fastest way to find the duplicate is:
Go to Targets
Go to Build Phases
Go to Compile Sources
Delete duplicate files.
Go to Targets
Select Build Settings
Search for "No Common Blocks", select it to NO.
It worked for me
Following steps solved the issue for me.
Go to Build Phases in Target settings.
Go to “Link Binary With Libraries”.
Check if any of the libraries exist twice.
Build again.
Remove -ObjC from Other Linker Flags or
Please check you imported any .m file instead of .h by mistake.
Update answer for 2021, Xcode 12.X:
pod deintegrate
pod install
Hope this helps!
My situation with some legacy project opened in Xcode 7.3 was:
duplicate symbol _SomeEnumState in:
followed with list of two unrelated files.o, then this was repeated couple of times, then finally:
ld: 8 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What solved it for me was changing enum declaration from:
enum SomeEnumState {
SomeEnumStateActive = 0,
SomeEnumStateUsed = 1,
SomeEnumStateHidden = 2
} SomeEnumState;
to this:
typedef NS_ENUM(NSUInteger, SomeEnumState) {
SomeEnumStateActive = 0,
SomeEnumStateUsed = 1,
SomeEnumStateHidden = 2
};
If somebody has explanation for this, please enlighten me.
Defining same variable under #implementation in more than one class also can cause this problem.
In my case, there were two file by same name in the location
Targets > Build Phases > Compile Sources and delete any duplicate files.
For me during the Xcode8 recommended project settings update "No Common Blocks" to YES which causes this issue.
My problem was that I had 5 duplicate symbols for architecture x86_64. After reading this post and their answers, I try with the common solution about change GCC_NO_COMMON_BLOCKS = YES to NO
But, instead of working for me, I went from 5 duplicates to 1 duplicate...
So, I paid attention to that last error, and I realized what was my problem, and it was an "incompatibility" with these packages (I had both in package.json):
rn-fetch-blob
react-native-blob-util
The message was clear about it, and I remove rn-fetch-blob because I have not idea why it was in my project, but, I only used with jest and delete it, it wasn't a problem.
So, after removing that package, and run yarn again, problem solved... And without changing the GCC_NO_COMMON_BLOCKS
Today , I got the same error . The error's key word is duplicate. I fix it by:
1. Remove the duplicate file at Build Phases-->Compile Sources
2. If you can not remove it at Build Phases, you need find the file at your project and remove the reference by DELETE :
3. Add the file to your project again
4. Add the file's .m to your Build Phases-->Compile Sources again
5. Build your project, the error will disappear
Another silly mistake that will cause this error is repeated files. I accidentally copied some files twice. First I went to Targets -> Build Phases -> Compile sources. There I noticed some files on that list twice and their locations.
Make sure you haven't imported a .m file by accident, you might want to delete your derived data in the Projects Window and then build and run again.
I got the same error when I added a pod repository
pod 'SWRevealViewController'
for an already added source code (SWRevealViewController) from gitHub. So, the error will be fixed by either removing the source code or pod repository.
Case # 2:
The 2nd time, this error appeared when I declare a constant in .h file.
NSString * const SomeConstant = #"SomeValue";
#interface AppDelegate : UIResponder <UIApplicationDelegate> {
...
...
None of above solutions works for me, I just fixed it myself.
I got duplicate symbol of my core data model which I make it myself, but
in my .xcdatamodeld inspector, I choose Class Definition of Codegen property, I guess that's what's wrong with. Then I choose Manual/None,it got fixed.
Hope this can be helpful for you!
For anyone else who is having this issue, I didn't see my resolution in any of these answers.
After having a .pbxproj merge conflict which was manually addressed (albeit poorly), there were duplicate references to individual class files in the .pbxproj. Deleting those from the Project > Build Phases > Compile Sources fixed everything for me.
Hope this helps someone down the line.
Similar to Juice007, I had declared and initialized a C type variable in two different .m files (that weren't imported!)
BOOL myVar = NO;
however, this method of declaring and initializing a variable, even in .m, even in #implementation grants it global scope. Your options are:
Declare it as static, to limit the scope to class:
static BOOL myVar = NO;
Remove the initialization (which will make the two classes share the global var):
BOOL myVar;
-(void) init{
myVar = NO;
}
Declare it as a property:
#property BOOL myVar;
Declare it as a proper iVar in the #interface
#interface myClass(){
BOOL myVar;
}
#end
In my case I had two main() methods defined in my project and removing one solved the issue.
The answers above didn't work for me. Here's how I got around it:
1) in finder, delete the entire Pods folder and Podfile.lock file
2) close the xcode project
3) run pod install in the terminal
4) open the xcode project, run the clean build command
Worked for me after that.
Because I haven't seen this answer:
Uninstall and reinstall your podfiles! Remove or uninstall library previously added : cocoapods
I've run into this issue over 3 times building my app and every time this is what fixes it. :)
I've just had this error as well. Found that the problem was variables declared with global scope, with the same names, were being repeated throughout the files being compiled into the program. Once changing the global variables to local scope to the pseudo-main function the error was resolved.

Xcode 5 error: "Malformed or corrupted AST file: mismatched umbrella header in submodule"

After adding StoreKit to my Xcode 5 project, I now see...
"Malformed or corrupted AST file: mismatched umbrella header in submodule"
...whenever I've imported any header from StoreKit. I haven't changed those system headers, and clearing derived data and the usual Clean Build Folder fix doesn't work either, nor does restarting Xcode change anything.
I see in the Clang sources where the error is being reported, but I can't tell why. Here's the relevant Clang code from http://clang.llvm.org/doxygen/ASTReader_8cpp_source.html:
case SUBMODULE_UMBRELLA_HEADER: {
03728 if (First) {
03729 Error("missing submodule metadata record at beginning of block");
03730 return true;
03731 }
03732
03733 if (!CurrentModule)
03734 break;
03735
03736 if (const FileEntry *Umbrella = PP.getFileManager().getFile(Blob)) {
03737 if (!CurrentModule->getUmbrellaHeader())
03738 ModMap.setUmbrellaHeader(CurrentModule, Umbrella);
03739 else if (CurrentModule->getUmbrellaHeader() != Umbrella) {
03740 Error("mismatched umbrella headers in submodule");
03741 return true;
03742 }
03743 }
03744 break;
03745 }
It evidently compares my imported umbrella header
#import <StoreKit/StoreKit.h>
to something else, but I can't determine what that something else is.
Has anyone else encountered this, and hopefully found a way to resolve it?
I was able to encounter this problem, following the direction mentioned by John above doesn't work for me. I was able to solve this problem by doing the following:
close all open XCode projects.
Delete all the folders inside Derived Data folder.
How to go to Derived Data folder? just right click on your Product build and show finder, browse through the hierarchy of folders and look for Derived Data.
Hope this helps. This seems to be a bug in Xcode? but not sure.
This solved it for me:
go to project build settings
scroll down to LLVM 5.1 Language Modules
set Enable Modules (C and Obj C) to NO
In Xcode go to Window->Organizer->Projects select your project and press delete button next to Derived data. Just did it (and it worked) with information the following question:
fatal error: malformed or corrupted AST file - Xcode
In your Project folder there would be couple of folders named Derived Data and build. Just remove those folders and the problem would be resolved. These folders get created automatically once you open your XCode.

Resources