Skip to content

Commit

Permalink
Merge pull request #116 from Itaybre/feature/build_with_release
Browse files Browse the repository at this point in the history
Add DEBUG flag to preview providers
  • Loading branch information
Itaybre authored Aug 12, 2023
2 parents 58a0551 + 33e266a commit 8bb0c9b
Show file tree
Hide file tree
Showing 17 changed files with 40 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CameraController.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 10;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"CameraController/Preview Content\"";
DEVELOPMENT_TEAM = PY9WJ3M9MW;
Expand All @@ -1218,7 +1218,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.3.2;
MARKETING_VERSION = 2.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.itaysoft.CameraController;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1235,7 +1235,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 10;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"CameraController/Preview Content\"";
DEVELOPMENT_TEAM = PY9WJ3M9MW;
Expand All @@ -1248,7 +1248,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.3.2;
MARKETING_VERSION = 2.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.itaysoft.CameraController;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -1311,7 +1311,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 10;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Helper/Preview Content\"";
DEVELOPMENT_TEAM = PY9WJ3M9MW;
Expand All @@ -1323,7 +1323,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.3.2;
MARKETING_VERSION = 2.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.itaysoft.CameraController.Helper;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1340,7 +1340,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 7;
CURRENT_PROJECT_VERSION = 10;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Helper/Preview Content\"";
DEVELOPMENT_TEAM = PY9WJ3M9MW;
Expand All @@ -1352,7 +1352,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.3.2;
MARKETING_VERSION = 2.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.itaysoft.CameraController.Helper;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ struct AutoBadge: View {
}
}

#if DEBUG
struct AutoBadge_Previews: PreviewProvider {
static var previews: some View {
AutoBadge()
.padding(.all)
}
}
#endif
2 changes: 2 additions & 0 deletions CameraController/Views/Common/ControlComponents/Slider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ struct Slider: View {
}
}

#if DEBUG
struct NewSliderView_Previews: PreviewProvider {
static var previews: some View {
StatefulPreviewWrapper(Float(40.0)) { value in
Expand Down Expand Up @@ -115,3 +116,4 @@ struct NewSliderView_Previews: PreviewProvider {
}
}
}
#endif
2 changes: 2 additions & 0 deletions CameraController/Views/Common/ControlComponents/Toggle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ struct Toggle: View {
}
}

#if DEBUG
struct Toggle_Previews: PreviewProvider {
static var previews: some View {
VStack {
Expand All @@ -26,3 +27,4 @@ struct Toggle_Previews: PreviewProvider {
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ struct SectionTitle<Content: View>: View {
}
}

#if DEBUG
struct SectionTitle_Previews: PreviewProvider {
static var previews: some View {
VStack {
Expand All @@ -44,3 +45,4 @@ struct SectionTitle_Previews: PreviewProvider {
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ struct SectionView<Content: View>: View {
}
}

#if DEBUG
struct SectionView_Previews: PreviewProvider {
static var previews: some View {
SectionView {
Expand All @@ -49,3 +50,4 @@ struct SectionView_Previews: PreviewProvider {
.padding()
}
}
#endif
2 changes: 2 additions & 0 deletions CameraController/Views/Common/UnsupportedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ struct UnsupportedView: View {
}
}

#if DEBUG
struct UnsupportedView_Previews: PreviewProvider {
static var previews: some View {
UnsupportedView()
}
}
#endif
2 changes: 2 additions & 0 deletions CameraController/Views/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ struct ContentView: View {
}
}

#if DEBUG
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ struct ApplicationSection: View {
}
}

#if DEBUG
struct ApplicationSection_Previews: PreviewProvider {
static var previews: some View {
ApplicationSection()
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ struct CameraSection: View {
}
}

#if DEBUG
struct CameraSection_Previews: PreviewProvider {
static var previews: some View {
CameraSection()
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ struct PreferencesView: View {
}
}

#if DEBUG
struct PreferencesView_Previews: PreviewProvider {
static var previews: some View {
PreferencesView()
}
}
#endif
2 changes: 2 additions & 0 deletions CameraController/Views/Settings/Preferences/QuitButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ struct QuitButton: View {
}
}

#if DEBUG
struct QuitButton_Previews: PreviewProvider {
static var previews: some View {
QuitButton()
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ struct ReadWriteSection: View {
}
}

#if DEBUG
struct ReadWriteSection_Previews: PreviewProvider {
static var previews: some View {
ReadWriteSection()
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ struct UpdatesSection: View {
}
}

#if DEBUG
struct UpdatesSection_Previews: PreviewProvider {
static var previews: some View {
UpdatesSection()
}
}
#endif
2 changes: 2 additions & 0 deletions CameraController/Views/Settings/Profile/ProfilesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ struct ProfilesView: View {
}
}

#if DEBUG
struct ProfilesView_Previews: PreviewProvider {
static var previews: some View {
ProfilesView()
}
}
#endif
2 changes: 2 additions & 0 deletions CameraController/Views/Settings/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ struct SettingsView: View {
}
}

#if DEBUG
struct SettingsView_Previews: PreviewProvider {
static var previews: some View {
SettingsView(
Expand All @@ -49,3 +50,4 @@ struct SettingsView_Previews: PreviewProvider {
)
}
}
#endif
2 changes: 2 additions & 0 deletions CameraController/Views/TabSelectorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ struct TabSelectorView: View {
}
}

#if DEBUG
struct TabSelectorView_Previews: PreviewProvider {
static var previews: some View {
StatefulPreviewWrapper(Int?(0)) { value in
Expand All @@ -122,3 +123,4 @@ struct TabSelectorView_Previews: PreviewProvider {
}
}
}
#endif

0 comments on commit 8bb0c9b

Please sign in to comment.