Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLAYRTS-5585 Remove AppCenter builds and distributions #499

Merged
merged 14 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Application/Application-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<string>LongFormVideo</string>
<key>AppCenterSecret</key>
<string>$(CONFIG__APPCENTER_SECRET)</string>
<key>AppCenterURL</key>
<string>$(APPCENTER_URL)</string>
<key>AppStoreAppleId</key>
<string>$(CONFIG__APPSTORE_APPLE_ID)</string>
<key>ApplicationGroupIdentifier</key>
Expand Down Expand Up @@ -48,7 +46,6 @@
<key>CFBundleURLSchemes</key>
<array>
<string>$(COMMON__URL_SCHEME)</string>
<string>appcenter-$(CONFIG__APPCENTER_SECRET)</string>
</array>
</dict>
</array>
Expand Down
6 changes: 0 additions & 6 deletions Application/Sources/Application/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
@import AirshipCore;
@import AppCenter;
@import AppCenterCrashes;
@import AppCenterDistribute;
@import AVFoundation;
@import CarPlay;
@import Firebase;
Expand Down Expand Up @@ -207,12 +206,7 @@ - (void)setupAppCenter
return;
}

#if defined(APPCENTER)
MSACDistribute.updateTrack = MSACUpdateTrackPrivate;
[MSACAppCenter start:appCenterSecret withServices:@[ MSACCrashes.class, MSACDistribute.class ]];
#else
[MSACAppCenter start:appCenterSecret withServices:@[ MSACCrashes.class ]];
#endif
}

- (void)setupDataProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extension Bundle {
}

var play_isTestFlightDistribution: Bool {
#if !DEBUG && !APPCENTER
#if !DEBUG
return (appStoreReceiptURL?.path ?? "").contains("sandboxReceipt")
#else
return false
Expand Down
41 changes: 3 additions & 38 deletions Application/Sources/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
// License information is available from the LICENSE file.
//

#if APPCENTER
import AppCenterDistribute
#endif
#if os(iOS) && (DEBUG || APPCENTER)
#if os(iOS) && DEBUG
import FLEX
#endif
import SRGAppearanceSwift
Expand Down Expand Up @@ -50,7 +47,7 @@ struct SettingsView: View {
AdvancedFeaturesSection(model: model)
ResetSection(model: model)
#endif
#if os(iOS) && (DEBUG || APPCENTER)
#if os(iOS) && DEBUG
DeveloperSection()
#endif
#if DEBUG || NIGHTLY || BETA
Expand Down Expand Up @@ -557,9 +554,6 @@ struct SettingsView: View {
}
#endif
Toggle(NSLocalizedString("Always ask user consent at launch", comment: "Always ask user consent at launch setting label"), isOn: $isAlwaysAskUserConsentAtLaunchEnabled)
#if os(iOS) && APPCENTER
VersionsAndReleaseNotesButton()
#endif
} header: {
Text(NSLocalizedString("Advanced features", comment: "Advanced features section header"))
} footer: {
Expand Down Expand Up @@ -601,35 +595,6 @@ struct SettingsView: View {
}
}

#if os(iOS) && APPCENTER
private struct VersionsAndReleaseNotesButton: View {
@State private var isSheetDisplayed = false

private var appCenterUrl: URL? {
guard let appCenterUrlString = Bundle.main.object(forInfoDictionaryKey: "AppCenterURL") as? String, !appCenterUrlString.isEmpty else {
return nil
}
return URL(string: appCenterUrlString)
}

var body: some View {
if let appCenterUrl {
Button(NSLocalizedString("Versions and release notes", comment: "Label of the button to access release notes and download internal builds (App Center)"), action: action)
.sheet(isPresented: $isSheetDisplayed) {
SafariView(url: appCenterUrl)
.ignoresSafeArea()
}
}
}

private func action() {
UserDefaults.standard.removeObject(forKey: "MSAppCenterPostponedTimestamp")
Distribute.checkForUpdate()
isSheetDisplayed = true
}
}
#endif

private struct PosterImagesSelectionCell: View {
@AppStorage(PlaySRGSettingPosterImages) private var selectedPosterImages = PosterImages.default

Expand Down Expand Up @@ -917,7 +882,7 @@ struct SettingsView: View {

// MARK: Developer section

#if os(iOS) && (DEBUG || APPCENTER)
#if os(iOS) && DEBUG
private struct DeveloperSection: View {
var body: some View {
PlaySection {
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/xcrun make -f

CONFIGURATION_REPOSITORY_URL=https://github.com/SRGSSR/playsrg-apple-configuration.git
CONFIGURATION_COMMIT_SHA1=678bad527c2540ece906499e5d2a3bf9be35f5bf
CONFIGURATION_COMMIT_SHA1=377719a97b73b7627280720c9d7d2257e2e01cf4
CONFIGURATION_FOLDER=Configuration

.PHONY: all
Expand Down
Loading