gaoge1993
gaoge1993

Reputation: 19

How can I upgrade my Realm Swift version from 0.96 to 0.97?

Can I just replace the two old version realm frameworks to the new version ones? Or what should I do?

Upvotes: 1

Views: 380

Answers (2)

TVDN
TVDN

Reputation: 315

I cam up with the same question and while looking around came up with a good solution. This is in addition to what TiM has pointed out. Also, a few things to keep in mind:

  • I upgraded from version 1.0 to 1.0.1: so there weren't many changes to the framework and commands I used in my app.

  • I didn't use any special or very specific commands. Mainly the queries and writes/updates of objects. Nothing very fancy. If you have very specific requirements of Realm than I suggest look into those and see if there are any special changes to how they are managed.

Now to the steps:

  1. Remove the frameworks from the "Embedded Binaries" section by clicking the "-":

General Tab - Embedded Binaries

  1. Remove the frameworks from the project itself by right-clicking on them and select "Delete"

Navigator - Framework Files

  1. Now just go and do the steps for installing the frameworks as found in the documentation "realm.io/docs/swift/latest/#installation-swift-22".

I understand this question is rather old, but looking through the SO I dint find a definite answer to this.

Hope this helped!

Upvotes: 0

TiM
TiM

Reputation: 16021

Yep! If you're not using a dependency manager like CocoaPods or Carthage, you just need to delete the old framework folders and copy the new ones into the same place. Xcode should be fine handling that the next time you attempt to build your project.

If you are using a dependency manager, then you just need to hit the update command in their command line tools, and it'll be taken care of automatically.

Please keep in mind that Realm 0.97 has completely removed all of its previously deprecated APIs, so if you were using any of those, you will get build errors, but they'll be very easy to fix.

Upvotes: 2

Related Questions