progress:^(NSProgress * _Nonnull uploadProgress) {
NSLog(@"Progress - %f", uploadProgress.fractionCompleted);
}
During the real machine test, this log cannot be printed, but it works fine on the simulator. The break point in this block will not stop. Why?
天蓬老师2017-05-02 09:30:09
A common reason for this situation is redefining NSLog.
Please check if there is code similar to the one below in your project.
#ifdef DEBUG
#define NSLog(format, ...) do { \
fprintf(stderr, "<%s : %d> %s\n", \
[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], \
__LINE__, __func__); \
(NSLog)( (format), ## __VA_ARGS__ ); \
fprintf(stderr, "-------\n"); \
} while (0)
#else
# define NSLog(...)
#endif