MatchCardApp - Mod 3 Lesson 10 - “Assets.xcassets” couldn’t be opened

/Users/bpstil-swift/Desktop/Kalmbach-Swift/CardMatchApp/CardMatchApp/Assets.xcassets:-1: The file “Assets.xcassets” couldn’t be opened because you don’t have permission to view it.

This dumb error is popping up again. I tried what I did before. I went back to System Preferences --> Security and Privacy
and I gave “Full Disk Access” to Xcode 10.

I also had problems with a bad connection / outlet for the TimerLabel because I had a typo.

I thought I got rid of the bad connection and created a new good one, but I am still getting “Assets.xcassets” error.

Any ideas?

Thank you,

Marie Kalmbach

@marie.kalmbach

It is possible that you have a more fundamental permissions issue with your Mac which can happen after installing new software or upgrading your MacOS software.

Close all your applications that are running then:

Open Disk Utility and select the MacintoshHD and then select First Aid. This may take some time so be patient.

When that has concluded, close the Disk Utility App and restart your Mac.

Thanks, Chris.

I’ll give it a whirl tomorrow.

Just boarded Amtrak’s Texas Eagle traveling from St. Louis to Marshall, TX.

I am l so grateful for the rapid response on this forum.

Apple has not provided ANY assistance.

I am attempting to complete this course before school resumes in early August. I want to do a good job of guiding my students through iOS App Development as they use the Code with Chris course.

He is an amazing teacher. So glad I have access to this course!

Cheers,

Marie Kalmbach from Louisiana

That’s a long trip. Clickety Clack Clickety Clack.

Yes, but I get to sleep through most of it!

Good night!

Hi Chris,

Some progress. First I tried doing “First Aid” on the Macintosh HD. Did not work. Same error message.

Then I noticed in the Disk Utilities app that you can also apply “First Aid” to Macintosh HD - Data, so I selected that and gave it a whirl.

Yay! The stupid cannot access “Assets.xcassets” error went away.

Now I have a new error.

Looks like as soon as I get into my CardMatchApp code, it dies with this error:

“Thread 1: signal SIGABRT”

Here are the last few details of info from the console:

43 CardMatchApp 0x00000001047c48c7 main + 71
44 libdyld.dylib 0x0000000107fb3551 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Seems like I got this SIGABRT error before when I had messed up my IBOutlet connections.

I did have a problem earlier because of the “TimerLable” typo, but I thought I fixed it.

I checked my Swift code again for the TimerLabel outlet and the connection seems OK. The little circle at the line number is filled in, not empty.

Do you think I should delete this label again and try to re-create it and re-connect it with the proper spelling.

I appreciate the “First Aid” utility tip. Excellent!

Marie

PROBLEM SOLVED!

I took my own advice and deleted the timer label from the story board. I added a new one, reconnected it, and now it’s all working as expected.

Yahoo!

I’m at the time slot of 10:30 in the 27 minute video for Mod 3 Lesson 10.

I’m sure in no time at all, I will create another error.

Thank you again for ALL your help!

Marie

1 Like

Well done Marie. Debugging is often consolidates what you’ve learned through analysing what is wrong.

just a side note, even though you lets say corrected an IBOutlet misspell the old one might still be connected (only at the storyboard) so when you launch it the old one is being call as well which leads to an error/crash

to be sure that you have the correct connections you can simply click on the label/button and click on the “connection inspector”, it will show all possible IBActions and IBOutlet as well as the currently connected actions/outlet to it

Hi Francis,

Thank you for the input. What I have learned is that if I mess up the spelling of the outlet or anything, it is just better to wipe out the label, recreate it, and do the connection again correctly.

I tried “fixing” the connection, but at my current skill level, it seems to work better with the approach above.

Thank you,

Marie

Marie,

There is a really simple way to rename Outlets and Actions without deleting the storyboard object and the code in the View Controller.

Simply place your cursor on the item you with to rename and then right-click your mouse, select Refactor > Rename.

Wait for Xcode to collect the references to that Outlet or Action and it will bring them all into view.

Change the spelling on the reference you originally clicked on (it will be highlighted)

Press the Return key or tap on the Rename button to the right.

Job done.

1 Like