Xcode: Update the project products group with new

2019-08-07 09:03发布

In the products group in Xcode, I have the library "libMyLib-mac.a" in red, even after I build for device because I have changed the product name of the library in the targets of the project to "libMyLib.a".

Now, how can I update Xcode to show the new product name?

(Note: when I change the name back with the -mac suffix, the library is built and shown as available in the products folder.)

1条回答
Juvenile、少年°
2楼-- · 2019-08-07 09:51

Much easier than I expected...

  1. Right click the project file in finder, and show package contents.
  2. Open the project.pbxproj file in some text editor.
  3. Replaced all occurrences of -mac.a with .a.
  4. Everything is now in order.
查看更多
登录 后发表回答