Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
Added a note about using the main ATProtoKit class's initializer when
using a method like getSession, refreshSession, or createAccount.
  • Loading branch information
MasterJ93 committed Dec 26, 2024
1 parent 8f34163 commit 73aeb94
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/ATProtoKit/ATProtoKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ public class ATProtoKit: ATProtoKitConfiguration, ATRecordConfiguration {
/// project's `CFBundleIdentifier` or an identifier named
/// `com.cjrriley.ATProtoKit`. However, you can manually override this.
///
/// If you're using methods such as
/// ``ATProtoKit/ATProtoKit/createAccount(email:handle:existingDID:inviteCode:verificationCode:verificationPhone:password:recoveryKey:plcOperation:pdsURL:)``
/// or ``ATProtoKit/ATProtoKit/getSession(by:pdsURL:)``, be sure to set
/// `canUseBlueskyRecords` to false. While the initializer does check to see if the records
/// have been added, it's best not to invoke it, esepcially if you're using ATProtoKit for a
/// generic AT Protocol service that doesn't use Bluesky records.
///
/// - Important: This initializer may potentially block the thread if
/// `canUseBlueskyRecords` is `true`. In this case, it's a good idea to move the initializer
/// to a `Task` block in order to prevent that from happening.
Expand Down

0 comments on commit 73aeb94

Please sign in to comment.