This commit is contained in:
Colby Williams 2018-08-16 13:13:29 -04:00
Родитель 740d02b289
Коммит 5d11873d24
18 изменённых файлов: 1 добавлений и 2205 удалений

Просмотреть файл

@ -1 +0,0 @@
4.1

7
iOS/Azure.xcworkspace/contents.xcworkspacedata сгенерированный
Просмотреть файл

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:/Users/colbylwilliams/GitHub/Azure.Mobile/iOS/AzureMobile/AzureMobile.xcodeproj">
</FileRef>
</Workspace>

Просмотреть файл

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>FILEHEADER</key>
<string>
// ___FILENAME___
// ___PROJECTNAME___
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//</string>
</dict>
</plist>

Просмотреть файл

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B12207F9BA80011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile iOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B1B207F9BA80011BE1B"
BuildableName = "AzureMobile iOS Tests.xctest"
BlueprintName = "AzureMobile iOS Tests"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B12207F9BA80011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile iOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B12207F9BA80011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile iOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B12207F9BA80011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile iOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

Просмотреть файл

@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B31207F9CB10011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile macOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B39207F9CB10011BE1B"
BuildableName = "AzureMobile macOS Tests.xctest"
BlueprintName = "AzureMobile macOS Tests"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B31207F9CB10011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile macOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B31207F9CB10011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile macOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B31207F9CB10011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile macOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

Просмотреть файл

@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B4D207F9CD50011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile tvOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B55207F9CD50011BE1B"
BuildableName = "AzureMobile tvOS Tests.xctest"
BlueprintName = "AzureMobile tvOS Tests"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B4D207F9CD50011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile tvOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B4D207F9CD50011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile tvOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B4D207F9CD50011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile tvOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

Просмотреть файл

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B69207F9CF50011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile watchOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B69207F9CF50011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile watchOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93011B69207F9CF50011BE1B"
BuildableName = "AzureMobile.framework"
BlueprintName = "AzureMobile watchOS"
ReferencedContainer = "container:AzureMobile.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

Просмотреть файл

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>AzureMobile iOS.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>AzureMobile macOS.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>AzureMobile tvOS.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>AzureMobile watchOS.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>AzureMobile.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>

Просмотреть файл

@ -1,3 +0,0 @@
github "Nike-Inc/Willow" ~> 5.0
github "kishikawakatsumi/KeychainAccess" ~> 3.1
github "Azure/Azure.iOS"

Просмотреть файл

@ -1,3 +0,0 @@
github "Azure/Azure.iOS" "v0.1.3"
github "Nike-Inc/Willow" "5.0.2"
github "kishikawakatsumi/KeychainAccess" "v3.1.1"

Просмотреть файл

@ -1,13 +0,0 @@
//
// AzureMobile.h
// AzureMobile
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
@import Foundation;
FOUNDATION_EXPORT double AzureMobileVersionNumber;
FOUNDATION_EXPORT const unsigned char AzureMobileVersionString[];

Просмотреть файл

@ -1,98 +0,0 @@
//
// DefaultPermissionProvider.swift
// AzureMobile
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
import Foundation
import AzureData
public struct PermissionRequest : Codable {
let databaseId: String
let collectionId: String
let documentId: String?
let tokenDuration: Int
let permissionMode: PermissionMode
}
public class DefaultPermissionProvider : PermissionProvider {
let baseUrl: URL
let session: URLSession
lazy var encoder: JSONEncoder = getPermissionEncoder()
lazy var decoder: JSONDecoder = getPermissionDecoder()
public var configuration: PermissionProviderConfiguration!
public init (withBaseUrl url: URL, providerConfiguration: PermissionProviderConfiguration = PermissionProviderConfiguration.default, sessionConfiguration: URLSessionConfiguration = URLSessionConfiguration.default) {
baseUrl = url
configuration = providerConfiguration
session = URLSession(configuration: sessionConfiguration)
}
public func getPermission(forCollectionWithId collectionId: String, inDatabase databaseId: String, withPermissionMode mode: PermissionMode, completion: @escaping (Response<Permission>) -> Void) {
let permissionRequest = PermissionRequest(databaseId: databaseId, collectionId: collectionId, documentId: nil, tokenDuration: Int(configuration.defaultTokenDuration), permissionMode: mode)
let url = baseUrl.appendingPathComponent("api/data/permission")
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
do {
request.httpBody = try encoder.encode(permissionRequest)
} catch {
completion(Response(PermissionProviderError.getPermissionFailed)); return;
}
session.dataTask(with: request) { (data, response, error) in
let httpResponse = response as? HTTPURLResponse
if let error = error {
completion(Response(request: request, data: data, response: httpResponse, result: .failure(error)))
} else if let data = data {
//Log.debugMessage(String(data: data, encoding: .utf8) ?? "fail")
do {
let permission = try self.decoder.decode(Permission.self, from: data)
completion(Response(request: request, data: data, response: httpResponse, result: .success(permission)))
} catch {
completion(Response(request: request, data: data, response: httpResponse, result: .failure(error))); return;
}
} else {
completion(Response(request: request, data: data, response: httpResponse, result: .failure(DocumentClientError(withKind: .unknownError)))); return;
}
}.resume()
}
public func getPermission(forDocumentWithId documentId: String, inCollection collectionId: String, inDatabase databaseId: String, withPermissionMode mode: PermissionMode, completion: @escaping (Response<Permission>) -> Void) {}
public func getPermission(forAttachmentsWithId attachmentId: String, onDocument documentId: String, inCollection collectionId: String, inDatabase databaseId: String, withPermissionMode mode: PermissionMode, completion: @escaping (Response<Permission>) -> Void) {}
public func getPermission(forStoredProcedureWithId storedProcedureId: String, inCollection collectionId: String, inDatabase databaseId: String, withPermissionMode mode: PermissionMode, completion: @escaping (Response<Permission>) -> Void) {}
public func getPermission(forUserDefinedFunctionWithId functionId: String, inCollection collectionId: String, inDatabase databaseId: String, withPermissionMode mode: PermissionMode, completion: @escaping (Response<Permission>) -> Void) {}
public func getPermission(forTriggerWithId triggerId: String, inCollection collectionId: String, inDatabase databaseId: String, withPermissionMode mode: PermissionMode, completion: @escaping (Response<Permission>) -> Void) {}
}

Просмотреть файл

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.1.3</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

Просмотреть файл

@ -1,129 +0,0 @@
//
// DefaultPermissionProviderTests.swift
// AzureMobile
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
import XCTest
import AzureData
@testable import AzureMobile
class DefaultPermissionProviderTests: XCTestCase {
let timeout: TimeInterval = 30.0
lazy var createExpectation = self.expectation(description: "should create and return colleciton")
lazy var listExpectation = self.expectation(description: "should return a list of colleciton")
lazy var getExpectation = self.expectation(description: "should get and return colleciton")
lazy var getDocExpectation = self.expectation(description: "should get and return document")
lazy var deleteExpectation = self.expectation(description: "should delete colleciton")
lazy var queryExpectation = self.expectation(description: "should query colleciton")
lazy var replaceExpectation = self.expectation(description: "should replace colleciton")
lazy var refreshExpectation = self.expectation(description: "should refresh colleciton")
fileprivate(set) var collection:DocumentCollection?
let customStringKey = "customStringKey"
let customStringValue = "customStringValue"
let customNumberKey = "customNumberKey"
let customNumberValue = 86
var functionUrl: URL? // = your function app url
var databaseName: String? // = your database name
override func setUp() {
super.setUp()
if let dbname = databaseName, !dbname.isEmpty, let baseUrl = functionUrl {
AzureData.configure(forAccountNamed: dbname, withPermissionProvider: DefaultPermissionProvider(withBaseUrl: baseUrl))
}
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
if let dbname = databaseName, !dbname.isEmpty {
var getResponse: Response<DictionaryDocument>?
var listResponse: Response<Resources<DictionaryDocument>>?
var createResponse: Response<DictionaryDocument>?
var deleteResponse: Response<Data>?
AzureData.get(collectionWithId: "MyCollectionFive", inDatabase: "MyDatabaseFive") { r in
self.collection = r.resource
self.getExpectation.fulfill()
}
wait(for: [getExpectation], timeout: timeout)
XCTAssertNotNil(collection)
if let collection = collection {
let newDocument = DictionaryDocument("MyDocument")
newDocument[customStringKey] = customStringValue
newDocument[customNumberKey] = customNumberValue
collection.create(newDocument) { r in
createResponse = r
self.createExpectation.fulfill()
}
wait(for: [createExpectation], timeout: timeout)
XCTAssertNotNil(createResponse?.resource)
collection.get(documentsAs: DictionaryDocument.self) { r in
listResponse = r
self.listExpectation.fulfill()
}
wait(for: [listExpectation], timeout: timeout)
XCTAssertNotNil(listResponse?.resource)
collection.get(documentWithResourceId: newDocument.id, as: DictionaryDocument.self) { r in
getResponse = r
self.getDocExpectation.fulfill()
}
wait(for: [getDocExpectation], timeout: timeout)
XCTAssertNotNil(getResponse?.resource)
if let doc = getResponse?.resource ?? createResponse?.resource {
collection.delete(doc) { r in
deleteResponse = r
self.deleteExpectation.fulfill()
}
wait(for: [deleteExpectation], timeout: timeout)
}
XCTAssert(deleteResponse?.result.isSuccess ?? false)
}
}
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}

Просмотреть файл

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

1
iOS/README.md Normal file
Просмотреть файл

@ -0,0 +1 @@
This project has been moved to https://github.com/Azure/Azure.iOS/tree/master/AzureMobile