4 Replies
      Latest reply on Jun 15, 2018 5:09 AM by OOPer
      • Re: Swift 3 or 4
        OOPer Level 7 Level 7 (4,765 points)

        Generally yes.

        The changes between Swift 3 and Swift 4 are not so huge and the migrator would be able to fix most of the changes.

        But there are some cases which the migrator cannot fix.


        I do not understand what you really mean with `UpGrade`, but if you are to create a new project for your app, I recommend you to start with the latest released version of Swift.

          • Re: Swift 3 or 4
            SlickCoder Level 1 Level 1 (0 points)

            Thank you OOPer, I’m new to this. Basically what I mean is, if I make an app for iPhone 5 with Swift 3 and would like to make the SAME app for iPhone 6 with Swift 4. Can I make the app in both phones with one swift. Including iPhone 4,5,6,7,8,10 etc.

              • Re: Swift 3 or 4
                KMT Level 9 Level 9 (13,755 points)

                Swift is backwards compatible, however, you should know that your list of iPhones includes older models that won't run current iOS, so it might be more realistic to trim your target coverage, say, to nothing below iPhone 5s/iOS 10.3.1/Swift 3.1

                • Re: Swift 3 or 4
                  OOPer Level 7 Level 7 (4,765 points)

                  Thanks for clarifying.


                  You should know that recently each Swift version has a tight relationship with Xcode version and iOS SDK version.


                  Swift 3/Xcode 8/iOS SDK 10

                  Swift 4/Xcode 9/iOS SDK 11

                  Swift 4.2/Xdode 10/iOS SDK 12



                  And whether a user can run your app or not strongly depends on the iOS Version, not the device itself.


                  So, you may have so many opportunity to be forced to use a newer version of Xcode:

                  - You may want ot use new features of new iOS

                  - Apple would change the minimum version of Xcode to build your app for the App Store

                  - ...


                  If you make an app, for example, targeting iOS 8+ (and if Apple would not remove any features used in your app), your app would run on all devices running iOS 8+, iPhone 4S, 5, 5S, 6, 6S, 7, 8, X...


                  But when you want to UpGrade your app, a newer version of Xcode or a newer version of iOS SDK may be required.

                  You should be ready for updating your Swift code, if you think you would eventually UpGrade your app in the future.