

I commented-out the Realm pod in the podfile and opted to add the pod through the Swift Package Manager route. After reading through a ticket on the Realm GitHub with regards to Xcode 11 fixes, I found there was an open feature branch for Swift Package Manager support. On the Realm GitHub there was an open branch for Xcode-11-2, which I hoped may fix this issue but the same issue persisted. xcframework bundle type, which is explained in this WWDC 2019 talk. This seems to have been some of the motivation behind the new. Until xCode 11 an x86_64 architecture for iOS would always have been a binary built for the simulator, but this is no longer the case. Surprisingly, the UIKitForMac build is actually considered ‘iOS’, but with an architecture of x86_64. This is quite a typical error when porting from iOS to macOS and refers to the lack of available binaries for the UIKitForMac platform. Pods/Realm/core/librealmcore-ios.a(bptree.o), building for UIKitForMac, but linking in object file built for iOS Simulator, for architecture x86_64”.

Realm wouldn’t build for UIKitForMac due to an error: I will now go through the pods that were necessary but had issues, and how I fixed each of these pods so that they would run in a native Mac app.

The pods that I decided were unnecessary for the initial port were: Crashlytics, Firebase/Analytics, Fabric and JGProgressHUD. Out of the pods that were causing errors, I decided which pods I needed and which pods the app could run without. There are also still outstanding issues related to Project Catalyst support within Cocoapods, which means that some of the more complicated pods aren’t easy to work with. CocoaPods Dependency MigrationĪfter selecting the Mac checkbox above I then tried to build the project but got a number of errors for different pods within my project, mainly because these pods had not yet been ported to UIKitForMac or iOS 13. This article will describe the process I went through to convert an iPad Pro app into a native macOS app that uses Apple’s new UIKitForMac. For a simple app this may well be the case, but for a typical app with lots of Cocoapods dependencies it’s unfortunately not that simple.
