Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not build Objective-C module 'ResearchKit'. Umbrella for module 'ResearchKit' already covers this directory. #55

Open
reyvababtista opened this issue Mar 1, 2024 · 9 comments

Comments

@reyvababtista
Copy link
Collaborator

reyvababtista commented Mar 1, 2024

Thank you for this open source project!

I have a build issue that I have not yet figured out. The build was done on M3 Max, Sonoma 14.3.1, Xcode 15.2, Swift 5.9.2. The device is still new, with Xcode newly installed, contained only the Beiwe project.

  1. Clone project, switch to branch 2.5.
  2. pod install
  3. Open Xcode, copy GoogleService-Info.plist file.
  4. Build.
  5. Error: Could not build Objective-C module 'ResearchKit'. Umbrella for module 'ResearchKit' already covers this directory
  6. Clean build folder.
  7. Close Xcode.
  8. pod install
  9. Open Xcode
  10. Build.
  11. Error: Could not build Objective-C module 'ResearchKit'. Umbrella for module 'ResearchKit' already covers this directory

I have attached the full build log and a screenshot into this message. Do you have any advice? @biblicabeebli

Build Beiwe2_2024-03-01T08-47-18.txt

Screenshot 2024-03-01 at 2 52 24 PM

Originally posted by @reyvababtista in #27 (comment)

@biblicabeebli
Copy link
Member

Unfortunately no. I've got the build working on an intel and an m2 mac. I'm no expert in pods if the error is in there.

When I got rid of PromiseKit in the 2.5 branch I got error message like this, but they were always random junk and a cleaning of the build folder and exit-reopen of Xcode fixed it.

Uh maybe you could try an Archive build in the product menu? That does some kind of cleaner build process (that's what you hit to make and publish a build to the app store) and has been my most recent action on the 2.4.14 build when I had to patch it.

(you will want the most recent work off of 2.5, it will be merged in hopefully soon. Many problems fixed.)

If you want to email me and set up a call I can try and help you with your build issues, I would be thrilled to get some iOS help. My time is a bit limited.

@biblicabeebli
Copy link
Member

Either a dumb question or a smart question: which project file are you opening?

@reyvababtista
Copy link
Collaborator Author

Unfortunately no. I've got the build working on an intel and an m2 mac. I'm no expert in pods if the error is in there.

When I got rid of PromiseKit in the 2.5 branch I got error message like this, but they were always random junk and a cleaning of the build folder and exit-reopen of Xcode fixed it.

Uh maybe you could try an Archive build in the product menu? That does some kind of cleaner build process (that's what you hit to make and publish a build to the app store) and has been my most recent action on the 2.4.14 build when I had to patch it.

(you will want the most recent work off of 2.5, it will be merged in hopefully soon. Many problems fixed.)

If you want to email me and set up a call I can try and help you with your build issues, I would be thrilled to get some iOS help. My time is a bit limited.

I have not yet try the Archieve option as I was trying to running the simulator first. I will try that later after branch 2.5 is updated.
I am not sure if I can find your email address from the repository. Can you give me the address?

Either a dumb question or a smart question: which project file are you opening?

I use the workspace file as prompted in the README.

@biblicabeebli
Copy link
Member

my user name at gmail.

@reyvababtista
Copy link
Collaborator Author

my user name at gmail.

Just sent you an email.

@reyvababtista
Copy link
Collaborator Author

@biblicabeebli this is what you asked.

Screenshot 2024-03-07 at 12 42 43 PM

@biblicabeebli
Copy link
Member

I worked with @reyvababtista but we have not been successful.

For some reason when Reyva runs the pod install command it doesn't install the same source.
Running a clean build folder, quitting Xcode, deleting the Pods folder and running pod install, then reopenning and building results in the error in the initial screenshot.
This error is resolvable by commenting out the second offending line, but doing so results in the error of screenshot 2.
The second error can be resolved by inserting void into the parentheses - this is apparently a C++ vs C syntax difference, but the problem is that Reyva's pod-installed version of the code is different from my pod-installed version of the code.

Wut.

My copy of the module map file, in full, is:

framework module ResearchKit {
    umbrella header "ResearchKit.h"
    
    module Private {
        umbrella header "ResearchKit_Private.h"
        export *
    }
    
    export *
    module * { export * }
}

it differs from Reyva's in lacking the second 4-line module declaration.

My copy of GDTCORClock.h has the void parameters as declared above. (or at least that's all we noticed)

In terms of differences in our environments:

  • I'm on Xcode 15.2 on Venture
  • Reva is on 15.3 on Sonoma
  • both running cocoapods 1.15.2
  • my cocoapods is installed through gem, his is installed through brew nope I have it installed via brew AND gem. well that's weird.

@reyvababtista could you line-by-line compare the output of my pod env command to yours? maybe we missed something when we did this live.
(lol the output contains triple-` sequences that break monospace block formatting on github. I've replaced the back-ticks with single quotes)


### Stack

'''
   CocoaPods : 1.15.2
        Ruby : ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin22]
    RubyGems : 3.5.4
        Host : macOS 13.6.4 (22G513)
       Xcode : 15.2 (15C500b)
         Git : git version 2.43.0
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.3.0/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
'''

### Installation Source

'''
Executable Path: /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/bin/pod
'''

### Plugins

'''
cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0
'''

### Podfile

'''ruby
platform :ios, '12.0'

target 'Beiwe' do
  use_frameworks!
  pod 'Crashlytics', '~> 3.4'
  pod 'KeychainSwift', '~> 8.0'
  pod 'Alamofire', '~> 4.5'
  pod 'ObjectMapper', :git => 'https://github.com/Hearst-DD/ObjectMapper.git', :branch => 'master'
  pod 'Eureka'
  pod 'SwiftValidator', :git => 'https://github.com/jpotts18/SwiftValidator.git', :branch => 'master'
  pod 'PKHUD', :git => 'https://github.com/pkluz/PKHUD.git', :branch => 'release/swift4'
  pod 'IDZSwiftCommonCrypto', '~> 0.13.0'
  pod 'couchbase-lite-ios'
  pod 'ResearchKit', :git => 'https://github.com/ResearchKit/ResearchKit.git', :commit => 'b50e1d7'
  pod 'ReachabilitySwift', '~>3'
  pod 'EmitterKit', '~> 5.1'
  pod 'Hakuba', :git => 'https://github.com/eskizyen/Hakuba.git', :branch => 'Swift3'
  pod 'XLActionController', '~>5.0.1'
  pod 'XCGLogger', '~> 7.0.0'
  pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '4.5.0'
  pod 'Firebase/Analytics'
  pod 'Firebase/Messaging', '~>6'

end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    next unless (target.name == 'ResearchKit')
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone'
    end
  end
  installer.pods_project.targets.each do |target|
    if target.name == 'Eureka' || target.name == 'XLActionController' || target.name == 'ResearchKit'
      target.build_configurations.each do |config|
        config.build_settings['SWIFT_VERSION'] = '4.2'
        config.build_settings['ENABLE_BITCODE'] = 'NO'
      end
    else
      target.build_configurations.each do |config|
        config.build_settings['SWIFT_VERSION'] = '4.0'
        config.build_settings['ENABLE_BITCODE'] = 'NO'
      end
    end
  end
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
    end
  end
end
'''

I don't have enough knowledge of cocoapods to determine why it installed just-different versions of the code. I don't remember doing anything different when setting up my environment. We need someone who understands cocoapods.

@biblicabeebli
Copy link
Member

(I cannot update my version of xcode due to my mac os version, which I cannot update due to employer IT/security policy. not that I want to.)

@biblicabeebli
Copy link
Member

@reyvababtista Shot in the dark - are you running x86 homebrew running on rosetta, or ARM homebrew?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants