Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when running on iOS 6 but not iOS 7

I am trying to run my project on iOS 6 and I have set all the appropriate build settings to let me do so, but when I run on iOS 6 I get this error:

dyld: Symbol not found: _OBJC_CLASS_$_NSURLSession
  Referenced from: /var/mobile/Applications/8AC09960-A403-413E-B70A-E03DB2AF5844/Flywheel.app/Flywheel
  Expected in: /System/Library/Frameworks/Foundation.framework/Foundation
 in /var/mobile/Applications/8AC09960-A403-413E-B70A-E03DB2AF5844/Flywheel.app/Flywheel

What gives?? iOS 7 works fine.

like image 729
pfrank Avatar asked Nov 28 '22 03:11

pfrank


1 Answers

The issue here is that the symbol isn't available on iOS 6. So you have to weak link the Foundation Framework by setting it's status to "optional" in Build Phases -> Link Binary With Libraries.

like image 69
Soph Avatar answered Dec 11 '22 11:12

Soph