6/10/2023 0 Comments Swift google drive apiNot yet authorized, request authorization and push the login UI onto the navigation stack. If ( userInterfaceIdiom] = UIUserInterfaceIdiomPad)ĬdiaTypes = initWithObjects: (NSString *) kUTTypeImage, nil] In case we're running the iPhone simulator, fall back on the photo library instead.ĬameraUI.sourceType = UIImagePickerControllerSourceTypePhotoLibrary If ()ĬameraUI.sourceType = UIImagePickerControllerSourceTypeCamera UIImagePickerController *cameraUI = init] = [GTMOAuth2ViewControllerTouch authForGoogleFromKeychainForName:kKeychainItemName Initialize the drive service & load existing credentials from the keychain if available Static NSString *const kClientID = NSString *const kClientSecret = driveService Static NSString *const kKeychainItemName = PROJECT NAME" :/Users/oodles/Documents/GDriveDemo/GDriveDemo/google-api-objectivec-client-read-only/Sourceġ0.) Expend GTL Source/Common/OAuth2/Touch folder in GTLxcodeproj and Drag GTMOAuth2ViewTouch.xib from here to main project supporting folderġ1.) In Finder, Drag and Drop GTLDrive.h and GTLDrive_Sources.m from the Source/Services/Drive/Generated to your projectġ2.) Now ,Open your viewController.h file and Replace your code as given bellow :: and then add path for Source folder of google-api-objectivec-client-read-only LibGTLTouchStaticLib.a ,amework ,amework and ameworkĨ.) Open Other linker flag in xcode and add -ObjC, -all_load as shown bellowĩ.) Open Project's Build Settings and Type User Header Search Path in Search box. Svn checkout google-api-objectivec-client-read-onlyĦ.) Create a new project for the app using the Single View Application template and open google-api-objectivec-client-read-only/Source folder and Drag and drop GTL.xcodeproj in your project navigator.ħ.) Expend "Link Binary with Libraries" list by selcting Build Setting of your project.
0 Comments
Leave a Reply. |