Xcode 6.1.a static library for iOS not generated

I tried to create a static library for my iOS device using Xcode 6.1.

I select on Xcode a new project with the Cocoa Touch Static Library template and name it MyLib. For the purpose of MyLib, I choose iPhone 6 in the simulator.

After the project was opened, I created MyLib with success.

But if I look at the Products folder, libMyLib.a will turn red and nothing will happen if I want to show it with finder.

In previous versions of Xcode, it works as I find in some tutorials.

I found a solution: the library was created under

../Xcode/Products/Debug-iphonesimulator/libMyLib.a

If I switch the target to my real iPhone 6, it also works, and in the Product Folder libMyLib will be black, and the library will be created under

../Xcode/Products/Debug-iphoneos/libMyLib.a

+5
source share
1 answer

It happened to me. I figured libMyLib.a was successfully created and was sitting under the Debug-iphonesimulator folder, but Xcode could not link to the correct path. Two ways you can find.

  • As OP suggested, create a library with iPhone 6. The target library should be black and right-click in the folder. The library folder for Debug-iphonesimulator is at the same level as Debug-iphoneos

  • Find the target assembly directory. Usually it is under:

/ Users / YourName / Library / Developer / Xcode / DerivedData / yourProjectName-wholebunchofalphebets / Build / Products

+1
source

Source: https://habr.com/ru/post/1207302/


All Articles