# Migrating an Objective-C codebase to Swift

**URL:** <https://forums.swift.org/t/migrating-an-objective-c-codebase-to-swift/61592>\
**Category:** Using Swift\
**Created:** [November 23, 2022, 10:44am UTC](https://forums.swift.org/t/migrating-an-objective-c-codebase-to-swift/61592 "2022-11-23T10:44:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickmoore](https://avatars.discourse-cdn.com/v4/letter/n/b19c9b/32.png) [@nickmoore](https://forums.swift.org/u/nickmoore)\
**Post date:** [November 23, 2022, 10:44am UTC](https://forums.swift.org/t/migrating-an-objective-c-codebase-to-swift/61592/1 "2022-11-23T10:44:55Z")

</div>

I have a well established product with a codebase in purely Objective-C.

I am considering whether to begin migrating this to Swift. Doing the whole thing in one go is not feasible but I think it might be doable bit by bit, reimplementing small parts at a time.

Does anyone have any experience of trying this?  
Any dos/don'ts/tips?  
Was it worth it?

---

<div class="post-metadata">

**Author:** ![ibex](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ibex/32/30439_2.png) [@ibex](https://forums.swift.org/u/ibex)\
**Post date:** [November 23, 2022, 11:09am UTC](https://forums.swift.org/t/migrating-an-objective-c-codebase-to-swift/61592/2 "2022-11-23T11:09:45Z")

</div>

Hello, @nickmoore

I have ported some parts of one of my apps ([P64](http://prettyfunction.org/content/AppStore/osx/P64/Examples/coordinate_vectors.html)): the front-end parts, the hardest bits. It wasn't really that hard because I did not use SwiftUI.

Currently, I am in the process of not porting but rewriting the back-end parts (a compiler, code generator, and a math engine) implemented as XPC services.

Have fun with porting. 🙂

---

<div class="post-metadata">

**Author:** ![gwendal.roue](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/gwendal.roue/32/13992_2.png) [@gwendal.roue](https://forums.swift.org/u/gwendal.roue)\
**Post date:** [November 23, 2022, 2:40pm UTC](https://forums.swift.org/t/migrating-an-objective-c-codebase-to-swift/61592/3 "2022-11-23T14:40:30Z")

</div>

The [An Approach for Migrating From Objective-C to Swift](https://www.steveonstuff.com/2022/01/13/migrating-from-objc-to-swift.html) blog post by Steve Barnegren was a good read.

---

<div class="post-metadata">

**Author:** ![mickeyl](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/mickeyl/32/12258_2.png) [@mickeyl](https://forums.swift.org/u/mickeyl)\
**Post date:** [November 23, 2022, 3:39pm UTC](https://forums.swift.org/t/migrating-an-objective-c-codebase-to-swift/61592/4 "2022-11-23T15:39:20Z")

</div>

Yes, this is very instructive.
