What steps will reproduce the problem?
1. Set build scheme in Xcode 4.6 to iOS 5.1 iPhone Simulator (or use an iOS 5.1
device)
2. Include code in a basic iOS app to initialize GTMOAuth2Authentication object
via the init method:
+ (id)authenticationWithServiceProvider:(NSString *)serviceProvider
tokenURL:(NSURL *)tokenURL
redirectURI:(NSString *)redirectURI
clientID:(NSString *)clientID
clientSecret:(NSString *)clientSecret
3. Set a breakpoint at line 200 in GTMOAuth2Authentication.m, inside the
aforementioned method, the line there should be "obj.serviceProvider =
serviceProvider;"
4. Launch your app in iOS 5.1 Simulator or on an iOS Device and trigger the
creation of the authentication object above.
5. When you hit the breakpoint, attempt to step to the next instruction,
obj.tokenURL = tokenURL;
What is the expected output? What do you see instead?
Well, setting the property should go as you'd expect, and if you tell the
debugger to continue, a GTMOAuth2Authentication object should be created (and
this works fine on iOS 6). Instead, when "obj.tokenURL = tokenURL;" is
executed, you get the following hard crash output with no backtrace (because
it's a runtime issue, I believe):
dyld: lazy symbol binding failed: Symbol not found:
_objc_setProperty_atomic_copy
Referenced from: /Users/billy/Library/Application Support/iPhone Simulator/5.1/Applications/74270074-AC83-495F-87E1-6A1923713EE6/Strip.app/Strip
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation
This kind of crash can usually be fixed by ensuring that the property in
question has a corresponding ivar declaration, linked via @synthesize. This
already appears to be the case with the tokenURL property, so I'm not sure why
it's blowing up. The value of the incoming tokenURL parameter is
"https://accounts.google.com/o/oauth2/token," so that does not appear to be the
problem, either.
What version of the product are you using? On what operating system?
SVN checkout of google-api-objectivec-client-read-only, latest date listed in
the ReleaseNotes.txt is dated 6-Dec-2012.
Please provide any additional information below.
Happy to provide further info, relevant build settings. The following is how
I'm creating the GTMOAuth2Authentication object in my view controller's
viewDidLoad method, which works just fine in iOS 6 as mentioned above:
// Check for authorization.
GTMOAuth2Authentication *auth =
[GTMOAuth2ViewControllerTouch authForGoogleFromKeychainForName:kGoogleDriveKeychainItemName
clientID:kGoogleDriveClientId
clientSecret:kGoogleDriveClientSecret];