Skip to content

Commit

Permalink
had to make classe constructors public
Browse files Browse the repository at this point in the history
  • Loading branch information
Elyahu41 committed Dec 26, 2023
1 parent 56fd850 commit 06aa31c
Show file tree
Hide file tree
Showing 14 changed files with 96 additions and 31 deletions.
14 changes: 10 additions & 4 deletions KosherSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@
CEDE8FC02B3272B700D74115 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
Expand Down Expand Up @@ -370,6 +371,8 @@
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SUPPORTED_PLATFORMS = "watchsimulator watchos macosx iphonesimulator iphoneos driverkit appletvsimulator appletvos";
SUPPORTS_MACCATALYST = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -380,6 +383,7 @@
CEDE8FC12B3272B700D74115 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
Expand Down Expand Up @@ -427,6 +431,8 @@
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SUPPORTED_PLATFORMS = "watchsimulator watchos macosx iphonesimulator iphoneos driverkit appletvsimulator appletvos";
SUPPORTS_MACCATALYST = YES;
SWIFT_COMPILATION_MODE = wholemodule;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down Expand Up @@ -529,8 +535,8 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 7L3824N5VJ;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
MACOSX_DEPLOYMENT_TARGET = 14.2;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.ej.KosherSwiftTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -550,8 +556,8 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 7L3824N5VJ;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
MACOSX_DEPLOYMENT_TARGET = 14.2;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.ej.KosherSwiftTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CEDE8FB72B3272B700D74115"
BuildableName = "KosherSwiftTests.xctest"
BlueprintName = "KosherSwiftTests"
ReferencedContainer = "container:KosherSwift.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>KosherSwiftTests.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
Expand Down
4 changes: 2 additions & 2 deletions Sources/KosherSwift/AstronomicalCalendar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public class AstronomicalCalendar {
* Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default
* {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.
*/
init() {
public init() {
self.workingDate = Date()
self.geoLocation = GeoLocation()
self.astronomicalCalculator = AstronomicalCalculator.getDefault(geoLocation: self.geoLocation);
Expand All @@ -337,7 +337,7 @@ public class AstronomicalCalendar {
*
* @see #setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class.
*/
init(geoLocation:GeoLocation) {
public init(geoLocation:GeoLocation) {
self.workingDate = Date()
self.geoLocation = geoLocation
self.astronomicalCalculator = AstronomicalCalculator.getDefault(geoLocation: self.geoLocation);
Expand Down
4 changes: 2 additions & 2 deletions Sources/KosherSwift/ComplexZmanimCalendar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar {
*
* @see ZmanimCalendar#ZmanimCalendar(GeoLocation)
*/
override init(location:GeoLocation) {
public override init(location:GeoLocation) {
super.init(location: location)
}

Expand All @@ -404,7 +404,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar {
*
* @see AstronomicalCalendar#AstronomicalCalendar()
*/
override init() {
public override init() {
super.init();
}

Expand Down
4 changes: 2 additions & 2 deletions Sources/KosherSwift/ZmanimCalendar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ public class ZmanimCalendar : AstronomicalCalendar {
*
* @see AstronomicalCalendar#AstronomicalCalendar()
*/
override init() {
public override init() {
self.useElevation = false
super.init();
}
Expand All @@ -1013,7 +1013,7 @@ public class ZmanimCalendar : AstronomicalCalendar {
* @param location
* the location
*/
init(location:GeoLocation) {
public init(location:GeoLocation) {
self.useElevation = false
super.init(geoLocation: location);
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/KosherSwift/hebrewcalendar/Daf.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public class Daf {
* @param masechtaNumber the <em>masechta</em> number in the order of the Daf Yomi to set as the current <em>masechta</em>.
* @param daf the <em>daf</em> (page) number to set.
*/
init(masechtaNumber: Int, daf: Int) {
public init(masechtaNumber: Int, daf: Int) {
self.masechtaNumber = masechtaNumber
self.daf = daf
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class HebrewDateFormatter {
/**
* Default constructor sets the {@link EnumMap}s of Hebrew and default transliterated parshiyos.
*/
init() {
public init() {
transliteratedParshaMap = [
JewishCalendar.Parsha.NONE: "",
JewishCalendar.Parsha.BERESHIS: "Bereshis",
Expand Down
14 changes: 7 additions & 7 deletions Sources/KosherSwift/hebrewcalendar/JewishCalendar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -714,15 +714,15 @@ public class JewishCalendar {
workingDate = workingDate.advanced(by: -86400)
}

init() {}
public init() {}

/**
* A constructor that initializes the date to the Date parameter. useModernHolidays and inIsrael will be set to false
*
* @param date
* the <code>Date</code> to set the calendar to
*/
init(workingDate:Date) {
public init(workingDate:Date) {
self.workingDate = workingDate
}

Expand All @@ -732,7 +732,7 @@ public class JewishCalendar {
* @param date
* the <code>Date</code> to set the calendar to
*/
init(workingDate:Date, timezone:TimeZone) {
public init(workingDate:Date, timezone:TimeZone) {
self.workingDate = workingDate
self.timeZone = timezone
}
Expand All @@ -744,7 +744,7 @@ public class JewishCalendar {
* @param inIsrael a bool to determine whether or not the methods should use in Israel calculations
* @param shouldUseModernHolidays a bool to determine to use modern holidays in the methods or not
*/
init(workingDate:Date, inIsrael:Bool, useModernHolidays:Bool) {
public init(workingDate:Date, inIsrael:Bool, useModernHolidays:Bool) {
self.workingDate = workingDate
self.inIsrael = inIsrael
self.useModernHolidays = useModernHolidays
Expand All @@ -757,7 +757,7 @@ public class JewishCalendar {
* @param inIsrael a bool to determine whether or not the methods should use in Israel calculations
* @param shouldUseModernHolidays a bool to determine to use modern holidays in the methods or not
*/
init(workingDate:Date, timezone:TimeZone, inIsrael:Bool, useModernHolidays:Bool) {
public init(workingDate:Date, timezone:TimeZone, inIsrael:Bool, useModernHolidays:Bool) {
self.workingDate = workingDate
self.inIsrael = inIsrael
self.useModernHolidays = useModernHolidays
Expand All @@ -771,7 +771,7 @@ public class JewishCalendar {
* @param isInIsrael a bool to determine whether or not the methods should use in Israel calculations
* @param shouldUseModernHolidays a bool to determine to use modern holidays in the methods or not
*/
init(jewishYear:Int, jewishMonth:Int, jewishDayOfMonth:Int) {//Test this
public init(jewishYear:Int, jewishMonth:Int, jewishDayOfMonth:Int) {//Test this
var hebrewCalendar = Calendar(identifier: .hebrew)
hebrewCalendar.timeZone = timeZone
workingDate = hebrewCalendar.date(from: DateComponents(calendar: hebrewCalendar, year: jewishYear, month: jewishMonth, day: jewishDayOfMonth))!
Expand All @@ -785,7 +785,7 @@ public class JewishCalendar {
* @param jewishDayOfMonth
* @param isInIsrael a bool to determine whether or not the methods should use in Israel calculations
*/
init(jewishYear:Int, jewishMonth:Int, jewishDayOfMonth:Int, isInIsrael:Bool) {//Test this
public init(jewishYear:Int, jewishMonth:Int, jewishDayOfMonth:Int, isInIsrael:Bool) {//Test this
var hebrewCalendar = Calendar(identifier: .hebrew)
hebrewCalendar.timeZone = timeZone
workingDate = hebrewCalendar.date(from: DateComponents(calendar: hebrewCalendar, year: jewishYear, month: jewishMonth, day: jewishDayOfMonth))!
Expand Down
6 changes: 3 additions & 3 deletions Sources/KosherSwift/util/GeoLocation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public class GeoLocation {
* @param timeZone
* the <code>TimeZone</code> for the location.
*/
init(locationName: String, latitude: Double, longitude: Double, timeZone: TimeZone) {
public init(locationName: String, latitude: Double, longitude: Double, timeZone: TimeZone) {
self.locationName = locationName
self.latitude = latitude
self.longitude = longitude
Expand All @@ -135,7 +135,7 @@ public class GeoLocation {
* @param timeZone
* the <code>TimeZone</code> for the location.
*/
init(locationName: String, latitude: Double, longitude: Double, elevation:Double, timeZone: TimeZone) {
public init(locationName: String, latitude: Double, longitude: Double, elevation:Double, timeZone: TimeZone) {
self.locationName = locationName
self.latitude = latitude
self.longitude = longitude
Expand All @@ -148,7 +148,7 @@ public class GeoLocation {
* GMT. The longitude will be set to 0 and the latitude will be 51.4772 to match the location of the <a
* href="https://www.rmg.co.uk/royal-observatory">Royal Observatory, Greenwich</a>. No daylight savings time will be used.
*/
init() {
public init() {
locationName = "Greenwich, England"
latitude = 51.4772
longitude = 0
Expand Down
4 changes: 2 additions & 2 deletions Sources/KosherSwift/util/NOAACalculator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ public class NOAACalculator : AstronomicalCalculator {

static var geoLocation: GeoLocation = GeoLocation()

override init() {
public override init() {
NOAACalculator.geoLocation.setTimeZone(timeZone: TimeZone.current)
}

init(geoLocation: GeoLocation) {
public init(geoLocation: GeoLocation) {
NOAACalculator.geoLocation = geoLocation
}

Expand Down
4 changes: 2 additions & 2 deletions Sources/KosherSwift/util/SunTimesCalculator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ public class SunTimesCalculator : AstronomicalCalculator {

static var geoLocation: GeoLocation = GeoLocation()

override init() {
public override init() {
SunTimesCalculator.geoLocation.setTimeZone(timeZone: TimeZone.current)
}

init(geoLocation: GeoLocation) {
public init(geoLocation: GeoLocation) {
SunTimesCalculator.geoLocation = geoLocation
}

Expand Down
6 changes: 3 additions & 3 deletions Sources/KosherSwift/util/Time.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class Time {
* @param seconds the seconds to set
* @param milliseconds the milliseconds to set
*/
init(hours: Int = 0, minutes: Int = 0, seconds: Int = 0, milliseconds: Int = 0) {
public init(hours: Int = 0, minutes: Int = 0, seconds: Int = 0, milliseconds: Int = 0) {
self.hours = hours
self.minutes = minutes
self.seconds = seconds
Expand All @@ -70,7 +70,7 @@ public class Time {
* calls {@link #Time(int)}
* @param millis the milliseconds to set the object with.
*/
convenience init(millis:Double) {
public convenience init(millis:Double) {
self.init(millis: Int(millis));
}

Expand All @@ -79,7 +79,7 @@ public class Time {
* and milliseconds. If the milliseconds are negative it will call {@link #setIsNegative(boolean)}.
* @param millis the milliseconds to set.
*/
init(millis:Int) {
public init(millis:Int) {
var adjustedMillis = millis;
if (adjustedMillis < 0) {
self.isNegative = true;
Expand Down
4 changes: 2 additions & 2 deletions Sources/KosherSwift/util/Zman.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class Zman {
* @param label the label of the <em>zman</em> such as "<em>Sof Zman Krias Shema GRA</em>".
* @see #Zman(long, String)
*/
init(label: String, zman: Date?) {
public init(label: String, zman: Date?) {
self.label = label
self.zman = zman
self.duration = 0
Expand All @@ -93,7 +93,7 @@ public class Zman {
* @param label the label of the <em>zman</em> such as "<em>Shaah Zmanis GRA</em>".
* @see #Zman(Date, String)
*/
init(label: String, duration: Int64) {
public init(label: String, duration: Int64) {
self.label = label
self.duration = duration
self.description = ""
Expand Down

0 comments on commit 06aa31c

Please sign in to comment.