fix: build error on Mac

This commit is contained in:
Yusuke Hosonuma
2020-08-18 11:55:59 +09:00
parent 6318758fb1
commit 89fc08061a
7 changed files with 20 additions and 13 deletions
+9 -9
View File
@@ -93,9 +93,9 @@
E574356D24E9767900BB27CA /* SignInOutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E574356C24E9767900BB27CA /* SignInOutView.swift */; };
E574356E24E9767900BB27CA /* SignInOutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E574356C24E9767900BB27CA /* SignInOutView.swift */; };
E574357024E97CF900BB27CA /* BoardSelectHistoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E574356F24E97CF900BB27CA /* BoardSelectHistoryView.swift */; };
E574357124E97CF900BB27CA /* BoardSelectHistoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E574356F24E97CF900BB27CA /* BoardSelectHistoryView.swift */; };
E580AA6D24E12F34007C60F1 /* BoardPresetFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = E580AA6C24E12F34007C60F1 /* BoardPresetFile.swift */; };
E580AAB824E14759007C60F1 /* LifeGameFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = E580AAB724E14759007C60F1 /* LifeGameFileManager.swift */; };
E58AB3A224EB77AA00339348 /* AppLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5C8D5C024E8E503005DB0FC /* AppLogger.swift */; };
E58CC55D24CB99D600048A0A /* LifeGame in Frameworks */ = {isa = PBXBuildFile; productRef = E58CC55C24CB99D600048A0A /* LifeGame */; };
E58D5F0D24E7698A000A0345 /* NWPathMonitor+Publisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = E58D5F0C24E7698A000A0345 /* NWPathMonitor+Publisher.swift */; };
E58D5F0E24E7698A000A0345 /* NWPathMonitor+Publisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = E58D5F0C24E7698A000A0345 /* NWPathMonitor+Publisher.swift */; };
@@ -470,6 +470,7 @@
E571536424D51B5B003B4C9E /* Util */ = {
isa = PBXGroup;
children = (
E5C8D5C024E8E503005DB0FC /* AppLogger.swift */,
E5E50A2424E52C5300CD64B6 /* GraphicsImageRenderer.swift */,
E571536524D51B73003B4C9E /* UserDefaultConvertible.swift */,
E571536824D51B9F003B4C9E /* UserDefault.swift */,
@@ -581,7 +582,6 @@
isa = PBXGroup;
children = (
E5C8D5BE24E8D49C005DB0FC /* UIImageWrapper.swift */,
E5C8D5C024E8E503005DB0FC /* AppLogger.swift */,
);
path = Model;
sourceTree = "<group>";
@@ -1151,6 +1151,7 @@
E580AAB824E14759007C60F1 /* LifeGameFileManager.swift in Sources */,
E58F427124E6C6FF0062E2FF /* BoardContainerView.swift in Sources */,
E55F7AA624DD0C1000DBC175 /* MacRootView.swift in Sources */,
E58AB3A224EB77AA00339348 /* AppLogger.swift in Sources */,
E572C8DD24DAE72C0030B192 /* BoardSizeMenu.swift in Sources */,
E55F7AAA24DD101900DBC175 /* PresetListView.swift in Sources */,
E53DFF7B24DC09BC00DC8F4F /* FirestoreBoardRepository.swift in Sources */,
@@ -1158,7 +1159,6 @@
E571536724D51B73003B4C9E /* UserDefaultConvertible.swift in Sources */,
E507482024CD4E45003811B5 /* HCenter.swift in Sources */,
E58F427224E6C71F0062E2FF /* BoardRenderImage.swift in Sources */,
E574357124E97CF900BB27CA /* BoardSelectHistoryView.swift in Sources */,
E518213424CC2E5300ABD16B /* Color+.swift in Sources */,
E518213124CC27CC00ABD16B /* SettingEnvironment.swift in Sources */,
E526A07524EAB08400D76ECD /* BoardItem.swift in Sources */,
@@ -1400,7 +1400,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = AA4808E2DBA26DB7C461E341 /* Pods-LifeGameApp (iOS).debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = iOS/Resources/LifeGameApp.entitlements;
@@ -1426,7 +1426,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 462FD68D509C302C01C06A52 /* Pods-LifeGameApp (iOS).release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = iOS/Resources/LifeGameApp.entitlements;
@@ -1456,10 +1456,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/Resources/macOS.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "Shared/Preview\\ Conent";
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = P437HSA6PY;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
@@ -1483,10 +1483,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = macOS/Resources/macOS.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "Shared/Preview\\ Conent";
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = P437HSA6PY;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
+1
View File
@@ -22,6 +22,7 @@ target 'LifeGameApp (macOS)' do
use_frameworks!
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'FirebaseFirestoreSwift'
end
+1 -1
View File
@@ -394,6 +394,6 @@ SPEC CHECKSUMS:
nanopb: c43f40fadfe79e8b8db116583945847910cbabc9
PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
PODFILE CHECKSUM: 845561c03f87fe70d412532662313bd2d50f51dc
PODFILE CHECKSUM: b0807015dd305d5886351026ed31ec73b41f2b67
COCOAPODS: 1.9.3
+4 -2
View File
@@ -41,10 +41,12 @@ final class SettingEnvironment: ObservableObject {
// FIXME: 背景画像が復元されない。
#warning("FIXME: 背景画像が起動時に復元されない(読み取れない)不具合あり。アプリ側のバグの可能性が高く感じるが、現時点ではOS側のバグも考慮。(beta4)")
#if os(iOS)
AppLogger.imageLoadBug.notice("[Start] loading background image.")
let image = UserDefaultSetting.shared.backgroundImage.image
backgroundImage = image
AppLogger.imageLoadBug.notice("[End] loading background image: \(image == nil ? "nil" : "found!", privacy: .public)")
#endif
#if os(iOS)
boardSelectDisplayStyle = UserDefaultSetting.shared.boardSelectDisplayStyle
@@ -76,13 +78,13 @@ final class SettingEnvironment: ObservableObject {
.dropFirst()
.assign(to: \.zoomLevel, on: UserDefaultSetting.shared)
.store(in: &cancellables)
#if os(iOS)
$backgroundImage
.dropFirst()
.map(UIImageWrapper.init)
.assign(to: \.backgroundImage, on: UserDefaultSetting.shared)
.store(in: &cancellables)
#if os(iOS)
$boardSelectDisplayStyle
.dropFirst()
.assign(to: \.boardSelectDisplayStyle, on: UserDefaultSetting.shared)
+1 -1
View File
@@ -28,10 +28,10 @@ final class UserDefaultSetting {
@UserDefault(key: "zoomLevel", defaultValue: DefaultZoomLevel)
var zoomLevel: Int
#if os(iOS)
@UserDefault(key: "backgroundImage", defaultValue: UIImageWrapper(nil))
var backgroundImage: UIImageWrapper
#if os(iOS)
@UserDefault(key: "boardSelectDisplayStyle", defaultValue: DefaultBoardSelectDisplayStyle)
var boardSelectDisplayStyle: BoardSelectStyle
@@ -34,9 +34,12 @@ struct BoardContainerView: View {
// MARK: Views
var body: some View {
#if os(iOS)
AppLogger.imageLoadBug.notice("BoardContainerView.body: \(setting.backgroundImage == nil ? "nil" : "found!", privacy: .public)")
#endif
return GeometryReader { geometry in
ZStack {
#if os(iOS)
if let image = setting.backgroundImage {
Image(image: image)
.resizable()
@@ -44,6 +47,7 @@ struct BoardContainerView: View {
.opacity(0.7)
.frame(width: geometry.size.width, height: geometry.size.height)
}
#endif
BoardRenderImage(
board: viewModel.board.board,
cellRenderSize: cellRenderSize,