kalpesh jetani kalpesh jetani - 1 month ago 14
Swift Question

Swift - App getting crashed in IOS 8.4 on launch with error _NSURLSessionTaskPriorityDefault

App is getting crashed on launch, with error log


dyld: Symbol not found: _NSURLSessionTaskPriorityDefault Referenced
from:
/private/var/mobile/Containers/Bundle/Application/E302B99F-08D3-45C0-A8ED-F500052FF375/AppName.app/AppName
Expected in:
/System/Library/Frameworks/Foundation.framework/Foundation in
/private/var/mobile/Containers/Bundle/Application/E302B99F-08D3-45C0-A8ED-F500052FF375/AppName.app/AppName


IOS Target Version : 8.0
Swift : version 2.2

Device: Iphone 6
Device Version 8.4

Answer

I found the solution.

  1. Make sure that you have linked your project with Foundation.framework and CFNetwork.framework
  2. Make sure the Foundation framework include is before CFNetwork.
  3. If you already have this configuration in your project then once un-link these frameworks, clean your project and link them again.

My project has been working well after this, hope yours does as well.

Comments