parent
e9a8530d81
commit
c42735d1c0
@ -1,92 +1,16 @@ |
||||
# ---> Swift |
||||
# Xcode |
||||
# |
||||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore |
||||
.DS_Store |
||||
*/.DS_Store |
||||
**/*/.DS* |
||||
|
||||
## User settings |
||||
xcuserdata/ |
||||
|
||||
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) |
||||
*.xcscmblueprint |
||||
*.xccheckout |
||||
|
||||
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) |
||||
build/ |
||||
DerivedData/ |
||||
*.moved-aside |
||||
*.pbxuser |
||||
!default.pbxuser |
||||
*.mode1v3 |
||||
!default.mode1v3 |
||||
*.mode2v3 |
||||
!default.mode2v3 |
||||
*.perspectivev3 |
||||
!default.perspectivev3 |
||||
|
||||
## Obj-C/Swift specific |
||||
*.hmap |
||||
|
||||
## App packaging |
||||
*.ipa |
||||
*.dSYM.zip |
||||
*.dSYM |
||||
|
||||
## Playgrounds |
||||
timeline.xctimeline |
||||
playground.xcworkspace |
||||
|
||||
# Swift Package Manager |
||||
# |
||||
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. |
||||
# Packages/ |
||||
# Package.pins |
||||
# Package.resolved |
||||
# *.xcodeproj |
||||
# |
||||
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata |
||||
# hence it is not needed unless you have added a package configuration file to your project |
||||
# .swiftpm |
||||
|
||||
.build/ |
||||
|
||||
# CocoaPods |
||||
# |
||||
# We recommend against adding the Pods directory to your .gitignore. However |
||||
# you should judge for yourself, the pros and cons are mentioned at: |
||||
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control |
||||
# |
||||
# Pods/ |
||||
# |
||||
# Add this line if you want to avoid checking in source code from the Xcode workspace |
||||
# *.xcworkspace |
||||
|
||||
# Carthage |
||||
# |
||||
# Add this line if you want to avoid checking in source code from Carthage dependencies. |
||||
# Carthage/Checkouts |
||||
|
||||
Carthage/Build/ |
||||
|
||||
# Accio dependency management |
||||
Dependencies/ |
||||
.accio/ |
||||
|
||||
# fastlane |
||||
# |
||||
# It is recommended to not store the screenshots in the git repo. |
||||
# Instead, use fastlane to re-generate the screenshots whenever they are needed. |
||||
# For more information about the recommended setup visit: |
||||
# https://docs.fastlane.tools/best-practices/source-control/#source-control |
||||
|
||||
fastlane/report.xml |
||||
fastlane/Preview.html |
||||
fastlane/screenshots/**/*.png |
||||
fastlane/test_output |
||||
|
||||
# Code Injection |
||||
# |
||||
# After new code Injection tools there's a generated folder /iOSInjectionProject |
||||
# https://github.com/johnno1962/injectionforxcode |
||||
*.xcodeproj/.pbxuser |
||||
*.xcodeproj/.mode1v3 |
||||
|
||||
iOSInjectionProject/ |
||||
*.xcodeproj/xcuserdata/* |
||||
*.xcodeproj/project.xcworkspace/xcuserdata/* |
||||
*.xcworkspace/xcuserdata/* |
||||
Pods/Pods.xcodeproj/xcuserdata/* |
||||
*.xcworkspace/xcshareddata/* |
||||
*.xcodeproj/project.xcworkspace/xcshareddata/* |
||||
|
||||
|
||||
@ -0,0 +1,636 @@ |
||||
// !$*UTF8*$! |
||||
{ |
||||
archiveVersion = 1; |
||||
classes = { |
||||
}; |
||||
objectVersion = 55; |
||||
objects = { |
||||
|
||||
/* Begin PBXBuildFile section */ |
||||
C41A31C628C49B310019B951 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C41A31C528C49B310019B951 /* AppDelegate.swift */; }; |
||||
C41A31C828C49B310019B951 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C41A31C728C49B310019B951 /* SceneDelegate.swift */; }; |
||||
C41A31CA28C49B310019B951 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C41A31C928C49B310019B951 /* ViewController.swift */; }; |
||||
C41A31CD28C49B310019B951 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C41A31CB28C49B310019B951 /* Main.storyboard */; }; |
||||
C41A31D028C49B310019B951 /* Notes.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = C41A31CE28C49B310019B951 /* Notes.xcdatamodeld */; }; |
||||
C41A31D228C49B320019B951 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C41A31D128C49B320019B951 /* Assets.xcassets */; }; |
||||
C41A31D528C49B320019B951 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C41A31D328C49B320019B951 /* LaunchScreen.storyboard */; }; |
||||
C41A31E028C49B320019B951 /* NotesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C41A31DF28C49B320019B951 /* NotesTests.swift */; }; |
||||
C41A31EA28C49B320019B951 /* NotesUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C41A31E928C49B320019B951 /* NotesUITests.swift */; }; |
||||
C41A31EC28C49B320019B951 /* NotesUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C41A31EB28C49B320019B951 /* NotesUITestsLaunchTests.swift */; }; |
||||
C41A31F928C49DC80019B951 /* NoteViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C41A31F828C49DC80019B951 /* NoteViewController.swift */; }; |
||||
C41A31FB28C4D8040019B951 /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = C41A31FA28C4D8040019B951 /* Preferences.swift */; }; |
||||
/* End PBXBuildFile section */ |
||||
|
||||
/* Begin PBXContainerItemProxy section */ |
||||
C41A31DC28C49B320019B951 /* PBXContainerItemProxy */ = { |
||||
isa = PBXContainerItemProxy; |
||||
containerPortal = C41A31BA28C49B310019B951 /* Project object */; |
||||
proxyType = 1; |
||||
remoteGlobalIDString = C41A31C128C49B310019B951; |
||||
remoteInfo = Notes; |
||||
}; |
||||
C41A31E628C49B320019B951 /* PBXContainerItemProxy */ = { |
||||
isa = PBXContainerItemProxy; |
||||
containerPortal = C41A31BA28C49B310019B951 /* Project object */; |
||||
proxyType = 1; |
||||
remoteGlobalIDString = C41A31C128C49B310019B951; |
||||
remoteInfo = Notes; |
||||
}; |
||||
/* End PBXContainerItemProxy section */ |
||||
|
||||
/* Begin PBXFileReference section */ |
||||
C41A31C228C49B310019B951 /* Notes.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Notes.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
||||
C41A31C528C49B310019B951 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; |
||||
C41A31C728C49B310019B951 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; }; |
||||
C41A31C928C49B310019B951 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; }; |
||||
C41A31CC28C49B310019B951 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; |
||||
C41A31CF28C49B310019B951 /* Notes.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Notes.xcdatamodel; sourceTree = "<group>"; }; |
||||
C41A31D128C49B320019B951 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; |
||||
C41A31D428C49B320019B951 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; |
||||
C41A31D628C49B320019B951 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; |
||||
C41A31DB28C49B320019B951 /* NotesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NotesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; |
||||
C41A31DF28C49B320019B951 /* NotesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotesTests.swift; sourceTree = "<group>"; }; |
||||
C41A31E528C49B320019B951 /* NotesUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NotesUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; |
||||
C41A31E928C49B320019B951 /* NotesUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotesUITests.swift; sourceTree = "<group>"; }; |
||||
C41A31EB28C49B320019B951 /* NotesUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotesUITestsLaunchTests.swift; sourceTree = "<group>"; }; |
||||
C41A31F828C49DC80019B951 /* NoteViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoteViewController.swift; sourceTree = "<group>"; }; |
||||
C41A31FA28C4D8040019B951 /* Preferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Preferences.swift; sourceTree = "<group>"; }; |
||||
/* End PBXFileReference section */ |
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */ |
||||
C41A31BF28C49B310019B951 /* Frameworks */ = { |
||||
isa = PBXFrameworksBuildPhase; |
||||
buildActionMask = 2147483647; |
||||
files = ( |
||||
); |
||||
runOnlyForDeploymentPostprocessing = 0; |
||||
}; |
||||
C41A31D828C49B320019B951 /* Frameworks */ = { |
||||
isa = PBXFrameworksBuildPhase; |
||||
buildActionMask = 2147483647; |
||||
files = ( |
||||
); |
||||
runOnlyForDeploymentPostprocessing = 0; |
||||
}; |
||||
C41A31E228C49B320019B951 /* Frameworks */ = { |
||||
isa = PBXFrameworksBuildPhase; |
||||
buildActionMask = 2147483647; |
||||
files = ( |
||||
); |
||||
runOnlyForDeploymentPostprocessing = 0; |
||||
}; |
||||
/* End PBXFrameworksBuildPhase section */ |
||||
|
||||
/* Begin PBXGroup section */ |
||||
C41A31B928C49B310019B951 = { |
||||
isa = PBXGroup; |
||||
children = ( |
||||
C41A31C428C49B310019B951 /* Notes */, |
||||
C41A31DE28C49B320019B951 /* NotesTests */, |
||||
C41A31E828C49B320019B951 /* NotesUITests */, |
||||
C41A31C328C49B310019B951 /* Products */, |
||||
); |
||||
sourceTree = "<group>"; |
||||
}; |
||||
C41A31C328C49B310019B951 /* Products */ = { |
||||
isa = PBXGroup; |
||||
children = ( |
||||
C41A31C228C49B310019B951 /* Notes.app */, |
||||
C41A31DB28C49B320019B951 /* NotesTests.xctest */, |
||||
C41A31E528C49B320019B951 /* NotesUITests.xctest */, |
||||
); |
||||
name = Products; |
||||
sourceTree = "<group>"; |
||||
}; |
||||
C41A31C428C49B310019B951 /* Notes */ = { |
||||
isa = PBXGroup; |
||||
children = ( |
||||
C41A31C528C49B310019B951 /* AppDelegate.swift */, |
||||
C41A31C728C49B310019B951 /* SceneDelegate.swift */, |
||||
C41A31C928C49B310019B951 /* ViewController.swift */, |
||||
C41A31F828C49DC80019B951 /* NoteViewController.swift */, |
||||
C41A31FA28C4D8040019B951 /* Preferences.swift */, |
||||
C41A31CB28C49B310019B951 /* Main.storyboard */, |
||||
C41A31D128C49B320019B951 /* Assets.xcassets */, |
||||
C41A31D328C49B320019B951 /* LaunchScreen.storyboard */, |
||||
C41A31D628C49B320019B951 /* Info.plist */, |
||||
C41A31CE28C49B310019B951 /* Notes.xcdatamodeld */, |
||||
); |
||||
path = Notes; |
||||
sourceTree = "<group>"; |
||||
}; |
||||
C41A31DE28C49B320019B951 /* NotesTests */ = { |
||||
isa = PBXGroup; |
||||
children = ( |
||||
C41A31DF28C49B320019B951 /* NotesTests.swift */, |
||||
); |
||||
path = NotesTests; |
||||
sourceTree = "<group>"; |
||||
}; |
||||
C41A31E828C49B320019B951 /* NotesUITests */ = { |
||||
isa = PBXGroup; |
||||
children = ( |
||||
C41A31E928C49B320019B951 /* NotesUITests.swift */, |
||||
C41A31EB28C49B320019B951 /* NotesUITestsLaunchTests.swift */, |
||||
); |
||||
path = NotesUITests; |
||||
sourceTree = "<group>"; |
||||
}; |
||||
/* End PBXGroup section */ |
||||
|
||||
/* Begin PBXNativeTarget section */ |
||||
C41A31C128C49B310019B951 /* Notes */ = { |
||||
isa = PBXNativeTarget; |
||||
buildConfigurationList = C41A31EF28C49B320019B951 /* Build configuration list for PBXNativeTarget "Notes" */; |
||||
buildPhases = ( |
||||
C41A31BE28C49B310019B951 /* Sources */, |
||||
C41A31BF28C49B310019B951 /* Frameworks */, |
||||
C41A31C028C49B310019B951 /* Resources */, |
||||
); |
||||
buildRules = ( |
||||
); |
||||
dependencies = ( |
||||
); |
||||
name = Notes; |
||||
productName = Notes; |
||||
productReference = C41A31C228C49B310019B951 /* Notes.app */; |
||||
productType = "com.apple.product-type.application"; |
||||
}; |
||||
C41A31DA28C49B320019B951 /* NotesTests */ = { |
||||
isa = PBXNativeTarget; |
||||
buildConfigurationList = C41A31F228C49B320019B951 /* Build configuration list for PBXNativeTarget "NotesTests" */; |
||||
buildPhases = ( |
||||
C41A31D728C49B320019B951 /* Sources */, |
||||
C41A31D828C49B320019B951 /* Frameworks */, |
||||
C41A31D928C49B320019B951 /* Resources */, |
||||
); |
||||
buildRules = ( |
||||
); |
||||
dependencies = ( |
||||
C41A31DD28C49B320019B951 /* PBXTargetDependency */, |
||||
); |
||||
name = NotesTests; |
||||
productName = NotesTests; |
||||
productReference = C41A31DB28C49B320019B951 /* NotesTests.xctest */; |
||||
productType = "com.apple.product-type.bundle.unit-test"; |
||||
}; |
||||
C41A31E428C49B320019B951 /* NotesUITests */ = { |
||||
isa = PBXNativeTarget; |
||||
buildConfigurationList = C41A31F528C49B320019B951 /* Build configuration list for PBXNativeTarget "NotesUITests" */; |
||||
buildPhases = ( |
||||
C41A31E128C49B320019B951 /* Sources */, |
||||
C41A31E228C49B320019B951 /* Frameworks */, |
||||
C41A31E328C49B320019B951 /* Resources */, |
||||
); |
||||
buildRules = ( |
||||
); |
||||
dependencies = ( |
||||
C41A31E728C49B320019B951 /* PBXTargetDependency */, |
||||
); |
||||
name = NotesUITests; |
||||
productName = NotesUITests; |
||||
productReference = C41A31E528C49B320019B951 /* NotesUITests.xctest */; |
||||
productType = "com.apple.product-type.bundle.ui-testing"; |
||||
}; |
||||
/* End PBXNativeTarget section */ |
||||
|
||||
/* Begin PBXProject section */ |
||||
C41A31BA28C49B310019B951 /* Project object */ = { |
||||
isa = PBXProject; |
||||
attributes = { |
||||
BuildIndependentTargetsInParallel = 1; |
||||
LastSwiftUpdateCheck = 1340; |
||||
LastUpgradeCheck = 1340; |
||||
TargetAttributes = { |
||||
C41A31C128C49B310019B951 = { |
||||
CreatedOnToolsVersion = 13.4.1; |
||||
}; |
||||
C41A31DA28C49B320019B951 = { |
||||
CreatedOnToolsVersion = 13.4.1; |
||||
TestTargetID = C41A31C128C49B310019B951; |
||||
}; |
||||
C41A31E428C49B320019B951 = { |
||||
CreatedOnToolsVersion = 13.4.1; |
||||
TestTargetID = C41A31C128C49B310019B951; |
||||
}; |
||||
}; |
||||
}; |
||||
buildConfigurationList = C41A31BD28C49B310019B951 /* Build configuration list for PBXProject "Notes" */; |
||||
compatibilityVersion = "Xcode 13.0"; |
||||
developmentRegion = en; |
||||
hasScannedForEncodings = 0; |
||||
knownRegions = ( |
||||
en, |
||||
Base, |
||||
); |
||||
mainGroup = C41A31B928C49B310019B951; |
||||
productRefGroup = C41A31C328C49B310019B951 /* Products */; |
||||
projectDirPath = ""; |
||||
projectRoot = ""; |
||||
targets = ( |
||||
C41A31C128C49B310019B951 /* Notes */, |
||||
C41A31DA28C49B320019B951 /* NotesTests */, |
||||
C41A31E428C49B320019B951 /* NotesUITests */, |
||||
); |
||||
}; |
||||
/* End PBXProject section */ |
||||
|
||||
/* Begin PBXResourcesBuildPhase section */ |
||||
C41A31C028C49B310019B951 /* Resources */ = { |
||||
isa = PBXResourcesBuildPhase; |
||||
buildActionMask = 2147483647; |
||||
files = ( |
||||
C41A31D528C49B320019B951 /* LaunchScreen.storyboard in Resources */, |
||||
C41A31D228C49B320019B951 /* Assets.xcassets in Resources */, |
||||
C41A31CD28C49B310019B951 /* Main.storyboard in Resources */, |
||||
); |
||||
runOnlyForDeploymentPostprocessing = 0; |
||||
}; |
||||
C41A31D928C49B320019B951 /* Resources */ = { |
||||
isa = PBXResourcesBuildPhase; |
||||
buildActionMask = 2147483647; |
||||
files = ( |
||||
); |
||||
runOnlyForDeploymentPostprocessing = 0; |
||||
}; |
||||
C41A31E328C49B320019B951 /* Resources */ = { |
||||
isa = PBXResourcesBuildPhase; |
||||
buildActionMask = 2147483647; |
||||
files = ( |
||||
); |
||||
runOnlyForDeploymentPostprocessing = 0; |
||||
}; |
||||
/* End PBXResourcesBuildPhase section */ |
||||
|
||||
/* Begin PBXSourcesBuildPhase section */ |
||||
C41A31BE28C49B310019B951 /* Sources */ = { |
||||
isa = PBXSourcesBuildPhase; |
||||
buildActionMask = 2147483647; |
||||
files = ( |
||||
C41A31CA28C49B310019B951 /* ViewController.swift in Sources */, |
||||
C41A31C628C49B310019B951 /* AppDelegate.swift in Sources */, |
||||
C41A31FB28C4D8040019B951 /* Preferences.swift in Sources */, |
||||
C41A31C828C49B310019B951 /* SceneDelegate.swift in Sources */, |
||||
C41A31F928C49DC80019B951 /* NoteViewController.swift in Sources */, |
||||
C41A31D028C49B310019B951 /* Notes.xcdatamodeld in Sources */, |
||||
); |
||||
runOnlyForDeploymentPostprocessing = 0; |
||||
}; |
||||
C41A31D728C49B320019B951 /* Sources */ = { |
||||
isa = PBXSourcesBuildPhase; |
||||
buildActionMask = 2147483647; |
||||
files = ( |
||||
C41A31E028C49B320019B951 /* NotesTests.swift in Sources */, |
||||
); |
||||
runOnlyForDeploymentPostprocessing = 0; |
||||
}; |
||||
C41A31E128C49B320019B951 /* Sources */ = { |
||||
isa = PBXSourcesBuildPhase; |
||||
buildActionMask = 2147483647; |
||||
files = ( |
||||
C41A31EC28C49B320019B951 /* NotesUITestsLaunchTests.swift in Sources */, |
||||
C41A31EA28C49B320019B951 /* NotesUITests.swift in Sources */, |
||||
); |
||||
runOnlyForDeploymentPostprocessing = 0; |
||||
}; |
||||
/* End PBXSourcesBuildPhase section */ |
||||
|
||||
/* Begin PBXTargetDependency section */ |
||||
C41A31DD28C49B320019B951 /* PBXTargetDependency */ = { |
||||
isa = PBXTargetDependency; |
||||
target = C41A31C128C49B310019B951 /* Notes */; |
||||
targetProxy = C41A31DC28C49B320019B951 /* PBXContainerItemProxy */; |
||||
}; |
||||
C41A31E728C49B320019B951 /* PBXTargetDependency */ = { |
||||
isa = PBXTargetDependency; |
||||
target = C41A31C128C49B310019B951 /* Notes */; |
||||
targetProxy = C41A31E628C49B320019B951 /* PBXContainerItemProxy */; |
||||
}; |
||||
/* End PBXTargetDependency section */ |
||||
|
||||
/* Begin PBXVariantGroup section */ |
||||
C41A31CB28C49B310019B951 /* Main.storyboard */ = { |
||||
isa = PBXVariantGroup; |
||||
children = ( |
||||
C41A31CC28C49B310019B951 /* Base */, |
||||
); |
||||
name = Main.storyboard; |
||||
sourceTree = "<group>"; |
||||
}; |
||||
C41A31D328C49B320019B951 /* LaunchScreen.storyboard */ = { |
||||
isa = PBXVariantGroup; |
||||
children = ( |
||||
C41A31D428C49B320019B951 /* Base */, |
||||
); |
||||
name = LaunchScreen.storyboard; |
||||
sourceTree = "<group>"; |
||||
}; |
||||
/* End PBXVariantGroup section */ |
||||
|
||||
/* Begin XCBuildConfiguration section */ |
||||
C41A31ED28C49B320019B951 /* Debug */ = { |
||||
isa = XCBuildConfiguration; |
||||
buildSettings = { |
||||
ALWAYS_SEARCH_USER_PATHS = NO; |
||||
CLANG_ANALYZER_NONNULL = YES; |
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; |
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; |
||||
CLANG_ENABLE_MODULES = YES; |
||||
CLANG_ENABLE_OBJC_ARC = YES; |
||||
CLANG_ENABLE_OBJC_WEAK = YES; |
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; |
||||
CLANG_WARN_BOOL_CONVERSION = YES; |
||||
CLANG_WARN_COMMA = YES; |
||||
CLANG_WARN_CONSTANT_CONVERSION = YES; |
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; |
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES; |
||||
CLANG_WARN_EMPTY_BODY = YES; |
||||
CLANG_WARN_ENUM_CONVERSION = YES; |
||||
CLANG_WARN_INFINITE_RECURSION = YES; |
||||
CLANG_WARN_INT_CONVERSION = YES; |
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; |
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; |
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; |
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; |
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; |
||||
CLANG_WARN_STRICT_PROTOTYPES = YES; |
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES; |
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; |
||||
CLANG_WARN_UNREACHABLE_CODE = YES; |
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
||||
COPY_PHASE_STRIP = NO; |
||||
DEBUG_INFORMATION_FORMAT = dwarf; |
||||
ENABLE_STRICT_OBJC_MSGSEND = YES; |
||||
ENABLE_TESTABILITY = YES; |
||||
GCC_C_LANGUAGE_STANDARD = gnu11; |
||||
GCC_DYNAMIC_NO_PIC = NO; |
||||
GCC_NO_COMMON_BLOCKS = YES; |
||||
GCC_OPTIMIZATION_LEVEL = 0; |
||||
GCC_PREPROCESSOR_DEFINITIONS = ( |
||||
"DEBUG=1", |
||||
"$(inherited)", |
||||
); |
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; |
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; |
||||
GCC_WARN_UNDECLARED_SELECTOR = YES; |
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
||||
GCC_WARN_UNUSED_FUNCTION = YES; |
||||
GCC_WARN_UNUSED_VARIABLE = YES; |
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.5; |
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; |
||||
MTL_FAST_MATH = YES; |
||||
ONLY_ACTIVE_ARCH = YES; |
||||
SDKROOT = iphoneos; |
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; |
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; |
||||
}; |
||||
name = Debug; |
||||
}; |
||||
C41A31EE28C49B320019B951 /* Release */ = { |
||||
isa = XCBuildConfiguration; |
||||
buildSettings = { |
||||
ALWAYS_SEARCH_USER_PATHS = NO; |
||||
CLANG_ANALYZER_NONNULL = YES; |
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; |
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; |
||||
CLANG_ENABLE_MODULES = YES; |
||||
CLANG_ENABLE_OBJC_ARC = YES; |
||||
CLANG_ENABLE_OBJC_WEAK = YES; |
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; |
||||
CLANG_WARN_BOOL_CONVERSION = YES; |
||||
CLANG_WARN_COMMA = YES; |
||||
CLANG_WARN_CONSTANT_CONVERSION = YES; |
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; |
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; |
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES; |
||||
CLANG_WARN_EMPTY_BODY = YES; |
||||
CLANG_WARN_ENUM_CONVERSION = YES; |
||||
CLANG_WARN_INFINITE_RECURSION = YES; |
||||
CLANG_WARN_INT_CONVERSION = YES; |
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; |
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; |
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; |
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; |
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; |
||||
CLANG_WARN_STRICT_PROTOTYPES = YES; |
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES; |
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; |
||||
CLANG_WARN_UNREACHABLE_CODE = YES; |
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
||||
COPY_PHASE_STRIP = NO; |
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; |
||||
ENABLE_NS_ASSERTIONS = NO; |
||||
ENABLE_STRICT_OBJC_MSGSEND = YES; |
||||
GCC_C_LANGUAGE_STANDARD = gnu11; |
||||
GCC_NO_COMMON_BLOCKS = YES; |
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; |
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; |
||||
GCC_WARN_UNDECLARED_SELECTOR = YES; |
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; |
||||
GCC_WARN_UNUSED_FUNCTION = YES; |
||||
GCC_WARN_UNUSED_VARIABLE = YES; |
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.5; |
||||
MTL_ENABLE_DEBUG_INFO = NO; |
||||
MTL_FAST_MATH = YES; |
||||
SDKROOT = iphoneos; |
||||
SWIFT_COMPILATION_MODE = wholemodule; |
||||
SWIFT_OPTIMIZATION_LEVEL = "-O"; |
||||
VALIDATE_PRODUCT = YES; |
||||
}; |
||||
name = Release; |
||||
}; |
||||
C41A31F028C49B320019B951 /* Debug */ = { |
||||
isa = XCBuildConfiguration; |
||||
buildSettings = { |
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; |
||||
CODE_SIGN_STYLE = Automatic; |
||||
CURRENT_PROJECT_VERSION = 1; |
||||
DEVELOPMENT_TEAM = 526E96RFNP; |
||||
GENERATE_INFOPLIST_FILE = YES; |
||||
INFOPLIST_FILE = Notes/Info.plist; |
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; |
||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; |
||||
INFOPLIST_KEY_UIMainStoryboardFile = Main; |
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; |
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; |
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; |
||||
LD_RUNPATH_SEARCH_PATHS = ( |
||||
"$(inherited)", |
||||
"@executable_path/Frameworks", |
||||
); |
||||
MARKETING_VERSION = 1.0; |
||||
PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.Notes; |
||||
PRODUCT_NAME = "$(TARGET_NAME)"; |
||||
SWIFT_EMIT_LOC_STRINGS = YES; |
||||
SWIFT_VERSION = 5.0; |
||||
TARGETED_DEVICE_FAMILY = "1,2"; |
||||
}; |
||||
name = Debug; |
||||
}; |
||||
C41A31F128C49B320019B951 /* Release */ = { |
||||
isa = XCBuildConfiguration; |
||||
buildSettings = { |
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; |
||||
CODE_SIGN_STYLE = Automatic; |
||||
CURRENT_PROJECT_VERSION = 1; |
||||
DEVELOPMENT_TEAM = 526E96RFNP; |
||||
GENERATE_INFOPLIST_FILE = YES; |
||||
INFOPLIST_FILE = Notes/Info.plist; |
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; |
||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; |
||||
INFOPLIST_KEY_UIMainStoryboardFile = Main; |
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; |
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; |
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; |
||||
LD_RUNPATH_SEARCH_PATHS = ( |
||||
"$(inherited)", |
||||
"@executable_path/Frameworks", |
||||
); |
||||
MARKETING_VERSION = 1.0; |
||||
PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.Notes; |
||||
PRODUCT_NAME = "$(TARGET_NAME)"; |
||||
SWIFT_EMIT_LOC_STRINGS = YES; |
||||
SWIFT_VERSION = 5.0; |
||||
TARGETED_DEVICE_FAMILY = "1,2"; |
||||
}; |
||||
name = Release; |
||||
}; |
||||
C41A31F328C49B320019B951 /* Debug */ = { |
||||
isa = XCBuildConfiguration; |
||||
buildSettings = { |
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; |
||||
BUNDLE_LOADER = "$(TEST_HOST)"; |
||||
CODE_SIGN_STYLE = Automatic; |
||||
CURRENT_PROJECT_VERSION = 1; |
||||
DEVELOPMENT_TEAM = 526E96RFNP; |
||||
GENERATE_INFOPLIST_FILE = YES; |
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.5; |
||||
MARKETING_VERSION = 1.0; |
||||
PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.NotesTests; |
||||
PRODUCT_NAME = "$(TARGET_NAME)"; |
||||
SWIFT_EMIT_LOC_STRINGS = NO; |
||||
SWIFT_VERSION = 5.0; |
||||
TARGETED_DEVICE_FAMILY = "1,2"; |
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Notes.app/Notes"; |
||||
}; |
||||
name = Debug; |
||||
}; |
||||
C41A31F428C49B320019B951 /* Release */ = { |
||||
isa = XCBuildConfiguration; |
||||
buildSettings = { |
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; |
||||
BUNDLE_LOADER = "$(TEST_HOST)"; |
||||
CODE_SIGN_STYLE = Automatic; |
||||
CURRENT_PROJECT_VERSION = 1; |
||||
DEVELOPMENT_TEAM = 526E96RFNP; |
||||
GENERATE_INFOPLIST_FILE = YES; |
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.5; |
||||
MARKETING_VERSION = 1.0; |
||||
PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.NotesTests; |
||||
PRODUCT_NAME = "$(TARGET_NAME)"; |
||||
SWIFT_EMIT_LOC_STRINGS = NO; |
||||
SWIFT_VERSION = 5.0; |
||||
TARGETED_DEVICE_FAMILY = "1,2"; |
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Notes.app/Notes"; |
||||
}; |
||||
name = Release; |
||||
}; |
||||
C41A31F628C49B320019B951 /* Debug */ = { |
||||
isa = XCBuildConfiguration; |
||||
buildSettings = { |
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; |
||||
CODE_SIGN_STYLE = Automatic; |
||||
CURRENT_PROJECT_VERSION = 1; |
||||
DEVELOPMENT_TEAM = 526E96RFNP; |
||||
GENERATE_INFOPLIST_FILE = YES; |
||||
MARKETING_VERSION = 1.0; |
||||
PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.NotesUITests; |
||||
PRODUCT_NAME = "$(TARGET_NAME)"; |
||||
SWIFT_EMIT_LOC_STRINGS = NO; |
||||
SWIFT_VERSION = 5.0; |
||||
TARGETED_DEVICE_FAMILY = "1,2"; |
||||
TEST_TARGET_NAME = Notes; |
||||
}; |
||||
name = Debug; |
||||
}; |
||||
C41A31F728C49B320019B951 /* Release */ = { |
||||
isa = XCBuildConfiguration; |
||||
buildSettings = { |
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; |
||||
CODE_SIGN_STYLE = Automatic; |
||||
CURRENT_PROJECT_VERSION = 1; |
||||
DEVELOPMENT_TEAM = 526E96RFNP; |
||||
GENERATE_INFOPLIST_FILE = YES; |
||||
MARKETING_VERSION = 1.0; |
||||
PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.NotesUITests; |
||||
PRODUCT_NAME = "$(TARGET_NAME)"; |
||||
SWIFT_EMIT_LOC_STRINGS = NO; |
||||
SWIFT_VERSION = 5.0; |
||||
TARGETED_DEVICE_FAMILY = "1,2"; |
||||
TEST_TARGET_NAME = Notes; |
||||
}; |
||||
name = Release; |
||||
}; |
||||
/* End XCBuildConfiguration section */ |
||||
|
||||
/* Begin XCConfigurationList section */ |
||||
C41A31BD28C49B310019B951 /* Build configuration list for PBXProject "Notes" */ = { |
||||
isa = XCConfigurationList; |
||||
buildConfigurations = ( |
||||
C41A31ED28C49B320019B951 /* Debug */, |
||||
C41A31EE28C49B320019B951 /* Release */, |
||||
); |
||||
defaultConfigurationIsVisible = 0; |
||||
defaultConfigurationName = Release; |
||||
}; |
||||
C41A31EF28C49B320019B951 /* Build configuration list for PBXNativeTarget "Notes" */ = { |
||||
isa = XCConfigurationList; |
||||
buildConfigurations = ( |
||||
C41A31F028C49B320019B951 /* Debug */, |
||||
C41A31F128C49B320019B951 /* Release */, |
||||
); |
||||
defaultConfigurationIsVisible = 0; |
||||
defaultConfigurationName = Release; |
||||
}; |
||||
C41A31F228C49B320019B951 /* Build configuration list for PBXNativeTarget "NotesTests" */ = { |
||||
isa = XCConfigurationList; |
||||
buildConfigurations = ( |
||||
C41A31F328C49B320019B951 /* Debug */, |
||||
C41A31F428C49B320019B951 /* Release */, |
||||
); |
||||
defaultConfigurationIsVisible = 0; |
||||
defaultConfigurationName = Release; |
||||
}; |
||||
C41A31F528C49B320019B951 /* Build configuration list for PBXNativeTarget "NotesUITests" */ = { |
||||
isa = XCConfigurationList; |
||||
buildConfigurations = ( |
||||
C41A31F628C49B320019B951 /* Debug */, |
||||
C41A31F728C49B320019B951 /* Release */, |
||||
); |
||||
defaultConfigurationIsVisible = 0; |
||||
defaultConfigurationName = Release; |
||||
}; |
||||
/* End XCConfigurationList section */ |
||||
|
||||
/* Begin XCVersionGroup section */ |
||||
C41A31CE28C49B310019B951 /* Notes.xcdatamodeld */ = { |
||||
isa = XCVersionGroup; |
||||
children = ( |
||||
C41A31CF28C49B310019B951 /* Notes.xcdatamodel */, |
||||
); |
||||
currentVersion = C41A31CF28C49B310019B951 /* Notes.xcdatamodel */; |
||||
path = Notes.xcdatamodeld; |
||||
sourceTree = "<group>"; |
||||
versionGroupType = wrapper.xcdatamodel; |
||||
}; |
||||
/* End XCVersionGroup section */ |
||||
}; |
||||
rootObject = C41A31BA28C49B310019B951 /* Project object */; |
||||
} |
||||
@ -0,0 +1,7 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<Workspace |
||||
version = "1.0"> |
||||
<FileRef |
||||
location = "self:"> |
||||
</FileRef> |
||||
</Workspace> |
||||
@ -0,0 +1,88 @@ |
||||
// |
||||
// AppDelegate.swift |
||||
// Notes |
||||
// |
||||
// Created by Laurent Morvillier on 04/09/2022. |
||||
// |
||||
|
||||
import UIKit |
||||
import CoreData |
||||
|
||||
@main |
||||
class AppDelegate: UIResponder, UIApplicationDelegate { |
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { |
||||
// Override point for customization after application launch. |
||||
|
||||
for fontFamilyName in UIFont.familyNames { |
||||
print("family: \(fontFamilyName)\n") |
||||
|
||||
for fontName in UIFont.fontNames(forFamilyName: fontFamilyName) { |
||||
print("font: \(fontName)") |
||||
} |
||||
} |
||||
|
||||
return true |
||||
} |
||||
|
||||
// MARK: UISceneSession Lifecycle |
||||
|
||||
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { |
||||
// Called when a new scene session is being created. |
||||
// Use this method to select a configuration to create the new scene with. |
||||
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) |
||||
} |
||||
|
||||
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) { |
||||
// Called when the user discards a scene session. |
||||
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. |
||||
// Use this method to release any resources that were specific to the discarded scenes, as they will not return. |
||||
} |
||||
|
||||
// MARK: - Core Data stack |
||||
|
||||
lazy var persistentContainer: NSPersistentCloudKitContainer = { |
||||
/* |
||||
The persistent container for the application. This implementation |
||||
creates and returns a container, having loaded the store for the |
||||
application to it. This property is optional since there are legitimate |
||||
error conditions that could cause the creation of the store to fail. |
||||
*/ |
||||
let container = NSPersistentCloudKitContainer(name: "Notes") |
||||
container.loadPersistentStores(completionHandler: { (storeDescription, error) in |
||||
if let error = error as NSError? { |
||||
// Replace this implementation with code to handle the error appropriately. |
||||
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. |
||||
|
||||
/* |
||||
Typical reasons for an error here include: |
||||
* The parent directory does not exist, cannot be created, or disallows writing. |
||||
* The persistent store is not accessible, due to permissions or data protection when the device is locked. |
||||
* The device is out of space. |
||||
* The store could not be migrated to the current model version. |
||||
Check the error message to determine what the actual problem was. |
||||
*/ |
||||
fatalError("Unresolved error \(error), \(error.userInfo)") |
||||
} |
||||
}) |
||||
return container |
||||
}() |
||||
|
||||
// MARK: - Core Data Saving support |
||||
|
||||
func saveContext () { |
||||
let context = persistentContainer.viewContext |
||||
if context.hasChanges { |
||||
do { |
||||
try context.save() |
||||
} catch { |
||||
// Replace this implementation with code to handle the error appropriately. |
||||
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. |
||||
let nserror = error as NSError |
||||
fatalError("Unresolved error \(nserror), \(nserror.userInfo)") |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
@ -0,0 +1,15 @@ |
||||
{ |
||||
"colors" : [ |
||||
{ |
||||
"color" : { |
||||
"platform" : "universal", |
||||
"reference" : "systemMintColor" |
||||
}, |
||||
"idiom" : "universal" |
||||
} |
||||
], |
||||
"info" : { |
||||
"author" : "xcode", |
||||
"version" : 1 |
||||
} |
||||
} |
||||
@ -0,0 +1,100 @@ |
||||
{ |
||||
"images" : [ |
||||
{ |
||||
"idiom" : "iphone", |
||||
"scale" : "2x", |
||||
"size" : "20x20" |
||||
}, |
||||
{ |
||||
"idiom" : "iphone", |
||||
"scale" : "3x", |
||||
"size" : "20x20" |
||||
}, |
||||
{ |
||||
"idiom" : "iphone", |
||||
"scale" : "2x", |
||||
"size" : "29x29" |
||||
}, |
||||
{ |
||||
"idiom" : "iphone", |
||||
"scale" : "3x", |
||||
"size" : "29x29" |
||||
}, |
||||
{ |
||||
"idiom" : "iphone", |
||||
"scale" : "2x", |
||||
"size" : "40x40" |
||||
}, |
||||
{ |
||||
"idiom" : "iphone", |
||||
"scale" : "3x", |
||||
"size" : "40x40" |
||||
}, |
||||
{ |
||||
"idiom" : "iphone", |
||||
"scale" : "2x", |
||||
"size" : "60x60" |
||||
}, |
||||
{ |
||||
"filename" : "icon180.png", |
||||
"idiom" : "iphone", |
||||
"scale" : "3x", |
||||
"size" : "60x60" |
||||
}, |
||||
{ |
||||
"idiom" : "ipad", |
||||
"scale" : "1x", |
||||
"size" : "20x20" |
||||
}, |
||||
{ |
||||
"idiom" : "ipad", |
||||
"scale" : "2x", |
||||
"size" : "20x20" |
||||
}, |
||||
{ |
||||
"idiom" : "ipad", |
||||
"scale" : "1x", |
||||
"size" : "29x29" |
||||
}, |
||||
{ |
||||
"idiom" : "ipad", |
||||
"scale" : "2x", |
||||
"size" : "29x29" |
||||
}, |
||||
{ |
||||
"idiom" : "ipad", |
||||
"scale" : "1x", |
||||
"size" : "40x40" |
||||
}, |
||||
{ |
||||
"idiom" : "ipad", |
||||
"scale" : "2x", |
||||
"size" : "40x40" |
||||
}, |
||||
{ |
||||
"idiom" : "ipad", |
||||
"scale" : "1x", |
||||
"size" : "76x76" |
||||
}, |
||||
{ |
||||
"idiom" : "ipad", |
||||
"scale" : "2x", |
||||
"size" : "76x76" |
||||
}, |
||||
{ |
||||
"idiom" : "ipad", |
||||
"scale" : "2x", |
||||
"size" : "83.5x83.5" |
||||
}, |
||||
{ |
||||
"filename" : "icon.png", |
||||
"idiom" : "ios-marketing", |
||||
"scale" : "1x", |
||||
"size" : "1024x1024" |
||||
} |
||||
], |
||||
"info" : { |
||||
"author" : "xcode", |
||||
"version" : 1 |
||||
} |
||||
} |
||||
|
After Width: | Height: | Size: 692 KiB |
|
After Width: | Height: | Size: 33 KiB |
@ -0,0 +1,6 @@ |
||||
{ |
||||
"info" : { |
||||
"author" : "xcode", |
||||
"version" : 1 |
||||
} |
||||
} |
||||
@ -0,0 +1,25 @@ |
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> |
||||
<dependencies> |
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> |
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> |
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
||||
</dependencies> |
||||
<scenes> |
||||
<!--View Controller--> |
||||
<scene sceneID="EHf-IW-A2E"> |
||||
<objects> |
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController"> |
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> |
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
||||
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> |
||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> |
||||
</view> |
||||
</viewController> |
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> |
||||
</objects> |
||||
<point key="canvasLocation" x="53" y="375"/> |
||||
</scene> |
||||
</scenes> |
||||
</document> |
||||
@ -0,0 +1,98 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="TxU-Fl-tNx"> |
||||
<device id="retina6_1" orientation="portrait" appearance="light"/> |
||||
<dependencies> |
||||
<deployment identifier="iOS"/> |
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/> |
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> |
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/> |
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
||||
</dependencies> |
||||
<scenes> |
||||
<!--View Controller--> |
||||
<scene sceneID="tne-QT-ifu"> |
||||
<objects> |
||||
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="Notes" customModuleProvider="target" sceneMemberID="viewController"> |
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> |
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> |
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
||||
<subviews> |
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="oMh-UP-9ML"> |
||||
<rect key="frame" x="20" y="48" width="374" height="242"/> |
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> |
||||
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string> |
||||
<color key="textColor" systemColor="labelColor"/> |
||||
<fontDescription key="fontDescription" name="DINAlternate-Bold" family="DIN Alternate" pointSize="14"/> |
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> |
||||
</textView> |
||||
</subviews> |
||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> |
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> |
||||
</view> |
||||
</viewController> |
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> |
||||
</objects> |
||||
<point key="canvasLocation" x="53.623188405797109" y="81.696428571428569"/> |
||||
</scene> |
||||
<!--Navigation Controller--> |
||||
<scene sceneID="hez-bJ-diu"> |
||||
<objects> |
||||
<navigationController id="TxU-Fl-tNx" sceneMemberID="viewController"> |
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="WFB-v3-7ji"> |
||||
<rect key="frame" x="0.0" y="48" width="414" height="44"/> |
||||
<autoresizingMask key="autoresizingMask"/> |
||||
</navigationBar> |
||||
<connections> |
||||
<segue destination="NKc-C6-bTZ" kind="relationship" relationship="rootViewController" id="08b-m4-FZS"/> |
||||
</connections> |
||||
</navigationController> |
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="It9-d6-eH5" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> |
||||
</objects> |
||||
<point key="canvasLocation" x="939" y="82"/> |
||||
</scene> |
||||
<!--Note View Controller--> |
||||
<scene sceneID="3me-1s-GmT"> |
||||
<objects> |
||||
<viewController storyboardIdentifier="note" id="NKc-C6-bTZ" customClass="NoteViewController" customModule="Notes" customModuleProvider="target" sceneMemberID="viewController"> |
||||
<view key="view" contentMode="scaleToFill" id="zfQ-Xr-jsC"> |
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> |
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
||||
<subviews> |
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="zPN-eq-BkD"> |
||||
<rect key="frame" x="8" y="100" width="398" height="754"/> |
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> |
||||
<color key="textColor" systemColor="labelColor"/> |
||||
<fontDescription key="fontDescription" name="DINAlternate-Bold" family="DIN Alternate" pointSize="14"/> |
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> |
||||
</textView> |
||||
</subviews> |
||||
<viewLayoutGuide key="safeArea" id="Qu6-9S-tel"/> |
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> |
||||
<constraints> |
||||
<constraint firstItem="Qu6-9S-tel" firstAttribute="trailing" secondItem="zPN-eq-BkD" secondAttribute="trailing" constant="8" id="9rz-bm-QIs"/> |
||||
<constraint firstItem="Qu6-9S-tel" firstAttribute="bottom" secondItem="zPN-eq-BkD" secondAttribute="bottom" constant="8" id="ElV-mT-Day"/> |
||||
<constraint firstItem="zPN-eq-BkD" firstAttribute="leading" secondItem="Qu6-9S-tel" secondAttribute="leading" constant="8" id="hUX-Ie-RB0"/> |
||||
<constraint firstItem="zPN-eq-BkD" firstAttribute="top" secondItem="Qu6-9S-tel" secondAttribute="top" constant="8" id="jaW-K0-O4W"/> |
||||
</constraints> |
||||
</view> |
||||
<navigationItem key="navigationItem" id="obh-lB-Hmb"/> |
||||
<connections> |
||||
<outlet property="textView" destination="zPN-eq-BkD" id="gC1-fy-xI4"/> |
||||
<outlet property="textViewBottomConstraint" destination="ElV-mT-Day" id="esj-WS-G5P"/> |
||||
</connections> |
||||
</viewController> |
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="BQh-DG-myD" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> |
||||
</objects> |
||||
<point key="canvasLocation" x="1736" y="82"/> |
||||
</scene> |
||||
</scenes> |
||||
<resources> |
||||
<systemColor name="labelColor"> |
||||
<color red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
||||
</systemColor> |
||||
<systemColor name="systemBackgroundColor"> |
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
||||
</systemColor> |
||||
</resources> |
||||
</document> |
||||
@ -0,0 +1,25 @@ |
||||
<?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>UIApplicationSceneManifest</key> |
||||
<dict> |
||||
<key>UIApplicationSupportsMultipleScenes</key> |
||||
<false/> |
||||
<key>UISceneConfigurations</key> |
||||
<dict> |
||||
<key>UIWindowSceneSessionRoleApplication</key> |
||||
<array> |
||||
<dict> |
||||
<key>UISceneConfigurationName</key> |
||||
<string>Default Configuration</string> |
||||
<key>UISceneDelegateClassName</key> |
||||
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string> |
||||
<key>UISceneStoryboardFile</key> |
||||
<string>Main</string> |
||||
</dict> |
||||
</array> |
||||
</dict> |
||||
</dict> |
||||
</dict> |
||||
</plist> |
||||
@ -0,0 +1,120 @@ |
||||
// |
||||
// NoteViewController.swift |
||||
// Notes |
||||
// |
||||
// Created by Laurent Morvillier on 04/09/2022. |
||||
// |
||||
|
||||
import Foundation |
||||
import UIKit |
||||
|
||||
class NoteViewController : UIViewController, UITextViewDelegate { |
||||
|
||||
var filename: String = "main" |
||||
|
||||
@IBOutlet weak var textView: UITextView! |
||||
|
||||
@IBOutlet weak var textViewBottomConstraint: NSLayoutConstraint! |
||||
|
||||
fileprivate weak var _lastEditLabel: UILabel? |
||||
|
||||
// MARK: - |
||||
|
||||
override func viewDidLoad() { |
||||
super.viewDidLoad() |
||||
|
||||
let shareButton = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(shareHandler)) |
||||
let addButton = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(addHandler)) |
||||
self.navigationItem.rightBarButtonItems = [addButton, shareButton] |
||||
|
||||
self.textView.text = Preferences.getContent(filename: self.filename) |
||||
self.textView.font = UIFont.systemFont(ofSize: 18.0, weight: .medium) |
||||
self.textView.delegate = self |
||||
self.textView.inputAccessoryView = self._inputAccessoryView() |
||||
|
||||
self._updateLastEdit() |
||||
|
||||
NotificationCenter.default.addObserver( |
||||
self, |
||||
selector: #selector(keyboardDidShow(notification:)), |
||||
name: UIResponder.keyboardDidShowNotification, |
||||
object: nil |
||||
) |
||||
|
||||
NotificationCenter.default.addObserver( |
||||
self, |
||||
selector: #selector(keyboardWillHide), |
||||
name: UIResponder.keyboardWillHideNotification, |
||||
object: nil |
||||
) |
||||
|
||||
} |
||||
|
||||
func textViewDidChange(_ textView: UITextView) { |
||||
Preferences.store(filename: self.filename, content: textView.text) |
||||
self._updateLastEdit() |
||||
} |
||||
|
||||
fileprivate func _updateLastEdit() { |
||||
if let date = Preferences.lastEditDate(filename: self.filename) { |
||||
let formattedDate: String = date.formatted() |
||||
self._lastEditLabel?.text = "last edit: \(formattedDate)" |
||||
} |
||||
} |
||||
|
||||
fileprivate func _inputAccessoryView() -> UIView { |
||||
|
||||
let toolbar: UIToolbar = UIToolbar(frame: CGRect(x: 0, y: 0, width: 333, height: 44.0)) |
||||
|
||||
let lastEditLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 280, height: 44)) |
||||
lastEditLabel.textColor = UIColor.gray |
||||
let lastEditButtonItem = UIBarButtonItem(customView: lastEditLabel) |
||||
self._lastEditLabel = lastEditLabel |
||||
|
||||
let flexButton = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil) |
||||
let dismissButton = UIBarButtonItem(image: UIImage(systemName: "checkmark"), style: .done, target: self, action: #selector(dismissKeyboard)) |
||||
toolbar.items = [lastEditButtonItem, flexButton, dismissButton] |
||||
|
||||
let swipeDown = UISwipeGestureRecognizer(target: self, action: #selector(dismissKeyboard)) |
||||
swipeDown.direction = .down |
||||
toolbar.addGestureRecognizer(swipeDown) |
||||
|
||||
return toolbar |
||||
} |
||||
|
||||
// MARK: - Keyboard |
||||
|
||||
@objc func dismissKeyboard() { |
||||
self.textView.resignFirstResponder() |
||||
} |
||||
|
||||
@objc func keyboardDidShow(notification: NSNotification) { |
||||
guard let keyboardRect = notification |
||||
.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] |
||||
as? NSValue else { return } |
||||
let frameKeyboard = keyboardRect.cgRectValue |
||||
|
||||
self.textViewBottomConstraint.constant = frameKeyboard.size.height |
||||
} |
||||
|
||||
@objc func keyboardWillHide() { |
||||
self.textViewBottomConstraint.constant = 0.0 |
||||
} |
||||
|
||||
// MARK: - Business |
||||
|
||||
@objc func shareHandler() { |
||||
|
||||
guard let text = self.textView.text else { |
||||
return |
||||
} |
||||
|
||||
let activityViewController = UIActivityViewController(activityItems: [text], applicationActivities: nil) |
||||
self.present(activityViewController, animated: true) |
||||
} |
||||
|
||||
@objc func addHandler() { |
||||
|
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,8 @@ |
||||
<?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>_XCCurrentVersionName</key> |
||||
<string>Notes.xcdatamodel</string> |
||||
</dict> |
||||
</plist> |
||||
@ -0,0 +1,4 @@ |
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1" systemVersion="11A491" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithCloudKit="true" userDefinedModelVersionIdentifier=""> |
||||
<elements/> |
||||
</model> |
||||
@ -0,0 +1,29 @@ |
||||
// |
||||
// Preferences.swift |
||||
// Notes |
||||
// |
||||
// Created by Laurent Morvillier on 04/09/2022. |
||||
// |
||||
|
||||
import Foundation |
||||
|
||||
class Preferences { |
||||
|
||||
static func store(filename: String, content: String) { |
||||
UserDefaults.standard.set(content, forKey: filename) |
||||
Preferences._fileChanged(filename: filename) |
||||
} |
||||
|
||||
fileprivate static func _fileChanged(filename: String) { |
||||
UserDefaults.standard.set(Date(), forKey: filename + "_date") |
||||
} |
||||
|
||||
static func getContent(filename: String) -> String? { |
||||
return UserDefaults.standard.object(forKey: filename) as? String |
||||
} |
||||
|
||||
static func lastEditDate(filename: String) -> Date? { |
||||
return UserDefaults.standard.object(forKey: filename + "_date") as? Date |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,55 @@ |
||||
// |
||||
// SceneDelegate.swift |
||||
// Notes |
||||
// |
||||
// Created by Laurent Morvillier on 04/09/2022. |
||||
// |
||||
|
||||
import UIKit |
||||
|
||||
class SceneDelegate: UIResponder, UIWindowSceneDelegate { |
||||
|
||||
var window: UIWindow? |
||||
|
||||
|
||||
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { |
||||
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. |
||||
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene. |
||||
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). |
||||
guard let _ = (scene as? UIWindowScene) else { return } |
||||
} |
||||
|
||||
func sceneDidDisconnect(_ scene: UIScene) { |
||||
// Called as the scene is being released by the system. |
||||
// This occurs shortly after the scene enters the background, or when its session is discarded. |
||||
// Release any resources associated with this scene that can be re-created the next time the scene connects. |
||||
// The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). |
||||
} |
||||
|
||||
func sceneDidBecomeActive(_ scene: UIScene) { |
||||
// Called when the scene has moved from an inactive state to an active state. |
||||
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. |
||||
} |
||||
|
||||
func sceneWillResignActive(_ scene: UIScene) { |
||||
// Called when the scene will move from an active state to an inactive state. |
||||
// This may occur due to temporary interruptions (ex. an incoming phone call). |
||||
} |
||||
|
||||
func sceneWillEnterForeground(_ scene: UIScene) { |
||||
// Called as the scene transitions from the background to the foreground. |
||||
// Use this method to undo the changes made on entering the background. |
||||
} |
||||
|
||||
func sceneDidEnterBackground(_ scene: UIScene) { |
||||
// Called as the scene transitions from the foreground to the background. |
||||
// Use this method to save data, release shared resources, and store enough scene-specific state information |
||||
// to restore the scene back to its current state. |
||||
|
||||
// Save changes in the application's managed object context when the application transitions to the background. |
||||
(UIApplication.shared.delegate as? AppDelegate)?.saveContext() |
||||
} |
||||
|
||||
|
||||
} |
||||
|
||||
@ -0,0 +1,19 @@ |
||||
// |
||||
// ViewController.swift |
||||
// Notes |
||||
// |
||||
// Created by Laurent Morvillier on 04/09/2022. |
||||
// |
||||
|
||||
import UIKit |
||||
|
||||
class ViewController: UIViewController { |
||||
|
||||
override func viewDidLoad() { |
||||
super.viewDidLoad() |
||||
// Do any additional setup after loading the view. |
||||
} |
||||
|
||||
|
||||
} |
||||
|
||||
@ -0,0 +1,36 @@ |
||||
// |
||||
// NotesTests.swift |
||||
// NotesTests |
||||
// |
||||
// Created by Laurent Morvillier on 04/09/2022. |
||||
// |
||||
|
||||
import XCTest |
||||
@testable import Notes |
||||
|
||||
class NotesTests: XCTestCase { |
||||
|
||||
override func setUpWithError() throws { |
||||
// Put setup code here. This method is called before the invocation of each test method in the class. |
||||
} |
||||
|
||||
override func tearDownWithError() throws { |
||||
// Put teardown code here. This method is called after the invocation of each test method in the class. |
||||
} |
||||
|
||||
func testExample() throws { |
||||
// This is an example of a functional test case. |
||||
// Use XCTAssert and related functions to verify your tests produce the correct results. |
||||
// Any test you write for XCTest can be annotated as throws and async. |
||||
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. |
||||
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. |
||||
} |
||||
|
||||
func testPerformanceExample() throws { |
||||
// This is an example of a performance test case. |
||||
self.measure { |
||||
// Put the code you want to measure the time of here. |
||||
} |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,41 @@ |
||||
// |
||||
// NotesUITests.swift |
||||
// NotesUITests |
||||
// |
||||
// Created by Laurent Morvillier on 04/09/2022. |
||||
// |
||||
|
||||
import XCTest |
||||
|
||||
class NotesUITests: XCTestCase { |
||||
|
||||
override func setUpWithError() throws { |
||||
// Put setup code here. This method is called before the invocation of each test method in the class. |
||||
|
||||
// In UI tests it is usually best to stop immediately when a failure occurs. |
||||
continueAfterFailure = false |
||||
|
||||
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. |
||||
} |
||||
|
||||
override func tearDownWithError() throws { |
||||
// Put teardown code here. This method is called after the invocation of each test method in the class. |
||||
} |
||||
|
||||
func testExample() throws { |
||||
// UI tests must launch the application that they test. |
||||
let app = XCUIApplication() |
||||
app.launch() |
||||
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results. |
||||
} |
||||
|
||||
func testLaunchPerformance() throws { |
||||
if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { |
||||
// This measures how long it takes to launch your application. |
||||
measure(metrics: [XCTApplicationLaunchMetric()]) { |
||||
XCUIApplication().launch() |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,32 @@ |
||||
// |
||||
// NotesUITestsLaunchTests.swift |
||||
// NotesUITests |
||||
// |
||||
// Created by Laurent Morvillier on 04/09/2022. |
||||
// |
||||
|
||||
import XCTest |
||||
|
||||
class NotesUITestsLaunchTests: XCTestCase { |
||||
|
||||
override class var runsForEachTargetApplicationUIConfiguration: Bool { |
||||
true |
||||
} |
||||
|
||||
override func setUpWithError() throws { |
||||
continueAfterFailure = false |
||||
} |
||||
|
||||
func testLaunch() throws { |
||||
let app = XCUIApplication() |
||||
app.launch() |
||||
|
||||
// Insert steps here to perform after app launch but before taking a screenshot, |
||||
// such as logging into a test account or navigating somewhere in the app |
||||
|
||||
let attachment = XCTAttachment(screenshot: app.screenshot()) |
||||
attachment.name = "Launch Screen" |
||||
attachment.lifetime = .keepAlways |
||||
add(attachment) |
||||
} |
||||
} |
||||
Loading…
Reference in new issue