我没有找到任何iPhone应用程序的解决方案。请帮助我的IOS应用程序。
我通过以下代码完成了android应用程序:
java.io.File file = getTempPkc12File();
ArrayList<String> scopes = new ArrayList<String>();
scopes.add(DriveScopes.DRIVE);
scopes.add(DriveScopes.DRIVE_FILE);
scopes.add(DriveScopes.DRIVE_SCRIPTS);
HttpTransport httpTransport = new NetHttpTransport();
JacksonFactory jsonFactory = new JacksonFactory();
GoogleCredential credential = new GoogleCredential.Builder()
.setTransport(httpTransport).setJsonFactory(jsonFactory)
.setServiceAccountId(SERVICE_ACCOUNT_EMAIL)
.setServiceAccountScopes(scopes)
.setServiceAccountPrivateKeyFromP12File(file).build();
service = new Drive.Builder(httpTransport, jsonFactory, null)
.setHttpRequestInitializer(credential).build();
答案 0 :(得分:0)