Bug Appears in Distribution (App Store) Version of

2019-05-28 05:07发布

问题:

I created an app that has a self-built photo tool. When I test (Debug & Ad Hoc), it works fine. It is built using a UIScrollView and adds each Photo to the UIScroll view as the photo's slot is scrolled onto the screen.

But now the app is in the App Store and the left-right swipe-to-load-photo feature is not loading the photos. This is the same situation on iPhone 3G and iPhone 4.

Any ideas why / how this could happen?

ADDITIONAL INFO

Upon further inspection and thinking about how I created this, here are some other notes.

If you swipe left/right after the first image appears, the app begins to 'lazy load' the next photo in sequence, depending on which way you are scrolling. If you get to the slot where an image is supposed to load and the image has not yet loaded, you see a UIActivityIndicator.

With the App Store version, I am usually just seeing blank screens. This makes me think it is lazy loading the images but not adding them to the subview, or not bringing them to the front of the view. If I scroll fast enough to outpace the lazy loading, I can get an image to eventually appear in one of the slots - so it is probably an issue with my lazy loading - but that doesn't answer "why does this work in ad hoc but fail in the app store version?"

回答1:

try to test your app in device by building it in release mode than install in your device and test the app. You can also try in simulator in release mode.



回答2:

Clean your build, then select Build and Analyze from the Build menu. Maybe you get some helpful information there :)



回答3:

Are the compiler optimization settings, preprocessor defines, SDK settings, etc., identical between your Ad Hoc builds and the final Distribution build? If not, that could cause a difference in behavior between the two versions on the same device.