Ch 15 Sample code

Getting the following message when attempting to open Ch 15 final DropCharge sample code in xCode. Any Suggestions?

“Project /Users/stuartbessler/Desktop/DropCharge.xcodeproj cannot be opened because the project file cannot be parsed.”


@skyrocketsw Can you please help with this when you get a chance? Thank you - much appreciated! :]

I’m not sure why this is happening. I’m guessing it has something to do with gitHub. At this point my suggestion would be to open the Chapter 16 Starter file. That projects contains all the code from the Chapter 15 Final and Challenges.

Chap 15 Final will not open:
“Project /Users/stuartbessler/Desktop/15 Final - DropCharge/DropCharge.xcodeproj cannot be opened because the project file cannot be parsed.”

Chap 16 Starter will load but not execute: “Thread 1: SIGABRT” (no messages)

You might want to take a look at download code!

Have started with 15 Starter which is OK and am working through Chapter 15. So far so good.

OK, so I’ve got part of an answer for you. I have massive problems with Drop Charge and as the sample code is so useful I needed to try and fix this problem. I found this article on Stack Overflow.

Looking at the contents of DropCharge.xcodeproj there is the project.pbxproj file and it has lines like this in it:

 <<<<<<< HEAD
 				LastUpgradeCheck = 0900;
 				TargetAttributes = {
 					35D99D571BBAE4E700373BA6 = {
 						CreatedOnToolsVersion = 7.1;
 						LastSwiftMigration = 0900;
						ProvisioningStyle = Automatic;

Just remove those those ( I removed the >>>>>>> making-drop-charge too ) and you can open the project. I did this with the Chapter 15 final project but it still doesn’t work because I get the following error when trying to build:

The Contents.json describing the "AppIcon.appiconset" is not valid JSON.

I have no idea whether that is a fixable error or not yet.

The sample code for Chapters 15 and 16 is completely stuffed and it would be good to have something that works.

EDIT: So it’s exactly the same problem with Contents.json in AppIcon.appiconset. Just remove the << HEAD and == lines and you’re good. The project will build.

Now I just need to figure out why mine is only on half the screen…

This topic was automatically closed after 166 days. New replies are no longer allowed.