├── .clang-format ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .gitmodules ├── .jazzy.json ├── Examples └── DBRoulette │ ├── README.md │ ├── iOS │ ├── CarthageProject │ │ └── DBRoulette │ │ │ ├── Cartfile │ │ │ ├── Cartfile.resolved │ │ │ ├── DBRoulette.xcodeproj │ │ │ └── project.pbxproj │ │ │ └── DBRoulette │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ │ ├── Info.plist │ │ │ ├── PhotoViewController.h │ │ │ ├── PhotoViewController.m │ │ │ ├── ViewController.h │ │ │ ├── ViewController.m │ │ │ └── main.m │ ├── CocoaPodsProject │ │ └── DBRoulette │ │ │ ├── DBRoulette.xcodeproj │ │ │ └── project.pbxproj │ │ │ ├── DBRoulette │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Assets.xcassets │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ ├── Base.lproj │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ └── Main.storyboard │ │ │ ├── Info.plist │ │ │ ├── PhotoViewController.h │ │ │ ├── PhotoViewController.m │ │ │ ├── ViewController.h │ │ │ ├── ViewController.m │ │ │ └── main.m │ │ │ ├── Podfile │ │ │ └── Podfile.lock │ └── SubprojectProject │ │ └── DBRoulette │ │ ├── Cartfile │ │ ├── Cartfile.resolved │ │ ├── DBRoulette.xcodeproj │ │ └── project.pbxproj │ │ └── DBRoulette │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── PhotoViewController.h │ │ ├── PhotoViewController.m │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ └── main.m │ └── macOS │ └── CarthageProject │ └── DBRoulette │ ├── Cartfile │ ├── Cartfile.resolved │ ├── DBRoulette.xcodeproj │ └── project.pbxproj │ └── DBRoulette │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ ├── PhotoViewController.h │ ├── PhotoViewController.m │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── Format ├── UmbrellaHeader.h ├── clang-format ├── format_files.sh ├── generate_docs.sh ├── jazzy.css └── jazzy.json ├── Images ├── DBRouletteAuthView.png ├── DBRouletteAuthViewMacOS.png ├── DBRouletteView.png ├── DBRouletteViewMacOS.png ├── InfoPlistExample.png ├── OAuthFlowApproval.png └── OAuthFlowInit.png ├── LICENSE ├── ObjectiveDropboxOfficial.podspec ├── README.md ├── Source └── ObjectiveDropboxOfficial │ ├── Headers │ ├── Internal │ │ ├── DBClientsManager+Protected.h │ │ ├── Networking │ │ │ ├── DBDelegate.h │ │ │ ├── DBGlobalErrorResponseHandler+Internal.h │ │ │ ├── DBHandlerTypesInternal.h │ │ │ ├── DBSDKReachability.h │ │ │ ├── DBSessionData.h │ │ │ ├── DBTasks+Protected.h │ │ │ ├── DBTasksImpl.h │ │ │ ├── DBTransportBaseClient+Internal.h │ │ │ ├── DBURLSessionTask.h │ │ │ ├── DBURLSessionTaskResponseBlockWrapper.h │ │ │ └── DBURLSessionTaskWithTokenRefresh.h │ │ ├── OAuth │ │ │ ├── DBAccessToken+NSSecureCoding.h │ │ │ ├── DBAccessTokenProvider+Internal.h │ │ │ ├── DBOAuthConstants.h │ │ │ ├── DBOAuthManager+Protected.h │ │ │ ├── DBOAuthPKCESession.h │ │ │ ├── DBOAuthTokenRequest.h │ │ │ ├── DBOAuthUtils.h │ │ │ └── DBScopeRequest+Protected.h │ │ └── Resources │ │ │ ├── DBChunkInputStream.h │ │ │ └── DBSDKSystem.h │ ├── PlatformInternal │ │ └── iOS │ │ │ └── DBLoadingViewController.h │ └── Umbrella │ │ ├── ObjectiveDropboxOfficial.h │ │ └── ObjectiveDropboxOfficialLib.h │ ├── ObjectiveDropboxOfficial.xcodeproj │ ├── en.lproj │ │ └── Localizable.strings │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── ObjectiveDropboxOfficial iOS.xcscheme │ │ └── ObjectiveDropboxOfficial macOS.xcscheme │ ├── Platform │ ├── ObjectiveDropboxOfficial_iOS │ │ ├── DBClientsManager+MobileAuth-iOS.h │ │ ├── DBClientsManager+MobileAuth-iOS.m │ │ ├── DBLoadingViewController.m │ │ ├── DBOAuthMobile-iOS.h │ │ ├── DBOAuthMobile-iOS.m │ │ ├── DBOAuthMobileManager-iOS.h │ │ ├── DBOAuthMobileManager-iOS.m │ │ ├── DBSDKImports-iOS.h │ │ ├── Info.plist │ │ └── OfficialPartners │ │ │ └── OpenWith │ │ │ ├── DBOfficialAppConnector-iOS.h │ │ │ ├── DBOfficialAppConnector-iOS.m │ │ │ ├── DBOpenWithInfo-iOS.h │ │ │ └── DBOpenWithInfo-iOS.m │ └── ObjectiveDropboxOfficial_macOS │ │ ├── DBClientsManager+DesktopAuth-macOS.h │ │ ├── DBClientsManager+DesktopAuth-macOS.m │ │ ├── DBOAuthDesktop-macOS.h │ │ ├── DBOAuthDesktop-macOS.m │ │ ├── DBSDKImports-macOS.h │ │ └── Info.plist │ └── Shared │ ├── Generated │ ├── ApiObjects │ │ ├── Account │ │ │ ├── DBAccountObjects.m │ │ │ └── Headers │ │ │ │ ├── DBACCOUNTPhotoSourceArg.h │ │ │ │ ├── DBACCOUNTSetProfilePhotoArg.h │ │ │ │ ├── DBACCOUNTSetProfilePhotoError.h │ │ │ │ └── DBACCOUNTSetProfilePhotoResult.h │ │ ├── Async │ │ │ ├── DBAsyncObjects.m │ │ │ └── Headers │ │ │ │ ├── DBASYNCLaunchEmptyResult.h │ │ │ │ ├── DBASYNCLaunchResultBase.h │ │ │ │ ├── DBASYNCPollArg.h │ │ │ │ ├── DBASYNCPollEmptyResult.h │ │ │ │ ├── DBASYNCPollError.h │ │ │ │ └── DBASYNCPollResultBase.h │ │ ├── Auth │ │ │ ├── DBAuthObjects.m │ │ │ └── Headers │ │ │ │ ├── DBAUTHAccessError.h │ │ │ │ ├── DBAUTHAuthError.h │ │ │ │ ├── DBAUTHInvalidAccountTypeError.h │ │ │ │ ├── DBAUTHPaperAccessError.h │ │ │ │ ├── DBAUTHRateLimitError.h │ │ │ │ ├── DBAUTHRateLimitReason.h │ │ │ │ ├── DBAUTHTokenFromOAuth1Arg.h │ │ │ │ ├── DBAUTHTokenFromOAuth1Error.h │ │ │ │ ├── DBAUTHTokenFromOAuth1Result.h │ │ │ │ └── DBAUTHTokenScopeError.h │ │ ├── Check │ │ │ ├── DBCheckObjects.m │ │ │ └── Headers │ │ │ │ ├── DBCHECKEchoArg.h │ │ │ │ └── DBCHECKEchoResult.h │ │ ├── Common │ │ │ ├── DBCommonObjects.m │ │ │ └── Headers │ │ │ │ ├── DBCOMMONPathRoot.h │ │ │ │ ├── DBCOMMONPathRootError.h │ │ │ │ ├── DBCOMMONRootInfo.h │ │ │ │ ├── DBCOMMONTeamRootInfo.h │ │ │ │ └── DBCOMMONUserRootInfo.h │ │ ├── Contacts │ │ │ ├── DBContactsObjects.m │ │ │ └── Headers │ │ │ │ ├── DBCONTACTSDeleteManualContactsArg.h │ │ │ │ └── DBCONTACTSDeleteManualContactsError.h │ │ ├── FileProperties │ │ │ ├── DBFilePropertiesObjects.m │ │ │ └── Headers │ │ │ │ ├── DBFILEPROPERTIESAddPropertiesArg.h │ │ │ │ ├── DBFILEPROPERTIESAddPropertiesError.h │ │ │ │ ├── DBFILEPROPERTIESAddTemplateArg.h │ │ │ │ ├── DBFILEPROPERTIESAddTemplateResult.h │ │ │ │ ├── DBFILEPROPERTIESGetTemplateArg.h │ │ │ │ ├── DBFILEPROPERTIESGetTemplateResult.h │ │ │ │ ├── DBFILEPROPERTIESInvalidPropertyGroupError.h │ │ │ │ ├── DBFILEPROPERTIESListTemplateResult.h │ │ │ │ ├── DBFILEPROPERTIESLogicalOperator.h │ │ │ │ ├── DBFILEPROPERTIESLookUpPropertiesError.h │ │ │ │ ├── DBFILEPROPERTIESLookupError.h │ │ │ │ ├── DBFILEPROPERTIESModifyTemplateError.h │ │ │ │ ├── DBFILEPROPERTIESOverwritePropertyGroupArg.h │ │ │ │ ├── DBFILEPROPERTIESPropertiesError.h │ │ │ │ ├── DBFILEPROPERTIESPropertiesSearchArg.h │ │ │ │ ├── DBFILEPROPERTIESPropertiesSearchContinueArg.h │ │ │ │ ├── DBFILEPROPERTIESPropertiesSearchContinueError.h │ │ │ │ ├── DBFILEPROPERTIESPropertiesSearchError.h │ │ │ │ ├── DBFILEPROPERTIESPropertiesSearchMatch.h │ │ │ │ ├── DBFILEPROPERTIESPropertiesSearchMode.h │ │ │ │ ├── DBFILEPROPERTIESPropertiesSearchQuery.h │ │ │ │ ├── DBFILEPROPERTIESPropertiesSearchResult.h │ │ │ │ ├── DBFILEPROPERTIESPropertyField.h │ │ │ │ ├── DBFILEPROPERTIESPropertyFieldTemplate.h │ │ │ │ ├── DBFILEPROPERTIESPropertyGroup.h │ │ │ │ ├── DBFILEPROPERTIESPropertyGroupTemplate.h │ │ │ │ ├── DBFILEPROPERTIESPropertyGroupUpdate.h │ │ │ │ ├── DBFILEPROPERTIESPropertyType.h │ │ │ │ ├── DBFILEPROPERTIESRemovePropertiesArg.h │ │ │ │ ├── DBFILEPROPERTIESRemovePropertiesError.h │ │ │ │ ├── DBFILEPROPERTIESRemoveTemplateArg.h │ │ │ │ ├── DBFILEPROPERTIESTemplateError.h │ │ │ │ ├── DBFILEPROPERTIESTemplateFilter.h │ │ │ │ ├── DBFILEPROPERTIESTemplateFilterBase.h │ │ │ │ ├── DBFILEPROPERTIESTemplateOwnerType.h │ │ │ │ ├── DBFILEPROPERTIESUpdatePropertiesArg.h │ │ │ │ ├── DBFILEPROPERTIESUpdatePropertiesError.h │ │ │ │ ├── DBFILEPROPERTIESUpdateTemplateArg.h │ │ │ │ └── DBFILEPROPERTIESUpdateTemplateResult.h │ │ ├── FileRequests │ │ │ ├── DBFileRequestsObjects.m │ │ │ └── Headers │ │ │ │ ├── DBFILEREQUESTSCountFileRequestsError.h │ │ │ │ ├── DBFILEREQUESTSCountFileRequestsResult.h │ │ │ │ ├── DBFILEREQUESTSCreateFileRequestArgs.h │ │ │ │ ├── DBFILEREQUESTSCreateFileRequestError.h │ │ │ │ ├── DBFILEREQUESTSDeleteAllClosedFileRequestsError.h │ │ │ │ ├── DBFILEREQUESTSDeleteAllClosedFileRequestsResult.h │ │ │ │ ├── DBFILEREQUESTSDeleteFileRequestArgs.h │ │ │ │ ├── DBFILEREQUESTSDeleteFileRequestError.h │ │ │ │ ├── DBFILEREQUESTSDeleteFileRequestsResult.h │ │ │ │ ├── DBFILEREQUESTSFileRequest.h │ │ │ │ ├── DBFILEREQUESTSFileRequestDeadline.h │ │ │ │ ├── DBFILEREQUESTSFileRequestError.h │ │ │ │ ├── DBFILEREQUESTSGeneralFileRequestsError.h │ │ │ │ ├── DBFILEREQUESTSGetFileRequestArgs.h │ │ │ │ ├── DBFILEREQUESTSGetFileRequestError.h │ │ │ │ ├── DBFILEREQUESTSGracePeriod.h │ │ │ │ ├── DBFILEREQUESTSListFileRequestsArg.h │ │ │ │ ├── DBFILEREQUESTSListFileRequestsContinueArg.h │ │ │ │ ├── DBFILEREQUESTSListFileRequestsContinueError.h │ │ │ │ ├── DBFILEREQUESTSListFileRequestsError.h │ │ │ │ ├── DBFILEREQUESTSListFileRequestsResult.h │ │ │ │ ├── DBFILEREQUESTSListFileRequestsV2Result.h │ │ │ │ ├── DBFILEREQUESTSUpdateFileRequestArgs.h │ │ │ │ ├── DBFILEREQUESTSUpdateFileRequestDeadline.h │ │ │ │ └── DBFILEREQUESTSUpdateFileRequestError.h │ │ ├── Files │ │ │ ├── DBFilesObjects.m │ │ │ └── Headers │ │ │ │ ├── DBFILESAddTagArg.h │ │ │ │ ├── DBFILESAddTagError.h │ │ │ │ ├── DBFILESAlphaGetMetadataArg.h │ │ │ │ ├── DBFILESAlphaGetMetadataError.h │ │ │ │ ├── DBFILESBaseTagError.h │ │ │ │ ├── DBFILESCommitInfo.h │ │ │ │ ├── DBFILESCommitInfoWithProperties.h │ │ │ │ ├── DBFILESContentSyncSetting.h │ │ │ │ ├── DBFILESContentSyncSettingArg.h │ │ │ │ ├── DBFILESCreateFolderArg.h │ │ │ │ ├── DBFILESCreateFolderBatchArg.h │ │ │ │ ├── DBFILESCreateFolderBatchError.h │ │ │ │ ├── DBFILESCreateFolderBatchJobStatus.h │ │ │ │ ├── DBFILESCreateFolderBatchLaunch.h │ │ │ │ ├── DBFILESCreateFolderBatchResult.h │ │ │ │ ├── DBFILESCreateFolderBatchResultEntry.h │ │ │ │ ├── DBFILESCreateFolderEntryError.h │ │ │ │ ├── DBFILESCreateFolderEntryResult.h │ │ │ │ ├── DBFILESCreateFolderError.h │ │ │ │ ├── DBFILESCreateFolderResult.h │ │ │ │ ├── DBFILESDeleteArg.h │ │ │ │ ├── DBFILESDeleteBatchArg.h │ │ │ │ ├── DBFILESDeleteBatchError.h │ │ │ │ ├── DBFILESDeleteBatchJobStatus.h │ │ │ │ ├── DBFILESDeleteBatchLaunch.h │ │ │ │ ├── DBFILESDeleteBatchResult.h │ │ │ │ ├── DBFILESDeleteBatchResultData.h │ │ │ │ ├── DBFILESDeleteBatchResultEntry.h │ │ │ │ ├── DBFILESDeleteError.h │ │ │ │ ├── DBFILESDeleteResult.h │ │ │ │ ├── DBFILESDeletedMetadata.h │ │ │ │ ├── DBFILESDimensions.h │ │ │ │ ├── DBFILESDownloadArg.h │ │ │ │ ├── DBFILESDownloadError.h │ │ │ │ ├── DBFILESDownloadZipArg.h │ │ │ │ ├── DBFILESDownloadZipError.h │ │ │ │ ├── DBFILESDownloadZipResult.h │ │ │ │ ├── DBFILESExportArg.h │ │ │ │ ├── DBFILESExportError.h │ │ │ │ ├── DBFILESExportInfo.h │ │ │ │ ├── DBFILESExportMetadata.h │ │ │ │ ├── DBFILESExportResult.h │ │ │ │ ├── DBFILESFileCategory.h │ │ │ │ ├── DBFILESFileLock.h │ │ │ │ ├── DBFILESFileLockContent.h │ │ │ │ ├── DBFILESFileLockMetadata.h │ │ │ │ ├── DBFILESFileMetadata.h │ │ │ │ ├── DBFILESFileOpsResult.h │ │ │ │ ├── DBFILESFileSharingInfo.h │ │ │ │ ├── DBFILESFileStatus.h │ │ │ │ ├── DBFILESFolderMetadata.h │ │ │ │ ├── DBFILESFolderSharingInfo.h │ │ │ │ ├── DBFILESGetCopyReferenceArg.h │ │ │ │ ├── DBFILESGetCopyReferenceError.h │ │ │ │ ├── DBFILESGetCopyReferenceResult.h │ │ │ │ ├── DBFILESGetMetadataArg.h │ │ │ │ ├── DBFILESGetMetadataError.h │ │ │ │ ├── DBFILESGetTagsArg.h │ │ │ │ ├── DBFILESGetTagsResult.h │ │ │ │ ├── DBFILESGetTemporaryLinkArg.h │ │ │ │ ├── DBFILESGetTemporaryLinkError.h │ │ │ │ ├── DBFILESGetTemporaryLinkResult.h │ │ │ │ ├── DBFILESGetTemporaryUploadLinkArg.h │ │ │ │ ├── DBFILESGetTemporaryUploadLinkResult.h │ │ │ │ ├── DBFILESGetThumbnailBatchArg.h │ │ │ │ ├── DBFILESGetThumbnailBatchError.h │ │ │ │ ├── DBFILESGetThumbnailBatchResult.h │ │ │ │ ├── DBFILESGetThumbnailBatchResultData.h │ │ │ │ ├── DBFILESGetThumbnailBatchResultEntry.h │ │ │ │ ├── DBFILESGpsCoordinates.h │ │ │ │ ├── DBFILESHighlightSpan.h │ │ │ │ ├── DBFILESImportFormat.h │ │ │ │ ├── DBFILESListFolderArg.h │ │ │ │ ├── DBFILESListFolderContinueArg.h │ │ │ │ ├── DBFILESListFolderContinueError.h │ │ │ │ ├── DBFILESListFolderError.h │ │ │ │ ├── DBFILESListFolderGetLatestCursorResult.h │ │ │ │ ├── DBFILESListFolderLongpollArg.h │ │ │ │ ├── DBFILESListFolderLongpollError.h │ │ │ │ ├── DBFILESListFolderLongpollResult.h │ │ │ │ ├── DBFILESListFolderResult.h │ │ │ │ ├── DBFILESListRevisionsArg.h │ │ │ │ ├── DBFILESListRevisionsError.h │ │ │ │ ├── DBFILESListRevisionsMode.h │ │ │ │ ├── DBFILESListRevisionsResult.h │ │ │ │ ├── DBFILESLockConflictError.h │ │ │ │ ├── DBFILESLockFileArg.h │ │ │ │ ├── DBFILESLockFileBatchArg.h │ │ │ │ ├── DBFILESLockFileBatchResult.h │ │ │ │ ├── DBFILESLockFileError.h │ │ │ │ ├── DBFILESLockFileResult.h │ │ │ │ ├── DBFILESLockFileResultEntry.h │ │ │ │ ├── DBFILESLookupError.h │ │ │ │ ├── DBFILESMediaInfo.h │ │ │ │ ├── DBFILESMediaMetadata.h │ │ │ │ ├── DBFILESMetadata.h │ │ │ │ ├── DBFILESMetadataV2.h │ │ │ │ ├── DBFILESMinimalFileLinkMetadata.h │ │ │ │ ├── DBFILESMoveBatchArg.h │ │ │ │ ├── DBFILESMoveIntoVaultError.h │ │ │ │ ├── DBFILESPaperContentError.h │ │ │ │ ├── DBFILESPaperCreateArg.h │ │ │ │ ├── DBFILESPaperCreateError.h │ │ │ │ ├── DBFILESPaperCreateResult.h │ │ │ │ ├── DBFILESPaperDocUpdatePolicy.h │ │ │ │ ├── DBFILESPaperUpdateArg.h │ │ │ │ ├── DBFILESPaperUpdateError.h │ │ │ │ ├── DBFILESPaperUpdateResult.h │ │ │ │ ├── DBFILESPathOrLink.h │ │ │ │ ├── DBFILESPathToTags.h │ │ │ │ ├── DBFILESPhotoMetadata.h │ │ │ │ ├── DBFILESPreviewArg.h │ │ │ │ ├── DBFILESPreviewError.h │ │ │ │ ├── DBFILESPreviewResult.h │ │ │ │ ├── DBFILESRelocationArg.h │ │ │ │ ├── DBFILESRelocationBatchArg.h │ │ │ │ ├── DBFILESRelocationBatchArgBase.h │ │ │ │ ├── DBFILESRelocationBatchError.h │ │ │ │ ├── DBFILESRelocationBatchErrorEntry.h │ │ │ │ ├── DBFILESRelocationBatchJobStatus.h │ │ │ │ ├── DBFILESRelocationBatchLaunch.h │ │ │ │ ├── DBFILESRelocationBatchResult.h │ │ │ │ ├── DBFILESRelocationBatchResultData.h │ │ │ │ ├── DBFILESRelocationBatchResultEntry.h │ │ │ │ ├── DBFILESRelocationBatchV2JobStatus.h │ │ │ │ ├── DBFILESRelocationBatchV2Launch.h │ │ │ │ ├── DBFILESRelocationBatchV2Result.h │ │ │ │ ├── DBFILESRelocationError.h │ │ │ │ ├── DBFILESRelocationPath.h │ │ │ │ ├── DBFILESRelocationResult.h │ │ │ │ ├── DBFILESRemoveTagArg.h │ │ │ │ ├── DBFILESRemoveTagError.h │ │ │ │ ├── DBFILESRestoreArg.h │ │ │ │ ├── DBFILESRestoreError.h │ │ │ │ ├── DBFILESSaveCopyReferenceArg.h │ │ │ │ ├── DBFILESSaveCopyReferenceError.h │ │ │ │ ├── DBFILESSaveCopyReferenceResult.h │ │ │ │ ├── DBFILESSaveUrlArg.h │ │ │ │ ├── DBFILESSaveUrlError.h │ │ │ │ ├── DBFILESSaveUrlJobStatus.h │ │ │ │ ├── DBFILESSaveUrlResult.h │ │ │ │ ├── DBFILESSearchArg.h │ │ │ │ ├── DBFILESSearchError.h │ │ │ │ ├── DBFILESSearchMatch.h │ │ │ │ ├── DBFILESSearchMatchFieldOptions.h │ │ │ │ ├── DBFILESSearchMatchType.h │ │ │ │ ├── DBFILESSearchMatchTypeV2.h │ │ │ │ ├── DBFILESSearchMatchV2.h │ │ │ │ ├── DBFILESSearchMode.h │ │ │ │ ├── DBFILESSearchOptions.h │ │ │ │ ├── DBFILESSearchOrderBy.h │ │ │ │ ├── DBFILESSearchResult.h │ │ │ │ ├── DBFILESSearchV2Arg.h │ │ │ │ ├── DBFILESSearchV2ContinueArg.h │ │ │ │ ├── DBFILESSearchV2Result.h │ │ │ │ ├── DBFILESSharedLink.h │ │ │ │ ├── DBFILESSharedLinkFileInfo.h │ │ │ │ ├── DBFILESSharingInfo.h │ │ │ │ ├── DBFILESSingleUserLock.h │ │ │ │ ├── DBFILESSymlinkInfo.h │ │ │ │ ├── DBFILESSyncSetting.h │ │ │ │ ├── DBFILESSyncSettingArg.h │ │ │ │ ├── DBFILESSyncSettingsError.h │ │ │ │ ├── DBFILESTag.h │ │ │ │ ├── DBFILESThumbnailArg.h │ │ │ │ ├── DBFILESThumbnailError.h │ │ │ │ ├── DBFILESThumbnailFormat.h │ │ │ │ ├── DBFILESThumbnailMode.h │ │ │ │ ├── DBFILESThumbnailSize.h │ │ │ │ ├── DBFILESThumbnailV2Arg.h │ │ │ │ ├── DBFILESThumbnailV2Error.h │ │ │ │ ├── DBFILESUnlockFileArg.h │ │ │ │ ├── DBFILESUnlockFileBatchArg.h │ │ │ │ ├── DBFILESUploadError.h │ │ │ │ ├── DBFILESUploadErrorWithProperties.h │ │ │ │ ├── DBFILESUploadSessionAppendArg.h │ │ │ │ ├── DBFILESUploadSessionCursor.h │ │ │ │ ├── DBFILESUploadSessionFinishArg.h │ │ │ │ ├── DBFILESUploadSessionFinishBatchArg.h │ │ │ │ ├── DBFILESUploadSessionFinishBatchJobStatus.h │ │ │ │ ├── DBFILESUploadSessionFinishBatchLaunch.h │ │ │ │ ├── DBFILESUploadSessionFinishBatchResult.h │ │ │ │ ├── DBFILESUploadSessionFinishBatchResultEntry.h │ │ │ │ ├── DBFILESUploadSessionFinishError.h │ │ │ │ ├── DBFILESUploadSessionLookupError.h │ │ │ │ ├── DBFILESUploadSessionOffsetError.h │ │ │ │ ├── DBFILESUploadSessionStartArg.h │ │ │ │ ├── DBFILESUploadSessionStartError.h │ │ │ │ ├── DBFILESUploadSessionStartResult.h │ │ │ │ ├── DBFILESUploadSessionType.h │ │ │ │ ├── DBFILESUploadWriteFailed.h │ │ │ │ ├── DBFILESUserGeneratedTag.h │ │ │ │ ├── DBFILESVideoMetadata.h │ │ │ │ ├── DBFILESWriteConflictError.h │ │ │ │ ├── DBFILESWriteError.h │ │ │ │ └── DBFILESWriteMode.h │ │ ├── SecondaryEmails │ │ │ ├── DBSecondaryEmailsObjects.m │ │ │ └── Headers │ │ │ │ └── DBSECONDARYEMAILSSecondaryEmail.h │ │ ├── SeenState │ │ │ ├── DBSeenStateObjects.m │ │ │ └── Headers │ │ │ │ └── DBSEENSTATEPlatformType.h │ │ └── UsersCommon │ │ │ ├── DBUsersCommonObjects.m │ │ │ └── Headers │ │ │ └── DBUSERSCOMMONAccountType.h │ ├── Client │ │ ├── DBAppBaseClient.h │ │ ├── DBAppBaseClient.m │ │ ├── DBUserBaseClient.h │ │ └── DBUserBaseClient.m │ ├── DBSDKImportsGenerated.h │ ├── Resources │ │ ├── DBSerializableProtocol.h │ │ ├── DBStoneBase.h │ │ ├── DBStoneBase.m │ │ ├── DBStoneSerializers.h │ │ ├── DBStoneSerializers.m │ │ ├── DBStoneValidators.h │ │ └── DBStoneValidators.m │ └── Routes │ │ ├── DBACCOUNTUserAuthRoutes.h │ │ ├── DBACCOUNTUserAuthRoutes.m │ │ ├── DBAUTHAppAuthRoutes.h │ │ ├── DBAUTHAppAuthRoutes.m │ │ ├── DBAUTHUserAuthRoutes.h │ │ ├── DBAUTHUserAuthRoutes.m │ │ ├── DBCHECKAppAuthRoutes.h │ │ ├── DBCHECKAppAuthRoutes.m │ │ ├── DBCHECKUserAuthRoutes.h │ │ ├── DBCHECKUserAuthRoutes.m │ │ ├── DBCONTACTSUserAuthRoutes.h │ │ ├── DBCONTACTSUserAuthRoutes.m │ │ ├── DBFILEPROPERTIESTeamAuthRoutes.h │ │ ├── DBFILEPROPERTIESTeamAuthRoutes.m │ │ ├── DBFILEPROPERTIESUserAuthRoutes.h │ │ ├── DBFILEPROPERTIESUserAuthRoutes.m │ │ ├── DBFILEREQUESTSUserAuthRoutes.h │ │ ├── DBFILEREQUESTSUserAuthRoutes.m │ │ ├── DBFILESAppAuthRoutes.h │ │ ├── DBFILESAppAuthRoutes.m │ │ ├── DBFILESUserAuthRoutes.h │ │ ├── DBFILESUserAuthRoutes.m │ │ └── RouteObjects │ │ ├── DBACCOUNTRouteObjects.h │ │ ├── DBACCOUNTRouteObjects.m │ │ ├── DBAUTHRouteObjects.h │ │ ├── DBAUTHRouteObjects.m │ │ ├── DBCHECKRouteObjects.h │ │ ├── DBCHECKRouteObjects.m │ │ ├── DBCONTACTSRouteObjects.h │ │ ├── DBCONTACTSRouteObjects.m │ │ ├── DBFILEPROPERTIESRouteObjects.h │ │ ├── DBFILEPROPERTIESRouteObjects.m │ │ ├── DBFILEREQUESTSRouteObjects.h │ │ ├── DBFILEREQUESTSRouteObjects.m │ │ ├── DBFILESRouteObjects.h │ │ └── DBFILESRouteObjects.m │ └── Handwritten │ ├── DBAppClient.h │ ├── DBAppClient.m │ ├── DBClientsManager.h │ ├── DBClientsManager.m │ ├── DBSDKImportsShared.h │ ├── DBUserClient.h │ ├── DBUserClient.m │ ├── Networking │ ├── DBDelegate.m │ ├── DBGlobalErrorResponseHandler.h │ ├── DBGlobalErrorResponseHandler.m │ ├── DBHandlerTypes.h │ ├── DBRequestErrors.h │ ├── DBRequestErrors.m │ ├── DBSDKReachability.m │ ├── DBSessionData.m │ ├── DBTasks.h │ ├── DBTasks.m │ ├── DBTasksImpl.m │ ├── DBTasksStorage.h │ ├── DBTasksStorage.m │ ├── DBTransportBaseClient.h │ ├── DBTransportBaseClient.m │ ├── DBTransportBaseConfig.h │ ├── DBTransportBaseConfig.m │ ├── DBTransportBaseHostnameConfig.h │ ├── DBTransportBaseHostnameConfig.m │ ├── DBTransportClientProtocol.h │ ├── DBTransportDefaultClient.h │ ├── DBTransportDefaultClient.m │ ├── DBTransportDefaultConfig.h │ ├── DBTransportDefaultConfig.m │ ├── DBURLSessionTaskResponseBlockWrapper.m │ └── DBURLSessionTaskWithTokenRefresh.m │ ├── OAuth │ ├── DBAccessToken+NSSecureCoding.m │ ├── DBAccessTokenProvider.h │ ├── DBAccessTokenProviderImpl.m │ ├── DBLoadingStatusDelegate.h │ ├── DBOAuthConstants.m │ ├── DBOAuthManager.h │ ├── DBOAuthManager.m │ ├── DBOAuthPKCESession.m │ ├── DBOAuthResult.h │ ├── DBOAuthResult.m │ ├── DBOAuthResultCompletion.h │ ├── DBOAuthTokenRequest.m │ ├── DBOAuthUtils.m │ ├── DBSDKKeychain.h │ ├── DBSDKKeychain.m │ ├── DBScopeRequest.h │ ├── DBScopeRequest.m │ └── DBSharedApplicationProtocol.h │ └── Resources │ ├── DBChunkInputStream.m │ ├── DBCustomDatatypes.h │ ├── DBCustomDatatypes.m │ ├── DBCustomRoutes.h │ ├── DBCustomRoutes.m │ ├── DBCustomTasks.h │ ├── DBCustomTasks.m │ ├── DBSDKConstants.h │ └── DBSDKConstants.m ├── TestObjectiveDropbox ├── IntegrationTests │ ├── TestAppType.h │ ├── TestClasses.h │ ├── TestClasses.m │ ├── TestData.h │ └── TestData.m ├── Podfile ├── Podfile.lock ├── TestObjectiveDropbox.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── TestObjectiveDropbox_iOS.xcscheme │ │ └── TestObjectiveDropbox_macOS.xcscheme ├── TestObjectiveDropbox_iOS │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── TestObjectiveDropbox_iOS.entitlements │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── TestObjectiveDropbox_iOSTests │ ├── FileRoutesTests.m │ ├── Info.plist │ ├── TeamRoutesTests.m │ ├── TestAuthTokenGenerator.h │ └── TestAuthTokenGenerator.m ├── TestObjectiveDropbox_macOS │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m └── TestObjectiveDropbox_macOSTests │ └── Info.plist ├── generate_base_client.py ├── update_repo_check.sh └── update_version.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | ## Build generated 3 | build/ 4 | DerivedData/ 5 | xcuserdata/ 6 | 7 | ## Various settings 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | 17 | ## Other 18 | *.moved-aside 19 | *.xcuserstate 20 | *.xcworkspace 21 | 22 | # macOS 23 | *.DS_Store 24 | 25 | # Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | # CocoaPods 32 | Pods/ 33 | 34 | # Carthage 35 | Carthage/ 36 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "stone"] 2 | path = stone 3 | url = https://github.com/dropbox/stone.git 4 | [submodule "spec"] 5 | path = spec 6 | url = https://github.com/dropbox/dropbox-api-spec.git 7 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CarthageProject/DBRoulette/Cartfile: -------------------------------------------------------------------------------- 1 | # ObjectiveDropboxOfficial 2 | github "https://github.com/dropbox/dropbox-sdk-obj-c" ~> 6.0.0 -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CarthageProject/DBRoulette/Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "dropbox/dropbox-sdk-obj-c" "6.0.0" 2 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CarthageProject/DBRoulette/DBRoulette/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DBRoulette 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface AppDelegate : UIResponder 11 | 12 | @property(strong, nonatomic) UIWindow *window; 13 | 14 | @property(nonatomic) BOOL authSuccessful; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CarthageProject/DBRoulette/DBRoulette/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CarthageProject/DBRoulette/DBRoulette/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CarthageProject/DBRoulette/DBRoulette/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleURLTypes 6 | 7 | 8 | CFBundleURLSchemes 9 | 10 | db-<APP_KEY> 11 | 12 | CFBundleURLName 13 | 14 | 15 | 16 | LSApplicationQueriesSchemes 17 | 18 | dbapi-2 19 | dbapi-8-emm 20 | 21 | CFBundleDevelopmentRegion 22 | en 23 | CFBundleExecutable 24 | $(EXECUTABLE_NAME) 25 | CFBundleIdentifier 26 | $(PRODUCT_BUNDLE_IDENTIFIER) 27 | CFBundleInfoDictionaryVersion 28 | 6.0 29 | CFBundleName 30 | $(PRODUCT_NAME) 31 | CFBundlePackageType 32 | APPL 33 | CFBundleShortVersionString 34 | 1.0 35 | CFBundleSignature 36 | ???? 37 | CFBundleVersion 38 | 1 39 | LSRequiresIPhoneOS 40 | 41 | UILaunchStoryboardName 42 | LaunchScreen 43 | UIMainStoryboardFile 44 | Main 45 | UIRequiredDeviceCapabilities 46 | 47 | armv7 48 | 49 | UISupportedInterfaceOrientations 50 | 51 | UIInterfaceOrientationPortrait 52 | UIInterfaceOrientationLandscapeLeft 53 | UIInterfaceOrientationLandscapeRight 54 | 55 | UISupportedInterfaceOrientations~ipad 56 | 57 | UIInterfaceOrientationPortrait 58 | UIInterfaceOrientationPortraitUpsideDown 59 | UIInterfaceOrientationLandscapeLeft 60 | UIInterfaceOrientationLandscapeRight 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CarthageProject/DBRoulette/DBRoulette/PhotoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PhotoViewController.h 3 | // DBRoulette 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface PhotoViewController : UIViewController 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CarthageProject/DBRoulette/DBRoulette/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // DBRoulette 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | static BOOL showPhotoView = NO; 11 | 12 | @interface ViewController : UIViewController 13 | 14 | @property (nonatomic) BOOL authSuccessful; 15 | 16 | - (void)checkButtons; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CarthageProject/DBRoulette/DBRoulette/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DBRoulette 4 | // 5 | // Created by Stephen Cobbe on 9/13/16. 6 | // Copyright © 2016 Dropbox. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/DBRoulette/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DBRoulette 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface AppDelegate : UIResponder 11 | 12 | @property(strong, nonatomic) UIWindow *window; 13 | 14 | @property(nonatomic) BOOL authSuccessful; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/DBRoulette/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/DBRoulette/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/DBRoulette/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleURLTypes 6 | 7 | 8 | CFBundleURLSchemes 9 | 10 | db-<APP_KEY> 11 | 12 | CFBundleURLName 13 | 14 | 15 | 16 | LSApplicationQueriesSchemes 17 | 18 | dbapi-2 19 | dbapi-8-emm 20 | 21 | CFBundleDevelopmentRegion 22 | en 23 | CFBundleExecutable 24 | $(EXECUTABLE_NAME) 25 | CFBundleIdentifier 26 | $(PRODUCT_BUNDLE_IDENTIFIER) 27 | CFBundleInfoDictionaryVersion 28 | 6.0 29 | CFBundleName 30 | $(PRODUCT_NAME) 31 | CFBundlePackageType 32 | APPL 33 | CFBundleShortVersionString 34 | 1.0 35 | CFBundleSignature 36 | ???? 37 | CFBundleVersion 38 | 1 39 | LSRequiresIPhoneOS 40 | 41 | UILaunchStoryboardName 42 | LaunchScreen 43 | UIMainStoryboardFile 44 | Main 45 | UIRequiredDeviceCapabilities 46 | 47 | armv7 48 | 49 | UISupportedInterfaceOrientations 50 | 51 | UIInterfaceOrientationPortrait 52 | UIInterfaceOrientationLandscapeLeft 53 | UIInterfaceOrientationLandscapeRight 54 | 55 | UISupportedInterfaceOrientations~ipad 56 | 57 | UIInterfaceOrientationPortrait 58 | UIInterfaceOrientationPortraitUpsideDown 59 | UIInterfaceOrientationLandscapeLeft 60 | UIInterfaceOrientationLandscapeRight 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/DBRoulette/PhotoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PhotoViewController.h 3 | // DBRoulette 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface PhotoViewController : UIViewController 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/DBRoulette/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // DBRoulette 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | static BOOL showPhotoView = NO; 11 | 12 | @interface ViewController : UIViewController 13 | 14 | @property (nonatomic) BOOL authSuccessful; 15 | 16 | - (void)checkButtons; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/DBRoulette/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DBRoulette 4 | // 5 | // Created by Stephen Cobbe on 9/5/16. 6 | // Copyright © 2016 Dropbox. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import 11 | 12 | int main(int argc, char *argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/Podfile: -------------------------------------------------------------------------------- 1 | target 'DBRoulette' do 2 | pod 'ObjectiveDropboxOfficial' 3 | end -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ObjectiveDropboxOfficial (6.0.0) 3 | 4 | DEPENDENCIES: 5 | - ObjectiveDropboxOfficial 6 | 7 | SPEC REPOS: 8 | trunk: 9 | - ObjectiveDropboxOfficial 10 | 11 | SPEC CHECKSUMS: 12 | ObjectiveDropboxOfficial: bca5b00db1989dd1999c04a70ac4f5e782cc1e54 13 | 14 | PODFILE CHECKSUM: 4d2f0f91f48989221c9f8ec5525875a7a6320274 15 | 16 | COCOAPODS: 1.10.1 17 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/SubprojectProject/DBRoulette/Cartfile: -------------------------------------------------------------------------------- 1 | # ObjectiveDropboxOfficial 2 | github "https://github.com/dropbox/dropbox-sdk-obj-c" ~> 6.0.0 -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/SubprojectProject/DBRoulette/Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "dropbox/dropbox-sdk-obj-c" "6.0.0" 2 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/SubprojectProject/DBRoulette/DBRoulette/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DBRoulette 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface AppDelegate : UIResponder 11 | 12 | @property(strong, nonatomic) UIWindow *window; 13 | 14 | @property(nonatomic) BOOL authSuccessful; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/SubprojectProject/DBRoulette/DBRoulette/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/SubprojectProject/DBRoulette/DBRoulette/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/SubprojectProject/DBRoulette/DBRoulette/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleURLTypes 6 | 7 | 8 | CFBundleURLSchemes 9 | 10 | db-<APP_KEY> 11 | 12 | CFBundleURLName 13 | 14 | 15 | 16 | LSApplicationQueriesSchemes 17 | 18 | dbapi-2 19 | dbapi-8-emm 20 | 21 | CFBundleDevelopmentRegion 22 | en 23 | CFBundleExecutable 24 | $(EXECUTABLE_NAME) 25 | CFBundleIdentifier 26 | $(PRODUCT_BUNDLE_IDENTIFIER) 27 | CFBundleInfoDictionaryVersion 28 | 6.0 29 | CFBundleName 30 | $(PRODUCT_NAME) 31 | CFBundlePackageType 32 | APPL 33 | CFBundleShortVersionString 34 | 1.0 35 | CFBundleSignature 36 | ???? 37 | CFBundleVersion 38 | 1 39 | LSRequiresIPhoneOS 40 | 41 | UILaunchStoryboardName 42 | LaunchScreen 43 | UIMainStoryboardFile 44 | Main 45 | UIRequiredDeviceCapabilities 46 | 47 | armv7 48 | 49 | UISupportedInterfaceOrientations 50 | 51 | UIInterfaceOrientationPortrait 52 | UIInterfaceOrientationLandscapeLeft 53 | UIInterfaceOrientationLandscapeRight 54 | 55 | UISupportedInterfaceOrientations~ipad 56 | 57 | UIInterfaceOrientationPortrait 58 | UIInterfaceOrientationPortraitUpsideDown 59 | UIInterfaceOrientationLandscapeLeft 60 | UIInterfaceOrientationLandscapeRight 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/SubprojectProject/DBRoulette/DBRoulette/PhotoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PhotoViewController.h 3 | // DBRoulette 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface PhotoViewController : UIViewController 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/SubprojectProject/DBRoulette/DBRoulette/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // DBRoulette 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | static BOOL showPhotoView = NO; 11 | 12 | @interface ViewController : UIViewController 13 | 14 | @property (nonatomic) BOOL authSuccessful; 15 | 16 | - (void)checkButtons; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Examples/DBRoulette/iOS/SubprojectProject/DBRoulette/DBRoulette/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DBRoulette 4 | // 5 | // Created by Stephen Cobbe on 9/13/16. 6 | // Copyright © 2016 Dropbox. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Examples/DBRoulette/macOS/CarthageProject/DBRoulette/Cartfile: -------------------------------------------------------------------------------- 1 | # ObjectiveDropboxOfficial 2 | github "https://github.com/dropbox/dropbox-sdk-obj-c" ~> 6.0.0 -------------------------------------------------------------------------------- /Examples/DBRoulette/macOS/CarthageProject/DBRoulette/Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "dropbox/dropbox-sdk-obj-c" "6.0.0" 2 | -------------------------------------------------------------------------------- /Examples/DBRoulette/macOS/CarthageProject/DBRoulette/DBRoulette/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DBRoulette 4 | // 5 | // Created by Stephen Cobbe on 2/27/17. 6 | // Copyright © 2017 Dropbox. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Examples/DBRoulette/macOS/CarthageProject/DBRoulette/DBRoulette/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /Examples/DBRoulette/macOS/CarthageProject/DBRoulette/DBRoulette/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LSApplicationQueriesSchemes 6 | 7 | dbapi-8-emm 8 | dbapi-2 9 | 10 | CFBundleURLTypes 11 | 12 | 13 | CFBundleURLSchemes 14 | 15 | db-<APP_KEY> 16 | 17 | CFBundleURLName 18 | 19 | 20 | 21 | CFBundleDevelopmentRegion 22 | en 23 | CFBundleExecutable 24 | $(EXECUTABLE_NAME) 25 | CFBundleIconFile 26 | 27 | CFBundleIdentifier 28 | $(PRODUCT_BUNDLE_IDENTIFIER) 29 | CFBundleInfoDictionaryVersion 30 | 6.0 31 | CFBundleName 32 | $(PRODUCT_NAME) 33 | CFBundlePackageType 34 | APPL 35 | CFBundleShortVersionString 36 | 1.0 37 | CFBundleVersion 38 | 1 39 | LSMinimumSystemVersion 40 | $(MACOSX_DEPLOYMENT_TARGET) 41 | NSHumanReadableCopyright 42 | Copyright © 2017 Dropbox. All rights reserved. 43 | NSMainStoryboardFile 44 | Main 45 | NSPrincipalClass 46 | NSApplication 47 | 48 | 49 | -------------------------------------------------------------------------------- /Examples/DBRoulette/macOS/CarthageProject/DBRoulette/DBRoulette/PhotoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PhotoViewController.h 3 | // DBRoulette 4 | // 5 | // Created by Stephen Cobbe on 2/27/17. 6 | // Copyright © 2017 Dropbox. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PhotoViewController : NSViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Examples/DBRoulette/macOS/CarthageProject/DBRoulette/DBRoulette/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // DBRoulette 4 | // 5 | // Created by Stephen Cobbe on 2/27/17. 6 | // Copyright © 2017 Dropbox. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : NSViewController 12 | 13 | - (void)checkButtons; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /Examples/DBRoulette/macOS/CarthageProject/DBRoulette/DBRoulette/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DBRoulette 4 | // 5 | // Created by Stephen Cobbe on 2/27/17. 6 | // Copyright © 2017 Dropbox. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /Format/UmbrellaHeader.h: -------------------------------------------------------------------------------- 1 | #import "DBSDKImportsShared.h" 2 | #import "DBSDKImports-iOS.h" 3 | #import "DBSDKImports-macOS.h" 4 | -------------------------------------------------------------------------------- /Format/clang-format: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blankwonder/dropbox-sdk-obj-c/89306b03ce920bf98b8f1d053cadf34d28e56e4c/Format/clang-format -------------------------------------------------------------------------------- /Format/format_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # e.g. `format_files.sh ` 3 | # 4 | 5 | srcs_path=$1 6 | 7 | if [[ "$OSTYPE" == "darwin"* ]]; then 8 | find "$srcs_path" -type f -name "*[.h|.m]" | xargs ./clang-format -i -style=file 9 | fi 10 | -------------------------------------------------------------------------------- /Format/generate_docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Script for generating jazzy docs 3 | 4 | if [ "$#" -ne 2 ]; then 5 | echo "Script requires two arguments: 1. path to docs repo checkout 2. path to updated SDK checkout." 6 | else 7 | sdk_version="$(git describe --abbrev=0 --tags)" 8 | docs_repo_location="$1" 9 | sdk_repo_location="$2" 10 | 11 | echo "Checking doc repo exists..." 12 | 13 | if [ -d $docs_repo_location ]; then 14 | if [ -d $sdk_repo_location ]; then 15 | docs_location="$docs_repo_location/api-docs/$sdk_version" 16 | tmp_location="$docs_repo_location/api-docs/all_sdk_files" 17 | if [ -d $docs_location ]; then 18 | rm -rf $docs_location 19 | fi 20 | 21 | mkdir $docs_location 22 | 23 | if [ -d $tmp_location ]; then 24 | rm -rf $tmp_location 25 | fi 26 | mkdir $tmp_location 27 | 28 | echo "Copying all sdk files to tmp directory..." 29 | find ../Source/ObjectiveDropboxOfficial/ -name \*.[h,m] -exec cp {} $tmp_location \; 30 | cp ../README.md $tmp_location 31 | cp ./UmbrellaHeader.h $tmp_location 32 | 33 | echo "Generating documents..." 34 | jazzy --objc --readme $tmp_location/README.md --umbrella-header $tmp_location/UmbrellaHeader.h --framework-root $tmp_location --config ../.jazzy.json --github_url https://github.com/dropbox/dropbox-sdk-obj-c --module-version $sdk_version --module ObjectiveDropboxOfficial -o $docs_location 35 | 36 | if [ -d $docs_location/css/ ]; then 37 | rm -rf $docs_location/css/ 38 | fi 39 | mkdir $docs_location/css/ 40 | 41 | cp jazzy.css $docs_location/css/ 42 | 43 | echo "Removing tmp sdk files..." 44 | rm -rf $tmp_location 45 | 46 | cd $docs_repo_location/api-docs 47 | rm latest 48 | ln -s $sdk_version latest 49 | cd - 50 | 51 | echo "Finished generating docs to: $docs_repo_location/api-docs." 52 | else 53 | echo "SDK directory does not exist" 54 | fi 55 | else 56 | echo "Docs directory does not exist" 57 | fi 58 | fi 59 | -------------------------------------------------------------------------------- /Format/jazzy.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Dropbox, Inc.", 3 | "skip_undocumented": true, 4 | "custom_categories": [ 5 | { 6 | "name": "Clients", 7 | "children": [ 8 | "DBUserClient", 9 | "DBTeamClient", 10 | "DBAppClient", 11 | "DBClientsManager" 12 | ] 13 | }, 14 | { 15 | "name": "Networking", 16 | "children": [ 17 | "DBTask", 18 | "DBRpcTask", 19 | "DBUploadTask", 20 | "DBDownloadUrlTask", 21 | "DBDownloadDataTask", 22 | "DBRequestError", 23 | "DBRequestHttpError", 24 | "DBRequestBadInputError", 25 | "DBRequestAuthError", 26 | "DBRequestAccessError", 27 | "DBRequestRateLimitError", 28 | "DBRequestInternalServerError", 29 | "DBRequestClientError", 30 | "DBTransportBaseConfig", 31 | "DBTransportDefaultConfig", 32 | "DBGlobalErrorResponseHandler", 33 | "DBTransportBaseClient", 34 | "DBTransportDefaultClient", 35 | "DBProgressBlock", 36 | "DBBatchUploadResponseBlock", 37 | "DBTasksStorage" 38 | ] 39 | }, 40 | { 41 | "name": "Custom", 42 | "children": [ 43 | "DBBatchUploadData", 44 | "DBBatchUploadTask" 45 | ] 46 | }, 47 | { 48 | "name": "OAuth", 49 | "children": [ 50 | "DBOAuthMobileManager", 51 | "DBOAuthManager", 52 | "DBAccessToken", 53 | "DBOAuthResult", 54 | "DBMobileSharedApplication", 55 | "DBDesktopSharedApplication", 56 | "DBSharedApplication" 57 | ] 58 | }, 59 | { 60 | "name": "Serializers", 61 | "children": [ 62 | "DBArraySerializer", 63 | "DBNSDateSerializer" 64 | ] 65 | }, 66 | { 67 | "name": "Union Tags", 68 | "children": [ 69 | "DBOAuthErrorType", 70 | "DBOAuthResultTag", 71 | "DBRequestErrorTag" 72 | ] 73 | }, 74 | { 75 | "name": "Route Objects", 76 | "children": [] 77 | } 78 | ], 79 | "author_url": "https://dropbox.com/developers", 80 | "hide_documentation_coverage": true 81 | } 82 | -------------------------------------------------------------------------------- /Images/DBRouletteAuthView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blankwonder/dropbox-sdk-obj-c/89306b03ce920bf98b8f1d053cadf34d28e56e4c/Images/DBRouletteAuthView.png -------------------------------------------------------------------------------- /Images/DBRouletteAuthViewMacOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blankwonder/dropbox-sdk-obj-c/89306b03ce920bf98b8f1d053cadf34d28e56e4c/Images/DBRouletteAuthViewMacOS.png -------------------------------------------------------------------------------- /Images/DBRouletteView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blankwonder/dropbox-sdk-obj-c/89306b03ce920bf98b8f1d053cadf34d28e56e4c/Images/DBRouletteView.png -------------------------------------------------------------------------------- /Images/DBRouletteViewMacOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blankwonder/dropbox-sdk-obj-c/89306b03ce920bf98b8f1d053cadf34d28e56e4c/Images/DBRouletteViewMacOS.png -------------------------------------------------------------------------------- /Images/InfoPlistExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blankwonder/dropbox-sdk-obj-c/89306b03ce920bf98b8f1d053cadf34d28e56e4c/Images/InfoPlistExample.png -------------------------------------------------------------------------------- /Images/OAuthFlowApproval.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blankwonder/dropbox-sdk-obj-c/89306b03ce920bf98b8f1d053cadf34d28e56e4c/Images/OAuthFlowApproval.png -------------------------------------------------------------------------------- /Images/OAuthFlowInit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blankwonder/dropbox-sdk-obj-c/89306b03ce920bf98b8f1d053cadf34d28e56e4c/Images/OAuthFlowInit.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2021 Dropbox Inc., http://www.dropbox.com/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /ObjectiveDropboxOfficial.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'ObjectiveDropboxOfficial' 3 | s.version = '6.2.3' 4 | s.summary = 'Dropbox Objective C SDK for APIv2' 5 | s.homepage = 'https://www.dropbox.com/developers' 6 | s.license = 'MIT' 7 | s.author = { 'Stephen Cobbe' => 'scobbe@dropbox.com' } 8 | s.source = { :git => 'https://github.com/dropbox/dropbox-sdk-obj-c.git', :tag => s.version } 9 | 10 | s.source_files = 'Source/ObjectiveDropboxOfficial/Shared/**/*.{h,m}', 'Source/ObjectiveDropboxOfficial/Headers/**/*.h' 11 | s.osx.source_files = 'Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_macOS/**/*.{h,m}' 12 | s.ios.source_files = 'Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_iOS/**/*.{h,m}' 13 | 14 | s.requires_arc = true 15 | 16 | s.osx.deployment_target = '10.10' 17 | s.ios.deployment_target = '9.0' 18 | 19 | s.public_header_files = 'Source/ObjectiveDropboxOfficial/Shared/**/*.h', 'Source/ObjectiveDropboxOfficial/Headers/Umbrella/*.h' 20 | s.osx.public_header_files = 'Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_macOS/**/*.h' 21 | s.ios.public_header_files = 'Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_iOS/**/*.h' 22 | 23 | s.osx.frameworks = 'AppKit', 'SystemConfiguration', 'Foundation' 24 | s.ios.frameworks = 'UIKit', 'SafariServices', 'SystemConfiguration', 'Foundation' 25 | end 26 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/DBClientsManager+Protected.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | #import "DBClientsManager.h" 8 | 9 | @class DBOAuthManager; 10 | @class DBTransportDefaultConfig; 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface DBClientsManager (Protected) 15 | 16 | + (void)setupWithOAuthManager:(DBOAuthManager *)oAuthManager 17 | transportConfig:(DBTransportDefaultConfig *)transportConfig; 18 | 19 | + (void)setupWithOAuthManagerTeam:(DBOAuthManager *)oAuthManager 20 | transportConfig:(DBTransportDefaultConfig *)transportConfig; 21 | 22 | + (void)setTransportConfig:(DBTransportDefaultConfig *)transportConfig; 23 | 24 | + (DBTransportDefaultConfig *)transportConfig; 25 | 26 | + (void)setAppKey:(NSString *)appKey; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/Networking/DBGlobalErrorResponseHandler+Internal.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | #import "DBGlobalErrorResponseHandler.h" 8 | 9 | @class DBTask; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface DBGlobalErrorResponseHandler (Internal) 14 | 15 | + (void)executeRegisteredResponseBlocksWithRouteError:(id _Nullable)routeError 16 | networkError:(nullable DBRequestError *)networkError 17 | restartTask:(DBTask *)restartTask; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/Networking/DBHandlerTypesInternal.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// For internal use inside the SDK. 5 | /// 6 | 7 | #import 8 | 9 | @class DBRequestError; 10 | 11 | // Storage blocks 12 | 13 | typedef BOOL (^DBRpcResponseBlockStorage)(NSData *_Nullable, NSURLResponse *_Nullable, NSError *_Nullable); 14 | 15 | typedef BOOL (^DBUploadResponseBlockStorage)(NSData *_Nullable, NSURLResponse *_Nullable, NSError *_Nullable); 16 | 17 | typedef BOOL (^DBDownloadResponseBlockStorage)(NSURL *_Nullable, NSURLResponse *_Nullable, NSError *_Nullable); 18 | 19 | // Internal implementation response blocks 20 | 21 | typedef void (^DBRpcResponseBlockImpl)(id _Nullable, id _Nullable, DBRequestError *_Nullable); 22 | 23 | typedef void (^DBUploadResponseBlockImpl)(id _Nullable, id _Nullable, DBRequestError *_Nullable); 24 | 25 | typedef void (^DBDownloadUrlResponseBlockImpl)(id _Nullable, id _Nullable, DBRequestError *_Nullable, NSURL *_Nullable); 26 | 27 | typedef void (^DBDownloadDataResponseBlockImpl)(id _Nullable, id _Nullable, DBRequestError *_Nullable, 28 | NSData *_Nullable); 29 | typedef void (^DBCleanupBlock)(void); 30 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/Networking/DBSDKReachability.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2016 Apple Inc. All Rights Reserved. 3 | See LICENSE.txt for this sample’s licensing information 4 | 5 | Abstract: 6 | Basic demonstration of how to use the SystemConfiguration Reachablity APIs. 7 | */ 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | typedef enum : NSInteger { DBNotReachable = 0, DBReachableViaWiFi, DBReachableViaWWAN } DBSDKNetworkStatus; 14 | 15 | #pragma mark IPv6 Support 16 | // Reachability fully support IPv6. For full details, see ReadMe.md. 17 | 18 | extern NSString *kDBSDKReachabilityChangedNotification; 19 | 20 | @interface DBSDKReachability : NSObject 21 | 22 | /*! 23 | * Use to check the reachability of a given host name. 24 | */ 25 | + (instancetype)reachabilityWithHostName:(NSString *)hostName; 26 | 27 | /*! 28 | * Use to check the reachability of a given IP address. 29 | */ 30 | + (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress; 31 | 32 | /*! 33 | * Checks whether the default route is available. Should be used by applications that do not connect to a particular 34 | * host. 35 | */ 36 | + (instancetype)reachabilityForInternetConnection; 37 | 38 | #pragma mark reachabilityForLocalWiFi 39 | // reachabilityForLocalWiFi has been removed from the sample. See ReadMe.md for more information. 40 | //+ (instancetype)reachabilityForLocalWiFi; 41 | 42 | /*! 43 | * Start listening for reachability notifications on the current run loop. 44 | */ 45 | - (BOOL)startNotifier; 46 | - (void)stopNotifier; 47 | 48 | - (DBSDKNetworkStatus)currentReachabilityStatus; 49 | 50 | /*! 51 | * WWAN may be available, but not active until a connection has been established. WiFi may require a connection for VPN 52 | * on Demand. 53 | */ 54 | - (BOOL)connectionRequired; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/Networking/DBTasks+Protected.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBHandlerTypesInternal.h" 6 | #import "DBTasks.h" 7 | #import 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | @class DBRoute; 12 | 13 | @interface DBRpcTask (Protected) 14 | 15 | - (DBRpcResponseBlockStorage)storageBlockWithResponseBlock:(DBRpcResponseBlockImpl)responseBlock 16 | cleanupBlock:(DBCleanupBlock)cleanupBlock; 17 | 18 | @end 19 | 20 | @interface DBUploadTask (Protected) 21 | 22 | - (DBUploadResponseBlockStorage)storageBlockWithResponseBlock:(DBUploadResponseBlockImpl)responseBlock 23 | cleanupBlock:(DBCleanupBlock)cleanupBlock; 24 | 25 | @end 26 | 27 | @interface DBDownloadUrlTask (Protected) 28 | 29 | - (DBDownloadResponseBlockStorage)storageBlockWithResponseBlock:(DBDownloadUrlResponseBlockImpl)responseBlock 30 | cleanupBlock:(DBCleanupBlock)cleanupBlock; 31 | 32 | @end 33 | 34 | @interface DBDownloadDataTask (Protected) 35 | 36 | - (DBDownloadResponseBlockStorage)storageBlockWithResponseBlock:(DBDownloadDataResponseBlockImpl)responseBlock 37 | cleanupBlock:(DBCleanupBlock)cleanupBlock; 38 | 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/Networking/DBURLSessionTask.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBHandlerTypes.h" 6 | #import 7 | 8 | @class DBURLSessionTaskResponseBlockWrapper; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | /// Block that creates the actual API request. 13 | typedef NSURLSessionTask *_Nonnull (^DBURLSessionTaskCreationBlock)(void); 14 | 15 | /// Protocol for custom URLSession tasks that are used internally by the DBTask classes. 16 | @protocol DBURLSessionTask 17 | 18 | /// The `NSURLSession` used to make the network request. 19 | @property (nonatomic, readonly) NSURLSession *session; 20 | 21 | /// Creates a new instance with same initial setup. 22 | - (id)duplicate; 23 | 24 | /// Cancels the API request. 25 | - (void)cancel; 26 | 27 | /// Suspends the API request. 28 | - (void)suspend; 29 | 30 | /// Resumes the API request. 31 | - (void)resume; 32 | 33 | /// Sets progress handler for the task. 34 | /// @param progressBlock The `DBProgressBlock` that handles task progress. 35 | /// @param queue An optional operation queue on which to execute progress handler code. If not provided, the handler 36 | /// may be executed on any queue. 37 | - (void)setProgressBlock:(DBProgressBlock)progressBlock queue:(nullable NSOperationQueue *)queue; 38 | 39 | /// Sets response/completion handler for the task. 40 | /// @param responseBlock The `DBURLSessionTaskResponseBlock` that handles task response. 41 | /// @param queue An optional operation queue on which to execute response handler code. If not provided, the handler 42 | /// may be executed on any queue. 43 | - (void)setResponseBlock:(DBURLSessionTaskResponseBlockWrapper *)responseBlock queue:(nullable NSOperationQueue *)queue; 44 | 45 | @end 46 | 47 | NS_ASSUME_NONNULL_END 48 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/Networking/DBURLSessionTaskResponseBlockWrapper.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBHandlerTypesInternal.h" 6 | #import 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | /// Response handler for DBURLSessionTask. 11 | @interface DBURLSessionTaskResponseBlockWrapper : NSObject 12 | 13 | @property (nonatomic, strong, readonly, nullable) DBRpcResponseBlockStorage rpcResponseBlock; 14 | @property (nonatomic, strong, readonly, nullable) DBUploadResponseBlockStorage uploadResponseBlock; 15 | @property (nonatomic, strong, readonly, nullable) DBDownloadResponseBlockStorage downloadResponseBlock; 16 | 17 | /// Handler wrapper for RPC tasks. 18 | + (DBURLSessionTaskResponseBlockWrapper *)withRpcResponseBlock:(DBRpcResponseBlockStorage)responseBlock; 19 | /// Handler wrapper for upload tasks. 20 | + (DBURLSessionTaskResponseBlockWrapper *)withUploadResponseBlock:(DBUploadResponseBlockStorage)responseBlock; 21 | /// Handler wrapper for download tasks. 22 | + (DBURLSessionTaskResponseBlockWrapper *)withDownloadResponseBlock:(DBDownloadResponseBlockStorage)responseBlock; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/Networking/DBURLSessionTaskWithTokenRefresh.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBTasks.h" 6 | #import "DBURLSessionTask.h" 7 | #import 8 | 9 | @protocol DBAccessTokenProvider; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// A class that wraps a network request that calls Dropbox API. 14 | /// This class will first attempt to refresh the access token and conditionally proceed to the actual API call. 15 | @interface DBURLSessionTaskWithTokenRefresh : NSObject 16 | 17 | - (instancetype)init NS_UNAVAILABLE; 18 | 19 | /// Designated Initializer. 20 | /// 21 | /// @param taskCreationBlock The block that creates the actual API request. 22 | /// @param taskDelegate The delegate used manage request handler code. 23 | /// @param urlSession The `NSURLSession` used to make the API network request. 24 | /// @param tokenProvider The `DBAccessTokenProvider` object to perform token refresh. 25 | /// 26 | - (instancetype)initWithTaskCreationBlock:(DBURLSessionTaskCreationBlock)taskCreationBlock 27 | taskDelegate:(nullable DBDelegate *)taskDelegate 28 | urlSession:(NSURLSession *)urlSession 29 | tokenProvider:(id)tokenProvider NS_DESIGNATED_INITIALIZER; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/OAuth/DBAccessToken+NSSecureCoding.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBOAuthManager.h" 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface DBAccessToken (NSSecureCoding) 10 | 11 | /// Attempts to create a DBAccessToken by decoding the given data. 12 | /// @param data The data to decode. 13 | /// @return DBAccessToken object if success, otherwise nil. 14 | + (nullable DBAccessToken *)createTokenFromData:(NSData *)data; 15 | 16 | /// Attempts to convert the given `DBAccessToken` to an `NSData` object. 17 | /// @param token The token to encode. 18 | /// @return NSData object if success, otherwise nil. 19 | + (nullable NSData *)covertTokenToData:(DBAccessToken *)token; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/OAuth/DBAccessTokenProvider+Internal.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBAccessTokenProvider.h" 6 | #import "DBOAuthManager.h" 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | /// Wrapper for legacy long-lived access token. 11 | @interface DBLongLivedAccessTokenProvider : NSObject 12 | 13 | - (instancetype)init NS_UNAVAILABLE; 14 | 15 | /// Designated initializer. 16 | /// 17 | /// @param tokenString An access token string. 18 | - (instancetype)initWithTokenString:(NSString *)tokenString NS_DESIGNATED_INITIALIZER; 19 | 20 | @end 21 | 22 | /// Wrapper for short-lived token. 23 | @interface DBShortLivedAccessTokenProvider : NSObject 24 | 25 | - (instancetype)init NS_UNAVAILABLE; 26 | 27 | /// Designated initializer. 28 | /// 29 | /// @param token A `DBAccessToken` represents a short-lived token. 30 | /// @param tokenRefresher Helper object that refreshes a token over network. 31 | - (instancetype)initWithToken:(DBAccessToken *)token 32 | tokenRefresher:(id)tokenRefresher NS_DESIGNATED_INITIALIZER; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/OAuth/DBOAuthConstants.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | /// Constant strings for keys of URL queries and responses in auth flow. 8 | 9 | extern NSString *const kDBCodeChallengeKey; 10 | extern NSString *const kDBCodeChallengeMethodKey; 11 | extern NSString *const kDBTokenAccessTypeKey; 12 | extern NSString *const kDBResponseTypeKey; 13 | extern NSString *const kDBScopeKey; 14 | extern NSString *const kDBIncludeGrantedScopesKey; 15 | extern NSString *const kDBStateKey; 16 | extern NSString *const kDBExtraQueryParamsKey; 17 | extern NSString *const kDBOauthCodeKey; 18 | extern NSString *const kDBOauthTokenKey; 19 | extern NSString *const kDBOauthSecretKey; 20 | extern NSString *const kDBUidKey; 21 | extern NSString *const kDBErrorKey; 22 | extern NSString *const kDBErrorDescriptionKey; 23 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/OAuth/DBOAuthManager+Protected.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | #import "DBOAuthManager.h" 8 | #import "DBOAuthResultCompletion.h" 9 | 10 | @protocol DBAccessTokenProvider; 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface DBOAuthManager (Protected) 15 | 16 | /// Extracts auth result from the url. 17 | /// @param url The redirect url which may contain auth result data. 18 | /// @param completion The completion block to pass back auth result. 19 | - (void)extractAuthResultFromRedirectURL:(NSURL *)url completion:(DBOAuthCompletion)completion; 20 | 21 | /// Completes the last step of OAuth code flow to exchange an access token with auth code. 22 | /// @param authCode OAuth code from auth response. 23 | /// @param codeVerifier Code verifier generated for the auth flow. 24 | - (void)finishPkceOAuthWithAuthCode:(NSString *)authCode 25 | codeVerifier:(NSString *)codeVerifier 26 | completion:(DBOAuthCompletion)completion; 27 | 28 | /// Creates a `DBAccessTokenProvider` that wraps short-lived token for token refresh 29 | /// or a static access token provider for long-live token. 30 | /// @param token The `DBAccessToken` object. 31 | - (id)accessTokenProviderForToken:(DBAccessToken *)token; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/OAuth/DBOAuthPKCESession.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | @class DBScopeRequest; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /// PKCE data for OAuth 2 Authorization Code Flow. 12 | @interface DBPkceData : NSObject 13 | 14 | // A random string generated for each code flow. 15 | @property (nonatomic, readonly) NSString *codeVerifier; 16 | // A string derived from codeVerifier by using BASE64URL-ENCODE(SHA256(ASCII(code_verifier))). 17 | @property (nonatomic, readonly) NSString *codeChallenge; 18 | // The hash method used to generate codeChallenge. 19 | @property (nonatomic, readonly) NSString *codeChallengeMethod; 20 | 21 | @end 22 | 23 | /// Object that contains all the necessary data of an OAuth 2 Authorization Code Flow with PKCE. 24 | @interface DBOAuthPKCESession : NSObject 25 | 26 | // The scope request for this auth session. 27 | @property (nonatomic, readonly, nullable) DBScopeRequest *scopeRequest; 28 | // PKCE data generated for this auth session. 29 | @property (nonatomic, readonly) DBPkceData *pkceData; 30 | // A string of colon-delimited options/state - used primarily to indicate if the token type to be returned. 31 | @property (nonatomic, readonly) NSString *state; 32 | // Token access type, hardcoded to "offline" to indicate short-lived access token + refresh token. 33 | @property (nonatomic, readonly) NSString *tokenAccessType; 34 | // Type of the auth response, hardcoded to "code" to indicate code flow. 35 | @property (nonatomic, readonly) NSString *responseType; 36 | 37 | - (instancetype)init NS_UNAVAILABLE; 38 | 39 | - (instancetype)initWithScopeRequest:(nullable DBScopeRequest *)scopeRequest NS_DESIGNATED_INITIALIZER; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/OAuth/DBOAuthUtils.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | @class DBOAuthPKCESession; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /// Contains utility methods used in auth flow. e.g. method to construct URL query. 12 | @interface DBOAuthUtils : NSObject 13 | 14 | /// Creates URL query items needed by PKCE code flow. 15 | + (NSArray *)createPkceCodeFlowParamsForAuthSession:(DBOAuthPKCESession *)authSession; 16 | 17 | /// Extracts auth response parameters from URL and removes percent encoding. 18 | /// Response parameters from DAuth via the Dropbox app are in the query component. 19 | + (NSDictionary *)extractDAuthResponseFromUrl:(NSURL *)url; 20 | 21 | /// Extracts auth response parameters from URL and removes percent encoding. 22 | /// Response parameters OAuth 2 code flow (RFC6749 4.1.2) are in the query component. 23 | + (NSDictionary *)extractOAuthResponseFromCodeFlowUrl:(NSURL *)url; 24 | 25 | /// Extracts auth response parameters from URL and removes percent encoding. 26 | /// Response parameters from OAuth 2 token flow (RFC6749 4.2.2) are in the fragment component. 27 | + (NSDictionary *)extractOAuthResponseFromTokenFlowUrl:(NSURL *)url; 28 | 29 | @end 30 | 31 | NS_ASSUME_NONNULL_END 32 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/OAuth/DBScopeRequest+Protected.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBScopeRequest.h" 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface DBScopeRequest (Protected) 10 | 11 | /// String value of DBScopeType. 12 | @property (nonatomic, readonly, copy) NSString *scopeType; 13 | /// Boolean indicating whether to keep all previously granted scopes. 14 | @property (nonatomic, readonly, assign) BOOL includeGrantedScopes; 15 | 16 | /// String representation of the scopes, used in URL query. Nil if no scopes requested. 17 | - (nullable NSString *)scopeString; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/Resources/DBChunkInputStream.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// Copyright (c) 2011 BJ Homer. All rights reserved. 4 | /// 5 | /// Based on example from @bjhomer https://github.com/bjhomer/HSCountingInputStream 6 | /// 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | /// 13 | /// Subclass of `NSInputStream` to enforce "bounds" on file stream, for 14 | /// chunk uploading. 15 | /// 16 | @interface DBChunkInputStream : NSInputStream 17 | 18 | /// 19 | /// DBChunkInputStream full constructor. 20 | /// 21 | /// @param fileUrl The file to stream. 22 | /// @param startBytes The starting position of the file stream, relative 23 | /// to the beginning of the file. 24 | /// @param endBytes The ending position of the file stream, relative 25 | /// to the beginning of the file. 26 | /// 27 | /// @return An initialized DBChunkInputStream instance. 28 | /// 29 | - (instancetype)initWithFileUrl:(NSURL *)fileUrl startBytes:(NSUInteger)startBytes endBytes:(NSUInteger)endBytes; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Internal/Resources/DBSDKSystem.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// Copyright (c) 2011 BJ Homer. All rights reserved. 4 | /// 5 | 6 | /* 7 | * System Versioning Preprocessor Macros 8 | */ 9 | 10 | #define SYSTEM_VERSION_EQUAL_TO(v) \ 11 | ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) 12 | #define SYSTEM_VERSION_GREATER_THAN(v) \ 13 | ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) 14 | #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) \ 15 | ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) 16 | #define SYSTEM_VERSION_LESS_THAN(v) \ 17 | ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) 18 | #define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) \ 19 | ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) 20 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/PlatformInternal/iOS/DBLoadingViewController.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | #import 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | @interface DBLoadingViewController : UIViewController 11 | 12 | - (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE; 13 | 14 | - (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil 15 | bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Umbrella/ObjectiveDropboxOfficial.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Umbrella import for importing as a framework 5 | /// 6 | 7 | #import "TargetConditionals.h" 8 | 9 | #import 10 | #import 11 | 12 | #if TARGET_OS_IPHONE 13 | #import 14 | #import 15 | #elif TARGET_OS_MAC 16 | #import 17 | #import 18 | #endif 19 | 20 | //! Project version number for ObjectiveDropboxOfficial. 21 | FOUNDATION_EXPORT double ObjectiveDropboxOfficialVersionNumber; 22 | 23 | //! Project version string for ObjectiveDropboxOfficial. 24 | FOUNDATION_EXPORT const unsigned char ObjectiveDropboxOfficialVersionString[]; 25 | 26 | // In this header, you should import all the public headers of your framework using statements like #import 27 | // 28 | 29 | #import 30 | 31 | #if TARGET_OS_IPHONE 32 | #import 33 | #elif TARGET_OS_MAC 34 | #import 35 | #endif 36 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Headers/Umbrella/ObjectiveDropboxOfficialLib.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Umbrella import for importing as a library 5 | /// 6 | 7 | #import "TargetConditionals.h" 8 | 9 | #import "DBSDKImportsShared.h" 10 | 11 | #if TARGET_OS_IPHONE 12 | #import "DBSDKImports-iOS.h" 13 | #elif TARGET_OS_MAC 14 | #import "DBSDKImports-macOS.h" 15 | #endif 16 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.xcodeproj/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blankwonder/dropbox-sdk-obj-c/89306b03ce920bf98b8f1d053cadf34d28e56e4c/Source/ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.xcodeproj/en.lproj/Localizable.strings -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_iOS/DBLoadingViewController.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBLoadingViewController.h" 6 | 7 | @interface DBLoadingViewController () 8 | 9 | @property (nonatomic, readwrite, strong) UIActivityIndicatorView *loadingSpinner; 10 | 11 | @end 12 | 13 | @implementation DBLoadingViewController 14 | 15 | - (instancetype)init { 16 | self = [super initWithNibName:nil bundle:nil]; 17 | if (self) { 18 | if (@available(iOS 13.0, *)) { 19 | _loadingSpinner = 20 | [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleLarge]; 21 | } else { 22 | _loadingSpinner = 23 | [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; 24 | } 25 | } 26 | return self; 27 | } 28 | 29 | - (void)viewDidLoad { 30 | [super viewDidLoad]; 31 | UIView *view = self.view; 32 | view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0.4]; 33 | [view addSubview:_loadingSpinner]; 34 | _loadingSpinner.translatesAutoresizingMaskIntoConstraints = NO; 35 | [NSLayoutConstraint activateConstraints:@[ 36 | [_loadingSpinner.centerXAnchor constraintEqualToAnchor:view.centerXAnchor], 37 | [_loadingSpinner.centerYAnchor constraintEqualToAnchor:view.centerYAnchor], 38 | ]]; 39 | [_loadingSpinner startAnimating]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_iOS/DBOAuthMobile-iOS.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | #import 7 | #import 8 | 9 | #import "DBLoadingStatusDelegate.h" 10 | #import "DBSharedApplicationProtocol.h" 11 | 12 | #pragma mark - Shared application 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /// 17 | /// Platform-specific (here, iOS) shared application. 18 | /// 19 | /// Renders OAuth flow and implements `DBSharedApplication` protocol. 20 | /// 21 | @interface DBMobileSharedApplication : NSObject 22 | 23 | /// Delegate to handle loading status during auth flow. 24 | @property (nonatomic, readwrite, weak) id loadingStatusDelegate; 25 | 26 | /// 27 | /// Full constructor. 28 | /// 29 | /// @param sharedApplication The `UIApplication` with which to render the OAuth flow. 30 | /// @param controller The `UIViewController` with which to render the OAuth flow. The controller reference is weakly 31 | /// held. 32 | /// @param openURL A wrapper around app-extension unsafe `openURL` call. 33 | /// 34 | /// @return An initialized instance. 35 | /// 36 | - (instancetype)initWithSharedApplication:(UIApplication *)sharedApplication 37 | controller:(UIViewController *)controller 38 | openURL:(void (^_Nonnull)(NSURL *))openURL; 39 | 40 | + (nullable DBMobileSharedApplication *)mobileSharedApplication; 41 | 42 | + (void)setMobileSharedApplication:(DBMobileSharedApplication *)mobileSharedApplication; 43 | 44 | - (void)dismissAuthController; 45 | 46 | @end 47 | 48 | #pragma mark - Web view controller 49 | 50 | /// 51 | /// Platform-specific (here, iOS) `UIViewController` for rendering OAuth flow. 52 | /// 53 | @interface DBMobileSafariViewController : SFSafariViewController 54 | 55 | - (instancetype)initWithUrl:(NSURL *)url cancelHandler:(DBOAuthCancelBlock)cancelHandler; 56 | 57 | @end 58 | 59 | NS_ASSUME_NONNULL_END 60 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_iOS/DBOAuthMobileManager-iOS.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | #import "DBOAuthManager.h" 8 | 9 | @protocol DBSharedApplication; 10 | 11 | #pragma mark - OAuth manager base (iOS) 12 | 13 | /// 14 | /// Platform-specific (iOS) manager for performing OAuth linking. 15 | /// 16 | @interface DBOAuthMobileManager : DBOAuthManager 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_iOS/DBSDKImports-iOS.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBClientsManager+MobileAuth-iOS.h" 6 | #import "DBLoadingStatusDelegate.h" 7 | #import "DBOAuthMobile-iOS.h" 8 | #import "DBOAuthMobileManager-iOS.h" 9 | 10 | /// OpenWith 11 | #import "DBOfficialAppConnector-iOS.h" 12 | #import "DBOpenWithInfo-iOS.h" 13 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ObjectiveDropboxOfficial 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 6.2.3 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(CURRENT_PROJECT_VERSION) 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_macOS/DBOAuthDesktop-macOS.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | #import 7 | 8 | #import "DBLoadingStatusDelegate.h" 9 | #import "DBSharedApplicationProtocol.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// 14 | /// Platform-specific (here, macOS) shared application. 15 | /// 16 | /// Renders OAuth flow and implements `DBSharedApplication` protocol. 17 | /// 18 | @interface DBDesktopSharedApplication : NSObject 19 | 20 | /// Delegate to handle loading status during auth flow. 21 | @property (nonatomic, readwrite, weak) id loadingStatusDelegate; 22 | 23 | /// Returns the shared instance of `DBDesktopSharedApplication`. 24 | + (nullable DBDesktopSharedApplication *)desktopSharedApplication; 25 | 26 | /// Sets the shared instance of `DBDesktopSharedApplication`. 27 | + (void)setDesktopSharedApplication:(DBDesktopSharedApplication *)desktopSharedApplication; 28 | 29 | /// 30 | /// Full constructor. 31 | /// 32 | /// @param sharedApplication The `NSWorkspace` with which to render the OAuth flow. 33 | /// @param controller The `NSViewController` with which to render the OAuth flow. The controller reference is weakly 34 | /// held. 35 | /// @param openURL A wrapper around app-extension unsafe `openURL` call. 36 | /// 37 | /// @return An initialized instance. 38 | /// 39 | - (instancetype)initWithSharedApplication:(NSWorkspace *)sharedApplication 40 | controller:(NSViewController *)controller 41 | openURL:(void (^_Nonnull)(NSURL *))openURL; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_macOS/DBSDKImports-macOS.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBClientsManager+DesktopAuth-macOS.h" 6 | #import "DBOAuthDesktop-macOS.h" 7 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_macOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 6.2.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSHumanReadableCopyright 24 | Copyright © 2016 Dropbox. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Auth/Headers/DBAUTHTokenScopeError.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBAUTHTokenScopeError; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `TokenScopeError` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBAUTHTokenScopeError : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// The required scope to access the route. 29 | @property (nonatomic, readonly, copy) NSString *requiredScope; 30 | 31 | #pragma mark - Constructors 32 | 33 | /// 34 | /// Full constructor for the struct (exposes all instance variables). 35 | /// 36 | /// @param requiredScope The required scope to access the route. 37 | /// 38 | /// @return An initialized instance. 39 | /// 40 | - (instancetype)initWithRequiredScope:(NSString *)requiredScope; 41 | 42 | - (instancetype)init NS_UNAVAILABLE; 43 | 44 | @end 45 | 46 | #pragma mark - Serializer Object 47 | 48 | /// 49 | /// The serialization class for the `TokenScopeError` struct. 50 | /// 51 | @interface DBAUTHTokenScopeErrorSerializer : NSObject 52 | 53 | /// 54 | /// Serializes `DBAUTHTokenScopeError` instances. 55 | /// 56 | /// @param instance An instance of the `DBAUTHTokenScopeError` API object. 57 | /// 58 | /// @return A json-compatible dictionary representation of the 59 | /// `DBAUTHTokenScopeError` API object. 60 | /// 61 | + (nullable NSDictionary *)serialize:(DBAUTHTokenScopeError *)instance; 62 | 63 | /// 64 | /// Deserializes `DBAUTHTokenScopeError` instances. 65 | /// 66 | /// @param dict A json-compatible dictionary representation of the 67 | /// `DBAUTHTokenScopeError` API object. 68 | /// 69 | /// @return An instantiation of the `DBAUTHTokenScopeError` object. 70 | /// 71 | + (DBAUTHTokenScopeError *)deserialize:(NSDictionary *)dict; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESAddTagArg.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESAddTagArg; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `AddTagArg` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESAddTagArg : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// Path to the item to be tagged. 29 | @property (nonatomic, readonly, copy) NSString *path; 30 | 31 | /// The value of the tag to add. 32 | @property (nonatomic, readonly, copy) NSString *tagText; 33 | 34 | #pragma mark - Constructors 35 | 36 | /// 37 | /// Full constructor for the struct (exposes all instance variables). 38 | /// 39 | /// @param path Path to the item to be tagged. 40 | /// @param tagText The value of the tag to add. 41 | /// 42 | /// @return An initialized instance. 43 | /// 44 | - (instancetype)initWithPath:(NSString *)path tagText:(NSString *)tagText; 45 | 46 | - (instancetype)init NS_UNAVAILABLE; 47 | 48 | @end 49 | 50 | #pragma mark - Serializer Object 51 | 52 | /// 53 | /// The serialization class for the `AddTagArg` struct. 54 | /// 55 | @interface DBFILESAddTagArgSerializer : NSObject 56 | 57 | /// 58 | /// Serializes `DBFILESAddTagArg` instances. 59 | /// 60 | /// @param instance An instance of the `DBFILESAddTagArg` API object. 61 | /// 62 | /// @return A json-compatible dictionary representation of the 63 | /// `DBFILESAddTagArg` API object. 64 | /// 65 | + (nullable NSDictionary *)serialize:(DBFILESAddTagArg *)instance; 66 | 67 | /// 68 | /// Deserializes `DBFILESAddTagArg` instances. 69 | /// 70 | /// @param dict A json-compatible dictionary representation of the 71 | /// `DBFILESAddTagArg` API object. 72 | /// 73 | /// @return An instantiation of the `DBFILESAddTagArg` object. 74 | /// 75 | + (DBFILESAddTagArg *)deserialize:(NSDictionary *)dict; 76 | 77 | @end 78 | 79 | NS_ASSUME_NONNULL_END 80 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESCreateFolderResult.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBFILESFileOpsResult.h" 10 | #import "DBSerializableProtocol.h" 11 | 12 | @class DBFILESCreateFolderResult; 13 | @class DBFILESFolderMetadata; 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | #pragma mark - API Object 18 | 19 | /// 20 | /// The `CreateFolderResult` struct. 21 | /// 22 | /// This class implements the `DBSerializable` protocol (serialize and 23 | /// deserialize instance methods), which is required for all Obj-C SDK API route 24 | /// objects. 25 | /// 26 | @interface DBFILESCreateFolderResult : DBFILESFileOpsResult 27 | 28 | #pragma mark - Instance fields 29 | 30 | /// Metadata of the created folder. 31 | @property (nonatomic, readonly) DBFILESFolderMetadata *metadata; 32 | 33 | #pragma mark - Constructors 34 | 35 | /// 36 | /// Full constructor for the struct (exposes all instance variables). 37 | /// 38 | /// @param metadata Metadata of the created folder. 39 | /// 40 | /// @return An initialized instance. 41 | /// 42 | - (instancetype)initWithMetadata:(DBFILESFolderMetadata *)metadata; 43 | 44 | @end 45 | 46 | #pragma mark - Serializer Object 47 | 48 | /// 49 | /// The serialization class for the `CreateFolderResult` struct. 50 | /// 51 | @interface DBFILESCreateFolderResultSerializer : NSObject 52 | 53 | /// 54 | /// Serializes `DBFILESCreateFolderResult` instances. 55 | /// 56 | /// @param instance An instance of the `DBFILESCreateFolderResult` API object. 57 | /// 58 | /// @return A json-compatible dictionary representation of the 59 | /// `DBFILESCreateFolderResult` API object. 60 | /// 61 | + (nullable NSDictionary *)serialize:(DBFILESCreateFolderResult *)instance; 62 | 63 | /// 64 | /// Deserializes `DBFILESCreateFolderResult` instances. 65 | /// 66 | /// @param dict A json-compatible dictionary representation of the 67 | /// `DBFILESCreateFolderResult` API object. 68 | /// 69 | /// @return An instantiation of the `DBFILESCreateFolderResult` object. 70 | /// 71 | + (DBFILESCreateFolderResult *)deserialize:(NSDictionary *)dict; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESDeleteBatchArg.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESDeleteArg; 12 | @class DBFILESDeleteBatchArg; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | #pragma mark - API Object 17 | 18 | /// 19 | /// The `DeleteBatchArg` struct. 20 | /// 21 | /// This class implements the `DBSerializable` protocol (serialize and 22 | /// deserialize instance methods), which is required for all Obj-C SDK API route 23 | /// objects. 24 | /// 25 | @interface DBFILESDeleteBatchArg : NSObject 26 | 27 | #pragma mark - Instance fields 28 | 29 | /// (no description). 30 | @property (nonatomic, readonly) NSArray *entries; 31 | 32 | #pragma mark - Constructors 33 | 34 | /// 35 | /// Full constructor for the struct (exposes all instance variables). 36 | /// 37 | /// @param entries (no description). 38 | /// 39 | /// @return An initialized instance. 40 | /// 41 | - (instancetype)initWithEntries:(NSArray *)entries; 42 | 43 | - (instancetype)init NS_UNAVAILABLE; 44 | 45 | @end 46 | 47 | #pragma mark - Serializer Object 48 | 49 | /// 50 | /// The serialization class for the `DeleteBatchArg` struct. 51 | /// 52 | @interface DBFILESDeleteBatchArgSerializer : NSObject 53 | 54 | /// 55 | /// Serializes `DBFILESDeleteBatchArg` instances. 56 | /// 57 | /// @param instance An instance of the `DBFILESDeleteBatchArg` API object. 58 | /// 59 | /// @return A json-compatible dictionary representation of the 60 | /// `DBFILESDeleteBatchArg` API object. 61 | /// 62 | + (nullable NSDictionary *)serialize:(DBFILESDeleteBatchArg *)instance; 63 | 64 | /// 65 | /// Deserializes `DBFILESDeleteBatchArg` instances. 66 | /// 67 | /// @param dict A json-compatible dictionary representation of the 68 | /// `DBFILESDeleteBatchArg` API object. 69 | /// 70 | /// @return An instantiation of the `DBFILESDeleteBatchArg` object. 71 | /// 72 | + (DBFILESDeleteBatchArg *)deserialize:(NSDictionary *)dict; 73 | 74 | @end 75 | 76 | NS_ASSUME_NONNULL_END 77 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESDeleteResult.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBFILESFileOpsResult.h" 10 | #import "DBSerializableProtocol.h" 11 | 12 | @class DBFILESDeleteResult; 13 | @class DBFILESMetadata; 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | #pragma mark - API Object 18 | 19 | /// 20 | /// The `DeleteResult` struct. 21 | /// 22 | /// This class implements the `DBSerializable` protocol (serialize and 23 | /// deserialize instance methods), which is required for all Obj-C SDK API route 24 | /// objects. 25 | /// 26 | @interface DBFILESDeleteResult : DBFILESFileOpsResult 27 | 28 | #pragma mark - Instance fields 29 | 30 | /// Metadata of the deleted object. 31 | @property (nonatomic, readonly) DBFILESMetadata *metadata; 32 | 33 | #pragma mark - Constructors 34 | 35 | /// 36 | /// Full constructor for the struct (exposes all instance variables). 37 | /// 38 | /// @param metadata Metadata of the deleted object. 39 | /// 40 | /// @return An initialized instance. 41 | /// 42 | - (instancetype)initWithMetadata:(DBFILESMetadata *)metadata; 43 | 44 | @end 45 | 46 | #pragma mark - Serializer Object 47 | 48 | /// 49 | /// The serialization class for the `DeleteResult` struct. 50 | /// 51 | @interface DBFILESDeleteResultSerializer : NSObject 52 | 53 | /// 54 | /// Serializes `DBFILESDeleteResult` instances. 55 | /// 56 | /// @param instance An instance of the `DBFILESDeleteResult` API object. 57 | /// 58 | /// @return A json-compatible dictionary representation of the 59 | /// `DBFILESDeleteResult` API object. 60 | /// 61 | + (nullable NSDictionary *)serialize:(DBFILESDeleteResult *)instance; 62 | 63 | /// 64 | /// Deserializes `DBFILESDeleteResult` instances. 65 | /// 66 | /// @param dict A json-compatible dictionary representation of the 67 | /// `DBFILESDeleteResult` API object. 68 | /// 69 | /// @return An instantiation of the `DBFILESDeleteResult` object. 70 | /// 71 | + (DBFILESDeleteResult *)deserialize:(NSDictionary *)dict; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESDownloadZipArg.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESDownloadZipArg; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `DownloadZipArg` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESDownloadZipArg : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// The path of the folder to download. 29 | @property (nonatomic, readonly, copy) NSString *path; 30 | 31 | #pragma mark - Constructors 32 | 33 | /// 34 | /// Full constructor for the struct (exposes all instance variables). 35 | /// 36 | /// @param path The path of the folder to download. 37 | /// 38 | /// @return An initialized instance. 39 | /// 40 | - (instancetype)initWithPath:(NSString *)path; 41 | 42 | - (instancetype)init NS_UNAVAILABLE; 43 | 44 | @end 45 | 46 | #pragma mark - Serializer Object 47 | 48 | /// 49 | /// The serialization class for the `DownloadZipArg` struct. 50 | /// 51 | @interface DBFILESDownloadZipArgSerializer : NSObject 52 | 53 | /// 54 | /// Serializes `DBFILESDownloadZipArg` instances. 55 | /// 56 | /// @param instance An instance of the `DBFILESDownloadZipArg` API object. 57 | /// 58 | /// @return A json-compatible dictionary representation of the 59 | /// `DBFILESDownloadZipArg` API object. 60 | /// 61 | + (nullable NSDictionary *)serialize:(DBFILESDownloadZipArg *)instance; 62 | 63 | /// 64 | /// Deserializes `DBFILESDownloadZipArg` instances. 65 | /// 66 | /// @param dict A json-compatible dictionary representation of the 67 | /// `DBFILESDownloadZipArg` API object. 68 | /// 69 | /// @return An instantiation of the `DBFILESDownloadZipArg` object. 70 | /// 71 | + (DBFILESDownloadZipArg *)deserialize:(NSDictionary *)dict; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESDownloadZipResult.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESDownloadZipResult; 12 | @class DBFILESFolderMetadata; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | #pragma mark - API Object 17 | 18 | /// 19 | /// The `DownloadZipResult` struct. 20 | /// 21 | /// This class implements the `DBSerializable` protocol (serialize and 22 | /// deserialize instance methods), which is required for all Obj-C SDK API route 23 | /// objects. 24 | /// 25 | @interface DBFILESDownloadZipResult : NSObject 26 | 27 | #pragma mark - Instance fields 28 | 29 | /// (no description). 30 | @property (nonatomic, readonly) DBFILESFolderMetadata *metadata; 31 | 32 | #pragma mark - Constructors 33 | 34 | /// 35 | /// Full constructor for the struct (exposes all instance variables). 36 | /// 37 | /// @param metadata (no description). 38 | /// 39 | /// @return An initialized instance. 40 | /// 41 | - (instancetype)initWithMetadata:(DBFILESFolderMetadata *)metadata; 42 | 43 | - (instancetype)init NS_UNAVAILABLE; 44 | 45 | @end 46 | 47 | #pragma mark - Serializer Object 48 | 49 | /// 50 | /// The serialization class for the `DownloadZipResult` struct. 51 | /// 52 | @interface DBFILESDownloadZipResultSerializer : NSObject 53 | 54 | /// 55 | /// Serializes `DBFILESDownloadZipResult` instances. 56 | /// 57 | /// @param instance An instance of the `DBFILESDownloadZipResult` API object. 58 | /// 59 | /// @return A json-compatible dictionary representation of the 60 | /// `DBFILESDownloadZipResult` API object. 61 | /// 62 | + (nullable NSDictionary *)serialize:(DBFILESDownloadZipResult *)instance; 63 | 64 | /// 65 | /// Deserializes `DBFILESDownloadZipResult` instances. 66 | /// 67 | /// @param dict A json-compatible dictionary representation of the 68 | /// `DBFILESDownloadZipResult` API object. 69 | /// 70 | /// @return An instantiation of the `DBFILESDownloadZipResult` object. 71 | /// 72 | + (DBFILESDownloadZipResult *)deserialize:(NSDictionary *)dict; 73 | 74 | @end 75 | 76 | NS_ASSUME_NONNULL_END 77 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESFileLock.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESFileLock; 12 | @class DBFILESFileLockContent; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | #pragma mark - API Object 17 | 18 | /// 19 | /// The `FileLock` struct. 20 | /// 21 | /// This class implements the `DBSerializable` protocol (serialize and 22 | /// deserialize instance methods), which is required for all Obj-C SDK API route 23 | /// objects. 24 | /// 25 | @interface DBFILESFileLock : NSObject 26 | 27 | #pragma mark - Instance fields 28 | 29 | /// The lock description. 30 | @property (nonatomic, readonly) DBFILESFileLockContent *content; 31 | 32 | #pragma mark - Constructors 33 | 34 | /// 35 | /// Full constructor for the struct (exposes all instance variables). 36 | /// 37 | /// @param content The lock description. 38 | /// 39 | /// @return An initialized instance. 40 | /// 41 | - (instancetype)initWithContent:(DBFILESFileLockContent *)content; 42 | 43 | - (instancetype)init NS_UNAVAILABLE; 44 | 45 | @end 46 | 47 | #pragma mark - Serializer Object 48 | 49 | /// 50 | /// The serialization class for the `FileLock` struct. 51 | /// 52 | @interface DBFILESFileLockSerializer : NSObject 53 | 54 | /// 55 | /// Serializes `DBFILESFileLock` instances. 56 | /// 57 | /// @param instance An instance of the `DBFILESFileLock` API object. 58 | /// 59 | /// @return A json-compatible dictionary representation of the `DBFILESFileLock` 60 | /// API object. 61 | /// 62 | + (nullable NSDictionary *)serialize:(DBFILESFileLock *)instance; 63 | 64 | /// 65 | /// Deserializes `DBFILESFileLock` instances. 66 | /// 67 | /// @param dict A json-compatible dictionary representation of the 68 | /// `DBFILESFileLock` API object. 69 | /// 70 | /// @return An instantiation of the `DBFILESFileLock` object. 71 | /// 72 | + (DBFILESFileLock *)deserialize:(NSDictionary *)dict; 73 | 74 | @end 75 | 76 | NS_ASSUME_NONNULL_END 77 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESFileOpsResult.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESFileOpsResult; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `FileOpsResult` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESFileOpsResult : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | #pragma mark - Constructors 29 | 30 | /// 31 | /// Full constructor for the struct (exposes all instance variables). 32 | /// 33 | /// @return An initialized instance. 34 | /// 35 | - (instancetype)initDefault; 36 | 37 | - (instancetype)init NS_UNAVAILABLE; 38 | 39 | @end 40 | 41 | #pragma mark - Serializer Object 42 | 43 | /// 44 | /// The serialization class for the `FileOpsResult` struct. 45 | /// 46 | @interface DBFILESFileOpsResultSerializer : NSObject 47 | 48 | /// 49 | /// Serializes `DBFILESFileOpsResult` instances. 50 | /// 51 | /// @param instance An instance of the `DBFILESFileOpsResult` API object. 52 | /// 53 | /// @return A json-compatible dictionary representation of the 54 | /// `DBFILESFileOpsResult` API object. 55 | /// 56 | + (nullable NSDictionary *)serialize:(DBFILESFileOpsResult *)instance; 57 | 58 | /// 59 | /// Deserializes `DBFILESFileOpsResult` instances. 60 | /// 61 | /// @param dict A json-compatible dictionary representation of the 62 | /// `DBFILESFileOpsResult` API object. 63 | /// 64 | /// @return An instantiation of the `DBFILESFileOpsResult` object. 65 | /// 66 | + (DBFILESFileOpsResult *)deserialize:(NSDictionary *)dict; 67 | 68 | @end 69 | 70 | NS_ASSUME_NONNULL_END 71 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESGetCopyReferenceArg.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESGetCopyReferenceArg; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `GetCopyReferenceArg` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESGetCopyReferenceArg : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// The path to the file or folder you want to get a copy reference to. 29 | @property (nonatomic, readonly, copy) NSString *path; 30 | 31 | #pragma mark - Constructors 32 | 33 | /// 34 | /// Full constructor for the struct (exposes all instance variables). 35 | /// 36 | /// @param path The path to the file or folder you want to get a copy reference 37 | /// to. 38 | /// 39 | /// @return An initialized instance. 40 | /// 41 | - (instancetype)initWithPath:(NSString *)path; 42 | 43 | - (instancetype)init NS_UNAVAILABLE; 44 | 45 | @end 46 | 47 | #pragma mark - Serializer Object 48 | 49 | /// 50 | /// The serialization class for the `GetCopyReferenceArg` struct. 51 | /// 52 | @interface DBFILESGetCopyReferenceArgSerializer : NSObject 53 | 54 | /// 55 | /// Serializes `DBFILESGetCopyReferenceArg` instances. 56 | /// 57 | /// @param instance An instance of the `DBFILESGetCopyReferenceArg` API object. 58 | /// 59 | /// @return A json-compatible dictionary representation of the 60 | /// `DBFILESGetCopyReferenceArg` API object. 61 | /// 62 | + (nullable NSDictionary *)serialize:(DBFILESGetCopyReferenceArg *)instance; 63 | 64 | /// 65 | /// Deserializes `DBFILESGetCopyReferenceArg` instances. 66 | /// 67 | /// @param dict A json-compatible dictionary representation of the 68 | /// `DBFILESGetCopyReferenceArg` API object. 69 | /// 70 | /// @return An instantiation of the `DBFILESGetCopyReferenceArg` object. 71 | /// 72 | + (DBFILESGetCopyReferenceArg *)deserialize:(NSDictionary *)dict; 73 | 74 | @end 75 | 76 | NS_ASSUME_NONNULL_END 77 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESGetTagsArg.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESGetTagsArg; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `GetTagsArg` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESGetTagsArg : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// Path to the items. 29 | @property (nonatomic, readonly) NSArray *paths; 30 | 31 | #pragma mark - Constructors 32 | 33 | /// 34 | /// Full constructor for the struct (exposes all instance variables). 35 | /// 36 | /// @param paths Path to the items. 37 | /// 38 | /// @return An initialized instance. 39 | /// 40 | - (instancetype)initWithPaths:(NSArray *)paths; 41 | 42 | - (instancetype)init NS_UNAVAILABLE; 43 | 44 | @end 45 | 46 | #pragma mark - Serializer Object 47 | 48 | /// 49 | /// The serialization class for the `GetTagsArg` struct. 50 | /// 51 | @interface DBFILESGetTagsArgSerializer : NSObject 52 | 53 | /// 54 | /// Serializes `DBFILESGetTagsArg` instances. 55 | /// 56 | /// @param instance An instance of the `DBFILESGetTagsArg` API object. 57 | /// 58 | /// @return A json-compatible dictionary representation of the 59 | /// `DBFILESGetTagsArg` API object. 60 | /// 61 | + (nullable NSDictionary *)serialize:(DBFILESGetTagsArg *)instance; 62 | 63 | /// 64 | /// Deserializes `DBFILESGetTagsArg` instances. 65 | /// 66 | /// @param dict A json-compatible dictionary representation of the 67 | /// `DBFILESGetTagsArg` API object. 68 | /// 69 | /// @return An instantiation of the `DBFILESGetTagsArg` object. 70 | /// 71 | + (DBFILESGetTagsArg *)deserialize:(NSDictionary *)dict; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESGetTagsResult.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESGetTagsResult; 12 | @class DBFILESPathToTags; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | #pragma mark - API Object 17 | 18 | /// 19 | /// The `GetTagsResult` struct. 20 | /// 21 | /// This class implements the `DBSerializable` protocol (serialize and 22 | /// deserialize instance methods), which is required for all Obj-C SDK API route 23 | /// objects. 24 | /// 25 | @interface DBFILESGetTagsResult : NSObject 26 | 27 | #pragma mark - Instance fields 28 | 29 | /// List of paths and their corresponding tags. 30 | @property (nonatomic, readonly) NSArray *pathsToTags; 31 | 32 | #pragma mark - Constructors 33 | 34 | /// 35 | /// Full constructor for the struct (exposes all instance variables). 36 | /// 37 | /// @param pathsToTags List of paths and their corresponding tags. 38 | /// 39 | /// @return An initialized instance. 40 | /// 41 | - (instancetype)initWithPathsToTags:(NSArray *)pathsToTags; 42 | 43 | - (instancetype)init NS_UNAVAILABLE; 44 | 45 | @end 46 | 47 | #pragma mark - Serializer Object 48 | 49 | /// 50 | /// The serialization class for the `GetTagsResult` struct. 51 | /// 52 | @interface DBFILESGetTagsResultSerializer : NSObject 53 | 54 | /// 55 | /// Serializes `DBFILESGetTagsResult` instances. 56 | /// 57 | /// @param instance An instance of the `DBFILESGetTagsResult` API object. 58 | /// 59 | /// @return A json-compatible dictionary representation of the 60 | /// `DBFILESGetTagsResult` API object. 61 | /// 62 | + (nullable NSDictionary *)serialize:(DBFILESGetTagsResult *)instance; 63 | 64 | /// 65 | /// Deserializes `DBFILESGetTagsResult` instances. 66 | /// 67 | /// @param dict A json-compatible dictionary representation of the 68 | /// `DBFILESGetTagsResult` API object. 69 | /// 70 | /// @return An instantiation of the `DBFILESGetTagsResult` object. 71 | /// 72 | + (DBFILESGetTagsResult *)deserialize:(NSDictionary *)dict; 73 | 74 | @end 75 | 76 | NS_ASSUME_NONNULL_END 77 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESGetTemporaryLinkArg.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESGetTemporaryLinkArg; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `GetTemporaryLinkArg` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESGetTemporaryLinkArg : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// The path to the file you want a temporary link to. 29 | @property (nonatomic, readonly, copy) NSString *path; 30 | 31 | #pragma mark - Constructors 32 | 33 | /// 34 | /// Full constructor for the struct (exposes all instance variables). 35 | /// 36 | /// @param path The path to the file you want a temporary link to. 37 | /// 38 | /// @return An initialized instance. 39 | /// 40 | - (instancetype)initWithPath:(NSString *)path; 41 | 42 | - (instancetype)init NS_UNAVAILABLE; 43 | 44 | @end 45 | 46 | #pragma mark - Serializer Object 47 | 48 | /// 49 | /// The serialization class for the `GetTemporaryLinkArg` struct. 50 | /// 51 | @interface DBFILESGetTemporaryLinkArgSerializer : NSObject 52 | 53 | /// 54 | /// Serializes `DBFILESGetTemporaryLinkArg` instances. 55 | /// 56 | /// @param instance An instance of the `DBFILESGetTemporaryLinkArg` API object. 57 | /// 58 | /// @return A json-compatible dictionary representation of the 59 | /// `DBFILESGetTemporaryLinkArg` API object. 60 | /// 61 | + (nullable NSDictionary *)serialize:(DBFILESGetTemporaryLinkArg *)instance; 62 | 63 | /// 64 | /// Deserializes `DBFILESGetTemporaryLinkArg` instances. 65 | /// 66 | /// @param dict A json-compatible dictionary representation of the 67 | /// `DBFILESGetTemporaryLinkArg` API object. 68 | /// 69 | /// @return An instantiation of the `DBFILESGetTemporaryLinkArg` object. 70 | /// 71 | + (DBFILESGetTemporaryLinkArg *)deserialize:(NSDictionary *)dict; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESLockConflictError.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESFileLock; 12 | @class DBFILESLockConflictError; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | #pragma mark - API Object 17 | 18 | /// 19 | /// The `LockConflictError` struct. 20 | /// 21 | /// This class implements the `DBSerializable` protocol (serialize and 22 | /// deserialize instance methods), which is required for all Obj-C SDK API route 23 | /// objects. 24 | /// 25 | @interface DBFILESLockConflictError : NSObject 26 | 27 | #pragma mark - Instance fields 28 | 29 | /// The lock that caused the conflict. 30 | @property (nonatomic, readonly) DBFILESFileLock *lock; 31 | 32 | #pragma mark - Constructors 33 | 34 | /// 35 | /// Full constructor for the struct (exposes all instance variables). 36 | /// 37 | /// @param lock The lock that caused the conflict. 38 | /// 39 | /// @return An initialized instance. 40 | /// 41 | - (instancetype)initWithLock:(DBFILESFileLock *)lock; 42 | 43 | - (instancetype)init NS_UNAVAILABLE; 44 | 45 | @end 46 | 47 | #pragma mark - Serializer Object 48 | 49 | /// 50 | /// The serialization class for the `LockConflictError` struct. 51 | /// 52 | @interface DBFILESLockConflictErrorSerializer : NSObject 53 | 54 | /// 55 | /// Serializes `DBFILESLockConflictError` instances. 56 | /// 57 | /// @param instance An instance of the `DBFILESLockConflictError` API object. 58 | /// 59 | /// @return A json-compatible dictionary representation of the 60 | /// `DBFILESLockConflictError` API object. 61 | /// 62 | + (nullable NSDictionary *)serialize:(DBFILESLockConflictError *)instance; 63 | 64 | /// 65 | /// Deserializes `DBFILESLockConflictError` instances. 66 | /// 67 | /// @param dict A json-compatible dictionary representation of the 68 | /// `DBFILESLockConflictError` API object. 69 | /// 70 | /// @return An instantiation of the `DBFILESLockConflictError` object. 71 | /// 72 | + (DBFILESLockConflictError *)deserialize:(NSDictionary *)dict; 73 | 74 | @end 75 | 76 | NS_ASSUME_NONNULL_END 77 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESLockFileArg.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESLockFileArg; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `LockFileArg` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESLockFileArg : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// Path in the user's Dropbox to a file. 29 | @property (nonatomic, readonly, copy) NSString *path; 30 | 31 | #pragma mark - Constructors 32 | 33 | /// 34 | /// Full constructor for the struct (exposes all instance variables). 35 | /// 36 | /// @param path Path in the user's Dropbox to a file. 37 | /// 38 | /// @return An initialized instance. 39 | /// 40 | - (instancetype)initWithPath:(NSString *)path; 41 | 42 | - (instancetype)init NS_UNAVAILABLE; 43 | 44 | @end 45 | 46 | #pragma mark - Serializer Object 47 | 48 | /// 49 | /// The serialization class for the `LockFileArg` struct. 50 | /// 51 | @interface DBFILESLockFileArgSerializer : NSObject 52 | 53 | /// 54 | /// Serializes `DBFILESLockFileArg` instances. 55 | /// 56 | /// @param instance An instance of the `DBFILESLockFileArg` API object. 57 | /// 58 | /// @return A json-compatible dictionary representation of the 59 | /// `DBFILESLockFileArg` API object. 60 | /// 61 | + (nullable NSDictionary *)serialize:(DBFILESLockFileArg *)instance; 62 | 63 | /// 64 | /// Deserializes `DBFILESLockFileArg` instances. 65 | /// 66 | /// @param dict A json-compatible dictionary representation of the 67 | /// `DBFILESLockFileArg` API object. 68 | /// 69 | /// @return An instantiation of the `DBFILESLockFileArg` object. 70 | /// 71 | + (DBFILESLockFileArg *)deserialize:(NSDictionary *)dict; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESPaperUpdateResult.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESPaperUpdateResult; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `PaperUpdateResult` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESPaperUpdateResult : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// The current doc revision. 29 | @property (nonatomic, readonly) NSNumber *paperRevision; 30 | 31 | #pragma mark - Constructors 32 | 33 | /// 34 | /// Full constructor for the struct (exposes all instance variables). 35 | /// 36 | /// @param paperRevision The current doc revision. 37 | /// 38 | /// @return An initialized instance. 39 | /// 40 | - (instancetype)initWithPaperRevision:(NSNumber *)paperRevision; 41 | 42 | - (instancetype)init NS_UNAVAILABLE; 43 | 44 | @end 45 | 46 | #pragma mark - Serializer Object 47 | 48 | /// 49 | /// The serialization class for the `PaperUpdateResult` struct. 50 | /// 51 | @interface DBFILESPaperUpdateResultSerializer : NSObject 52 | 53 | /// 54 | /// Serializes `DBFILESPaperUpdateResult` instances. 55 | /// 56 | /// @param instance An instance of the `DBFILESPaperUpdateResult` API object. 57 | /// 58 | /// @return A json-compatible dictionary representation of the 59 | /// `DBFILESPaperUpdateResult` API object. 60 | /// 61 | + (nullable NSDictionary *)serialize:(DBFILESPaperUpdateResult *)instance; 62 | 63 | /// 64 | /// Deserializes `DBFILESPaperUpdateResult` instances. 65 | /// 66 | /// @param dict A json-compatible dictionary representation of the 67 | /// `DBFILESPaperUpdateResult` API object. 68 | /// 69 | /// @return An instantiation of the `DBFILESPaperUpdateResult` object. 70 | /// 71 | + (DBFILESPaperUpdateResult *)deserialize:(NSDictionary *)dict; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESPathToTags.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESPathToTags; 12 | @class DBFILESTag; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | #pragma mark - API Object 17 | 18 | /// 19 | /// The `PathToTags` struct. 20 | /// 21 | /// This class implements the `DBSerializable` protocol (serialize and 22 | /// deserialize instance methods), which is required for all Obj-C SDK API route 23 | /// objects. 24 | /// 25 | @interface DBFILESPathToTags : NSObject 26 | 27 | #pragma mark - Instance fields 28 | 29 | /// Path of the item. 30 | @property (nonatomic, readonly, copy) NSString *path; 31 | 32 | /// Tags assigned to this item. 33 | @property (nonatomic, readonly) NSArray *tags; 34 | 35 | #pragma mark - Constructors 36 | 37 | /// 38 | /// Full constructor for the struct (exposes all instance variables). 39 | /// 40 | /// @param path Path of the item. 41 | /// @param tags Tags assigned to this item. 42 | /// 43 | /// @return An initialized instance. 44 | /// 45 | - (instancetype)initWithPath:(NSString *)path tags:(NSArray *)tags; 46 | 47 | - (instancetype)init NS_UNAVAILABLE; 48 | 49 | @end 50 | 51 | #pragma mark - Serializer Object 52 | 53 | /// 54 | /// The serialization class for the `PathToTags` struct. 55 | /// 56 | @interface DBFILESPathToTagsSerializer : NSObject 57 | 58 | /// 59 | /// Serializes `DBFILESPathToTags` instances. 60 | /// 61 | /// @param instance An instance of the `DBFILESPathToTags` API object. 62 | /// 63 | /// @return A json-compatible dictionary representation of the 64 | /// `DBFILESPathToTags` API object. 65 | /// 66 | + (nullable NSDictionary *)serialize:(DBFILESPathToTags *)instance; 67 | 68 | /// 69 | /// Deserializes `DBFILESPathToTags` instances. 70 | /// 71 | /// @param dict A json-compatible dictionary representation of the 72 | /// `DBFILESPathToTags` API object. 73 | /// 74 | /// @return An instantiation of the `DBFILESPathToTags` object. 75 | /// 76 | + (DBFILESPathToTags *)deserialize:(NSDictionary *)dict; 77 | 78 | @end 79 | 80 | NS_ASSUME_NONNULL_END 81 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESRelocationResult.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBFILESFileOpsResult.h" 10 | #import "DBSerializableProtocol.h" 11 | 12 | @class DBFILESMetadata; 13 | @class DBFILESRelocationResult; 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | #pragma mark - API Object 18 | 19 | /// 20 | /// The `RelocationResult` struct. 21 | /// 22 | /// This class implements the `DBSerializable` protocol (serialize and 23 | /// deserialize instance methods), which is required for all Obj-C SDK API route 24 | /// objects. 25 | /// 26 | @interface DBFILESRelocationResult : DBFILESFileOpsResult 27 | 28 | #pragma mark - Instance fields 29 | 30 | /// Metadata of the relocated object. 31 | @property (nonatomic, readonly) DBFILESMetadata *metadata; 32 | 33 | #pragma mark - Constructors 34 | 35 | /// 36 | /// Full constructor for the struct (exposes all instance variables). 37 | /// 38 | /// @param metadata Metadata of the relocated object. 39 | /// 40 | /// @return An initialized instance. 41 | /// 42 | - (instancetype)initWithMetadata:(DBFILESMetadata *)metadata; 43 | 44 | @end 45 | 46 | #pragma mark - Serializer Object 47 | 48 | /// 49 | /// The serialization class for the `RelocationResult` struct. 50 | /// 51 | @interface DBFILESRelocationResultSerializer : NSObject 52 | 53 | /// 54 | /// Serializes `DBFILESRelocationResult` instances. 55 | /// 56 | /// @param instance An instance of the `DBFILESRelocationResult` API object. 57 | /// 58 | /// @return A json-compatible dictionary representation of the 59 | /// `DBFILESRelocationResult` API object. 60 | /// 61 | + (nullable NSDictionary *)serialize:(DBFILESRelocationResult *)instance; 62 | 63 | /// 64 | /// Deserializes `DBFILESRelocationResult` instances. 65 | /// 66 | /// @param dict A json-compatible dictionary representation of the 67 | /// `DBFILESRelocationResult` API object. 68 | /// 69 | /// @return An instantiation of the `DBFILESRelocationResult` object. 70 | /// 71 | + (DBFILESRelocationResult *)deserialize:(NSDictionary *)dict; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESRemoveTagArg.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESRemoveTagArg; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `RemoveTagArg` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESRemoveTagArg : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// Path to the item to tag. 29 | @property (nonatomic, readonly, copy) NSString *path; 30 | 31 | /// The tag to remove. 32 | @property (nonatomic, readonly, copy) NSString *tagText; 33 | 34 | #pragma mark - Constructors 35 | 36 | /// 37 | /// Full constructor for the struct (exposes all instance variables). 38 | /// 39 | /// @param path Path to the item to tag. 40 | /// @param tagText The tag to remove. 41 | /// 42 | /// @return An initialized instance. 43 | /// 44 | - (instancetype)initWithPath:(NSString *)path tagText:(NSString *)tagText; 45 | 46 | - (instancetype)init NS_UNAVAILABLE; 47 | 48 | @end 49 | 50 | #pragma mark - Serializer Object 51 | 52 | /// 53 | /// The serialization class for the `RemoveTagArg` struct. 54 | /// 55 | @interface DBFILESRemoveTagArgSerializer : NSObject 56 | 57 | /// 58 | /// Serializes `DBFILESRemoveTagArg` instances. 59 | /// 60 | /// @param instance An instance of the `DBFILESRemoveTagArg` API object. 61 | /// 62 | /// @return A json-compatible dictionary representation of the 63 | /// `DBFILESRemoveTagArg` API object. 64 | /// 65 | + (nullable NSDictionary *)serialize:(DBFILESRemoveTagArg *)instance; 66 | 67 | /// 68 | /// Deserializes `DBFILESRemoveTagArg` instances. 69 | /// 70 | /// @param dict A json-compatible dictionary representation of the 71 | /// `DBFILESRemoveTagArg` API object. 72 | /// 73 | /// @return An instantiation of the `DBFILESRemoveTagArg` object. 74 | /// 75 | + (DBFILESRemoveTagArg *)deserialize:(NSDictionary *)dict; 76 | 77 | @end 78 | 79 | NS_ASSUME_NONNULL_END 80 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESRestoreArg.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESRestoreArg; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `RestoreArg` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESRestoreArg : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// The path to save the restored file. 29 | @property (nonatomic, readonly, copy) NSString *path; 30 | 31 | /// The revision to restore. 32 | @property (nonatomic, readonly, copy) NSString *rev; 33 | 34 | #pragma mark - Constructors 35 | 36 | /// 37 | /// Full constructor for the struct (exposes all instance variables). 38 | /// 39 | /// @param path The path to save the restored file. 40 | /// @param rev The revision to restore. 41 | /// 42 | /// @return An initialized instance. 43 | /// 44 | - (instancetype)initWithPath:(NSString *)path rev:(NSString *)rev; 45 | 46 | - (instancetype)init NS_UNAVAILABLE; 47 | 48 | @end 49 | 50 | #pragma mark - Serializer Object 51 | 52 | /// 53 | /// The serialization class for the `RestoreArg` struct. 54 | /// 55 | @interface DBFILESRestoreArgSerializer : NSObject 56 | 57 | /// 58 | /// Serializes `DBFILESRestoreArg` instances. 59 | /// 60 | /// @param instance An instance of the `DBFILESRestoreArg` API object. 61 | /// 62 | /// @return A json-compatible dictionary representation of the 63 | /// `DBFILESRestoreArg` API object. 64 | /// 65 | + (nullable NSDictionary *)serialize:(DBFILESRestoreArg *)instance; 66 | 67 | /// 68 | /// Deserializes `DBFILESRestoreArg` instances. 69 | /// 70 | /// @param dict A json-compatible dictionary representation of the 71 | /// `DBFILESRestoreArg` API object. 72 | /// 73 | /// @return An instantiation of the `DBFILESRestoreArg` object. 74 | /// 75 | + (DBFILESRestoreArg *)deserialize:(NSDictionary *)dict; 76 | 77 | @end 78 | 79 | NS_ASSUME_NONNULL_END 80 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESSaveUrlArg.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESSaveUrlArg; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `SaveUrlArg` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESSaveUrlArg : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// The path in Dropbox where the URL will be saved to. 29 | @property (nonatomic, readonly, copy) NSString *path; 30 | 31 | /// The URL to be saved. 32 | @property (nonatomic, readonly, copy) NSString *url; 33 | 34 | #pragma mark - Constructors 35 | 36 | /// 37 | /// Full constructor for the struct (exposes all instance variables). 38 | /// 39 | /// @param path The path in Dropbox where the URL will be saved to. 40 | /// @param url The URL to be saved. 41 | /// 42 | /// @return An initialized instance. 43 | /// 44 | - (instancetype)initWithPath:(NSString *)path url:(NSString *)url; 45 | 46 | - (instancetype)init NS_UNAVAILABLE; 47 | 48 | @end 49 | 50 | #pragma mark - Serializer Object 51 | 52 | /// 53 | /// The serialization class for the `SaveUrlArg` struct. 54 | /// 55 | @interface DBFILESSaveUrlArgSerializer : NSObject 56 | 57 | /// 58 | /// Serializes `DBFILESSaveUrlArg` instances. 59 | /// 60 | /// @param instance An instance of the `DBFILESSaveUrlArg` API object. 61 | /// 62 | /// @return A json-compatible dictionary representation of the 63 | /// `DBFILESSaveUrlArg` API object. 64 | /// 65 | + (nullable NSDictionary *)serialize:(DBFILESSaveUrlArg *)instance; 66 | 67 | /// 68 | /// Deserializes `DBFILESSaveUrlArg` instances. 69 | /// 70 | /// @param dict A json-compatible dictionary representation of the 71 | /// `DBFILESSaveUrlArg` API object. 72 | /// 73 | /// @return An instantiation of the `DBFILESSaveUrlArg` object. 74 | /// 75 | + (DBFILESSaveUrlArg *)deserialize:(NSDictionary *)dict; 76 | 77 | @end 78 | 79 | NS_ASSUME_NONNULL_END 80 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESSharingInfo.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESSharingInfo; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `SharingInfo` struct. 19 | /// 20 | /// Sharing info for a file or folder. 21 | /// 22 | /// This class implements the `DBSerializable` protocol (serialize and 23 | /// deserialize instance methods), which is required for all Obj-C SDK API route 24 | /// objects. 25 | /// 26 | @interface DBFILESSharingInfo : NSObject 27 | 28 | #pragma mark - Instance fields 29 | 30 | /// True if the file or folder is inside a read-only shared folder. 31 | @property (nonatomic, readonly) NSNumber *readOnly; 32 | 33 | #pragma mark - Constructors 34 | 35 | /// 36 | /// Full constructor for the struct (exposes all instance variables). 37 | /// 38 | /// @param readOnly True if the file or folder is inside a read-only shared 39 | /// folder. 40 | /// 41 | /// @return An initialized instance. 42 | /// 43 | - (instancetype)initWithReadOnly:(NSNumber *)readOnly; 44 | 45 | - (instancetype)init NS_UNAVAILABLE; 46 | 47 | @end 48 | 49 | #pragma mark - Serializer Object 50 | 51 | /// 52 | /// The serialization class for the `SharingInfo` struct. 53 | /// 54 | @interface DBFILESSharingInfoSerializer : NSObject 55 | 56 | /// 57 | /// Serializes `DBFILESSharingInfo` instances. 58 | /// 59 | /// @param instance An instance of the `DBFILESSharingInfo` API object. 60 | /// 61 | /// @return A json-compatible dictionary representation of the 62 | /// `DBFILESSharingInfo` API object. 63 | /// 64 | + (nullable NSDictionary *)serialize:(DBFILESSharingInfo *)instance; 65 | 66 | /// 67 | /// Deserializes `DBFILESSharingInfo` instances. 68 | /// 69 | /// @param dict A json-compatible dictionary representation of the 70 | /// `DBFILESSharingInfo` API object. 71 | /// 72 | /// @return An instantiation of the `DBFILESSharingInfo` object. 73 | /// 74 | + (DBFILESSharingInfo *)deserialize:(NSDictionary *)dict; 75 | 76 | @end 77 | 78 | NS_ASSUME_NONNULL_END 79 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESSymlinkInfo.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESSymlinkInfo; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `SymlinkInfo` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESSymlinkInfo : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// The target this symlink points to. 29 | @property (nonatomic, readonly, copy) NSString *target; 30 | 31 | #pragma mark - Constructors 32 | 33 | /// 34 | /// Full constructor for the struct (exposes all instance variables). 35 | /// 36 | /// @param target The target this symlink points to. 37 | /// 38 | /// @return An initialized instance. 39 | /// 40 | - (instancetype)initWithTarget:(NSString *)target; 41 | 42 | - (instancetype)init NS_UNAVAILABLE; 43 | 44 | @end 45 | 46 | #pragma mark - Serializer Object 47 | 48 | /// 49 | /// The serialization class for the `SymlinkInfo` struct. 50 | /// 51 | @interface DBFILESSymlinkInfoSerializer : NSObject 52 | 53 | /// 54 | /// Serializes `DBFILESSymlinkInfo` instances. 55 | /// 56 | /// @param instance An instance of the `DBFILESSymlinkInfo` API object. 57 | /// 58 | /// @return A json-compatible dictionary representation of the 59 | /// `DBFILESSymlinkInfo` API object. 60 | /// 61 | + (nullable NSDictionary *)serialize:(DBFILESSymlinkInfo *)instance; 62 | 63 | /// 64 | /// Deserializes `DBFILESSymlinkInfo` instances. 65 | /// 66 | /// @param dict A json-compatible dictionary representation of the 67 | /// `DBFILESSymlinkInfo` API object. 68 | /// 69 | /// @return An instantiation of the `DBFILESSymlinkInfo` object. 70 | /// 71 | + (DBFILESSymlinkInfo *)deserialize:(NSDictionary *)dict; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESUnlockFileArg.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESUnlockFileArg; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `UnlockFileArg` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESUnlockFileArg : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// Path in the user's Dropbox to a file. 29 | @property (nonatomic, readonly, copy) NSString *path; 30 | 31 | #pragma mark - Constructors 32 | 33 | /// 34 | /// Full constructor for the struct (exposes all instance variables). 35 | /// 36 | /// @param path Path in the user's Dropbox to a file. 37 | /// 38 | /// @return An initialized instance. 39 | /// 40 | - (instancetype)initWithPath:(NSString *)path; 41 | 42 | - (instancetype)init NS_UNAVAILABLE; 43 | 44 | @end 45 | 46 | #pragma mark - Serializer Object 47 | 48 | /// 49 | /// The serialization class for the `UnlockFileArg` struct. 50 | /// 51 | @interface DBFILESUnlockFileArgSerializer : NSObject 52 | 53 | /// 54 | /// Serializes `DBFILESUnlockFileArg` instances. 55 | /// 56 | /// @param instance An instance of the `DBFILESUnlockFileArg` API object. 57 | /// 58 | /// @return A json-compatible dictionary representation of the 59 | /// `DBFILESUnlockFileArg` API object. 60 | /// 61 | + (nullable NSDictionary *)serialize:(DBFILESUnlockFileArg *)instance; 62 | 63 | /// 64 | /// Deserializes `DBFILESUnlockFileArg` instances. 65 | /// 66 | /// @param dict A json-compatible dictionary representation of the 67 | /// `DBFILESUnlockFileArg` API object. 68 | /// 69 | /// @return An instantiation of the `DBFILESUnlockFileArg` object. 70 | /// 71 | + (DBFILESUnlockFileArg *)deserialize:(NSDictionary *)dict; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/ApiObjects/Files/Headers/DBFILESUserGeneratedTag.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBSerializableProtocol.h" 10 | 11 | @class DBFILESUserGeneratedTag; 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | #pragma mark - API Object 16 | 17 | /// 18 | /// The `UserGeneratedTag` struct. 19 | /// 20 | /// This class implements the `DBSerializable` protocol (serialize and 21 | /// deserialize instance methods), which is required for all Obj-C SDK API route 22 | /// objects. 23 | /// 24 | @interface DBFILESUserGeneratedTag : NSObject 25 | 26 | #pragma mark - Instance fields 27 | 28 | /// (no description). 29 | @property (nonatomic, readonly, copy) NSString *tagText; 30 | 31 | #pragma mark - Constructors 32 | 33 | /// 34 | /// Full constructor for the struct (exposes all instance variables). 35 | /// 36 | /// @param tagText (no description). 37 | /// 38 | /// @return An initialized instance. 39 | /// 40 | - (instancetype)initWithTagText:(NSString *)tagText; 41 | 42 | - (instancetype)init NS_UNAVAILABLE; 43 | 44 | @end 45 | 46 | #pragma mark - Serializer Object 47 | 48 | /// 49 | /// The serialization class for the `UserGeneratedTag` struct. 50 | /// 51 | @interface DBFILESUserGeneratedTagSerializer : NSObject 52 | 53 | /// 54 | /// Serializes `DBFILESUserGeneratedTag` instances. 55 | /// 56 | /// @param instance An instance of the `DBFILESUserGeneratedTag` API object. 57 | /// 58 | /// @return A json-compatible dictionary representation of the 59 | /// `DBFILESUserGeneratedTag` API object. 60 | /// 61 | + (nullable NSDictionary *)serialize:(DBFILESUserGeneratedTag *)instance; 62 | 63 | /// 64 | /// Deserializes `DBFILESUserGeneratedTag` instances. 65 | /// 66 | /// @param dict A json-compatible dictionary representation of the 67 | /// `DBFILESUserGeneratedTag` API object. 68 | /// 69 | /// @return An instantiation of the `DBFILESUserGeneratedTag` object. 70 | /// 71 | + (DBFILESUserGeneratedTag *)deserialize:(NSDictionary *)dict; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Client/DBAppBaseClient.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import "DBAUTHAppAuthRoutes.h" 8 | #import "DBCHECKAppAuthRoutes.h" 9 | #import "DBFILESAppAuthRoutes.h" 10 | #import "DBRequestErrors.h" 11 | #import "DBTasks.h" 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @protocol DBTransportClient; 17 | 18 | /// 19 | /// Base client object that contains an instance field for each namespace, each 20 | /// of which contains references to all routes within that namespace. 21 | /// Fully-implemented API clients will inherit this class. 22 | /// 23 | @interface DBAppBaseClient : NSObject { 24 | 25 | @protected 26 | id _transportClient; 27 | } 28 | 29 | /// Routes within the `auth` namespace. 30 | @property (nonatomic, readonly) DBAUTHAppAuthRoutes *authRoutes; 31 | 32 | /// Routes within the `check` namespace. 33 | @property (nonatomic, readonly) DBCHECKAppAuthRoutes *checkRoutes; 34 | 35 | /// Routes within the `files` namespace. 36 | @property (nonatomic, readonly) DBFILESAppAuthRoutes *filesRoutes; 37 | 38 | /// Initializes the `DBAppBaseClient` object with a networking client. 39 | - (instancetype)initWithTransportClient:(id)client; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Client/DBAppBaseClient.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import "DBAppBaseClient.h" 8 | #import "DBAUTHAppAuthRoutes.h" 9 | #import "DBCHECKAppAuthRoutes.h" 10 | #import "DBFILESAppAuthRoutes.h" 11 | #import "DBTransportClientProtocol.h" 12 | 13 | @implementation DBAppBaseClient 14 | 15 | - (instancetype)initWithTransportClient:(id)client { 16 | self = [super init]; 17 | if (self) { 18 | _transportClient = client; 19 | _authRoutes = [[DBAUTHAppAuthRoutes alloc] init:client]; 20 | _checkRoutes = [[DBCHECKAppAuthRoutes alloc] init:client]; 21 | _filesRoutes = [[DBFILESAppAuthRoutes alloc] init:client]; 22 | } 23 | return self; 24 | } 25 | @end 26 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Client/DBUserBaseClient.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import "DBACCOUNTUserAuthRoutes.h" 8 | #import "DBAUTHUserAuthRoutes.h" 9 | #import "DBCHECKUserAuthRoutes.h" 10 | #import "DBCONTACTSUserAuthRoutes.h" 11 | #import "DBFILEPROPERTIESUserAuthRoutes.h" 12 | #import "DBFILEREQUESTSUserAuthRoutes.h" 13 | #import "DBFILESUserAuthRoutes.h" 14 | #import "DBRequestErrors.h" 15 | #import "DBTasks.h" 16 | #import 17 | 18 | NS_ASSUME_NONNULL_BEGIN 19 | 20 | @protocol DBTransportClient; 21 | 22 | /// 23 | /// Base client object that contains an instance field for each namespace, each 24 | /// of which contains references to all routes within that namespace. 25 | /// Fully-implemented API clients will inherit this class. 26 | /// 27 | @interface DBUserBaseClient : NSObject { 28 | 29 | @protected 30 | id _transportClient; 31 | } 32 | 33 | /// Routes within the `account` namespace. 34 | @property (nonatomic, readonly) DBACCOUNTUserAuthRoutes *accountRoutes; 35 | 36 | /// Routes within the `auth` namespace. 37 | @property (nonatomic, readonly) DBAUTHUserAuthRoutes *authRoutes; 38 | 39 | /// Routes within the `check` namespace. 40 | @property (nonatomic, readonly) DBCHECKUserAuthRoutes *checkRoutes; 41 | 42 | /// Routes within the `contacts` namespace. 43 | @property (nonatomic, readonly) DBCONTACTSUserAuthRoutes *contactsRoutes; 44 | 45 | /// Routes within the `fileProperties` namespace. 46 | @property (nonatomic, readonly) DBFILEPROPERTIESUserAuthRoutes *filePropertiesRoutes; 47 | 48 | /// Routes within the `fileRequests` namespace. 49 | @property (nonatomic, readonly) DBFILEREQUESTSUserAuthRoutes *fileRequestsRoutes; 50 | 51 | /// Routes within the `files` namespace. 52 | @property (nonatomic, readonly) DBFILESUserAuthRoutes *filesRoutes; 53 | 54 | /// Initializes the `DBUserBaseClient` object with a networking client. 55 | - (instancetype)initWithTransportClient:(id)client; 56 | 57 | @end 58 | 59 | NS_ASSUME_NONNULL_END 60 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Client/DBUserBaseClient.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import "DBUserBaseClient.h" 8 | #import "DBACCOUNTUserAuthRoutes.h" 9 | #import "DBAUTHUserAuthRoutes.h" 10 | #import "DBCHECKUserAuthRoutes.h" 11 | #import "DBCONTACTSUserAuthRoutes.h" 12 | #import "DBFILEPROPERTIESUserAuthRoutes.h" 13 | #import "DBFILEREQUESTSUserAuthRoutes.h" 14 | #import "DBFILESUserAuthRoutes.h" 15 | #import "DBTransportClientProtocol.h" 16 | 17 | @implementation DBUserBaseClient 18 | 19 | - (instancetype)initWithTransportClient:(id)client { 20 | self = [super init]; 21 | if (self) { 22 | _transportClient = client; 23 | _accountRoutes = [[DBACCOUNTUserAuthRoutes alloc] init:client]; 24 | _authRoutes = [[DBAUTHUserAuthRoutes alloc] init:client]; 25 | _checkRoutes = [[DBCHECKUserAuthRoutes alloc] init:client]; 26 | _contactsRoutes = [[DBCONTACTSUserAuthRoutes alloc] init:client]; 27 | _filePropertiesRoutes = [[DBFILEPROPERTIESUserAuthRoutes alloc] init:client]; 28 | _fileRequestsRoutes = [[DBFILEREQUESTSUserAuthRoutes alloc] init:client]; 29 | _filesRoutes = [[DBFILESUserAuthRoutes alloc] init:client]; 30 | } 31 | return self; 32 | } 33 | @end 34 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Resources/DBSerializableProtocol.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | /// 10 | /// Protocol which all Obj-C SDK API route objects must implement, otherwise a compiler-warning 11 | /// is generated. 12 | /// 13 | @protocol DBSerializable 14 | 15 | /// 16 | /// Class method which returns a json-compatible dictionary representation of the 17 | /// supplied object. 18 | /// 19 | /// @param instance An instance of the API object to be serialized. 20 | /// 21 | /// @return A serialized, json-compatible dictionary representation of the API object. 22 | /// 23 | + (nullable NSDictionary *)serialize:(id)instance; 24 | 25 | /// 26 | /// Class method which returns an instantiation of the supplied object as represented 27 | /// by a json-compatible dictionary. 28 | /// 29 | /// @param dict A dictionary representation of the API object to be serialized. 30 | /// 31 | /// @return A deserialized, instantiation of the API object. 32 | /// 33 | + (id)deserialize:(NSDictionary *)dict; 34 | 35 | /// 36 | /// Description method. 37 | /// 38 | /// @return A human-readable representation of the current object. 39 | /// 40 | - (NSString *)description; 41 | 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Resources/DBStoneBase.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBStoneBase.h" 6 | 7 | @implementation DBRoute 8 | 9 | - (instancetype)init:(NSString *)name 10 | namespace_:(NSString *)namespace_ 11 | deprecated:(NSNumber *)deprecated 12 | resultType:(Class)resultType 13 | errorType:(Class)errorType 14 | attrs:(NSDictionary *)attrs 15 | dataStructSerialBlock:(id (^)(id))dataStructSerialBlock 16 | dataStructDeserialBlock:(id (^)(id))dataStructDeserialBlock { 17 | self = [self init]; 18 | if (self != nil) { 19 | _name = name; 20 | _namespace_ = namespace_; 21 | _deprecated = deprecated; 22 | _resultType = resultType; 23 | _errorType = errorType; 24 | _attrs = attrs; 25 | _dataStructSerialBlock = dataStructSerialBlock; 26 | _dataStructDeserialBlock = dataStructDeserialBlock; 27 | } 28 | return self; 29 | } 30 | 31 | @end 32 | 33 | @implementation DBNilObject 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Resources/DBStoneValidators.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | /// 10 | /// Validator functions used by SDK to impose value constraints. 11 | /// 12 | @interface DBStoneValidators : NSObject 13 | 14 | /// Validator for `NSString` objects. Enforces minimum length and/or maximum length and/or regex pattern. 15 | + (void (^_Nonnull)(NSString *))stringValidator:(nullable NSNumber *)minLength 16 | maxLength:(nullable NSNumber *)maxLength 17 | pattern:(nullable NSString *)pattern; 18 | 19 | /// Validator for `NSNumber` objects. Enforces minimum value and/or maximum value. 20 | + (void (^_Nonnull)(NSNumber *))numericValidator:(nullable NSNumber *)minValue maxValue:(nullable NSNumber *)maxValue; 21 | 22 | /// Validator for `NSArray` objects. Enforces minimum number of items and/or maximum minimum number of items. Method 23 | /// requires a validator block that can validate each item in the array. 24 | + (void (^_Nonnull)(NSArray *))arrayValidator:(nullable NSNumber *)minItems 25 | maxItems:(nullable NSNumber *)maxItems 26 | itemValidator:(void (^_Nullable)(T))itemValidator; 27 | 28 | /// Validator for `NSDictionary` objects. Enforces minimum number of items and/or maximum minimum number of items. 29 | /// Method 30 | /// requires a validator block that can validate each item in the array. 31 | + (void (^_Nonnull)(NSDictionary *))mapValidator:(void (^_Nullable)(T))itemValidator; 32 | 33 | /// Wrapper validator for nullable objects. Maintains a reference to the object's normal non-nullable validator. 34 | + (void (^_Nonnull)(T))nullableValidator:(void (^_Nonnull)(T))internalValidator; 35 | 36 | + (void (^_Nonnull)(id))nonnullValidator:(void (^_Nullable)(id))internalValidator; 37 | 38 | + (void)raiseIllegalStateErrorWithMessage:(NSString *)message; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/DBACCOUNTUserAuthRoutes.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBTasks.h" 10 | 11 | @class DBACCOUNTPhotoSourceArg; 12 | @class DBACCOUNTSetProfilePhotoError; 13 | @class DBACCOUNTSetProfilePhotoResult; 14 | @class DBNilObject; 15 | 16 | @protocol DBTransportClient; 17 | 18 | /// 19 | /// Routes for the `Account` namespace 20 | /// 21 | 22 | NS_ASSUME_NONNULL_BEGIN 23 | 24 | @interface DBACCOUNTUserAuthRoutes : NSObject 25 | 26 | /// An instance of the networking client that each route will use to submit a 27 | /// request. 28 | @property (nonatomic, readonly) id client; 29 | 30 | /// Initializes the `DBACCOUNTUserAuthRoutes` namespace container object with a 31 | /// networking client. 32 | - (instancetype)init:(id)client; 33 | 34 | /// 35 | /// Sets a user's profile photo. 36 | /// 37 | /// @param photo Image to set as the user's new profile photo. 38 | /// 39 | /// @return Through the response callback, the caller will receive a `DBACCOUNTSetProfilePhotoResult` object on success 40 | /// or a `DBACCOUNTSetProfilePhotoError` object on failure. 41 | /// 42 | - (DBRpcTask *)setProfilePhoto: 43 | (DBACCOUNTPhotoSourceArg *)photo; 44 | 45 | @end 46 | 47 | NS_ASSUME_NONNULL_END 48 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/DBACCOUNTUserAuthRoutes.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import "DBACCOUNTUserAuthRoutes.h" 8 | #import "DBACCOUNTPhotoSourceArg.h" 9 | #import "DBACCOUNTRouteObjects.h" 10 | #import "DBACCOUNTSetProfilePhotoArg.h" 11 | #import "DBACCOUNTSetProfilePhotoError.h" 12 | #import "DBACCOUNTSetProfilePhotoResult.h" 13 | #import "DBRequestErrors.h" 14 | #import "DBStoneBase.h" 15 | #import "DBTransportClientProtocol.h" 16 | 17 | @implementation DBACCOUNTUserAuthRoutes 18 | 19 | - (instancetype)init:(id)client { 20 | self = [super init]; 21 | if (self) { 22 | _client = client; 23 | } 24 | return self; 25 | } 26 | 27 | - (DBRpcTask *)setProfilePhoto:(DBACCOUNTPhotoSourceArg *)photo { 28 | DBRoute *route = DBACCOUNTRouteObjects.DBACCOUNTSetProfilePhoto; 29 | DBACCOUNTSetProfilePhotoArg *arg = [[DBACCOUNTSetProfilePhotoArg alloc] initWithPhoto:photo]; 30 | return [self.client requestRpc:route arg:arg]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/DBAUTHAppAuthRoutes.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBTasks.h" 10 | 11 | @class DBAUTHTokenFromOAuth1Error; 12 | @class DBAUTHTokenFromOAuth1Result; 13 | @class DBNilObject; 14 | 15 | @protocol DBTransportClient; 16 | 17 | /// 18 | /// Routes for the `Auth` namespace 19 | /// 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @interface DBAUTHAppAuthRoutes : NSObject 24 | 25 | /// An instance of the networking client that each route will use to submit a 26 | /// request. 27 | @property (nonatomic, readonly) id client; 28 | 29 | /// Initializes the `DBAUTHAppAuthRoutes` namespace container object with a 30 | /// networking client. 31 | - (instancetype)init:(id)client; 32 | 33 | /// 34 | /// Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token. 35 | /// 36 | /// @param oauth1Token The supplied OAuth 1.0 access token. 37 | /// @param oauth1TokenSecret The token secret associated with the supplied access token. 38 | /// 39 | /// @return Through the response callback, the caller will receive a `DBAUTHTokenFromOAuth1Result` object on success or 40 | /// a `DBAUTHTokenFromOAuth1Error` object on failure. 41 | /// 42 | - (DBRpcTask *)tokenFromOauth1:(NSString *)oauth1Token 43 | oauth1TokenSecret: 44 | (NSString *)oauth1TokenSecret; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/DBAUTHAppAuthRoutes.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import "DBAUTHAppAuthRoutes.h" 8 | #import "DBAUTHRouteObjects.h" 9 | #import "DBAUTHTokenFromOAuth1Arg.h" 10 | #import "DBAUTHTokenFromOAuth1Error.h" 11 | #import "DBAUTHTokenFromOAuth1Result.h" 12 | #import "DBRequestErrors.h" 13 | #import "DBStoneBase.h" 14 | #import "DBTransportClientProtocol.h" 15 | 16 | @implementation DBAUTHAppAuthRoutes 17 | 18 | - (instancetype)init:(id)client { 19 | self = [super init]; 20 | if (self) { 21 | _client = client; 22 | } 23 | return self; 24 | } 25 | 26 | - (DBRpcTask *)tokenFromOauth1:(NSString *)oauth1Token oauth1TokenSecret:(NSString *)oauth1TokenSecret { 27 | DBRoute *route = DBAUTHRouteObjects.DBAUTHTokenFromOauth1; 28 | DBAUTHTokenFromOAuth1Arg *arg = 29 | [[DBAUTHTokenFromOAuth1Arg alloc] initWithOauth1Token:oauth1Token oauth1TokenSecret:oauth1TokenSecret]; 30 | return [self.client requestRpc:route arg:arg]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/DBAUTHUserAuthRoutes.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBTasks.h" 10 | 11 | @class DBAUTHTokenFromOAuth1Error; 12 | @class DBAUTHTokenFromOAuth1Result; 13 | @class DBNilObject; 14 | 15 | @protocol DBTransportClient; 16 | 17 | /// 18 | /// Routes for the `Auth` namespace 19 | /// 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @interface DBAUTHUserAuthRoutes : NSObject 24 | 25 | /// An instance of the networking client that each route will use to submit a 26 | /// request. 27 | @property (nonatomic, readonly) id client; 28 | 29 | /// Initializes the `DBAUTHUserAuthRoutes` namespace container object with a 30 | /// networking client. 31 | - (instancetype)init:(id)client; 32 | 33 | /// 34 | /// Disables the access token used to authenticate the call. If there is a corresponding refresh token for the access 35 | /// token, this disables that refresh token, as well as any other access tokens for that refresh token. 36 | /// 37 | /// 38 | /// @return Through the response callback, the caller will receive a `void` object on success or a `void` object on 39 | /// failure. 40 | /// 41 | - (DBRpcTask *)tokenRevoke; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/DBAUTHUserAuthRoutes.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import "DBAUTHUserAuthRoutes.h" 8 | #import "DBAUTHRouteObjects.h" 9 | #import "DBAUTHTokenFromOAuth1Arg.h" 10 | #import "DBAUTHTokenFromOAuth1Error.h" 11 | #import "DBAUTHTokenFromOAuth1Result.h" 12 | #import "DBRequestErrors.h" 13 | #import "DBStoneBase.h" 14 | #import "DBTransportClientProtocol.h" 15 | 16 | @implementation DBAUTHUserAuthRoutes 17 | 18 | - (instancetype)init:(id)client { 19 | self = [super init]; 20 | if (self) { 21 | _client = client; 22 | } 23 | return self; 24 | } 25 | 26 | - (DBRpcTask *)tokenRevoke { 27 | DBRoute *route = DBAUTHRouteObjects.DBAUTHTokenRevoke; 28 | return [self.client requestRpc:route arg:nil]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/DBCHECKAppAuthRoutes.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBTasks.h" 10 | 11 | @class DBCHECKEchoResult; 12 | @class DBNilObject; 13 | 14 | @protocol DBTransportClient; 15 | 16 | /// 17 | /// Routes for the `Check` namespace 18 | /// 19 | 20 | NS_ASSUME_NONNULL_BEGIN 21 | 22 | @interface DBCHECKAppAuthRoutes : NSObject 23 | 24 | /// An instance of the networking client that each route will use to submit a 25 | /// request. 26 | @property (nonatomic, readonly) id client; 27 | 28 | /// Initializes the `DBCHECKAppAuthRoutes` namespace container object with a 29 | /// networking client. 30 | - (instancetype)init:(id)client; 31 | 32 | /// 33 | /// This endpoint performs App Authentication, validating the supplied app key and secret, and returns the supplied 34 | /// string, to allow you to test your code and connection to the Dropbox API. It has no other effect. If you receive an 35 | /// HTTP 200 response with the supplied query, it indicates at least part of the Dropbox API infrastructure is working 36 | /// and that the app key and secret valid. 37 | /// 38 | /// 39 | /// @return Through the response callback, the caller will receive a `DBCHECKEchoResult` object on success or a `void` 40 | /// object on failure. 41 | /// 42 | - (DBRpcTask *)app; 43 | 44 | /// 45 | /// This endpoint performs App Authentication, validating the supplied app key and secret, and returns the supplied 46 | /// string, to allow you to test your code and connection to the Dropbox API. It has no other effect. If you receive an 47 | /// HTTP 200 response with the supplied query, it indicates at least part of the Dropbox API infrastructure is working 48 | /// and that the app key and secret valid. 49 | /// 50 | /// @param query The string that you'd like to be echoed back to you. 51 | /// 52 | /// @return Through the response callback, the caller will receive a `DBCHECKEchoResult` object on success or a `void` 53 | /// object on failure. 54 | /// 55 | - (DBRpcTask *)app:(nullable NSString *)query; 56 | 57 | @end 58 | 59 | NS_ASSUME_NONNULL_END 60 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/DBCHECKAppAuthRoutes.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import "DBCHECKAppAuthRoutes.h" 8 | #import "DBCHECKEchoArg.h" 9 | #import "DBCHECKEchoResult.h" 10 | #import "DBCHECKRouteObjects.h" 11 | #import "DBRequestErrors.h" 12 | #import "DBStoneBase.h" 13 | #import "DBTransportClientProtocol.h" 14 | 15 | @implementation DBCHECKAppAuthRoutes 16 | 17 | - (instancetype)init:(id)client { 18 | self = [super init]; 19 | if (self) { 20 | _client = client; 21 | } 22 | return self; 23 | } 24 | 25 | - (DBRpcTask *)app { 26 | DBRoute *route = DBCHECKRouteObjects.DBCHECKApp; 27 | DBCHECKEchoArg *arg = [[DBCHECKEchoArg alloc] initDefault]; 28 | return [self.client requestRpc:route arg:arg]; 29 | } 30 | 31 | - (DBRpcTask *)app:(NSString *)query { 32 | DBRoute *route = DBCHECKRouteObjects.DBCHECKApp; 33 | DBCHECKEchoArg *arg = [[DBCHECKEchoArg alloc] initWithQuery:query]; 34 | return [self.client requestRpc:route arg:arg]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/DBCHECKUserAuthRoutes.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBTasks.h" 10 | 11 | @class DBCHECKEchoResult; 12 | @class DBNilObject; 13 | 14 | @protocol DBTransportClient; 15 | 16 | /// 17 | /// Routes for the `Check` namespace 18 | /// 19 | 20 | NS_ASSUME_NONNULL_BEGIN 21 | 22 | @interface DBCHECKUserAuthRoutes : NSObject 23 | 24 | /// An instance of the networking client that each route will use to submit a 25 | /// request. 26 | @property (nonatomic, readonly) id client; 27 | 28 | /// Initializes the `DBCHECKUserAuthRoutes` namespace container object with a 29 | /// networking client. 30 | - (instancetype)init:(id)client; 31 | 32 | /// 33 | /// This endpoint performs User Authentication, validating the supplied access token, and returns the supplied string, 34 | /// to allow you to test your code and connection to the Dropbox API. It has no other effect. If you receive an HTTP 200 35 | /// response with the supplied query, it indicates at least part of the Dropbox API infrastructure is working and that 36 | /// the access token is valid. 37 | /// 38 | /// 39 | /// @return Through the response callback, the caller will receive a `DBCHECKEchoResult` object on success or a `void` 40 | /// object on failure. 41 | /// 42 | - (DBRpcTask *)user; 43 | 44 | /// 45 | /// This endpoint performs User Authentication, validating the supplied access token, and returns the supplied string, 46 | /// to allow you to test your code and connection to the Dropbox API. It has no other effect. If you receive an HTTP 200 47 | /// response with the supplied query, it indicates at least part of the Dropbox API infrastructure is working and that 48 | /// the access token is valid. 49 | /// 50 | /// @param query The string that you'd like to be echoed back to you. 51 | /// 52 | /// @return Through the response callback, the caller will receive a `DBCHECKEchoResult` object on success or a `void` 53 | /// object on failure. 54 | /// 55 | - (DBRpcTask *)user:(nullable NSString *)query; 56 | 57 | @end 58 | 59 | NS_ASSUME_NONNULL_END 60 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/DBCHECKUserAuthRoutes.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import "DBCHECKUserAuthRoutes.h" 8 | #import "DBCHECKEchoArg.h" 9 | #import "DBCHECKEchoResult.h" 10 | #import "DBCHECKRouteObjects.h" 11 | #import "DBRequestErrors.h" 12 | #import "DBStoneBase.h" 13 | #import "DBTransportClientProtocol.h" 14 | 15 | @implementation DBCHECKUserAuthRoutes 16 | 17 | - (instancetype)init:(id)client { 18 | self = [super init]; 19 | if (self) { 20 | _client = client; 21 | } 22 | return self; 23 | } 24 | 25 | - (DBRpcTask *)user { 26 | DBRoute *route = DBCHECKRouteObjects.DBCHECKUser; 27 | DBCHECKEchoArg *arg = [[DBCHECKEchoArg alloc] initDefault]; 28 | return [self.client requestRpc:route arg:arg]; 29 | } 30 | 31 | - (DBRpcTask *)user:(NSString *)query { 32 | DBRoute *route = DBCHECKRouteObjects.DBCHECKUser; 33 | DBCHECKEchoArg *arg = [[DBCHECKEchoArg alloc] initWithQuery:query]; 34 | return [self.client requestRpc:route arg:arg]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/DBCONTACTSUserAuthRoutes.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | #import "DBTasks.h" 10 | 11 | @class DBCONTACTSDeleteManualContactsError; 12 | @class DBNilObject; 13 | 14 | @protocol DBTransportClient; 15 | 16 | /// 17 | /// Routes for the `Contacts` namespace 18 | /// 19 | 20 | NS_ASSUME_NONNULL_BEGIN 21 | 22 | @interface DBCONTACTSUserAuthRoutes : NSObject 23 | 24 | /// An instance of the networking client that each route will use to submit a 25 | /// request. 26 | @property (nonatomic, readonly) id client; 27 | 28 | /// Initializes the `DBCONTACTSUserAuthRoutes` namespace container object with a 29 | /// networking client. 30 | - (instancetype)init:(id)client; 31 | 32 | /// 33 | /// Removes all manually added contacts. You'll still keep contacts who are on your team or who you imported. New 34 | /// contacts will be added when you share. 35 | /// 36 | /// 37 | /// @return Through the response callback, the caller will receive a `void` object on success or a `void` object on 38 | /// failure. 39 | /// 40 | - (DBRpcTask *)deleteManualContacts; 41 | 42 | /// 43 | /// Removes manually added contacts from the given list. 44 | /// 45 | /// @param emailAddresses List of manually added contacts to be deleted. 46 | /// 47 | /// @return Through the response callback, the caller will receive a `void` object on success or a 48 | /// `DBCONTACTSDeleteManualContactsError` object on failure. 49 | /// 50 | - (DBRpcTask *)deleteManualContactsBatch: 51 | (NSArray *)emailAddresses; 52 | 53 | @end 54 | 55 | NS_ASSUME_NONNULL_END 56 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/DBCONTACTSUserAuthRoutes.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import "DBCONTACTSUserAuthRoutes.h" 8 | #import "DBCONTACTSDeleteManualContactsArg.h" 9 | #import "DBCONTACTSDeleteManualContactsError.h" 10 | #import "DBCONTACTSRouteObjects.h" 11 | #import "DBRequestErrors.h" 12 | #import "DBStoneBase.h" 13 | #import "DBTransportClientProtocol.h" 14 | 15 | @implementation DBCONTACTSUserAuthRoutes 16 | 17 | - (instancetype)init:(id)client { 18 | self = [super init]; 19 | if (self) { 20 | _client = client; 21 | } 22 | return self; 23 | } 24 | 25 | - (DBRpcTask *)deleteManualContacts { 26 | DBRoute *route = DBCONTACTSRouteObjects.DBCONTACTSDeleteManualContacts; 27 | return [self.client requestRpc:route arg:nil]; 28 | } 29 | 30 | - (DBRpcTask *)deleteManualContactsBatch:(NSArray *)emailAddresses { 31 | DBRoute *route = DBCONTACTSRouteObjects.DBCONTACTSDeleteManualContactsBatch; 32 | DBCONTACTSDeleteManualContactsArg *arg = 33 | [[DBCONTACTSDeleteManualContactsArg alloc] initWithEmailAddresses:emailAddresses]; 34 | return [self.client requestRpc:route arg:arg]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/RouteObjects/DBACCOUNTRouteObjects.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | @class DBRoute; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// 14 | /// Stone route objects for the Account namespace. Each route in the Account 15 | /// namespace has its own static object, which contains information about the 16 | /// route. 17 | /// 18 | @interface DBACCOUNTRouteObjects : NSObject 19 | 20 | /// Accessor method for the setProfilePhoto route object. 21 | + (DBRoute *)DBACCOUNTSetProfilePhoto; 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/RouteObjects/DBACCOUNTRouteObjects.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import "DBACCOUNTRouteObjects.h" 8 | #import "DBACCOUNTSetProfilePhotoError.h" 9 | #import "DBACCOUNTSetProfilePhotoResult.h" 10 | #import "DBACCOUNTUserAuthRoutes.h" 11 | #import "DBRequestErrors.h" 12 | #import "DBStoneBase.h" 13 | 14 | @implementation DBACCOUNTRouteObjects 15 | 16 | static DBRoute *DBACCOUNTSetProfilePhoto; 17 | 18 | static NSObject *lockObj = nil; 19 | + (void)initialize { 20 | static dispatch_once_t onceToken; 21 | dispatch_once(&onceToken, ^{ 22 | lockObj = [[NSObject alloc] init]; 23 | }); 24 | } 25 | 26 | + (DBRoute *)DBACCOUNTSetProfilePhoto { 27 | @synchronized(lockObj) { 28 | if (!DBACCOUNTSetProfilePhoto) { 29 | DBACCOUNTSetProfilePhoto = [[DBRoute alloc] init:@"set_profile_photo" 30 | namespace_:@"account" 31 | deprecated:@NO 32 | resultType:[DBACCOUNTSetProfilePhotoResult class] 33 | errorType:[DBACCOUNTSetProfilePhotoError class] 34 | attrs:@{ 35 | @"auth" : @"user", 36 | @"host" : @"api", 37 | @"style" : @"rpc" 38 | } 39 | dataStructSerialBlock:nil 40 | dataStructDeserialBlock:nil]; 41 | } 42 | return DBACCOUNTSetProfilePhoto; 43 | } 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/RouteObjects/DBAUTHRouteObjects.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | @class DBRoute; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// 14 | /// Stone route objects for the Auth namespace. Each route in the Auth namespace 15 | /// has its own static object, which contains information about the route. 16 | /// 17 | @interface DBAUTHRouteObjects : NSObject 18 | 19 | /// Accessor method for the tokenFromOauth1 route object. 20 | + (DBRoute *)DBAUTHTokenFromOauth1; 21 | 22 | /// Accessor method for the tokenRevoke route object. 23 | + (DBRoute *)DBAUTHTokenRevoke; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/RouteObjects/DBCHECKRouteObjects.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | @class DBRoute; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// 14 | /// Stone route objects for the Check namespace. Each route in the Check 15 | /// namespace has its own static object, which contains information about the 16 | /// route. 17 | /// 18 | @interface DBCHECKRouteObjects : NSObject 19 | 20 | /// Accessor method for the app route object. 21 | + (DBRoute *)DBCHECKApp; 22 | 23 | /// Accessor method for the user route object. 24 | + (DBRoute *)DBCHECKUser; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/RouteObjects/DBCHECKRouteObjects.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import "DBCHECKRouteObjects.h" 8 | #import "DBCHECKAppAuthRoutes.h" 9 | #import "DBCHECKEchoResult.h" 10 | #import "DBCHECKUserAuthRoutes.h" 11 | #import "DBRequestErrors.h" 12 | #import "DBStoneBase.h" 13 | 14 | @implementation DBCHECKRouteObjects 15 | 16 | static DBRoute *DBCHECKApp; 17 | static DBRoute *DBCHECKUser; 18 | 19 | static NSObject *lockObj = nil; 20 | + (void)initialize { 21 | static dispatch_once_t onceToken; 22 | dispatch_once(&onceToken, ^{ 23 | lockObj = [[NSObject alloc] init]; 24 | }); 25 | } 26 | 27 | + (DBRoute *)DBCHECKApp { 28 | @synchronized(lockObj) { 29 | if (!DBCHECKApp) { 30 | DBCHECKApp = [[DBRoute alloc] init:@"app" 31 | namespace_:@"check" 32 | deprecated:@NO 33 | resultType:[DBCHECKEchoResult class] 34 | errorType:nil 35 | attrs:@{ 36 | @"auth" : @"app", 37 | @"host" : @"api", 38 | @"style" : @"rpc" 39 | } 40 | dataStructSerialBlock:nil 41 | dataStructDeserialBlock:nil]; 42 | } 43 | return DBCHECKApp; 44 | } 45 | } 46 | 47 | + (DBRoute *)DBCHECKUser { 48 | @synchronized(lockObj) { 49 | if (!DBCHECKUser) { 50 | DBCHECKUser = [[DBRoute alloc] init:@"user" 51 | namespace_:@"check" 52 | deprecated:@NO 53 | resultType:[DBCHECKEchoResult class] 54 | errorType:nil 55 | attrs:@{ 56 | @"auth" : @"user", 57 | @"host" : @"api", 58 | @"style" : @"rpc" 59 | } 60 | dataStructSerialBlock:nil 61 | dataStructDeserialBlock:nil]; 62 | } 63 | return DBCHECKUser; 64 | } 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/RouteObjects/DBCONTACTSRouteObjects.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | @class DBRoute; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// 14 | /// Stone route objects for the Contacts namespace. Each route in the Contacts 15 | /// namespace has its own static object, which contains information about the 16 | /// route. 17 | /// 18 | @interface DBCONTACTSRouteObjects : NSObject 19 | 20 | /// Accessor method for the deleteManualContacts route object. 21 | + (DBRoute *)DBCONTACTSDeleteManualContacts; 22 | 23 | /// Accessor method for the deleteManualContactsBatch route object. 24 | + (DBRoute *)DBCONTACTSDeleteManualContactsBatch; 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Generated/Routes/RouteObjects/DBFILEREQUESTSRouteObjects.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | /// Auto-generated by Stone, do not modify. 5 | /// 6 | 7 | #import 8 | 9 | @class DBRoute; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// 14 | /// Stone route objects for the FileRequests namespace. Each route in the 15 | /// FileRequests namespace has its own static object, which contains information 16 | /// about the route. 17 | /// 18 | @interface DBFILEREQUESTSRouteObjects : NSObject 19 | 20 | /// Accessor method for the count route object. 21 | + (DBRoute *)DBFILEREQUESTSCount; 22 | 23 | /// Accessor method for the create route object. 24 | + (DBRoute *)DBFILEREQUESTSCreate; 25 | 26 | /// Accessor method for the delete_ route object. 27 | + (DBRoute *)DBFILEREQUESTSDelete_; 28 | 29 | /// Accessor method for the deleteAllClosed route object. 30 | + (DBRoute *)DBFILEREQUESTSDeleteAllClosed; 31 | 32 | /// Accessor method for the get route object. 33 | + (DBRoute *)DBFILEREQUESTSGet; 34 | 35 | /// Accessor method for the listV2 route object. 36 | + (DBRoute *)DBFILEREQUESTSListV2; 37 | 38 | /// Accessor method for the list route object. 39 | + (DBRoute *)DBFILEREQUESTSList; 40 | 41 | /// Accessor method for the listContinue route object. 42 | + (DBRoute *)DBFILEREQUESTSListContinue; 43 | 44 | /// Accessor method for the update route object. 45 | + (DBRoute *)DBFILEREQUESTSUpdate; 46 | 47 | @end 48 | 49 | NS_ASSUME_NONNULL_END 50 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/DBAppClient.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | #import "DBAppBaseClient.h" 8 | 9 | @class DBTransportDefaultConfig; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// 14 | /// Dropbox API Client for all endpoints with auth type "app". 15 | /// 16 | /// This is the SDK user's primary interface with the Dropbox API. Routes can be accessed via each "namespace" object in 17 | /// the instance fields of its parent, `DBAppBaseClient`. To see a full list of the API endpoints available, 18 | /// please visit: https://www.dropbox.com/developers/documentation/http/documentation. 19 | /// 20 | @interface DBAppClient : DBAppBaseClient 21 | 22 | /// 23 | /// Convenience constructor. 24 | /// 25 | /// Uses standard network configuration parameters. 26 | /// 27 | /// @param appKey The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key 28 | /// is used for querying endpoints that have "app auth" authentication type. 29 | /// @param appSecret The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app 30 | /// key is used for querying endpoints that have "app auth" authentication type. 31 | /// 32 | /// @return An initialized instance. 33 | /// 34 | - (instancetype)initWithAppKey:(NSString *)appKey appSecret:(NSString *)appSecret; 35 | 36 | /// 37 | /// Full constructor. 38 | /// 39 | /// @param transportConfig A wrapper around the different parameters that can be set to change network calling behavior. 40 | /// `DBTransportDefaultConfig` offers a number of different constructors to customize networking settings. 41 | /// 42 | /// @return An initialized instance. 43 | /// 44 | - (instancetype)initWithTransportConfig:(nullable DBTransportDefaultConfig *)transportConfig; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/DBAppClient.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBAppClient.h" 6 | #import "DBTransportDefaultClient.h" 7 | #import "DBTransportDefaultConfig.h" 8 | 9 | @implementation DBAppClient 10 | 11 | - (instancetype)initWithAppKey:(NSString *)appKey appSecret:(NSString *)appSecret { 12 | DBTransportDefaultConfig *transportConfig = 13 | [[DBTransportDefaultConfig alloc] initWithAppKey:appKey appSecret:appSecret]; 14 | return [self initWithTransportConfig:transportConfig]; 15 | } 16 | 17 | - (instancetype)initWithTransportConfig:(DBTransportDefaultConfig *)transportConfig { 18 | DBTransportDefaultClient *transportClient = 19 | [[DBTransportDefaultClient alloc] initWithAccessToken:nil tokenUid:nil transportConfig:transportConfig]; 20 | return [super initWithTransportClient:transportClient]; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/DBSDKImportsShared.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | /// Import generated shared files 6 | 7 | #import "DBSDKImportsGenerated.h" 8 | 9 | /// Import handwritten shared files 10 | 11 | #import "DBAppClient.h" 12 | #import "DBClientsManager.h" 13 | #import "DBUserClient.h" 14 | 15 | /// Networking 16 | #import "DBGlobalErrorResponseHandler.h" 17 | #import "DBHandlerTypes.h" 18 | #import "DBRequestErrors.h" 19 | #import "DBTasks.h" 20 | #import "DBTasksStorage.h" 21 | #import "DBTransportBaseClient.h" 22 | #import "DBTransportBaseConfig.h" 23 | #import "DBTransportClientProtocol.h" 24 | #import "DBTransportDefaultClient.h" 25 | #import "DBTransportDefaultConfig.h" 26 | 27 | /// OAuth 28 | #import "DBOAuthManager.h" 29 | #import "DBOAuthResult.h" 30 | #import "DBOAuthResultCompletion.h" 31 | #import "DBSDKKeychain.h" 32 | #import "DBScopeRequest.h" 33 | #import "DBSharedApplicationProtocol.h" 34 | 35 | /// Resources 36 | #import "DBCustomDatatypes.h" 37 | #import "DBCustomRoutes.h" 38 | #import "DBCustomTasks.h" 39 | #import "DBSDKConstants.h" 40 | 41 | /// "Generated" Resources 42 | #import "DBSerializableProtocol.h" 43 | #import "DBStoneBase.h" 44 | #import "DBStoneSerializers.h" 45 | #import "DBStoneValidators.h" 46 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/Networking/DBSessionData.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBSessionData.h" 6 | 7 | #pragma mark - Progress data 8 | 9 | @implementation DBProgressData 10 | 11 | - (instancetype)initWithProgressData:(int64_t)committed 12 | totalCommitted:(int64_t)totalCommitted 13 | expectedToCommit:(int64_t)expectedToCommit { 14 | self = [super init]; 15 | if (self) { 16 | _committed = committed; 17 | _totalCommitted = totalCommitted; 18 | _expectedToCommit = expectedToCommit; 19 | } 20 | return self; 21 | } 22 | 23 | @end 24 | 25 | #pragma mark - Completion data 26 | 27 | @implementation DBCompletionData 28 | 29 | - (instancetype)initWithCompletionData:(NSData *)responseBody 30 | responseMetadata:(NSURLResponse *)responseMetadata 31 | responseError:(NSError *)responseError 32 | urlOutput:(NSURL *)urlOutput { 33 | self = [super init]; 34 | if (self) { 35 | _responseBody = responseBody; 36 | _responseMetadata = responseMetadata; 37 | _responseError = responseError; 38 | _urlOutput = urlOutput; 39 | } 40 | return self; 41 | } 42 | 43 | @end 44 | 45 | #pragma mark - Session data 46 | 47 | @implementation DBSessionData 48 | 49 | - (instancetype)initWithSessionId:(NSString *)sessionId { 50 | self = [super init]; 51 | if (self) { 52 | _sessionId = sessionId; 53 | _responsesData = [NSMutableDictionary new]; 54 | _progressHandlers = [NSMutableDictionary new]; 55 | _rpcHandlers = [NSMutableDictionary new]; 56 | _uploadHandlers = [NSMutableDictionary new]; 57 | _downloadHandlers = [NSMutableDictionary new]; 58 | _progressData = [NSMutableDictionary new]; 59 | _completionData = [NSMutableDictionary new]; 60 | _progressHandlerQueues = [NSMutableDictionary new]; 61 | _responseHandlerQueues = [NSMutableDictionary new]; 62 | } 63 | return self; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/Networking/DBTasksStorage.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | #import "DBTasks.h" 8 | 9 | /// 10 | /// Task storage for upload and download tasks. 11 | /// 12 | /// Offers a convenient, thread-safe storage option for upload and download tasks so that they can be cancelled later. 13 | /// 14 | @interface DBTasksStorage : NSObject 15 | 16 | /// 17 | /// Cancels all tasks stored in the object. 18 | /// 19 | - (void)cancelAllTasks; 20 | 21 | /// 22 | /// Adds the upload task in a thread-safe manner. 23 | /// 24 | /// @note If `cancelAllTasks` has already been called, the task is not only not added, but it is cancelled as well. 25 | /// 26 | /// @param task The task to add. 27 | /// 28 | - (void)addUploadTask:(DBUploadTask *)task; 29 | 30 | /// 31 | /// Removes the upload task in a thread-safe manner. 32 | /// 33 | /// @param task The task to remove. 34 | /// 35 | - (void)removeUploadTask:(DBUploadTask *)task; 36 | 37 | /// 38 | /// Adds the download to url task in a thread-safe manner. 39 | /// 40 | /// @note If `cancelAllTasks` has already been called, the task is not only not added, but it is cancelled as well. 41 | /// 42 | /// @param task The task to add. 43 | /// 44 | - (void)addDownloadUrlTask:(DBDownloadUrlTask *)task; 45 | 46 | /// 47 | /// Removes the download to url task in a thread-safe manner. 48 | /// 49 | /// @param task The task to remove. 50 | /// 51 | - (void)removeDownloadUrlTask:(DBDownloadUrlTask *)task; 52 | 53 | /// 54 | /// Adds the download to data task in a thread-safe manner. 55 | /// 56 | /// @note If `cancelAllTasks` has already been called, the task is not only not added, but it is cancelled as well. 57 | /// 58 | /// @param task The task to add. 59 | /// 60 | - (void)addDownloadDataTask:(DBDownloadDataTask *)task; 61 | 62 | /// 63 | /// Removes the download to data task in a thread-safe manner. 64 | /// 65 | /// @param task The task to remove. 66 | /// 67 | - (void)removeDownloadDataTask:(DBDownloadDataTask *)task; 68 | 69 | /// 70 | /// Determine whether there are tasks in progress. 71 | /// 72 | /// @return Whether there are tasks in progress. 73 | /// 74 | - (BOOL)tasksInProgress; 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/Networking/DBTransportBaseHostnameConfig.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2017 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBStoneBase.h" 6 | #import 7 | 8 | /// Enum of Dropbox API hosts. 9 | typedef NS_ENUM(NSUInteger, DBRouteHost) { 10 | DBRouteHostUnknown = 0, 11 | DBRouteHostApi, 12 | DBRouteHostContent, 13 | DBRouteHostNotify, 14 | }; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | @interface DBRoute (DropboxHost) 19 | 20 | /// @return which host this route points to 21 | @property (nonatomic, readonly) DBRouteHost host; 22 | 23 | @end 24 | 25 | /// 26 | /// Configuration class that defines the different hostnames that the Dropbox SDK uses 27 | /// 28 | @interface DBTransportBaseHostnameConfig : NSObject 29 | 30 | @property (nonatomic, readonly, copy) NSString *meta; 31 | @property (nonatomic, readonly, copy) NSString *api; 32 | @property (nonatomic, readonly, copy) NSString *content; 33 | @property (nonatomic, readonly, copy) NSString *notify; 34 | 35 | /// 36 | /// Default constructor. 37 | /// 38 | /// @return An initialized instance of hostname configurations with default values set for all hostnames 39 | /// 40 | - (instancetype)init; 41 | 42 | /// 43 | /// Constructor that takes in a set of custom hostnames to use for api calls. 44 | /// 45 | /// @param meta the hostname to metaserver 46 | /// @param api the hostname to api server 47 | /// @param content the hostname to content server 48 | /// @param notify the hostname to notify server 49 | /// 50 | /// @return An initialized instance with the provided hostname configuration 51 | /// 52 | - (instancetype)initWithMeta:(NSString *)meta api:(NSString *)api content:(NSString *)content notify:(NSString *)notify; 53 | 54 | /// 55 | /// Returns the prefix to use for API calls to the given route type. 56 | /// 57 | /// @param route the type of route to get a prefix for. 58 | /// Currently the valid hosts are: "api", "content", and "notify". 59 | /// 60 | /// @return An absolute URL prefix, typically "https:///2" or nil if an invalid route type is provided. 61 | /// 62 | - (nullable NSString *)apiV2PrefixWithRoute:(DBRoute *)route; 63 | 64 | @end 65 | 66 | NS_ASSUME_NONNULL_END 67 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/Networking/DBTransportBaseHostnameConfig.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBTransportBaseHostnameConfig.h" 6 | #import "DBSDKConstants.h" 7 | #import "DBStoneBase.h" 8 | 9 | @implementation DBRoute (DropboxHost) 10 | 11 | - (DBRouteHost)host { 12 | NSString *routeHost = self.attrs[@"host"]; 13 | if ([routeHost isEqualToString:@"api"]) { 14 | return DBRouteHostApi; 15 | } 16 | if ([routeHost isEqualToString:@"content"]) { 17 | return DBRouteHostContent; 18 | } 19 | if ([routeHost isEqualToString:@"notify"]) { 20 | return DBRouteHostNotify; 21 | } 22 | return DBRouteHostUnknown; 23 | } 24 | 25 | @end 26 | 27 | @implementation DBTransportBaseHostnameConfig 28 | 29 | - (instancetype)init { 30 | return [self initWithMeta:@"www.dropbox.com" 31 | api:@"api.dropbox.com" 32 | content:@"api-content.dropbox.com" 33 | notify:@"notify.dropboxapi.com"]; 34 | } 35 | 36 | - (instancetype)initWithMeta:(NSString *)meta 37 | api:(NSString *)api 38 | content:(NSString *)content 39 | notify:(NSString *)notify { 40 | if (self = [super init]) { 41 | _meta = meta; 42 | _api = api; 43 | _content = content; 44 | _notify = notify; 45 | } 46 | return self; 47 | } 48 | 49 | - (nullable NSString *)apiV2PrefixWithRoute:(DBRoute *)route { 50 | switch (route.host) { 51 | case DBRouteHostApi: 52 | return [NSString stringWithFormat:@"https://%@/2", _api]; 53 | case DBRouteHostContent: 54 | return [NSString stringWithFormat:@"https://%@/2", _content]; 55 | case DBRouteHostNotify: 56 | return [NSString stringWithFormat:@"https://%@/2", _notify]; 57 | case DBRouteHostUnknown: 58 | return nil; 59 | } 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/Networking/DBURLSessionTaskResponseBlockWrapper.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBURLSessionTaskResponseBlockWrapper.h" 6 | 7 | @interface DBURLSessionTaskResponseBlockWrapper () 8 | 9 | @property (nonatomic, strong, nullable) DBRpcResponseBlockStorage rpcResponseBlock; 10 | @property (nonatomic, strong, nullable) DBUploadResponseBlockStorage uploadResponseBlock; 11 | @property (nonatomic, strong, nullable) DBDownloadResponseBlockStorage downloadResponseBlock; 12 | 13 | @end 14 | 15 | @implementation DBURLSessionTaskResponseBlockWrapper 16 | 17 | + (DBURLSessionTaskResponseBlockWrapper *)withRpcResponseBlock:(DBRpcResponseBlockStorage)responseBlock { 18 | DBURLSessionTaskResponseBlockWrapper *wrapper = [[DBURLSessionTaskResponseBlockWrapper alloc] init]; 19 | wrapper.rpcResponseBlock = responseBlock; 20 | return wrapper; 21 | } 22 | 23 | + (DBURLSessionTaskResponseBlockWrapper *)withUploadResponseBlock:(DBUploadResponseBlockStorage)responseBlock { 24 | DBURLSessionTaskResponseBlockWrapper *wrapper = [[DBURLSessionTaskResponseBlockWrapper alloc] init]; 25 | wrapper.uploadResponseBlock = responseBlock; 26 | return wrapper; 27 | } 28 | 29 | + (DBURLSessionTaskResponseBlockWrapper *)withDownloadResponseBlock:(DBDownloadResponseBlockStorage)responseBlock { 30 | DBURLSessionTaskResponseBlockWrapper *wrapper = [[DBURLSessionTaskResponseBlockWrapper alloc] init]; 31 | wrapper.downloadResponseBlock = responseBlock; 32 | return wrapper; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/OAuth/DBAccessToken+NSSecureCoding.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBAccessToken+NSSecureCoding.h" 6 | #import "DBOAuthManager.h" 7 | 8 | @implementation DBAccessToken (NSSecureCoding) 9 | 10 | + (DBAccessToken *)createTokenFromData:(NSData *)data { 11 | DBAccessToken *token = nil; 12 | if (@available(iOS 11.0, macOS 10.13, *)) { 13 | token = [NSKeyedUnarchiver unarchivedObjectOfClass:[DBAccessToken class] fromData:data error:NULL]; 14 | } else { 15 | id object = [NSKeyedUnarchiver unarchiveObjectWithData:data]; 16 | if ([object isKindOfClass:[DBAccessToken class]]) { 17 | token = object; 18 | } 19 | } 20 | return token; 21 | } 22 | 23 | + (NSData *)covertTokenToData:(DBAccessToken *)token { 24 | NSData *data = nil; 25 | if (@available(iOS 11.0, macOS 10.13, *)) { 26 | data = [NSKeyedArchiver archivedDataWithRootObject:token requiringSecureCoding:YES error:NULL]; 27 | } else { 28 | data = [NSKeyedArchiver archivedDataWithRootObject:token]; 29 | } 30 | return data; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/OAuth/DBAccessTokenProvider.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBOAuthResultCompletion.h" 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | /// Protocol for objects that provide an access token and offer a way to refresh (short-lived) token. 10 | @protocol DBAccessTokenProvider 11 | 12 | /// Returns an access token for making user auth API calls. 13 | @property (nonatomic, readonly) NSString *accessToken; 14 | 15 | /// This refreshes the access token if it's expired or about to expire. 16 | /// The refresh result will be passed back via the completion block. 17 | - (void)refreshAccessTokenIfNecessary:(DBOAuthCompletion)completion; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/OAuth/DBLoadingStatusDelegate.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | /// Protocol for handling loading status during auth flow. 10 | /// Implementing class could show custom UX to reflect loading status. 11 | @protocol DBLoadingStatusDelegate 12 | 13 | /// Called when auth flow is loading/waiting for some data. e.g. Waiting for a network request to finish. 14 | - (void)showLoading; 15 | 16 | /// Called when auth flow finishes loading/waiting. e.g. A network request finished. 17 | - (void)dismissLoading; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/OAuth/DBOAuthConstants.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBOAuthConstants.h" 6 | 7 | NSString *const kDBCodeChallengeKey = @"code_challenge"; 8 | NSString *const kDBCodeChallengeMethodKey = @"code_challenge_method"; 9 | NSString *const kDBTokenAccessTypeKey = @"token_access_type"; 10 | NSString *const kDBResponseTypeKey = @"response_type"; 11 | NSString *const kDBScopeKey = @"scope"; 12 | NSString *const kDBIncludeGrantedScopesKey = @"include_granted_scopes"; 13 | NSString *const kDBStateKey = @"state"; 14 | NSString *const kDBExtraQueryParamsKey = @"extra_query_params"; 15 | NSString *const kDBOauthCodeKey = @"oauth_code"; 16 | NSString *const kDBOauthTokenKey = @"oauth_token"; 17 | NSString *const kDBOauthSecretKey = @"oauth_token_secret"; 18 | NSString *const kDBUidKey = @"uid"; 19 | NSString *const kDBErrorKey = @"error"; 20 | NSString *const kDBErrorDescriptionKey = @"error_description"; 21 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/OAuth/DBOAuthResultCompletion.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | @class DBOAuthResult; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /// Callback block for oauth result. 12 | typedef void (^DBOAuthCompletion)(DBOAuthResult *_Nullable); 13 | 14 | NS_ASSUME_NONNULL_END 15 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/OAuth/DBSDKKeychain.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | #import "DBHandlerTypes.h" 8 | 9 | @class DBAccessToken; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /// 14 | /// Keychain class for storing OAuth tokens. 15 | /// 16 | @interface DBSDKKeychain : NSObject 17 | 18 | /// Stores DBAccessToken in the keychain. 19 | + (BOOL)storeAccessToken:(DBAccessToken *)accessToken; 20 | 21 | /// Retrieves a DBAccessToken from the corresponding key (uid) from the keychain. 22 | + (nullable DBAccessToken *)retrieveTokenWithUid:(NSString *)uid; 23 | 24 | /// Retrieves all token uids from the keychain. 25 | + (NSArray *)retrieveAllTokenIds; 26 | 27 | /// Deletes the stored token value for a key (uid). 28 | + (BOOL)deleteTokenWithUid:(NSString *)uid; 29 | 30 | /// Deletes all key / value pairs in the keychain. 31 | + (BOOL)clearAllTokens; 32 | 33 | /// Checks if performing a v1 token migration is necessary, and if so, performs it. 34 | + (BOOL)checkAndPerformV1TokenMigration:(DBTokenMigrationResponseBlock)responseBlock 35 | queue:(nullable NSOperationQueue *)queue 36 | appKey:(NSString *)appKey 37 | appSecret:(NSString *)appSecret; 38 | 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/OAuth/DBScopeRequest.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | typedef NS_ENUM(NSUInteger, DBScopeType) { 10 | DBScopeTypeTeam = 0, 11 | DBScopeTypeUser, 12 | }; 13 | 14 | /// Contains the information of requested scopes. 15 | @interface DBScopeRequest : NSObject 16 | 17 | - (instancetype)init NS_UNAVAILABLE; 18 | 19 | /// 20 | /// Designated Initializer. 21 | /// 22 | /// @param scopeType Type of the requested scopes. 23 | /// @param scopes A list of scope returned by Dropbox server. Each scope correspond to a group of API endpoints. 24 | /// To call one API endpoint you have to obtains the scope first otherwise you will get HTTP 401. 25 | /// @param includeGrantedScopes If false, Dropbox will give you the scopes in scopes array. 26 | /// Otherwise Dropbox server will return a token with all scopes user previously granted your app 27 | /// together with the new scopes. 28 | - (instancetype)initWithScopeType:(DBScopeType)scopeType 29 | scopes:(NSArray *)scopes 30 | includeGrantedScopes:(BOOL)includeGrantedScopes NS_DESIGNATED_INITIALIZER; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/OAuth/DBScopeRequest.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2020 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBScopeRequest.h" 6 | 7 | @interface DBScopeRequest () 8 | 9 | @property (nonatomic, readonly) NSString *scopeType; 10 | @property (nonatomic, readonly, assign) BOOL includeGrantedScopes; 11 | @property (nonatomic, readonly) NSArray *scopes; 12 | 13 | @end 14 | 15 | @implementation DBScopeRequest 16 | 17 | - (instancetype)initWithScopeType:(DBScopeType)scopeType 18 | scopes:(NSArray *)scopes 19 | includeGrantedScopes:(BOOL)includeGrantedScopes { 20 | self = [super init]; 21 | if (self) { 22 | _scopeType = [DBScopeRequest stringFromScopeType:scopeType]; 23 | _scopes = scopes; 24 | _includeGrantedScopes = includeGrantedScopes; 25 | } 26 | return self; 27 | } 28 | 29 | - (NSString *)scopeString { 30 | if (_scopes.count == 0) { 31 | return nil; 32 | } else { 33 | return [_scopes componentsJoinedByString:@" "]; 34 | } 35 | } 36 | 37 | + (NSString *)stringFromScopeType:(DBScopeType)scopeType { 38 | switch (scopeType) { 39 | case DBScopeTypeTeam: 40 | return @"team"; 41 | case DBScopeTypeUser: 42 | return @"user"; 43 | } 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/Resources/DBCustomDatatypes.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBCustomDatatypes.h" 6 | #import "DBTasksStorage.h" 7 | 8 | @implementation DBBatchUploadData 9 | 10 | - (instancetype)initWithFileCommitInfo:(NSDictionary *)fileUrlsToCommitInfo 11 | progressBlock:(DBProgressBlock)progressBlock 12 | responseBlock:(DBBatchUploadResponseBlock)responseBlock 13 | queue:(NSOperationQueue *)queue { 14 | self = [super init]; 15 | if (self) { 16 | // we specifiy a custom queue so that the main thread is not blocked 17 | _queue = queue; 18 | [_queue setMaxConcurrentOperationCount:1]; 19 | 20 | // create a special background queue to monitor progress and sleep until the processing is complete 21 | _pollingQueue = [NSOperationQueue new]; 22 | [_pollingQueue setMaxConcurrentOperationCount:1]; 23 | 24 | // we want to make sure all of our file data has been uploaded 25 | // before we make our final batch commit call to `/upload_session/finish_batch`, 26 | // but we also don't want to wait for each response before making a 27 | // succeeding upload call, so we used dispatch groups to wait for all upload 28 | // calls to return before making our final batch commit call 29 | _uploadGroup = dispatch_group_create(); 30 | 31 | _fileUrlsToCommitInfo = fileUrlsToCommitInfo; 32 | _fileUrlsToRequestErrors = [NSMutableDictionary new]; 33 | _finishArgs = [NSMutableArray new]; 34 | 35 | _progressBlock = progressBlock; 36 | _responseBlock = responseBlock; 37 | 38 | _cancel = NO; 39 | 40 | _taskStorage = [DBTasksStorage new]; 41 | } 42 | return self; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/Resources/DBCustomTasks.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import 6 | 7 | @class DBBatchUploadData; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /// 12 | /// Dropbox task object for custom batch upload route. 13 | /// 14 | /// The batch upload route is a convenience layer over several of our auto-generated API endpoints. For this reason, 15 | /// there is less flexibility and granularity of control. Progress and response handlers are passed directly into this 16 | /// route (rather than installed via this task object) and only `cancel` is available. This task is also specific to 17 | /// only one endpoint, rather than an entire class (style) of endpoints. 18 | /// 19 | @interface DBBatchUploadTask : NSObject 20 | 21 | /// 22 | /// DBBatchUploadTask full constructor. 23 | /// 24 | /// @param uploadData relevant to the particular batch upload request. 25 | /// 26 | /// @returns A DBBatchUploadTask instance. 27 | /// 28 | - (instancetype)initWithUploadData:(DBBatchUploadData *)uploadData; 29 | 30 | /// 31 | /// Cancels the current request. 32 | /// 33 | - (void)cancel; 34 | 35 | /// 36 | /// Determines whether there are any upload tasks still in progress. 37 | /// 38 | /// NOTE: This will return `NO` during the final polling / commit phase of batch upload. 39 | /// 40 | /// @return Whether there are any upload tasks in progress. 41 | /// 42 | - (BOOL)uploadsInProgress; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/Resources/DBCustomTasks.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | #import "DBCustomTasks.h" 6 | #import "DBCustomDatatypes.h" 7 | #import "DBTasksStorage.h" 8 | 9 | @implementation DBBatchUploadTask { 10 | DBBatchUploadData *_uploadData; 11 | } 12 | 13 | - (instancetype)initWithUploadData:(DBBatchUploadData *)uploadData { 14 | self = [super init]; 15 | if (self) { 16 | _uploadData = uploadData; 17 | } 18 | return self; 19 | } 20 | 21 | - (void)cancel { 22 | _uploadData.cancel = YES; 23 | [_uploadData.taskStorage cancelAllTasks]; 24 | } 25 | 26 | - (BOOL)uploadsInProgress { 27 | return [_uploadData.taskStorage tasksInProgress]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/Resources/DBSDKConstants.h: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | /// Constants for the SDK should go here. 6 | 7 | #import 8 | 9 | extern NSString *const kDBSDKVersion; 10 | extern NSString *const kDBSDKDefaultUserAgentPrefix; 11 | extern NSString *const kDBSDKForegroundSessionId; 12 | extern NSString *const kDBSDKBackgroundSessionId; 13 | extern NSString *const kDBSDKCSRFKey; 14 | -------------------------------------------------------------------------------- /Source/ObjectiveDropboxOfficial/Shared/Handwritten/Resources/DBSDKConstants.m: -------------------------------------------------------------------------------- 1 | /// 2 | /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. 3 | /// 4 | 5 | /// Constants for the SDK should go here. 6 | 7 | #import 8 | 9 | #import "DBSDKConstants.h" 10 | 11 | NSString *const kDBSDKVersion = @"6.2.3"; 12 | NSString *const kDBSDKDefaultUserAgentPrefix = @"OfficialDropboxObjCSDKv2"; 13 | NSString *const kDBSDKForegroundSessionId = @"com.dropbox.dropbox_sdk_obj_c_foreground"; 14 | NSString *const kDBSDKBackgroundSessionId = @"com.dropbox.dropbox_sdk_obj_c_background"; 15 | NSString *const kDBSDKCSRFKey = @"kDBSDKCSRFKeyObjCSDK"; 16 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/IntegrationTests/TestAppType.h: -------------------------------------------------------------------------------- 1 | // 2 | // TestAppType.h 3 | // TestObjectiveDropbox 4 | // 5 | // Created by Stephen Cobbe on 2/16/17. 6 | // Copyright © 2017 Dropbox. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSInteger, ApiAppPermissionType) { 12 | FullDropboxScoped, 13 | FullDropboxScopedForTeamTesting, 14 | }; 15 | 16 | /// Toggle this variable depending on which set of tests you are running. 17 | static ApiAppPermissionType appPermission = (ApiAppPermissionType)FullDropboxScoped; 18 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/IntegrationTests/TestData.m: -------------------------------------------------------------------------------- 1 | // 2 | // TestData.m 3 | // TestObjectiveDropbox_iOS 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #import "TestData.h" 11 | 12 | @implementation TestData 13 | 14 | - (instancetype)init { 15 | self = [super init]; 16 | if (self) { 17 | // generic user data 18 | _testId = [NSString stringWithFormat:@"%d", arc4random_uniform(1000)]; 19 | _baseFolder = @"/Testing/ObjectiveDropboxTests"; 20 | _testFolderName = @"testFolder"; 21 | _testFolderPath = [NSString stringWithFormat:@"%@%@%@%@%@", _baseFolder, @"/", _testFolderName, @"_", _testId]; 22 | _testShareFolderName = @"testShareFolder"; 23 | _testShareFolderPath = 24 | [NSString stringWithFormat:@"%@%@%@%@%@", _baseFolder, @"/", _testShareFolderName, @"_", _testId]; 25 | _testFileName = @"testFile"; 26 | _testFilePath = [NSString stringWithFormat:@"%@%@%@", _testFolderPath, @"/", _testFileName]; 27 | _testData = @"testing data example"; 28 | _fileData = [_testData dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO]; 29 | _fileManager = [NSFileManager defaultManager]; 30 | _directoryURL = [_fileManager URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask][0]; 31 | _destURL = [_directoryURL URLByAppendingPathComponent:_testFileName]; 32 | _destURLException = [_directoryURL 33 | URLByAppendingPathComponent:[NSString stringWithFormat:@"%@%@", _testFileName, @"_does_not_exist"]]; 34 | 35 | // generic team data 36 | _testIdTeam = [NSString stringWithFormat:@"%d", arc4random_uniform(1000)]; 37 | _groupName = [NSString stringWithFormat:@"%@%@", @"GroupName", _testIdTeam]; 38 | _groupExternalId = [NSString stringWithFormat:@"%@%@", @"group-", _testIdTeam]; 39 | 40 | // personal user data 41 | _accountId = @"dbid:"; 42 | _accountId2 = @"dbid:"; 43 | _accountId3 = @"dbid:"; 44 | _accountId3Email = @""; 45 | 46 | // personal team data 47 | _teamMemberEmail = @""; 48 | _teamMemberNewEmail = @""; 49 | 50 | // App key and secret 51 | _fullDropboxAppKey = @""; 52 | _fullDropboxAppSecret = @""; 53 | } 54 | return self; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target "TestObjectiveDropbox_iOS" do 4 | platform :ios, '9.0' 5 | pod 'ObjectiveDropboxOfficial', :path => '../' 6 | target "TestObjectiveDropbox_iOSTests" do 7 | pod 'ObjectiveDropboxOfficial', :path => '../' 8 | end 9 | end 10 | 11 | target "TestObjectiveDropbox_macOS" do 12 | platform :osx, '10.10' 13 | pod 'ObjectiveDropboxOfficial', :path => '../' 14 | target "TestObjectiveDropbox_macOSTests" do 15 | pod 'ObjectiveDropboxOfficial', :path => '../' 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ObjectiveDropboxOfficial (6.2.0) 3 | 4 | DEPENDENCIES: 5 | - ObjectiveDropboxOfficial (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | ObjectiveDropboxOfficial: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | ObjectiveDropboxOfficial: 2115db7fc21d267c6f0606557a6ea0b69aa37d30 13 | 14 | PODFILE CHECKSUM: 9fd03646bd8426ab0dfe9b4eaa0407fd51d7b8ff 15 | 16 | COCOAPODS: 1.11.2 17 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_iOS/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // TestObjectiveDropbox_iOS 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface AppDelegate : UIResponder 11 | 12 | @property(strong, nonatomic) UIWindow *window; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_iOS/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleURLTypes 22 | 23 | 24 | CFBundleURLName 25 | 26 | CFBundleURLSchemes 27 | 28 | db-<APP_KEY> 29 | db-<APP_KEY> 30 | db-<APP_KEY> 31 | 32 | 33 | 34 | CFBundleVersion 35 | 1 36 | LSApplicationQueriesSchemes 37 | 38 | dbapi-8-emm 39 | dbapi-2 40 | 41 | LSRequiresIPhoneOS 42 | 43 | UILaunchStoryboardName 44 | LaunchScreen 45 | UIMainStoryboardFile 46 | Main 47 | UIRequiredDeviceCapabilities 48 | 49 | armv7 50 | 51 | UISupportedInterfaceOrientations 52 | 53 | UIInterfaceOrientationPortrait 54 | UIInterfaceOrientationLandscapeLeft 55 | UIInterfaceOrientationLandscapeRight 56 | 57 | UISupportedInterfaceOrientations~ipad 58 | 59 | UIInterfaceOrientationPortrait 60 | UIInterfaceOrientationPortraitUpsideDown 61 | UIInterfaceOrientationLandscapeLeft 62 | UIInterfaceOrientationLandscapeRight 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_iOS/TestObjectiveDropbox_iOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | keychain-access-groups 6 | 7 | $(AppIdentifierPrefix)com.dropbox.TestObjectiveDropbox-iOS 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_iOS/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // TestObjectiveDropbox_iOS 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class DBOpenWithInfo; 11 | 12 | @interface ViewController : UIViewController 13 | 14 | - (void)checkButtons; 15 | 16 | - (void)setOpenWithInfoNSURL:(DBOpenWithInfo * _Nonnull)openWithInfoNSURL; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_iOS/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TestObjectiveDropbox_iOS 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import "AppDelegate.h" 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | @autoreleasepool { 13 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_iOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_iOSTests/TestAuthTokenGenerator.h: -------------------------------------------------------------------------------- 1 | @class DBAccessToken; 2 | 3 | @interface TestAuthTokenGenerator : NSObject 4 | + (nonnull NSString *)environmentVariableForKey:(nonnull NSString *)key; 5 | 6 | + (nullable DBAccessToken *)refreshToken:(nullable NSString *)refreshToken 7 | apiKey:(nullable NSString *)apiKey 8 | scopes:(nonnull NSArray*)scopes; 9 | @end 10 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_macOS/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // TestObjectiveDropbox_macOS 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface AppDelegate : NSObject 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_macOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_macOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleURLTypes 22 | 23 | 24 | CFBundleURLName 25 | 26 | CFBundleURLSchemes 27 | 28 | db-<APP_KEY> 29 | db-<APP_KEY> 30 | db-<APP_KEY> 31 | 32 | 33 | 34 | CFBundleVersion 35 | 1 36 | LSApplicationQueriesSchemes 37 | 38 | dbapi-8-emm 39 | dbapi-2 40 | 41 | LSMinimumSystemVersion 42 | $(MACOSX_DEPLOYMENT_TARGET) 43 | NSHumanReadableCopyright 44 | Copyright © 2016 Dropbox. All rights reserved. 45 | NSMainStoryboardFile 46 | Main 47 | NSPrincipalClass 48 | NSApplication 49 | 50 | 51 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_macOS/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // TestObjectiveDropbox_macOS 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface ViewController : NSViewController 11 | 12 | - (void)checkButtons; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_macOS/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TestObjectiveDropbox_macOS 4 | // 5 | // Copyright © 2016 Dropbox. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | int main(int argc, const char *argv[]) { return NSApplicationMain(argc, argv); } 11 | -------------------------------------------------------------------------------- /TestObjectiveDropbox/TestObjectiveDropbox_macOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /update_repo_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Release checklist 4 | # 5 | # 0. Check on DBApp, Chime, Paper. Run analyzer. 6 | # 1. Make sure test data is reset 7 | # 2. Run generator 8 | # 3. Check test project, run unit tests 9 | # 4. Check pod spec lint 10 | # 5. Increment version with script 11 | # 6. Update Carthage example project 12 | # 7. Push to CocoaPods 13 | # 14 | 15 | cat TestObjectiveDropbox/IntegrationTests/TestData.m 16 | 17 | # python generate_base_client.py 18 | 19 | # pod spec lint 20 | -------------------------------------------------------------------------------- /update_version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Script for updating ObjectiveDropboxOfficial version number 4 | 5 | echo 6 | 7 | if [ "$#" -ne 1 ]; then 8 | echo "Requires 1 parameter. Usage: \`./update_version \`" 9 | exit 1 10 | fi 11 | 12 | arg_version_regex="^[0-9]+\.[0-9]+\.[0-9]+$" 13 | version_regex="[0-9]+\.[0-9]+\.[0-9]+" 14 | 15 | podspec=./ObjectiveDropboxOfficial.podspec 16 | readme=./README.md 17 | user_agent=Source/ObjectiveDropboxOfficial/Shared/Handwritten/Resources/DBSDKConstants.m 18 | ios_version=Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_iOS/Info.plist 19 | mac_version=Source/ObjectiveDropboxOfficial/Platform/ObjectiveDropboxOfficial_macOS/Info.plist 20 | 21 | if ! [[ $1 =~ $arg_version_regex ]]; then 22 | echo "\"$1\" version string must have format x.x.x" 23 | exit 1 24 | else 25 | echo "Updating SDK text to version \"$1\"" 26 | fi 27 | 28 | echo 29 | echo 30 | 31 | echo "Replacing podspec version number..." 32 | sed -i '' -E "s/s.version = '$version_regex'/s.version = '$1'/" $podspec 33 | echo '--------------------' 34 | cat $podspec | grep $1 35 | echo '--------------------' 36 | echo 37 | 38 | echo "Replacing README version number..." 39 | sed -i '' -E "s/~> $version_regex/~> $1/" $readme 40 | echo '--------------------' 41 | cat $readme | grep $1 42 | echo '--------------------' 43 | echo 44 | 45 | echo "Replacing User Agent version number..." 46 | sed -i '' -E "s/kDBSDKVersion = @\"$version_regex\";/kDBSDKVersion = @\"$1\";/" $user_agent 47 | echo '--------------------' 48 | cat $user_agent | grep $1 49 | echo '--------------------' 50 | echo 51 | 52 | echo "Replacing iOS xcodeproj version number..." 53 | sed -i '' -E "s/$version_regex/$1/" $ios_version 54 | echo '--------------------' 55 | cat $ios_version | grep $1 56 | echo '--------------------' 57 | echo 58 | 59 | echo "Replacing macOS xcodeproj version number..." 60 | sed -i '' -E "s/$version_regex/$1/" $mac_version 61 | echo '--------------------' 62 | cat $mac_version | grep $1 63 | echo '--------------------' 64 | echo 65 | echo 66 | echo "Committing changes and tagging commit." 67 | git commit -am "$1 release." 68 | git tag "$1" 69 | echo 70 | echo "Changes ready for review and push" 71 | echo 72 | --------------------------------------------------------------------------------