Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS App isn't able to find framework header files

I have a Cocoa Touch framework created in Obj-C, I have built it for simulator as well as for arm7, 7s, 64 and it is a fat framework.
After adding this framework to the test project by dragging, when I try to add header file through import it autocompletes, yet Xcode is unable to locate those files and returns an error.

I have tried adding search paths as well but to no avail, Xcode just doesn't find those files.

I have made all those headers public while creating framework, have tested with an embedded test app it works

Here are Xcode images

like image 712
vishal dharankar Avatar asked Mar 14 '23 19:03

vishal dharankar


2 Answers

You need to specify the header files you want 'public' when making your framework.

In Xcode:

  1. Select the header file you want to expose (project navigator)
  2. Select 'file inspector' right hand side in Xcode.
  3. Locate the section 'Target Membersip'
  4. Make sure that your framework is selected
  5. After the name of your framework there is a selectable drop down meny.
  6. select 'public' out of public/private/project.

re-compile the framework and re include it. Now you see the header file you made public.

like image 54
Anders Cedronius Avatar answered Mar 23 '23 23:03

Anders Cedronius


I think you need to set "Header search path" in Build Settings

like image 22
Smit Shah Avatar answered Mar 23 '23 21:03

Smit Shah