Question

I have created static library project using the line script files.

Then I am manually copy .h files and .a file and created a framework. using iOS universal framework method. But it's working fine while creating first time. but changed small modification in .m file its not reflecting in created staic library .a file. but it's working fine while using source files.

Please let me know if you have face similar type of issues.

Was it helpful?

Solution

I think this post answers your question, there is a bug in xcode, according to the signature, the post is by a developer who works on the xcode product. The reply to it shows a solution that has worked for me, which is:

  • explicitly set the location of the static library to "Relative to Build Products"
  • with a good text editor, edit the project.pbxproj inside the your project e.g. MyProject.xcodeproj/project.pbxproj and search for a line like the one below containing your library name. Verify that for the path= entry there is no path, and only the filename of your library file. It's nasty to have to do this, but I have found that xcode does not get it right 100% of the time.

    {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMyLibrary.a; sourceTree = BUILT_PRODUCTS_DIR; };

OTHER TIPS

Do a clean build. The working project might be pointing at the old .a file maybe. Cleanup the project and then add the static library.

check and match the .a file creation date/time to ensure that it has been generated after you have made changes to .m file

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top