HBSupportController

Objective-C

@interface HBSupportController : NSObject

Swift

class HBSupportController : NSObject

The HBSupportController class in CepheiPrefs provides a factory that configures an email composer for package support.

The resulting view controller should be presented modally; it should not be pushed on a navigation controller stack.

  • Initialises a Mail composer by using information provided by a bundle and preferences identifier.

    Either a bundle or preferences identifier is required. If both are nil, an exception will be thrown. The email address is derived from the Author field of the package’s control file. HBSupportController implicitly adds the user’s package listing (output of dpkg -l) and the preferences plist as attachments.

    Declaration

    Objective-C

    + (nonnull UIViewController *)
        supportViewControllerForBundle:(nullable NSBundle *)bundle
                 preferencesIdentifier:(nullable NSString *)preferencesIdentifier;

    Swift

    class func supportViewController(for bundle: Bundle?, preferencesIdentifier: String?) -> UIViewController

    Parameters

    bundle

    A bundle included with the package.

    preferencesIdentifier

    A preferences identifier that is used by the package.

    Return Value

    A pre-configured email composer.

  • Initialises a Mail composer by using information provided by a bundle, preferences identifier, and optional email address.

    Either a bundle or preferences identifier is required. If both are nil, an exception will be thrown. If sendToEmail is nil, the email address is derived from the Author field of the package’s control file. HBSupportController implicitly adds the user’s package listing (output of dpkg -l) and the preferences plist as attachments.

    Declaration

    Objective-C

    + (nonnull UIViewController *)
        supportViewControllerForBundle:(nullable NSBundle *)bundle
                 preferencesIdentifier:(nullable NSString *)preferencesIdentifier
                           sendToEmail:(nullable NSString *)sendToEmail;

    Swift

    class func supportViewController(for bundle: Bundle?, preferencesIdentifier: String?, sendToEmail: String?) -> UIViewController

    Parameters

    bundle

    A bundle included with the package.

    preferencesIdentifier

    A preferences identifier that is used by the package.

    sendToEmail

    The email address to prefill in the To field. Pass nil to use the email address from the package.

    Return Value

    A pre-configured email composer.

Deprecated

  • Deprecated

    TechSupport is no longer supported.

    No longer supported. Returns nil.

    Declaration

    Objective-C

    + (nonnull id)linkInstructionForEmailAddress:(nonnull NSString *)emailAddress;

    Swift

    class func linkInstruction(forEmailAddress emailAddress: String) -> Any

    Return Value

    nil.

  • Deprecated

    TechSupport is no longer supported.

    Initialises a Mail composer by using information provided by a bundle.

    Refer to +supportViewControllerForBundle:preferencesIdentifier:linkInstruction:supportInstructions: for information on how the bundle is used.

    Declaration

    Objective-C

    + (nonnull UIViewController *)supportViewControllerForBundle:
        (nonnull NSBundle *)bundle;

    Swift

    class func supportViewController(for bundle: Bundle) -> UIViewController

    Parameters

    bundle

    A bundle included with the package.

    Return Value

    A pre-configured email composer.

  • Deprecated

    Use +[HBSupportController supportViewControllerForBundle:preferencesIdentifier:].

    Initialises a Mail composer by using information provided by either a bundle or a preferences identifier, and providing it a custom link instruction and support instructions.

    The bundle may set the key HBPackageIdentifier in its Info.plist, containing the package identifier to gather information from. Otherwise, the dpkg file lists are searched to find the package that contains the bundle. The package’s name, identifier, and author will be used to fill out fields in the information that the user will submit.

    Declaration

    Objective-C

    + (nonnull UIViewController *)
        supportViewControllerForBundle:(nullable NSBundle *)bundle
                 preferencesIdentifier:(nullable NSString *)preferencesIdentifier
                       linkInstruction:(nullable id)linkInstruction
                   supportInstructions:(nullable NSArray *)supportInstructions;

    Swift

    class func supportViewController(for bundle: Bundle?, preferencesIdentifier: String?, linkInstruction: Any?, supportInstructions: [Any]?) -> UIViewController

    Parameters

    bundle

    A bundle included with the package.

    preferencesIdentifier

    The preferences identifier of the package, if it’s different from the package identifier that contains the bundle.

    linkInstruction

    Ignored.

    supportInstructions

    Ignored.

    Return Value

    A pre-configured email composer.