---
updatedAt: 2026-05-14T00:17:54.000Z
agentTools:
  projectIndex: https://developers.piwik.pro/llms.txt
---

# applicationInstall

The **applicationInstall()** method records the installation of the app. The event is sent the first time the app is launched, once per installation. If a user installs your app but doesn't run it, the event is not sent.

## Syntax

```swift Swift
PiwikTracker.sharedInstance()?.applicationInstall()
```
```objectivec Objective-C
[[PiwikTracker sharedInstance] applicationInstall];
```

## Examples

Call **`applicationInstall()`** from **`App.init()`** immediately after configuring the tracker:

```swift Swift
@main
struct MyApp: App {
    init() {
        PiwikTracker.sharedInstance(
            siteID: "site-id",
            baseURL: URL(string: "https://example.piwik.pro")!
        )
        PiwikTracker.sharedInstance()?.applicationInstall()
    }

    var body: some Scene {
        WindowGroup { ContentView() }
    }
}
```

Or from **`application(_:didFinishLaunchingWithOptions:)`** when you use an **`AppDelegate`**:

```swift Swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    PiwikTracker.sharedInstance(siteID: "site-id", baseURL: URL(string: "https://example.piwik.pro")!)
    PiwikTracker.sharedInstance()?.applicationInstall()
    return true
}
```
```objectivec Objective-C
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [PiwikTracker sharedInstanceWithSiteID:@"site-id" baseURL:[NSURL URLWithString:@"https://example.piwik.pro"]];
    [[PiwikTracker sharedInstance] applicationInstall];
    return YES;
}
```

## Notes

* Call `applicationInstall()` immediately after configuring the tracker, because this event is only sent to the server once per app installation.
* Further calls on the same install do not enqueue another install event. The boolean return value indicates whether a new event was queued.
* Prefer this over the deprecated [`sendApplicationDownload()`](https://developers.piwik.pro/docs/sendapplicationdownload), which fires at most once per **app version**; `applicationInstall()` fires at most once per **device installation**.

## Related methods

* [`applicationUpdate()`](https://developers.piwik.pro/docs/applicationupdate-ios-sdk)
* [`sendApplicationDownload()`](https://developers.piwik.pro/docs/sendapplicationdownload) (deprecated)