4

I have only been using xcode for about a month. I have xcode 6 installed and created a project that used the SQLite.swift project by stephencelis from GitHub. All had been running fine and I think I must have inadvertently loaded an Xcode update this morning. I am now on xcode version 6.3. Now when I open my project and perform a build I get the error on a line in one of my units that does "import SQLite". The error message reads: "Module file was created by an older version of compiler". Prior I had 50+ errors in the SQLite source files so I had downloaded the latest zip for SQLite and opened that project and performed a build which worked with no errors. But now if I go back and compile my project I get the error mentioned in subject.

I think I just don't know how to properly use these libraries from GitHub or if this is specific to SQLite. Any help would be greatly appreciated.

Wayne Fulcher
  • 741
  • 1
  • 11
  • 21
  • You need to delete your SQlite file and start over. – BotMaster Apr 14 '15 at 16:03
  • Try cleaning your build folder and/or deleting your DerivedData folder. – stephencelis Apr 14 '15 at 19:09
  • Yeah that didn't work before as I said earlier I had downloaded the zip file from GitHub and replaced all the files from the original SQLite.swift project with the new one and did a build on the SQLite.swift project. Maybe you are meaning something different but I would need more details to know what you mean. – Wayne Fulcher Apr 14 '15 at 19:13
  • Well I managed to completely remove SQLite from my project and removed all files. I redownloaded zip and copied folder/files to my source folder. I then dragged the SQLite.xcodeproj file into my project and completed the remaining steps for a new installation. I have cleaned and performed a build. I have closed XCode, reopened, clean and perform a build. Now I just keep getting the error: No such Module 'SQLite'. So its as if my new install is not working. – Wayne Fulcher Apr 14 '15 at 19:43
  • So I closed my project in xcode and opened the SQLite project and did a clean / build. Then I closed XCode and reopened xcode and opened my project. Now when I clean/build it tells me that the module SQLite has a minimum deployment target of ios 8.3. So under Deployment / iOS Deployment Target I changed that to iOS 8.3. Now after I clean/build I am getting tons of errors such as "Cannot invoke 'delete' with no arguments." So I have been researching but seem to be stuck figuring out why my syntax that had been working no longer works anymore. – Wayne Fulcher Apr 14 '15 at 20:11
  • I'm happy to help troubleshoot if you want to give me access to your repo on GitHub. Send me an email (check the GitHub commits for my address) and we can take the conversation there if that helps. – stephencelis Apr 14 '15 at 21:00
  • 1
    Oh, as far as what I meant earlier I'm not talking about your project at all, but its build products. If you hold "option/alt" while selecting "Clean", it will actually be "Clean Build Folder", which does a more thorough cleaning of your project. You can also open the "Terminal" app and run `rm -fr ~/Library/Developer/Xcode/DerivedData/` for an even more thorough cleaning. – stephencelis Apr 14 '15 at 21:02

1 Answers1

8

Short answer:

Alt/Option + Product menu > Clean (becomes "Clean Build Folder")


Trying to apply this answer I had previously set "Defines Module" under Packaging to YES for my app's Build Settings in Xcode 6.4. Then, trying to apply this answer I opened my project again in Xcode 7.0 beta. That is when I got the error.

Following @stephencelis' answer in the comments, I held Alt/Option while selecting "Clean" from the Product menu in order to clean the build folder. After building again the "Module file was created by an older version of compiler" error was gone. However, I still had to go back and apply the answers I linked to above to get other things to work.

Community
  • 1
  • 1
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393