Can I add Swift 3 in Xcode11? - swift3

I am using some Cocoapods packages that works well in Swift 3.2. If I changed those packages I need to do lot of code editing which will consume lot of time and effort. Is there any ways to add Swift 3 to Xcode 11?

I doubt you can ADD a Swift version. I.e. use 5.1 for your code and 3.1 for libraries. AFAIK, all binaries have to be built using the same compiler.
Technically, you can CHANGE the toolchain. This article illustrates how (not sure if nowadays 3.1 is stretching this though):
Medium Blog about Xcode toolchains
However, I doubt that you can submit apps built with 3.1 to the AppStore.
I also wonder if you really even want to try to buy into this. If you use Swift 3.1 you may need to make sure to bundle the runtime with your app. Since one of the more recent evolutions of iOS, the Swift runtime is not packaged with apps anymore, but relies on the OS runtime.
Good luck on this endeavor. Really want to kick all the Swift 5.x goodies? ;)

Related

C++ runtime compatibility in an iOS library

I need to distribute a closed-source library (in the form of a dynamic .framework) which uses C++ internally and exposes an Objective-C API at the module boundary. The library will be used by numerous clients in their apps.
As I understand, by default the C++ runtime is linked dynamically via libc++.dylib. So the question is: is the runtime compatible between iOS releases / compiler versions? Can my clients run into binary compatibility issues when using my library (e.g. OS is shipped with a different runtime version, producing subtle bugs in my library)?
Sidenote (as to where this question is coming from): On Windows, you would usually want to link the C++ runtime statically if you want to ensure that the binary works on all systems without the need to ship the specific version runtime component. So I wonder if the same problem existent on iOS.
Only Apple knows if or when some C++ library is no longer supported. My guess would be that apps depending on a no longer supported runtime would stop working completely or would not build with your library in the first place. I have found this info here (Xcode 10 (iOS 12) does not contain libstdc++6.0.9) indicating that, over the years, support for older runtimes may be dropped and then you'd need to build another library.
Speaking from past experience, we had an app - I know, not quite the same as a library - in the App store with a C++ core and Objective-C shim and did not care about C++ runtime compatibility. That never became an issue. Instead, from time to time (over several years and iOS iterations) there were slight user interface quirks that needed to be ironed out (I think with iOS7 - ok, you may not have an UI) then the forced move to 64-bit, then some API change where Apple wanted things that way or another... When there as an issue then we did a build with the latest XCode and that would have helped keeping things running, but the old version kept on working.
The upshot is, you'll need to be prepared to maintain your library and maybe something else 'gives' before the C++ runtime becomes a problem and then you'll just have to do another build for your customers.
If you are using libc++.dylib which is system wide library, then any application can also use it.
So by definition whoever delivers this library (Apple), is responsible for maintaining backward binary compatibility of this library.
If compatibility would have been broken, thousands of application would be corrupted.
On other hand if you are using some custom version of this library then it should be shipped with *.framework. In this case there is no risk of breaking compatibility since it is shipped with framework.
So basically there is no reason for you to worry about that.
If something is gets broken then lots of applications will be broken.
In the past new iOS versions have provided excellent compatibility with existing apps. If an app was built for an old iOS version, it would also run on new iOS versions. It seems that Apple simulates old iOS versions - including their visual style and quirks. If you run an app built for iOS 6 or earlier, it will still have the grayish look and not the new style introduced with iOS 7.
Once an app is updated, the story is different: you will need to use the latest Xcode, new rules apply and many old features will have been decommissioned. As part of this, Apple might remove APIs, switch to a new C++ compiler, change the standard C and C++ library etc.
So:
A released app in the App Store should continue to work for many years with your C++ library.
However, for the development of new apps or new version of an existing app, you will need to check the compatibility of your library regularly and possibly provide updated versions.

Find deprecated or changed methods in site core with different versions

I am planning to migrate site core 6.5 to site core 8.1. So here i am using below dlls sample
Sitecore.nexus
Sitecore.NVelocity
Sitecore.Analytics
Sitecore.Marketing.Wildcards and etc.
While i am doing POC i got understand Sitecore.Marketing.Wildcards is changed because of vast changes in Rules Engine.I figured out by compile time errors in my code after code has setup with sitecore 8.1. So i planned for another work around.
My question is how can I find a way to discover deprecated or changed functions from one version to another version of site core migrations? I'm trying to fgire this out before I dive into development.
The best way is to go through the release notes and find what is changed.
https://dev.sitecore.net/Downloads/Sitecore%20Experience%20Platform/Sitecore%2081/Sitecore%20Experience%20Platform%2081%20Initial%20Release/Release%20Notes
For example, on the release notes for Sitecore 8.1 on above link, you will find certain deprecated features, functionality, framework like SPEAK 1.1 framework etc. So with every release, some features or components may get deprecated and you need to fix the code break due to this.

New WebKit with old Qt. Is it worth trying?

I have a project built with Qt 3.2.3. It's a little outdated piece of code, but it works fine except for its' embedded browser. This thing is plain old. So I want to take fresh nightly built WebKit and try to adopt it somehow. The question is - is it even possible? I am new with Qt, but had a little experience with WebKit in the recent past. It was very easy linking it to C# project, but I really don't know about Qt and C++.
Maybe there is some better solution for updating a Qt browser without touching the whole Qt?
Honestly saying I think it's easier to port an application from 3.* to latest 4/5 then compiling latest WebKit into 3.*.. there are some core differences which will be really hard to solve. Although such experiment can be possible but I just not sure it's worth it.
WebKit from SVN won't even build against Qt from a couple months ago, so I can't imagine it would be easy to get it to build against Qt 3. I would highly recommend just porting to the current version of Qt and QtWebKit.

is GTK 3.x a real cross-platform solution?

I have tasted both Qt 4.x/5.x and GTKmm 3.x and I really like GTKmm over Qt.
Now I have just discovered that GTKmm 3.x doesn't offer a Windows porting, they also do not offer a Mac porting, basically I can't find nothing but libraries/sources/binaries for Linux.
Apparently the Windows support ( I'm not sure about the situation for the Mac OS stuff ) was dropped in the 2.x era and it's still not-existing today.
I have planned to use GTK 3.x for specific reasons, especially for some new features introduced by the 3.x branch, so using GTK 2.x is an option off the table.
Now I ask: there is something new for the Windows and/or Mac support for GTK 3.x ? There is something ? even experimental projects ?
No it isn't - at least when you want to be on the safe side for the future. The MacOSX and GTK ports are less then perfect and completely voluntarily which means by a program of this complexity and size they are not not active developed. And nobody cares that old features are implemented before new are added.
Almost 2 years since GTK3 released and there is still no official Windows binary distribution. And on one of the GNOME conferences there was an open discussion if GTK4 should be made Linux only. Well i guess they mean Linux/BSD - but Wayland is pure Linux at the moment and BSD do have a lack of developer for Desktop stuff.
This should be enough to scare any person with a serious program which requires real world investment away.
Also i strongly belive that cross platform GUI toolkits are a thing from the past. Abstract the GUI of your app and develop for every platform. With the success of the AppStores you will be forced more and more to use the native platform style. Your app will already be rejected by Apples AppStore if it looks to different. Windows is now enforcing WinRT. Be prepared that this will just be more important in the future.
So the way to go is WxWidgets which uses native widget sets. Skip GTK
2018-12-18 Update:
GTK+ 3 on Windows has been supported through MSYS2 for years.
Old answer:
GTK for Windows is currently provided "as-is". What it means, basically, is that there are no GTK maintainer that use Windows, and those using Linux have enough work maintaining the Linux builds.
This means that any contribution for GTK 3 on Windows is welcome, some people are using it, but that's not ready for the masses because nobody steps up to do the work, which won't be done by magic overnight. So it's usable, but don't expect reactive maintenance.
As for the build, there's a french dude providing an (unofficial) GTK 3 installer for Windows.
As of right now, no.
Like Frédéric Hamidi said, see Where can I download precompiled GTK+ 3 binaries or windows installer? for more info.
GTK on Mac has worked well for a long time and continues to work into the 3.x series:
https://live.gnome.org/GTK%2B/OSX/Building
You can also install GTK 3.x using MacPorts, but I don't know how well that works.

How to install external library in Xcode 4?

I am thinking of completing the free online course provided by Stanford on C++ and data abstractions. They have provided a C++ library with the necessary functionality required for the course.
I am trying to install the library which is called CS106LibrariesForXcode.pkg. I have done exactly what they have mentioned in the handout. You can find the handout here.
I am using X-Code 4.3.1. Nothing happens even after I install the CS106LibrariesForXcode.pkg. Is it because of the version of Xcode I am using? How do I get it work?
You need to install XCode 3.0 in order to use CS106LibrariesForXcode.pkg library.
XCode 4 have a very different UI and functionality compared to XCode 3. So it would be unwise to study XCode 3 only. But if you're going to study C++ using those tutorials you'd probably want to install XCode 3 and use it.