Issue with iOS 4.3

159 views
Skip to first unread message

Leon Lucardie

unread,
Oct 12, 2012, 1:41:39 PM10/12/12
to google-api-obj...@googlegroups.com
I'm currently having an issue while using the GTL library and deploying to iOS 4.3.

I got the library linked to my project and it builds and runs fine on iOS 5 and iOS 6.
The problem is whenever I run the project on iOS 4.3 or lower I get the following error when it starts:
dyld: Symbol not found: _OBJC_CLASS_$_NSJSONSerialization
This only happens when I have the library linked to my project. Running the project without the GTL library works fine in iOS 4.3.
What could be the problem here and how can I fix it?

I have the library linked like this:

-Added the GTL.xcodeproj to my application project (for cross-reference)
-Added libGTLTouchStaticLib.a to my Link Binary with Libraries list
-Added the generated header files that are generated in the DerivedData folder to my application
-Added the GTLBlogger source files to my application (since the Blogger API is the only one I use). Added the -fno-objc-arc compiler flag
-Added the '-ObjC -all_load' Linker Flag to the build settings
 

Thomas Van Lenten

unread,
Oct 12, 2012, 2:14:19 PM10/12/12
to google-api-obj...@googlegroups.com
The deployment targets is being set to something that always has NSJSONSerialization.  You need to have it set (on the target that compiles the GTL code) to go back to iOS 4.3.  You'll also need to include SBJSON.

TVL

Leon Lucardie

unread,
Oct 13, 2012, 3:56:29 AM10/13/12
to google-api-obj...@googlegroups.com
Thanks for the help. Setting iOS 4.3 as the build target for the GTL library worked perfectly considering the NSJSONSerialization problem. However, I currently am not able to properly add SBJSON to my project.

I've added libsjson-ios.a to my  Link Binary with Libraries list (as described in the documentation), but I'm still getting the following error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No parsing class found' 

Op vrijdag 12 oktober 2012 20:14:20 UTC+2 schreef Tom Van Lenten het volgende:

Greg Robbins

unread,
Oct 13, 2012, 12:25:14 PM10/13/12
to google-api-obj...@googlegroups.com
Adding the SBJSON sources that were checked out along with the library sources to the same project target as the other library sources should work. The library is not intended to be used with the latest release of SBJSON from github, and the GTL library uses SBJSON only when running on iOS 4.

Leon Lucardie

unread,
Oct 13, 2012, 12:33:48 PM10/13/12
to google-api-obj...@googlegroups.com
I was using the latest release from github. The ones that came with the library worked fine and my app is running properly now.

Thanks for the help.

Op zaterdag 13 oktober 2012 18:25:45 UTC+2 schreef Greg Robbins het volgende:

AndroidDev Serene

unread,
Jan 6, 2013, 12:57:25 AM1/6/13
to google-api-obj...@googlegroups.com
Hi, 

I'm having exactly the same problem now. Can you explain a little bit on how you solved it? I've added SBJSON 3.1.1 to my project but still got the error. Anything that I need to set?

Thank you very much.

AndroidDev Serene

unread,
Jan 6, 2013, 12:57:33 AM1/6/13
to google-api-obj...@googlegroups.com
Hi, 

I'm having exactly the same problem now. Can you explain a little bit on how you solved it? I've added SBJSON 3.1.1 to my project but still got the error. Anything that I need to set?

Thank you very much.


On Saturday, October 13, 2012 9:33:48 AM UTC-7, Leon Lucardie wrote:

Greg Robbins

unread,
Jan 6, 2013, 11:56:19 AM1/6/13
to google-api-obj...@googlegroups.com
The library will not work with SBJSON 3.1.1. If you need to use the library for an application deploying on iOS 4, then compile the library with the version of SBJSON that is automatically checked out by subversion with the library sources.

The library does not need any version SBJSON for applications deploying on iOS 5 and later, since iOS 5 includes the NSJSONSerialization class.

Jeffrey Walton

unread,
Jan 6, 2013, 12:10:54 PM1/6/13
to google-api-obj...@googlegroups.com
Bad idea. You are depending upon Apple for your security. At times,
Apple does not have a f**king clue about security.

Apple waited months before removing the toxic Diginotar certificate
(the update had to occur out of band).

Apple let nearly 200 bugs fester and rot while waiting for their iOS
6.0 press release. Confer:
http://lists.owasp.org/pipermail/owasp-mobile-security-project/2012-November/000412.html.

There XML parser suffered from a billion laughs as late as over the
summer in iOS 5.1.1 (I tested it personally).

Its not just Apple - Google and AOSP members have the same defect on
Android. And so does Windows Mobile (RIP). Confer:
https://en.wikipedia.org/wiki/File:Android_historical_version_distribution.png.

A more in-depth treatment of the subject can be found at "Mobile
Development Architecture (Vendor Patching vs App Updates)?",
http://lists.owasp.org/pipermail/owasp-mobile-security-project/2012-November/000412.html.

Jeffrey Walton
Mobile Security Architect
Reply all
Reply to author
Forward
0 new messages