Note that there are some explanatory texts on larger screens.

plurals
  1. PODifference between debug and release
    primarykey
    data
    text
    <p>I have an app that runs a synchronization algorithm.</p> <p>When I build and run it in debug mode (onto my iPhone 5) it all works fine.</p> <p>However, when I archive it and upload it to TestFlight and then download and install to the same iPhone 5 then part of the sync doesn't work.</p> <p>It doesn't crash or anything, it just doesn't run that part of the sync.</p> <p>The stupid thing is that it is a line of code inside a single function that isn't running. Everything else in that function does run.</p> <p>I have no idea where to start looking for this.</p> <p><strong>EDIT</strong></p> <p>With help from Mindaugas I've found exactly why and which bit of code is not being run.</p> <p>The function is...</p> <pre><code>- (void)uploadData { NSLog(@"pushing photos"); for (StoredImage *storedImage in self.recordArray) { NSURL *url = [self urlForImageUpload:storedImage]; if (url == nil) { continue; } ImageUploadOperation *uploader = [[OJFImageUploadOperation alloc] init]; uploader.image = storedImage.image; uploader.url = url; [self.recordQueue addOperation:uploader]; } } </code></pre> <p>When I set the optimisation level to "Fastest, Smallest" it seems to mess the order of this function up.</p> <p>When it enters I can see that there is a single object in the array and it enters into the loop. But then it completely skips past the first line <code>NSURL *url = [self urlForImageUpload:storedImage];</code> and goes to the end. So the upload never actually starts and it moves onto the next item.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload