Issues manually adding a module to my project

Hello. I'm working on the iOS native side of a react native library (don't worry this question is specifically about the iOS native part). My library relies on the GoogleSignIn library from google. The problem is it uses functionality from a fork that has not been merged by Google yet, and .podspec files do not support specifying a git repo for a module like the actual Podfile does. To circumvent this issue I opted to clone the fork into my libraries source code and treat it as a sort of submodule. I setup the public_header_files/private_header_files/resource_bundle properties in my podspec based on the GoogleSignIn submodules podspec and added the headers to my HEADER_SEARCH_PATHS. I then added the public headers to my bridging header.

So in my podspec I have

  s.source_files = "ios/**/*.{h,m,mm,swift}", "GoogleSignIn-iOS/GoogleSignIn/Sources/**/*.{h,m,mm,swift}"
  s.public_header_files = "GoogleSignIn-iOS/GoogleSignIn/Sources/Public/GoogleSignIn/*.h"
  s.private_header_files = "GoogleSignIn-iOS/GoogleSignIn/Sources/**/*.h"
  
  s.resource_bundle = {
    'GoogleSignIn' => ['GoogleSignIn-iOS/GoogleSignIn/Sources/{Resources,Strings}/*']
  }


  s.pod_target_xcconfig = {
    'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(PODS_ROOT)/GoogleSignIn-iOS/GoogleSignIn/Sources/Public/GoogleSignIn" "$(PODS_ROOT)/GoogleSignIn-iOS/GoogleSignIn/Sources"'
  }

  s.user_target_xcconfig = {
    'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(PODS_ROOT)/GoogleSignIn-iOS/GoogleSignIn/Sources/Public/GoogleSignIn" "$(PODS_ROOT)/GoogleSignIn-iOS/GoogleSignIn/Sources"'
  }

and in my bridging header

#import "GIDAppCheckError.h"
#import "GIDConfiguration.h"
#import "GIDGoogleUser.h"
#import "GIDProfileData.h"
#import "GIDSignIn.h"
#import "GIDSignInButton.h"
#import "GIDSignInResult.h"
#import "GIDToken.h"
#import "GoogleSignIn.h"

This is working to some extent because I can see the headers in my pod project

Not sure why they're under project but I manually moved them to private/public and it didn't seem to affect anything.

Anyway regardless which category I put the headers in, I cannot actually import GoogleSignIn from outside the "submodule". Additionally, some files within the "submodule" cannot find each other. For example at GoogleSignIn-iOS/GoogleSignIn/Sources/GIDToken.m I have #import "GoogleSignIn/Sources/Public/GoogleSignIn/GIDToken.h", which just results in 'GoogleSignIn/Sources/Public/GoogleSignIn/GIDToken.h' file not found. If I just do #import "GIDToken.h" its fine but I can't actually rewrite the imports otherwise they'll break again when I update the submodule from git. I have asked on several Discord communites as well as ChatGPT but I cannot find any configuration that makes this submodule work via the podspec.

Heres the repo for my module if anyone wants to take a closer look or take a stab at it https://github.com/GNUGradyn/react-native-google-auth

Issues manually adding a module to my project
 
 
Q