Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

menashehertz

macrumors newbie
Original poster
Dec 3, 2015
7
0
Hi,

In the process of learning Swift I create playgrounds and projects where I try out different things.

When I want to look up something that I did but don't remember where I use a Finder window to search for some words in the Swift file and it finds it for me.

The problem is the playground files. They are packaged and the actual swift is in a contents file which the finder does not see.

I can't easily find what I am looking for. I looked at other products in the Apple store and nothing searches the contents of there files.

Any ideas?

Thanks Steven
 

fisherking

macrumors G4
Jul 16, 2010
11,252
5,563
ny somewhere
easyfind (check the applestore, or google it); you can set it to search EVERYWHERE or anywhere...including package contents..
 

menashehertz

macrumors newbie
Original poster
Dec 3, 2015
7
0
Thanks for your help.

I did try easyfind and yes it's able to find the package file using the file name. However was unsuccessful searching the contents of the packaged file.

Steven
 

menashehertz

macrumors newbie
Original poster
Dec 3, 2015
7
0
Screen Shot 2015-12-03 at 5.02.36 PM.png
Screen Shot 2015-12-03 at 5.02.45 PM.png
 

menashehertz

macrumors newbie
Original poster
Dec 3, 2015
7
0
This worked to find the packaged file. but When I search for contents(using the phrase "Person" which exists)
Screen Shot 2015-12-03 at 5.05.48 PM.png
this is what happens.
 

menashehertz

macrumors newbie
Original poster
Dec 3, 2015
7
0
I'm really not familiar with find and grep. Are they suppose to search in Package contents?
 

leman

macrumors Core
Oct 14, 2008
19,522
19,679
These are command line tools which which you can search files in any location, and since bundles are just folders, yes, you can search stuff in it. For your use case, doing something like

grep path_to_bundle -re "Person"

should work.

Also, you can use an editor like TextMate to search for a string or a regex in all files of a folder

Edit: sorry, it should have been -re
 
Last edited:
  • Like
Reactions: menashehertz

menashehertz

macrumors newbie
Original poster
Dec 3, 2015
7
0
leman,

OK thanks for the ideas. I found that an editor can find the files in packages. Your help is much appreciated.

Steven
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.