export type WidgetTemplateOptions = { appGroup: string; /** When true, omit @main — caller emits a WidgetBundle instead. */ useBundle?: boolean; /** When true, scaffold AppIntentConfiguration (iOS 17+ Edit Widget). */ configurable?: boolean; }; export declare function getWidgetTemplate(name: string, options?: WidgetTemplateOptions): string; export declare const CLIP_TEMPLATE = "import SwiftUI\n\n@main\nstruct AppClipApp: App {\n var body: some Scene {\n WindowGroup {\n ContentView()\n }\n }\n}\n\nstruct ContentView: View {\n var body: some View {\n VStack {\n Text(\"App Clip\")\n .font(.largeTitle)\n Text(\"Welcome to App Clip\")\n .font(.body)\n }\n .padding()\n }\n}"; export declare const IMESSAGE_TEMPLATE = "// iMessage sticker pack\n// Add sticker images to Stickers.xcstickers folder"; export declare const MESSAGES_TEMPLATE = "import UIKit\nimport Messages\n\nclass MessagesViewController: MSMessagesAppViewController {\n override func viewDidLoad() {\n super.viewDidLoad()\n\n setupUI()\n }\n\n private func setupUI() {\n view.backgroundColor = .systemBackground\n\n let titleLabel = UILabel()\n titleLabel.text = \"iMessage App\"\n titleLabel.font = .boldSystemFont(ofSize: 24)\n titleLabel.textAlignment = .center\n titleLabel.translatesAutoresizingMaskIntoConstraints = false\n\n let subtitleLabel = UILabel()\n subtitleLabel.text = \"Your interactive iMessage app\"\n subtitleLabel.font = .systemFont(ofSize: 16)\n subtitleLabel.textColor = .secondaryLabel\n subtitleLabel.textAlignment = .center\n subtitleLabel.translatesAutoresizingMaskIntoConstraints = false\n\n view.addSubview(titleLabel)\n view.addSubview(subtitleLabel)\n\n NSLayoutConstraint.activate([\n titleLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor),\n titleLabel.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: -20),\n subtitleLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 8),\n subtitleLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor)\n ])\n }\n\n // MARK: - Conversation Handling\n\n override func didBecomeActive(with conversation: MSConversation) {\n super.didBecomeActive(with: conversation)\n\n // Called when the extension is about to move from the inactive to active state.\n // Use this method to configure your extension and restore previously stored state.\n\n if let selectedMessage = conversation.selectedMessage {\n // Handle a selected message\n print(\"Selected message: \\(selectedMessage)\")\n }\n }\n\n override func willResignActive(with conversation: MSConversation) {\n super.willResignActive(with: conversation)\n\n // Called when the extension is about to move from the active to inactive state.\n // This will happen when the user dismisses the extension, changes to a different\n // conversation or selects a different input method.\n }\n\n override func didReceive(_ message: MSMessage, conversation: MSConversation) {\n super.didReceive(message, conversation: conversation)\n\n // Called when a message arrives that was generated by another instance of this\n // extension on a remote device.\n }\n\n override func didStartSending(_ message: MSMessage, conversation: MSConversation) {\n super.didStartSending(message, conversation: conversation)\n\n // Called when the user taps the send button.\n }\n\n override func didCancelSending(_ message: MSMessage, conversation: MSConversation) {\n super.didCancelSending(message, conversation: conversation)\n\n // Called when the user deletes the message without sending it.\n }\n\n override func willTransition(to presentationStyle: MSMessagesAppPresentationStyle) {\n super.willTransition(to: presentationStyle)\n\n // Called before the extension transitions to a new presentation style.\n // Use this method to prepare for the change in presentation style.\n }\n\n override func didTransition(to presentationStyle: MSMessagesAppPresentationStyle) {\n super.didTransition(to: presentationStyle)\n\n // Called after the extension transitions to a new presentation style.\n // Use this method to finalize any behaviors associated with the change in presentation style.\n }\n}"; export declare const SHARE_TEMPLATE = "import UIKit\nimport Social\n\nclass ShareViewController: UIViewController {\n override func viewDidLoad() {\n super.viewDidLoad()\n\n let label = UILabel()\n label.text = \"Share Extension\"\n label.textAlignment = .center\n label.translatesAutoresizingMaskIntoConstraints = false\n\n view.addSubview(label)\n\n NSLayoutConstraint.activate([\n label.centerXAnchor.constraint(equalTo: view.centerXAnchor),\n label.centerYAnchor.constraint(equalTo: view.centerYAnchor)\n ])\n }\n}"; export declare const ACTION_TEMPLATE = "import UIKit\n\nclass ActionViewController: UIViewController {\n override func viewDidLoad() {\n super.viewDidLoad()\n\n let label = UILabel()\n label.text = \"Action Extension\"\n label.textAlignment = .center\n label.translatesAutoresizingMaskIntoConstraints = false\n\n view.addSubview(label)\n\n NSLayoutConstraint.activate([\n label.centerXAnchor.constraint(equalTo: view.centerXAnchor),\n label.centerYAnchor.constraint(equalTo: view.centerYAnchor)\n ])\n }\n}"; export declare const WALLET_TEMPLATE = "import PassKit\nimport UIKit\n\nclass PassProvider: PKIssuerProvisioningExtensionHandler {\n\n override func status() async -> PKIssuerProvisioningExtensionStatus {\n let status = PKIssuerProvisioningExtensionStatus()\n status.requiresAuthentication = true\n status.passEntriesAvailable = true\n status.remotePassEntriesAvailable = true\n return status\n }\n\n override func passEntries() async -> [PKIssuerProvisioningExtensionPassEntry] {\n guard let cardArt = UIImage(named: \"CardArt\")?.cgImage,\n let config = createAddRequestConfiguration() else {\n return []\n }\n\n guard let entry = PKIssuerProvisioningExtensionPaymentPassEntry(\n identifier: \"your-card-identifier\",\n title: \"Your Card\",\n art: cardArt,\n addRequestConfiguration: config\n ) else {\n return []\n }\n\n return [entry]\n }\n\n override func remotePassEntries() async -> [PKIssuerProvisioningExtensionPassEntry] {\n return await passEntries()\n }\n\n override func generateAddPaymentPassRequestForPassEntryWithIdentifier(\n _ identifier: String,\n configuration: PKAddPaymentPassRequestConfiguration,\n certificateChain certificates: [Data],\n nonce: Data,\n nonceSignature: Data\n ) async -> PKAddPaymentPassRequest? {\n // In production: send certificates/nonce to server, get encrypted pass data back\n let request = PKAddPaymentPassRequest()\n // request.encryptedPassData = dataFromServer\n // request.activationData = activationDataFromServer\n return request\n }\n\n private func createAddRequestConfiguration() -> PKAddPaymentPassRequestConfiguration? {\n guard let config = PKAddPaymentPassRequestConfiguration(encryptionScheme: .ECC_V2) else {\n return nil\n }\n config.cardholderName = \"Cardholder Name\"\n config.primaryAccountSuffix = \"1234\"\n config.localizedDescription = \"Your Card Description\"\n config.primaryAccountIdentifier = \"\"\n config.paymentNetwork = .visa\n return config\n }\n}"; export declare const WALLET_UI_TEMPLATE = "import UIKit\nimport PassKit\n\nclass AuthorizationViewController: UIViewController, PKIssuerProvisioningExtensionAuthorizationProviding {\n\n var completionHandler: ((PKIssuerProvisioningExtensionAuthorizationResult) -> Void)?\n\n override func viewDidLoad() {\n super.viewDidLoad()\n setupUI()\n }\n\n private func setupUI() {\n view.backgroundColor = .systemBackground\n\n let titleLabel = UILabel()\n titleLabel.text = \"Authenticate\"\n titleLabel.font = .boldSystemFont(ofSize: 24)\n titleLabel.textAlignment = .center\n titleLabel.translatesAutoresizingMaskIntoConstraints = false\n\n let subtitleLabel = UILabel()\n subtitleLabel.text = \"Verify your identity to add this card\"\n subtitleLabel.font = .systemFont(ofSize: 16)\n subtitleLabel.textColor = .secondaryLabel\n subtitleLabel.textAlignment = .center\n subtitleLabel.translatesAutoresizingMaskIntoConstraints = false\n\n let authenticateButton = UIButton(type: .system)\n authenticateButton.setTitle(\"Authenticate\", for: .normal)\n authenticateButton.titleLabel?.font = .boldSystemFont(ofSize: 18)\n authenticateButton.addTarget(self, action: #selector(authenticateTapped), for: .touchUpInside)\n authenticateButton.translatesAutoresizingMaskIntoConstraints = false\n\n let cancelButton = UIButton(type: .system)\n cancelButton.setTitle(\"Cancel\", for: .normal)\n cancelButton.addTarget(self, action: #selector(cancelTapped), for: .touchUpInside)\n cancelButton.translatesAutoresizingMaskIntoConstraints = false\n\n view.addSubview(titleLabel)\n view.addSubview(subtitleLabel)\n view.addSubview(authenticateButton)\n view.addSubview(cancelButton)\n\n NSLayoutConstraint.activate([\n titleLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor),\n titleLabel.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: -60),\n subtitleLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 8),\n subtitleLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor),\n authenticateButton.topAnchor.constraint(equalTo: subtitleLabel.bottomAnchor, constant: 32),\n authenticateButton.centerXAnchor.constraint(equalTo: view.centerXAnchor),\n cancelButton.topAnchor.constraint(equalTo: authenticateButton.bottomAnchor, constant: 16),\n cancelButton.centerXAnchor.constraint(equalTo: view.centerXAnchor)\n ])\n }\n\n @objc private func authenticateTapped() {\n completionHandler?(.authorized)\n }\n\n @objc private func cancelTapped() {\n completionHandler?(.canceled)\n }\n}"; export declare const INTENT_TEMPLATE = "import Intents\n\nclass IntentHandler: INExtension {\n\n override func handler(for intent: INIntent) -> Any {\n // Return self or specific handler based on intent type\n return self\n }\n}\n\n// MARK: - Example Intent Handling\n// Uncomment and customize for your specific intents\n\n// extension IntentHandler: INStartWorkoutIntentHandling {\n// func handle(intent: INStartWorkoutIntent, completion: @escaping (INStartWorkoutIntentResponse) -> Void) {\n// let response = INStartWorkoutIntentResponse(code: .continueInApp, userActivity: nil)\n// completion(response)\n// }\n// }"; export declare const INTENT_UI_TEMPLATE = "import IntentsUI\n\nclass IntentViewController: UIViewController, INUIHostedViewControlling {\n\n override func viewDidLoad() {\n super.viewDidLoad()\n }\n\n func configureView(\n for parameters: Set,\n of interaction: INInteraction,\n interactiveBehavior: INUIInteractiveBehavior,\n context: INUIHostedViewContext,\n completion: @escaping (Bool, Set, CGSize) -> Void\n ) {\n // Customize the UI based on the intent\n let desiredSize = CGSize(width: view.bounds.width, height: 100)\n completion(true, parameters, desiredSize)\n }\n}"; export declare const IOS_TEMPLATES: Record string)>; export declare const TEMPLATE_FILENAMES: Record; //# sourceMappingURL=ios.d.ts.map