Adds CloudKit support to the monster library between devices.
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
E20CEFEC261FEA2100B55D72 /* MonsterDetailWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20CEFEB261FEA2100B55D72 /* MonsterDetailWrapper.swift */; };
|
E20CEFEC261FEA2100B55D72 /* MonsterDetailWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E20CEFEB261FEA2100B55D72 /* MonsterDetailWrapper.swift */; };
|
||||||
E20CEFFA261FEBBA00B55D72 /* MonsterDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E257100825B1B2470055B23B /* MonsterDetailView.swift */; };
|
E20CEFFA261FEBBA00B55D72 /* MonsterDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E257100825B1B2470055B23B /* MonsterDetailView.swift */; };
|
||||||
E20CF000261FEBD300B55D72 /* MarkdownUI in Frameworks */ = {isa = PBXBuildFile; productRef = E20CEFFF261FEBD300B55D72 /* MarkdownUI */; };
|
E20CF000261FEBD300B55D72 /* MarkdownUI in Frameworks */ = {isa = PBXBuildFile; productRef = E20CEFFF261FEBD300B55D72 /* MarkdownUI */; };
|
||||||
|
E20CF00E261FF38600B55D72 /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E20CF00D261FF38600B55D72 /* CloudKit.framework */; };
|
||||||
E210B83A25B42D980083EAC5 /* MCProficiencyPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = E210B83925B42D980083EAC5 /* MCProficiencyPicker.swift */; };
|
E210B83A25B42D980083EAC5 /* MCProficiencyPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = E210B83925B42D980083EAC5 /* MCProficiencyPicker.swift */; };
|
||||||
E210B83F25B42DAB0083EAC5 /* MCAdvantagePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = E210B83E25B42DAB0083EAC5 /* MCAdvantagePicker.swift */; };
|
E210B83F25B42DAB0083EAC5 /* MCAdvantagePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = E210B83E25B42DAB0083EAC5 /* MCAdvantagePicker.swift */; };
|
||||||
E21661D12616E9A800117782 /* ImportMonster.swift in Sources */ = {isa = PBXBuildFile; fileRef = E21661D02616E9A800117782 /* ImportMonster.swift */; };
|
E21661D12616E9A800117782 /* ImportMonster.swift in Sources */ = {isa = PBXBuildFile; fileRef = E21661D02616E9A800117782 /* ImportMonster.swift */; };
|
||||||
@@ -147,6 +148,8 @@
|
|||||||
E20209F925D8E19100EFE733 /* SkillViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SkillViewModel.swift; sourceTree = "<group>"; };
|
E20209F925D8E19100EFE733 /* SkillViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SkillViewModel.swift; sourceTree = "<group>"; };
|
||||||
E20209FA25D8E19100EFE733 /* MonsterViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MonsterViewModel.swift; sourceTree = "<group>"; };
|
E20209FA25D8E19100EFE733 /* MonsterViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MonsterViewModel.swift; sourceTree = "<group>"; };
|
||||||
E20CEFEB261FEA2100B55D72 /* MonsterDetailWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MonsterDetailWrapper.swift; sourceTree = "<group>"; };
|
E20CEFEB261FEA2100B55D72 /* MonsterDetailWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MonsterDetailWrapper.swift; sourceTree = "<group>"; };
|
||||||
|
E20CF008261FF37700B55D72 /* MonsterCards.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MonsterCards.entitlements; sourceTree = "<group>"; };
|
||||||
|
E20CF00D261FF38600B55D72 /* CloudKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CloudKit.framework; path = System/Library/Frameworks/CloudKit.framework; sourceTree = SDKROOT; };
|
||||||
E210B83925B42D980083EAC5 /* MCProficiencyPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MCProficiencyPicker.swift; sourceTree = "<group>"; };
|
E210B83925B42D980083EAC5 /* MCProficiencyPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MCProficiencyPicker.swift; sourceTree = "<group>"; };
|
||||||
E210B83E25B42DAB0083EAC5 /* MCAdvantagePicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MCAdvantagePicker.swift; sourceTree = "<group>"; };
|
E210B83E25B42DAB0083EAC5 /* MCAdvantagePicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MCAdvantagePicker.swift; sourceTree = "<group>"; };
|
||||||
E21661D02616E9A800117782 /* ImportMonster.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImportMonster.swift; sourceTree = "<group>"; };
|
E21661D02616E9A800117782 /* ImportMonster.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImportMonster.swift; sourceTree = "<group>"; };
|
||||||
@@ -231,6 +234,7 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
E254F901260D07C1009295A5 /* MarkdownUI in Frameworks */,
|
E254F901260D07C1009295A5 /* MarkdownUI in Frameworks */,
|
||||||
|
E20CF00E261FF38600B55D72 /* CloudKit.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -267,6 +271,7 @@
|
|||||||
E216E47C261FE76F00FD9262 /* Frameworks */ = {
|
E216E47C261FE76F00FD9262 /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
E20CF00D261FF38600B55D72 /* CloudKit.framework */,
|
||||||
E216E47D261FE76F00FD9262 /* QuickLook.framework */,
|
E216E47D261FE76F00FD9262 /* QuickLook.framework */,
|
||||||
);
|
);
|
||||||
name = Frameworks;
|
name = Frameworks;
|
||||||
@@ -308,6 +313,7 @@
|
|||||||
E2570FB725B1AC520055B23B /* MonsterCards */ = {
|
E2570FB725B1AC520055B23B /* MonsterCards */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
E20CF008261FF37700B55D72 /* MonsterCards.entitlements */,
|
||||||
E2570FBC25B1AC550055B23B /* Assets.xcassets */,
|
E2570FBC25B1AC550055B23B /* Assets.xcassets */,
|
||||||
E2D473FB25B5328800CB36D7 /* Helpers */,
|
E2D473FB25B5328800CB36D7 /* Helpers */,
|
||||||
E2570FC625B1AC550055B23B /* Info.plist */,
|
E2570FC625B1AC550055B23B /* Info.plist */,
|
||||||
@@ -891,6 +897,7 @@
|
|||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = MonsterCards/MonsterCards.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
DEVELOPMENT_ASSET_PATHS = "\"MonsterCards/Preview Content\"";
|
DEVELOPMENT_ASSET_PATHS = "\"MonsterCards/Preview Content\"";
|
||||||
DEVELOPMENT_TEAM = J793L9LQJ2;
|
DEVELOPMENT_TEAM = J793L9LQJ2;
|
||||||
@@ -914,6 +921,7 @@
|
|||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = MonsterCards/MonsterCards.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
DEVELOPMENT_ASSET_PATHS = "\"MonsterCards/Preview Content\"";
|
DEVELOPMENT_ASSET_PATHS = "\"MonsterCards/Preview Content\"";
|
||||||
DEVELOPMENT_TEAM = J793L9LQJ2;
|
DEVELOPMENT_TEAM = J793L9LQJ2;
|
||||||
|
|||||||
@@ -2,14 +2,27 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleIconName</key>
|
|
||||||
<string>AppIcon</string>
|
|
||||||
<key>UIUserInterfaceStyle</key>
|
|
||||||
<string>Light</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleDocumentTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeIconFiles</key>
|
||||||
|
<array/>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>Monster Data</string>
|
||||||
|
<key>LSHandlerRank</key>
|
||||||
|
<string>Owner</string>
|
||||||
|
<key>LSItemContentTypes</key>
|
||||||
|
<array>
|
||||||
|
<string>com.majinnaibu.MonsterCards.Monster</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIconName</key>
|
||||||
|
<string>AppIcon</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
@@ -24,6 +37,8 @@
|
|||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||||
|
<true/>
|
||||||
<key>UIApplicationSceneManifest</key>
|
<key>UIApplicationSceneManifest</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>UIApplicationSupportsMultipleScenes</key>
|
<key>UIApplicationSupportsMultipleScenes</key>
|
||||||
@@ -31,6 +46,10 @@
|
|||||||
</dict>
|
</dict>
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>UIBackgroundModes</key>
|
||||||
|
<array>
|
||||||
|
<string>remote-notification</string>
|
||||||
|
</array>
|
||||||
<key>UILaunchScreen</key>
|
<key>UILaunchScreen</key>
|
||||||
<dict/>
|
<dict/>
|
||||||
<key>UIRequiredDeviceCapabilities</key>
|
<key>UIRequiredDeviceCapabilities</key>
|
||||||
@@ -52,23 +71,8 @@
|
|||||||
</array>
|
</array>
|
||||||
<key>UISupportsDocumentBrowser</key>
|
<key>UISupportsDocumentBrowser</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>LSSupportsOpeningDocumentsInPlace</key>
|
<key>UIUserInterfaceStyle</key>
|
||||||
<true/>
|
<string>Light</string>
|
||||||
<key>CFBundleDocumentTypes</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleTypeIconFiles</key>
|
|
||||||
<array/>
|
|
||||||
<key>CFBundleTypeName</key>
|
|
||||||
<string>Monster Data</string>
|
|
||||||
<key>LSHandlerRank</key>
|
|
||||||
<string>Owner</string>
|
|
||||||
<key>LSItemContentTypes</key>
|
|
||||||
<array>
|
|
||||||
<string>com.majinnaibu.MonsterCards.Monster</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
<key>UTExportedTypeDeclarations</key>
|
<key>UTExportedTypeDeclarations</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
|
|||||||
@@ -19,8 +19,7 @@ public class Monster: NSManagedObject {
|
|||||||
self.subtype = subtype;
|
self.subtype = subtype;
|
||||||
self.alignment = alignment;
|
self.alignment = alignment;
|
||||||
}
|
}
|
||||||
|
// MARK: Armor
|
||||||
// MARK: Armor
|
|
||||||
|
|
||||||
var armorTypeEnum: ArmorType {
|
var armorTypeEnum: ArmorType {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -305,7 +305,6 @@ class MonsterViewModel: ObservableObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// MARK: Armor
|
// MARK: Armor
|
||||||
|
|
||||||
var armorClassDescription: String {
|
var armorClassDescription: String {
|
||||||
@@ -382,7 +381,6 @@ class MonsterViewModel: ObservableObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MARK: Challenge Rating / Proficiency Bonus
|
// MARK: Challenge Rating / Proficiency Bonus
|
||||||
|
|
||||||
|
|
||||||
var proficiencyBonus: Int {
|
var proficiencyBonus: Int {
|
||||||
switch challengeRating {
|
switch challengeRating {
|
||||||
|
|||||||
16
MonsterCards/MonsterCards.entitlements
Normal file
16
MonsterCards/MonsterCards.entitlements
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>aps-environment</key>
|
||||||
|
<string>development</string>
|
||||||
|
<key>com.apple.developer.icloud-container-identifiers</key>
|
||||||
|
<array>
|
||||||
|
<string>iCloud.com.majinnaibu.MonsterCards.MonsterCards</string>
|
||||||
|
</array>
|
||||||
|
<key>com.apple.developer.icloud-services</key>
|
||||||
|
<array>
|
||||||
|
<string>CloudKit</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -36,6 +36,7 @@ struct PersistenceController {
|
|||||||
if inMemory {
|
if inMemory {
|
||||||
container.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: "/dev/null")
|
container.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: "/dev/null")
|
||||||
}
|
}
|
||||||
|
container.viewContext.automaticallyMergesChangesFromParent = true
|
||||||
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
|
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
|
||||||
if let error = error as NSError? {
|
if let error = error as NSError? {
|
||||||
fatalError("Unresolved error \(error), \(error.userInfo)")
|
fatalError("Unresolved error \(error), \(error.userInfo)")
|
||||||
|
|||||||
Reference in New Issue
Block a user