BrowserStack support (#561)

* BrowserStack support

* Add fastlane step to automatically upload builds to BrowserStack

* Add error log for when Application Groups are not available

* Use better applicationSupportDirectory API
This commit is contained in:
Stefan Ceriu
2023-02-10 16:52:15 +02:00
committed by GitHub
parent c8fb93e00d
commit b0a7d05a8c
5 changed files with 30 additions and 1 deletions
+7 -1
View File
@@ -28,8 +28,14 @@ extension URL {
/// The URL of the primary app group container.
static var appGroupContainerDirectory: URL {
guard let url = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: InfoPlistReader.main.appGroupIdentifier) else {
fatalError("Should always be able to retrieve the container directory")
MXLog.error("Application Group unavailable, falling back to the application folder")
// Browserstack doesn't properly handle AppGroup entitlements so this fails, presumably because of the resigning happening on their side
// Try using the normal app folder instead of the app group
// https://www.browserstack.com/docs/app-automate/appium/troubleshooting/entitlements-error
return URL.applicationSupportDirectory.deletingLastPathComponent().deletingLastPathComponent()
}
return url
}