Uploaded image for project: 'Realm Cocoa SDK'
  1. Realm Cocoa SDK
  2. RCOCOA-1581

Error in linking phase when using Realm as SPM dependency for sub-target

      How frequently does the bug occur?

      All the time

      Description

      Actual result:

      1. Try to archive project with a sub-target that has realm-cocoa as SPM dependency.
      2. Get errors as described here (#7526)
      3. Apply proposed fix to realm-core
      4. Receive another linking error

      Expected result:
      Archive process succeeds

      Stacktrace & log output

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      Undefined symbols for architecture arm64
      Symbol: realm::ObjKey realm::Table::find_first<realm::StringData>(realm::ColKey, realm::StringData) const
      Referenced from: realm::ObjKey realm::Object::get_for_primary_key_in_migration<objc_object* __strong, RLMAccessorContext>(RLMAccessorContext&, realm::Table const&, realm::Property const&, objc_object* __strong&&) in RLMAccessor.o
      ld: symbol(s) not found for architecture arm64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      

      Can you reproduce the bug?

      Yes, always

      Reproduction Steps

      In description

      Version

      v10.22.0

      What SDK flavour are you using?

      Local Database only

      Are you using encryption?

      No, not using encryption

      Platform OS and version(s)

      Any iOS Device (arm64)

      Build environment

      Xcode version: 13.2
      Dependency manager and version: SPM

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: