سؤال

When compiling an iOS app, everything looks great in the following scenarios:

  • iOS 5.0.1, Debug Mode
  • iOS 5.0.1, Release Mode
  • iOS 4.2.1, Debug Mode

When I Build to an Archive in Release Mode, and run on iOS 4.2.1, there are a multitude of visual issues. For the most part, these consist of text positions (UILabels for the most part) on screen being incorrect. I'm testing the 4.2.1 Release build on a physical device; the iPod touch 2nd gen. Building with Xcode also version 4.2.1 (4D502).

The project incorporates a number of third party libraries.

I've attempted the following ways to resolve these issues with no positive effects:

  • Removed/Modified all Build Settings specific to the Release build to match the Debug build, including Code Optimization Level, Linker Flags, Debugging Symbols, Other C/C++ Flags, and all Preprocessor Macros.
  • Switched between the available compilers: LLVM GCC 4.2, and Apple LLVM Compiler 3.0
  • Checked for anything out of the ordinary in Build Phases and Build Rules
  • Removed all Arguments and Diagnostics that would have applied to the Debug build in the "Manage Schemes" window.

I'm unsure what other aspects of the build process could meddle with the app in this way, particularly when the Build Settings are nearly identical at this point. Any ideas?

UPDATE

I've found that the project builds with no problems using the latest beta version of Xcode. I'm thinking this points to an issue that's specific to the version of Clang included in Xcode 4.2.1. As Apple won't allow submissions of apps compiled with beta versions of Xcode, I'm still searching for a solution within 4.2.1.

هل كانت مفيدة؟

المحلول

Based on feedback received in the Apple Developer Forums that it could be issues with Clang, I tried switching back to LLVM GCC 4.2 in Xcode 4.2.1.

This time after switching compilers, I quit Xcode and deleted all files from ~/Library/Developer/Xcode/DerivedData to ensure that no Intermediates were left behind.

From that point on, the app worked correctly in Release Mode on iOS 4.2.1.

نصائح أخرى

It means that your app is not able to support armv6 architecture. Make sure all the libraries support armv6, apart from armv7. Exact nature of visual issues may point to a specific library.

I ran into the same problem and didn't want to switch back to GCC (which indeed eliminates the problems). After some further research, I came across this solution: https://stackoverflow.com/a/8391405/1273518 This worked perfectly for me!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top