Rémi Belzanti
Rémi Belzanti

Reputation: 423

Why can't I build for some specific iOS simulators?

I have an app working with my own framework. I made the framework build for i386 as well as arm and everything is fine. My app used to run on every simulators and is available on the store.

Now, for some reason, i can't run my app on some simulators. The simulators that work :

The simulators that doesn't work :

The error is that a *.h file from my framework in not found.

I'd like to know what can prevent this file from being found, or rather what search path is not used with some simulators. There must be some project/target property that screws with those simulator types, except that i can't find any that would make a difference.

In my code i've searched for any kind of difference i would make, but they are just about iOS version regarding UI components. I also use TARGET_IPHONE_SIMULATOR but it should not make any difference between simulators.

FYI, my app version nows include Watch Kit. It's working on the Apple Watch as well as on the Apple Watch simulator attached to the iPhone 5 (external display). It may be related...

Any help much appreciated!

Edit: The full error description:

/Users/me/sources/myApp/iOS/trunk/include/someFile.h:18:10: 'dir/someOtherFile.h' file not found

Edit: Header files in all targets:

My framework and every files that include any .h of my framework are only part of the myApp, i took care not adding any reference in myApp.watchkit or myApp.watchkitextension

Edit: Solutions tried:

Edit: 64-bits:

I use some paths like that in the project file: $(FRAMEWORK_SEARCH_PATHS)frameworkName_$(CURRENT_ARCH).framework/Versions/A/Headers For example, it refers to '/searchPathFolder/frameworkName_i386.framework/...' when i build for simulators.

Upvotes: 4

Views: 464

Answers (1)

Rémi Belzanti
Rémi Belzanti

Reputation: 423

Solved. The issue came from my framework that for some reason wasn't build for 64 bits simulator versions.

For everything to work fine, the project needs 4 versions of the framework: x86 (32 bits simulator), x64 (64 bits simulator), armv7 (32 bits device) and arm64 (64 bits device).

Then with project properties, unnecessary frameworks are simply ignored at build time:

ignoring file myFramework_i386.framework/myFramework_i386, file was built for archive which is not the architecture being linked (arm64)

Upvotes: 3

Related Questions