My favorites | Sign in
Project Home
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 74: TouchJSON - warns 'stringWithContentsOfFile:' is deprecated
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Mar 2010


 
Reported by edaya...@gmail.com, Feb 26, 2010
What steps will reproduce the problem?
Set XCode 10.6|Debug|All|i386
Build and run project

What is the expected output? No warning
What do you see instead?
TouchJSON - Warning Compile CJSONScanner_UnitTests.m
'stringWithContentsOfFile:' is deprecated

What version of the product are you using? 1.0.7
On what operating system? Mac OS X 10.6

Please provide any additional information below.
Can eliminate warning by replacing:
BOOL theResult = Scan([NSString stringWithContentsOfFile:[[NSBundle
bundleForClass:[self class]] pathForResource:@"Blake" ofType:@"json"]],
&theObject);

with:
BOOL theResult = Scan([NSString stringWithContentsOfFile:[[NSBundle
bundleForClass:[self class]] pathForResource:@"Blake" ofType:@"json"]
encoding:NSUTF8StringEncoding error:nil], &theObject);

Reference:
http://iphone.keyvisuals.com/apps/fixed-stringwithcontentsoffile-is-deprecated-error/


Mar 19, 2010
Project Member #1 jwight
Fixed. Thank you.
Status: Fixed

Powered by Google Project Hosting