kstenerud / iOS-Universal-Framework

An XCode project template to build universal frameworks (arm7, arm7s, and simulator) for iOS / iPhone.
2.95k stars 473 forks source link

Compile warnings while using the framework #65

Closed basiliskfang closed 11 years ago

basiliskfang commented 11 years ago

Hi,

I built a framework using my source code in the way you described. I use a "Real framework" but get the same issue with a Fake Framework too. The problem is, I see a lot of compile warnings such as this one -

warning: (armv6) /Users/myName/Library/Developer/Xcode/DerivedData/XtifyPush-acscbtgfyhhbkfbesuhjiqckjunk/Build/Intermediates/XtifyPush.build/Debug-iphoneos/XtifyPush.build/Objects-normal/armv6/ASIAuthenticationDialog.o unable to open object file

After that the app runs fine and I have no issues. But since I am going to distribute the framework to users, I need to make the warnings go away. Any ideas how this can be fixed?

kstenerud commented 11 years ago

It's something that tends to crop up from time to time. I haven't been able to narrow down why it happens, but for some reason the linker will preserve the location of the original object file used to build the library/framework, and then the final linking stage will complain as it looks there for the (now nonexistent) debug information.

Make sure your framework's project settings are to completely strip the framework binary. Failing that, I'm planning on getting a beta of the next generation of universal framework template released this weekend which should resolve a number of issues with the current version.

basiliskfang commented 11 years ago

Thanks for the quick reply! What do you mean when you say "Make sure your framework's project settings are to completely strip the framework binary." How do I make sure?

kstenerud commented 11 years ago

Look for "Strip" settings in your build settings (e.g. "Strip Linked Product", "Strip Style").

Normally you don't need to set these, but when Xcode starts complaining like that it sometimes helps. (it's a bit of a voodoo fix, but I don't have anything better at the moment).

basiliskfang commented 11 years ago

I set Strip symbols During copy as Yes, Strip Linked Product as Yes and Strip Style as All Symbols. It still throws the same warnings. Any other ideas?

kstenerud commented 11 years ago

Two other possibilities:

The biggest challenge with this template system is trying to anticipate and compensate for Xcode bugs, especially the intermittent ones :/

If it still doesn't work, give the new beta a try when I release it tomorrow or Sunday.

basiliskfang commented 11 years ago

It worked with the new Beta! Thanks a bunch :)