Always return a response avoiding iOS crashes on no-changes
parent
401320e08b
commit
d560d0e470
|
@ -998,7 +998,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
if (changeDetected)
|
||||
{
|
||||
NSLog(@"Change detected, we push the content.");
|
||||
[output appendString: s];
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
@ -1008,6 +1007,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
}
|
||||
}
|
||||
|
||||
// We always return the last generated response.
|
||||
// If we only return <Sync><Collections/></Sync>,
|
||||
// iOS powered devices will simply crash.
|
||||
[output appendString: s];
|
||||
|
||||
[output appendString: @"</Collections></Sync>"];
|
||||
|
||||
d = [[output dataUsingEncoding: NSUTF8StringEncoding] xml2wbxml];
|
||||
|
|
Loading…
Reference in New Issue