0

I'm trying to figure out how to use Realm in both projects iOS and macOS of a single workspace. At first try it fails to compile with more than 200 errors.

Workspace currently contains:

  • MyApp iOS project
  • MyAppMac macOS project
  • Pods project

Podfile:

workspace 'MyApp'

target 'MyApp' do

    workspace 'MyApp'
    xcodeproj 'MyApp.xcodeproj'

    use_frameworks!

    pod 'RealmSwift'
    pod 'SVProgressHUD'

end

target 'MyAppMac' do

    workspace 'MyApp'
    xcodeproj 'MyAppMac.xcodeproj'

    use_frameworks!

    pod 'RealmSwift'

end
Vito Valov
  • 1,765
  • 1
  • 19
  • 37

1 Answers1

0

I just discovered that adding pod 'Realm' to MyAppMac target, works fine and produces no errors.

However, is this optimal?

I've seen some ways to reuse shared pods like RealmSwift but not sure how to do this given the configuration.

Vito Valov
  • 1,765
  • 1
  • 19
  • 37