简体   繁体   中英

Google Drive SDK and iOS 5.1

Is the SDK compatible with iOS 5 or only with iOS 6 ?

Everything is fine with the Google exemple and iOS 6 (simulator and devices) but Xcode return a runtime error with iOS 5.1 (simulator and devices).

I'm using Xcode 4.5.2.

Google exemple : https://developers.google.com/drive/quickstart-ios

Runtime error returned :

dyld: lazy symbol binding failed: Symbol not found: _objc_setProperty_nonatomic_copy
 Referenced from: /Users/Borongaj/Library/Application Support/iPhone Simulator/5.1/Applications/FC5B32F0-C5E6-4054-BE81-4F52054AC911/Tests Google Drive.app/Tests Google Drive
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation


dyld: Symbol not found: _objc_setProperty_nonatomic_copy
Referenced from: /Users/Borongaj/Library/Application Support/iPhone Simulator/5.1/Applications/FC5B32F0-C5E6-4054-BE81-4F52054AC911/Tests Google Drive.app/Tests Google Drive
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation

I've found the solution.

The Google documentation omit some important things :

  1. watch the Google video instead of reading the Google tutorial (text), because some drag/drop can corrupt Xcode buildings preferences

  2. Add GTLDrive_Sources.m inside Project > Build Phases > Compile Sources

  3. switch the GTL project iOS Deployment Target option to 5.1 (or anything else).

With these three steps, you avoid some boring error message.

Even the Google engineer get same errors during video ! :-)

我在Xcode 6.1.1上将iOS Development目标设置为5.1.1以解决此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM