---
title: refreshSourcesIfNecessary()
framework: eventkit
role: symbol
role_heading: Instance Method
path: eventkit/ekeventstore/refreshsourcesifnecessary()
---

# refreshSourcesIfNecessary()

Pulls new data from remote sources, if necessary.

## Declaration

```swift
func refreshSourcesIfNecessary()
```

## Discussion

Discussion Use this method to pull new data from remote sources if the local data is out of date.

## See Also

### Saving and restoring state

- [commit()](eventkit/ekeventstore/commit().md)
- [reset()](eventkit/ekeventstore/reset().md)
