repack icon indicating copy to clipboard operation
repack copied to clipboard

callstack_repack-Swift.h file not found

Open jefmoraes opened this issue 1 year ago • 10 comments

I'm having a failure when executing the application build in Xcode 15, I installed the pods correctly but I don't know why this happens, I have another project and everything happened correctly there

Captura de Tela 2024-02-08 às 16 38 31 Captura de Tela 2024-02-08 às 16 38 52

I discovered that the file that should be generated is not being generated by Xcode in DerivedSources the generated file is callstack_repack _vers.c when it should be callstack_repack-Swift.h Captura de Tela 2024-02-22 às 11 49 33

jefmoraes avatar Feb 08 '24 19:02 jefmoraes

Same problem here

sternlucas avatar Feb 23 '24 13:02 sternlucas

@jefmoraes @sternlucas can you provide me with your cocoapods version being used in the projects?

jbroma avatar Feb 29 '24 10:02 jbroma

@jefmoraes @sternlucas I'm not able to reproduce this issue on a fresh react-native project created using CLI, can you provide even more details about your environment? Here is what i tried it on:

  1. System: Sonoma 14.1
  2. Xcode: 15.2
  3. Ruby: 2.7.6
  4. Cocoapods: 14.3
  5. Node: 20.11.1

jbroma avatar Feb 29 '24 11:02 jbroma

@jbroma seeing same issue when i tried to integrate re.pack to existing application

Sonomae 14.3.1 XCode 15.2 Ruby 2.7.6 cocoapods 1.11.2 node 16.14.2

react-native 0.68.6 @callstack/repack ^3.7.0

i tried setting up superapp example and it worked fine with above core deps

mlakmal avatar Mar 01 '24 19:03 mlakmal

@mlakmal did you run pod install after adding repack?

jbroma avatar Mar 01 '24 19:03 jbroma

@mlakmal did you run pod install after adding repack?

yes i did. it installed the Pods. below is the screenshot in xcode with pod files.

screenshot

mlakmal avatar Mar 01 '24 19:03 mlakmal

here the problem was related to the use of use_frameworks! :linkage => :static, just add the code bellow it to the podfile and run pod install. This way, in build phases in the callstack-repack pod you will notice that the Copy generated compatibility header file will be generated, it is responsible for guiding the import paths.

pre_install do |installer|
   installer.pod_targets.each do |pod|
     if pod.name.eql?('callstack-repack')
       def pod.build_type
         Pod::BuildType.static_library
       end
     end
   end
 end 

After

image image

Before

image image

jefmoraes avatar Mar 01 '24 19:03 jefmoraes

Looks like it's related to #390

jbroma avatar Mar 01 '24 20:03 jbroma

i do see use_frameworks! in our podfile let me give it a shot at above fix and let yall know...

mlakmal avatar Mar 01 '24 20:03 mlakmal

that workaround did not resolve the issue for me.

fyi: point to note is that i had to manually link the callstack-repack in Podfile. wonder if thats causing the issue...

mlakmal avatar Mar 05 '24 15:03 mlakmal

This issue has been marked as stale because it has been inactive for 30 days. Please update this issue or it will be automatically closed in 14 days.

github-actions[bot] avatar Apr 05 '24 00:04 github-actions[bot]

@mlakmal did you manage to resolve this?

jbroma avatar Apr 23 '24 12:04 jbroma

Yes I am not sure what combination actually worked. I did all below and it's solved now. Tnx

  • Add callstack as static in profile
  • Add manual link in profile for callstack. Yarn didn't auto link...
  • Re-setup ruby env

lakmal-gentem avatar Apr 23 '24 12:04 lakmal-gentem

@mlakmal @jefmoraes Potential fix for this issue has been merged, it will be included in 4.0.0-rc.2 which should be available today 🎉

If there is an option for you to test whether this fixes the problem without adjusting Podfile in your projects, please do and let me know if that helped 🙏

jbroma avatar Apr 24 '24 10:04 jbroma

@mlakmal @jefmoraes Potential fix for this issue has been merged, it will be included in 4.0.0-rc.2 which should be available today 🎉

If there is an option for you to test whether this fixes the problem without adjusting Podfile in your projects, please do and let me know if that helped 🙏

thanks for the fix. will try it later next week and get back to you!

mlakmal avatar Apr 24 '24 12:04 mlakmal

@mlakmal @jefmoraes Potential fix for this issue has been merged, it will be included in 4.0.0-rc.2 which should be available today 🎉

If there is an option for you to test whether this fixes the problem without adjusting Podfile in your projects, please do and let me know if that helped 🙏

I confirm that the repack upgrade from 3.7.0 to 4.0.0-rc-2 resolved this issue without need to add "pre_install ..." to Podfile.

HebertGB avatar May 03 '24 21:05 HebertGB

@mlakmal @jefmoraes Potential fix for this issue has been merged, it will be included in 4.0.0-rc.2 which should be available today 🎉

If there is an option for you to test whether this fixes the problem without adjusting Podfile in your projects, please do and let me know if that helped 🙏

i confirm that the issue is fixed in 4.0.0-rc-2

ichina avatar May 04 '24 10:05 ichina

@mlakmal @jefmoraes Potential fix for this issue has been merged, it will be included in 4.0.0-rc.2 which should be available today 🎉 If there is an option for you to test whether this fixes the problem without adjusting Podfile in your projects, please do and let me know if that helped 🙏

thanks for the fix. will try it later next week and get back to you!

yes this is working on ours as well!

mlakmal avatar May 09 '24 22:05 mlakmal