@@ -1760,46 +1760,6 @@ public extension Sequence where Element: ParseInstallation {
17601760// MARK: Migrate from Objective-C SDK
17611761public extension ParseInstallation {
17621762
1763- /**
1764- Migrates the `ParseInstallation` *asynchronously* from the Objective-C SDK Keychain.
1765-
1766- - parameter copyEntireInstallation: When **true**, copies the
1767- entire `ParseInstallation` from the Objective-C SDK Keychain to the Swift SDK. When
1768- **false**, only the `channels` and `deviceToken` are copied from the Objective-C
1769- SDK Keychain; resulting in a new `ParseInstallation` for original `sessionToken`.
1770- Defaults to **true**.
1771- - parameter options: A set of header options sent to the server. Defaults to an empty set.
1772- - parameter callbackQueue: The queue to return to after completion. Default value of .main.
1773- - parameter completion: The block to execute.
1774- It should have the following argument signature: `(Result<Self, ParseError>)`.
1775- - note: The default cache policy for this method is `.reloadIgnoringLocalCacheData`. If a developer
1776- desires a different policy, it should be inserted in `options`.
1777- - warning: When initializing the Swift SDK, `migratingFromObjcSDK` should be set to **false**
1778- when calling this method.
1779- - warning: The latest **PFInstallation** from the Objective-C SDK should be saved to your
1780- Parse Server before calling this method. This method assumes **PFInstallation.installationId**
1781- is saved to the Keychain. If the **installationId** is not saved to the Keychain, this method will
1782- not work.
1783- */
1784- @available ( * , deprecated, message: " This does not work, use become() instead " )
1785- static func migrateFromObjCKeychain( copyEntireInstallation: Bool = true ,
1786- options: API . Options = [ ] ,
1787- callbackQueue: DispatchQueue = . main,
1788- completion: @escaping ( Result < Self , ParseError > ) -> Void ) {
1789- guard let objcParseKeychain = KeychainStore . objectiveC,
1790- let oldInstallationId: String = objcParseKeychain. objectObjectiveC ( forKey: " installationId " ) else {
1791- let error = ParseError ( code: . unknownError,
1792- message: " Could not find Installation in the Objective-C SDK Keychain " )
1793- callbackQueue. async {
1794- completion ( . failure( error) )
1795- }
1796- return
1797- }
1798- become ( oldInstallationId,
1799- copyEntireInstallation: copyEntireInstallation,
1800- completion: completion)
1801- }
1802-
18031763 /**
18041764 Deletes the Objective-C Keychain along with the Objective-C `ParseInstallation`
18051765 from the Parse Server *asynchronously* and executes the given callback block.
0 commit comments