Realm-cocoa: librealmcore-ios.a(bptree.o), building for Mac Catalyst, but linking in object file built for iOS Simulator

Created on 1 May 2020  路  4Comments  路  Source: realm/realm-cocoa

Goals

Use Realm for iOS, iOS Extensions and Mac Catalyst

Expected Results

Build and successfully run our iOS app using Mac Catalyst

Actual Results

Build fails with this error:

Pods/Realm/core/librealmcore-ios.a(bptree.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, for architecture x86_64

Steps to Reproduce

Setup an iOS app that uses cocoapods to share realm between an iOS app and iOS extensions then enable Mac Catalyst support

Code Sample

source 'https://github.com/CocoaPods/Specs.git'

use_frameworks!
inhibit_all_warnings!

def data_framework_pods
  pod 'RealmSwift'
  pod 'RxRelay'
  pod 'RxSwift'
  pod 'RxSwiftExt/Core'
  pod 'SwiftProtobuf'
end

target 'NotificationContent' do
  platform :ios, '13.0'
  data_framework_pods
end

target 'NotificationService' do
  platform :ios, '13.0'
  data_framework_pods
end

target 'MainApp' do
  platform :ios, '13.0'
  data_framework_pods
end

Version of Realm and Tooling

Realm framework version: 4.4.1

Realm Object Server version: 4.4.1

Xcode version: 11.4.1

iOS/OSX version: 13.4.1 / 10.15.4

Dependency manager + version: Cocoapods v1.9.1

Notes

Tried the cocoapods related ideas from comments in #6163 and #6297 but none of them work.

O-Community

Most helpful comment

We decided to stop using realm

All 4 comments

I removed realm from the extensions so it is just in the main iOS app via cocoapods and the issue persists.

We decided to stop using realm

same error , when i build mac app,

/Pods/Realm/core/librealmcore-ios.a(utilities.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, for architecture x86_64

xcode 11.5
realm 5.0.1

Same issue. I understand Cocapods doesn't support Mac Catalyst?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

javierjulio picture javierjulio  路  3Comments

menhui222 picture menhui222  路  3Comments

TheHmmka picture TheHmmka  路  3Comments

carvalho-oak picture carvalho-oak  路  3Comments

fadylateef picture fadylateef  路  3Comments