BLACK FRIDAY SALE: Save big on all my Swift books and bundles! >>

SOLVED: What is the proper way to copy a file from an old project and use it in a new project?

Forums > SwiftUI

I have tried to add files from old projects before, and it created it as a reference to a file rather than just making a copy of my file to keep in the the new project.

The only way that I know of to avoid this is to create a new file in the new project, then copy and paste all of the text from the file in the old project into it. But it seems like there must be a more automatic way of doing it.


Drag and Drop it in your new project and make sure you select "Copy file as needed" or how it's named and DON'T make a reference. That's it.


Hacking with Swift is sponsored by RevenueCat

SPONSORED In-app subscriptions are a pain to implement, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app. Oh, and it's free if your app makes less than $10k/mo.

Learn more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.