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

Can't build RealmSwift inside a framework #8393

Closed
duyenlv opened this issue Oct 10, 2023 · 2 comments
Closed

Can't build RealmSwift inside a framework #8393

duyenlv opened this issue Oct 10, 2023 · 2 comments

Comments

@duyenlv
Copy link

duyenlv commented Oct 10, 2023

How frequently does the bug occur?

Always

Description

Tried both Cocoapods and Swift package manager


Podfile:

TARGET_IOS_VERSION = '15.0'

workspace 'Boilerplate'
platform :ios, TARGET_IOS_VERSION

def main_pods
  pod 'MBProgressHUD', '1.2.0'
  pod 'ReachabilitySwift', '5.0.0'
  
  #https://github.com/wxxsw/GSMessages/tags
  pod "GSMessages", '1.7.5'
  
  #https://github.com/SDWebImage/SDWebImage/blob/master/CHANGELOG.md
  pod 'SDWebImage', '5.18.2'
  pod 'SDWebImageSVGCoder', '1.7.0'
  
  #https://github.com/gmarm/BetterSegmentedControl/releases
  pod 'BetterSegmentedControl', '2.0.1'
  
  #https://help.branch.io/developers-hub/docs/ios-version-history
  pod 'BranchSDK', '2.2.2'
  
  #https://firebase.google.com/support/release-notes/ios
  pod 'Firebase/AnalyticsWithoutAdIdSupport', '10.16.0'
  pod 'FirebaseCrashlytics', '10.16.0'
  pod 'FirebaseMessaging', '10.16.0'
  
  #https://github.com/ninjaprox/NVActivityIndicatorView/releases
  pod "NVActivityIndicatorView", '5.1.1'
  
  #https://github.com/TimOliver/TOCropViewController/
  pod 'CropViewController', '2.6.1'
  
  #https://github.com/jonkykong/SideMenu
  pod 'SideMenu', '6.5.0'
  
  #https://github.com/marmelroy/PhoneNumberKit/releases
  pod 'PhoneNumberKit', '3.7.4'
  
  #https://github.com/google/GoogleSignIn-iOS/releases
  pod 'GoogleSignIn', '7.0.0'
  
  #https://github.com/SVGKit/SVGKit/releases
  pod 'SVGKit', '3.0.0'
  
end

target 'BoilerplateFramework' do
  project 'BoilerplateFramework.xcodeproj'
  use_frameworks!

  main_pods

end

target 'Main' do
  project 'Main.xcodeproj'
  use_frameworks!

  main_pods

end

post_install do |installer|
   installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
       config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = TARGET_IOS_VERSION
       #fix for xcode 14: require bundle target having code signing
       config.build_settings['CODE_SIGN_IDENTITY'] = ''
     end
   end
   
   installer.aggregate_targets.each do |target|
     target.xcconfigs.each do |variant, xcconfig|
       xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
       IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
     end
   end
   installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
       if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
         xcconfig_path = config.base_configuration_reference.real_path
         IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
       end
     end
   end
 end

Anyone can help?

Stacktrace & log output

No response

Can you reproduce the bug?

Always

Reproduction Steps

No response

Version

10.43.0

What Atlas Services are you using?

Local Database only

Are you using encryption?

Yes

Platform OS and version(s)

iOS Simulator 17.0

Build environment

Xcode version: 14.3.1
Dependency manager and version: COCOAPODS 1.13.0

@Jaycyn
Copy link

Jaycyn commented Oct 22, 2023

In your podfile, where is

pod 'Realm', '~>10'

@nirinchev
Copy link
Member

Closing this due to lack of response.

@nirinchev nirinchev closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
@sync-by-unito sync-by-unito bot closed this as completed Feb 16, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants