Skip to content

Commit

Permalink
Merge pull request #45 from fumiyasac/feature/2025-update-library-swi…
Browse files Browse the repository at this point in the history
…ftui

README変更&簡単なSwiftUI製サンプル新規追加
  • Loading branch information
fumiyasac authored Jan 2, 2025
2 parents 0b83d99 + 8d7c2c7 commit ca7047a
Show file tree
Hide file tree
Showing 6 changed files with 225 additions and 43 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.7
// swift-tools-version:5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public func judgeJapaneseHoliday(year: Int, month: Int, day: Int) -> Bool {

### Requirements & Support

+ iOS 13.0 or later
+ iOS 14.0 or later
+ macOS 11.0 or later

### Installation
Expand All @@ -43,7 +43,7 @@ Create Podfile and specify it in your Podfile:
★ Example of Podfile

```
platform :ios, '13.0'
platform :ios, '14.0'
use_frameworks!
target [YOUR PROJECT NAME]' do
pod 'CalculateCalendarLogic'
Expand Down Expand Up @@ -156,7 +156,7 @@ public func judgeJapaneseHoliday(year: Int, month: Int, day: Int) -> Bool {

### 対応バージョンとサポート

+ iOS 13.0 or later
+ iOS 14.0 or later
+ macOS 11.0 or later

### 導入方法
Expand Down Expand Up @@ -232,7 +232,7 @@ print("2016年1月1日:\(result)")

現行プログラムでCalculateCalendarLogic.swiftで考慮したテストケースは下記の通りです。

+ 今年(2016年〜2022年)の祝祭日の判定が正しく行えていること
+ 今年(2016年〜2025年)の祝祭日の判定が正しく行えていること
+ ゴールデンウィークの判定が正しく行えていること(※サンプル:2017年/2019年/2021年)
+ シルバーウィークの判定が正しく行えていること(※サンプル:2015年/2026年/2032年)
+ 春分の日・秋分の日の判定が正しく行えていること(※サンプル:2000年〜2030年)
Expand All @@ -247,6 +247,7 @@ print("2016年1月1日:\(result)")

まだまだ甘い部分があるかもしれませんが、その際はPullRequest等を送っていただければ幸いです。アプリ開発の中でこのサンプルが少しでもお役にたつ事ができれば嬉しい限りです。

+ 2025.01.02: 保守対応を行いました。
+ 2023.01.01: 保守対応&iOS16で利用可能なUICalendarViewのサンプル追加を行いました。
+ 2021.06.05: Gihub Actions追加([uhooi](https://github.com/uhooi)様)
+ 2020.12.02: Xcode12.2への対応/2021年の祝日に関する追加対応/サンプルコード修正等を行いました。
Expand Down
130 changes: 107 additions & 23 deletions handMadeCalendarAdvance.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand All @@ -12,6 +12,8 @@
31889D161E29F3BC00DFD4CB /* CalculateCalendarLogicTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E517AF5A1CE0F63C006847A0 /* CalculateCalendarLogicTests.swift */; };
DE0166BC1CDE5892002BB133 /* CalendarCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0166BB1CDE5892002BB133 /* CalendarCell.swift */; };
DE03CFF329608C650054BCF1 /* NewCalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE03CFF229608C650054BCF1 /* NewCalendarViewController.swift */; };
DE4977542D26609200FEC950 /* DatePickerSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE4977532D26609200FEC950 /* DatePickerSelectView.swift */; };
DE4977572D26635200FEC950 /* MijickCalendarView in Frameworks */ = {isa = PBXBuildFile; productRef = DE4977562D26635200FEC950 /* MijickCalendarView */; };
DE7396FA1CCB4EC100A9A222 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE7396F91CCB4EC100A9A222 /* AppDelegate.swift */; };
DE7396FC1CCB4EC100A9A222 /* MonthlyCalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE7396FB1CCB4EC100A9A222 /* MonthlyCalendarViewController.swift */; };
DE7396FF1CCB4EC100A9A222 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DE7396FD1CCB4EC100A9A222 /* Main.storyboard */; };
Expand Down Expand Up @@ -94,6 +96,7 @@
31889D061E29F37F00DFD4CB /* CalculateCalendarLogic OSXTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "CalculateCalendarLogic OSXTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
DE0166BB1CDE5892002BB133 /* CalendarCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CalendarCell.swift; sourceTree = "<group>"; };
DE03CFF229608C650054BCF1 /* NewCalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewCalendarViewController.swift; sourceTree = "<group>"; };
DE4977532D26609200FEC950 /* DatePickerSelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatePickerSelectView.swift; sourceTree = "<group>"; };
DE7396F61CCB4EC100A9A222 /* handMadeCalendarAdvance.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = handMadeCalendarAdvance.app; sourceTree = BUILT_PRODUCTS_DIR; };
DE7396F91CCB4EC100A9A222 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
DE7396FB1CCB4EC100A9A222 /* MonthlyCalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MonthlyCalendarViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -139,6 +142,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DE4977572D26635200FEC950 /* MijickCalendarView in Frameworks */,
E517AF5F1CE0F63C006847A0 /* CalculateCalendarLogic.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -249,6 +253,7 @@
DE7396FB1CCB4EC100A9A222 /* MonthlyCalendarViewController.swift */,
DEE369C2257C8E5A00A22800 /* DatePickerCalendarViewController.swift */,
DE03CFF229608C650054BCF1 /* NewCalendarViewController.swift */,
DE4977532D26609200FEC950 /* DatePickerSelectView.swift */,
);
name = ViewController;
sourceTree = "<group>";
Expand Down Expand Up @@ -478,6 +483,9 @@
Base,
);
mainGroup = DE7396ED1CCB4EC100A9A222;
packageReferences = (
DE4977552D26618300FEC950 /* XCRemoteSwiftPackageReference "CalendarView" */,
);
productRefGroup = DE7396F71CCB4EC100A9A222 /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -612,6 +620,7 @@
DEE369C3257C8E5A00A22800 /* DatePickerCalendarViewController.swift in Sources */,
DE03CFF329608C650054BCF1 /* NewCalendarViewController.swift in Sources */,
DE7396FC1CCB4EC100A9A222 /* MonthlyCalendarViewController.swift in Sources */,
DE4977542D26609200FEC950 /* DatePickerSelectView.swift in Sources */,
DE7396FA1CCB4EC100A9A222 /* AppDelegate.swift in Sources */,
DE0166BC1CDE5892002BB133 /* CalendarCell.swift in Sources */,
DEE369B4257C8A1600A22800 /* MainViewController.swift in Sources */,
Expand Down Expand Up @@ -721,7 +730,11 @@
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = CalculateCalendarLogic/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_BUNDLE_IDENTIFIER = "net.just1factory.CalculateCalendarLogic-OSX";
PRODUCT_NAME = CalculateCalendarLogic;
Expand Down Expand Up @@ -750,13 +763,18 @@
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = CalculateCalendarLogic/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_BUNDLE_IDENTIFIER = "net.just1factory.CalculateCalendarLogic-OSX";
PRODUCT_NAME = CalculateCalendarLogic;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -773,7 +791,11 @@
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Tests/CalculateCalendarLogicTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = "net.just1factory.CalculateCalendarLogic-OSXTests";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -793,12 +815,17 @@
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Tests/CalculateCalendarLogicTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = "net.just1factory.CalculateCalendarLogic-OSXTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 3.0;
};
name = Release;
Expand Down Expand Up @@ -918,8 +945,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = S5BF5553KY;
INFOPLIST_FILE = handMadeCalendarAdvance/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.handMadeCalendarAdvance;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -933,8 +963,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = S5BF5553KY;
INFOPLIST_FILE = handMadeCalendarAdvance/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.handMadeCalendarAdvance;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -946,8 +979,12 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = handMadeCalendarAdvanceTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.handMadeCalendarAdvanceTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -960,8 +997,12 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = handMadeCalendarAdvanceTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.handMadeCalendarAdvanceTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -973,7 +1014,11 @@
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = handMadeCalendarAdvanceUITests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.handMadeCalendarAdvanceUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -985,7 +1030,11 @@
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = handMadeCalendarAdvanceUITests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.handMadeCalendarAdvanceUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -1006,7 +1055,11 @@
INFOPLIST_FILE = CalculateCalendarLogic/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.CalculateCalendarLogic;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -1031,7 +1084,11 @@
INFOPLIST_FILE = CalculateCalendarLogic/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.CalculateCalendarLogic;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -1046,8 +1103,12 @@
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = Tests/CalculateCalendarLogicTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.CalculateCalendarLogicTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -1059,8 +1120,12 @@
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = Tests/CalculateCalendarLogicTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.CalculateCalendarLogicTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -1144,6 +1209,25 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
DE4977552D26618300FEC950 /* XCRemoteSwiftPackageReference "CalendarView" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/Mijick/CalendarView.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 1.0.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
DE4977562D26635200FEC950 /* MijickCalendarView */ = {
isa = XCSwiftPackageProductDependency;
package = DE4977552D26618300FEC950 /* XCRemoteSwiftPackageReference "CalendarView" */;
productName = MijickCalendarView;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = DE7396EE1CCB4EC100A9A222 /* Project object */;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"originHash" : "95755beb3185c87b9d87ab36a12571768201613e7aea3bb2fbc1fa63c76b2ec2",
"pins" : [
{
"identity" : "calendarview",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Mijick/CalendarView.git",
"state" : {
"revision" : "b347587ba39a023b61881158872db9d01a90a9a6",
"version" : "1.0.0"
}
}
],
"version" : 3
}
Loading

0 comments on commit ca7047a

Please sign in to comment.