Can I debug directly the iOS application for iPhone-5 (armv7s), built only for armv6 and armv7?

Our iOS application relies on a commercial third-party static lib, available only for armv6 + armv7. For this reason, I cannot create our application for armv7. Only armv6 + armv7 + simulator.

Our builds are deployed and launched on the iPhone-5 without any problems - it runs the armv7 code.

However, I cannot find a way to debug directly on iPhone 5. When I connect iPhone-5 and try to build for debugging, I get linker errors like this:

"No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7s, VALID_ARCHS=armv7)." 

Initially, I thought that perhaps my setting of โ€œBuild only active architectureโ€ for the debug configuration made Xcode not try to build for armv7 when iPhone-5 (armv7s) was connected.

But when I set this to โ€œNOโ€ (constantly creating Xcode for ALL SUPPORTED ARCHITECTURES), I get a whole different bunch of build errors (excerpt below --- we have many goals, and each of them generates similar errors).

 === BUILD NATIVE TARGET ASPCommon OF PROJECT ASPCommon WITH CONFIGURATION Debug === Check dependencies No architectures to compile for (ARCHS=i386, VALID_ARCHS=armv7). ** BUILD FAILED ** The following build commands failed: Check dependencies (1 failure) Command /bin/sh failed with exit code 65 

This target has no NO dependencies, it only builds against the iOS SDK frameworks and works great when a device other than the iPad 4 / iPhone 5 is connected.

Finally, my question is: is it even possible to debug armv7 code on an armv7s device? If possible, when am I doing wrong in my build settings to break this?

Thanks!

+4
source share
2 answers

Short answer: None. I believe that what you are trying to do is simply impossible! The third party static lib needs to be rebuilt for armv7s. Keep chasing them until they upgrade their library.

0
source

Oh, I forgot that I posted this question ...

In the end, I was able to debug all iOS devices, as the source of the problem was neither in the armv7 library nor in my project / target settings.

The problem was the iOS Xcode template that I used to create the iOS "Framework". (old version of iOS Universal framework by Karl Stenerud ).

Our code base is large, and many of its main blocks serve versions of MacOS and iOS applications, plus we want to encapsulate these main blocks as an "SDK", including a library, title, resources and documentation. So, we used Framework for this. Since there is no internal "Framework" template for iOS, we used a third-party template.

In this template, script users who had an error skipped platforms from the assembly in a certain situation, which led to assembly errors and the inability to debug.

The last word --- updating the template fixed the problem.

0
source

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


All Articles