3

I am developing a framework for my obj-c iOS app.

I followed this tutorial: https://www.raywenderlich.com/65964/create-a-framework-for-ios

My framework files builds correctly and I can import it into my sample project and it builds correctly. But my project doesn't perform as expected.

When I did deeper into my framework headers, I find my problem.

Certain header files allow me to CMD-Click on the imports to view the corresponding header files in my project.

So for example:

  1. In TestFile.h, I have: #import <Framework/SomeFile.h>, I can CMD-Click on this grand and I get linked to SomeFile.h
  2. In TestFile2.h, I also have: #import <Framework/SomeFile.h>. When I CMD-Click on this, I get the Question Mark symbol indicating that the file isn't found.

In my Framework Project, I have a directory structure like so:

FrameworkProj.xcodeproj
->FrameworkProj
  ->FrameworkHeaders.h
  ->Folder
    ->some files
    ->some folders
  ->Folder

I'm wondering if I haven't set a flag in my Build Settings that doesn't recursively link the files to my compiled framework, but I'm wondering why can I see the files in my headers files if this is the case.

Thanks very much!

1 Answer 1

1

May seem stupid but I solved this problem with a single line.

I needed to include -all_load in Target > Build Settings > Other Linker Flags

Sign up to request clarification or add additional context in comments.

2 Comments

where did u find this solution?
It was a suggestion from one of many threads I was reading at the time. Unable to link directly unfortunately

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.