joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.81k stars 773 forks source link

NSURLSessionDataDelegate methods are not able to triggered in release build #505

Open satputepritamcts opened 4 years ago

satputepritamcts commented 4 years ago

NSURLSessionDataDelegate are not able to triggered in release build(In debug it's working fine) and PDF are not getting loaded. After comparing code with rn-fetch-blob previous version we got to know that earlier NSURLSessionDataTask task variable was having local scope and it’s __block variable but in latest version it's global and declared as weak

With below change NSURLSessionDataDelegate methods are calling and PDF is displayed.


@Property (nullable, nonatomic, strong) NSURLSessionDataTask *task;

Any one facing same issue ?

cristianoccazinsp commented 4 years ago

Do you know which PR added that change?

satputepritamcts commented 4 years ago

@cristianoccazinsp It was added in version 0.10.9 andSeparate requests from network logic was created in below commit https://github.com/joltup/rn-fetch-blob/commit/8dd310d9f62979b77b39ddfb11ef6287fcf71bae#diff-e1595377ab5b79cea2781f2f81193df3

satputepritamcts commented 4 years ago

@cristianoccazinsp Any update on this? Related to PDF not downloaded or Delegate methods are not able to triggered

teodor-appd commented 3 years ago

Related to: https://github.com/joltup/rn-fetch-blob/pull/723