From a924f8d485d86c47852dcc5a76423ff0c5c14f9c Mon Sep 17 00:00:00 2001 From: erickahmed Date: Sat, 29 Mar 2025 10:23:20 +0100 Subject: [PATCH] Initial Commit --- Bytenews.xcodeproj/project.pbxproj | 588 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/xcschememanagement.plist | 14 + .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 35 ++ Bytenews/Assets.xcassets/Contents.json | 6 + Bytenews/Bytenews.entitlements | 18 + Bytenews/BytenewsApp.swift | 32 + Bytenews/ContentView.swift | 61 ++ Bytenews/Info.plist | 10 + Bytenews/Item.swift | 18 + .../Preview Assets.xcassets/Contents.json | 6 + BytenewsTests/BytenewsTests.swift | 17 + BytenewsUITests/BytenewsUITests.swift | 43 ++ .../BytenewsUITestsLaunchTests.swift | 33 + 15 files changed, 899 insertions(+) create mode 100644 Bytenews.xcodeproj/project.pbxproj create mode 100644 Bytenews.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Bytenews.xcodeproj/xcuserdata/erickahmed.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 Bytenews/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 Bytenews/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Bytenews/Assets.xcassets/Contents.json create mode 100644 Bytenews/Bytenews.entitlements create mode 100644 Bytenews/BytenewsApp.swift create mode 100644 Bytenews/ContentView.swift create mode 100644 Bytenews/Info.plist create mode 100644 Bytenews/Item.swift create mode 100644 Bytenews/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 BytenewsTests/BytenewsTests.swift create mode 100644 BytenewsUITests/BytenewsUITests.swift create mode 100644 BytenewsUITests/BytenewsUITestsLaunchTests.swift diff --git a/Bytenews.xcodeproj/project.pbxproj b/Bytenews.xcodeproj/project.pbxproj new file mode 100644 index 0000000..397237e --- /dev/null +++ b/Bytenews.xcodeproj/project.pbxproj @@ -0,0 +1,588 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXContainerItemProxy section */ + 62A994F12D97F38600C8C45D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 62A994D42D97F38500C8C45D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 62A994DB2D97F38500C8C45D; + remoteInfo = Bytenews; + }; + 62A994FB2D97F38600C8C45D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 62A994D42D97F38500C8C45D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 62A994DB2D97F38500C8C45D; + remoteInfo = Bytenews; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 62A994DC2D97F38500C8C45D /* Bytenews.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Bytenews.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 62A994F02D97F38600C8C45D /* BytenewsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BytenewsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 62A994FA2D97F38600C8C45D /* BytenewsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BytenewsUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + 62A995022D97F38600C8C45D /* Exceptions for "Bytenews" folder in "Bytenews" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 62A994DB2D97F38500C8C45D /* Bytenews */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 62A994DE2D97F38500C8C45D /* Bytenews */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 62A995022D97F38600C8C45D /* Exceptions for "Bytenews" folder in "Bytenews" target */, + ); + path = Bytenews; + sourceTree = ""; + }; + 62A994F32D97F38600C8C45D /* BytenewsTests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = BytenewsTests; + sourceTree = ""; + }; + 62A994FD2D97F38600C8C45D /* BytenewsUITests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = BytenewsUITests; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 62A994D92D97F38500C8C45D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 62A994ED2D97F38600C8C45D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 62A994F72D97F38600C8C45D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 62A994D32D97F38500C8C45D = { + isa = PBXGroup; + children = ( + 62A994DE2D97F38500C8C45D /* Bytenews */, + 62A994F32D97F38600C8C45D /* BytenewsTests */, + 62A994FD2D97F38600C8C45D /* BytenewsUITests */, + 62A994DD2D97F38500C8C45D /* Products */, + ); + sourceTree = ""; + }; + 62A994DD2D97F38500C8C45D /* Products */ = { + isa = PBXGroup; + children = ( + 62A994DC2D97F38500C8C45D /* Bytenews.app */, + 62A994F02D97F38600C8C45D /* BytenewsTests.xctest */, + 62A994FA2D97F38600C8C45D /* BytenewsUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 62A994DB2D97F38500C8C45D /* Bytenews */ = { + isa = PBXNativeTarget; + buildConfigurationList = 62A995032D97F38600C8C45D /* Build configuration list for PBXNativeTarget "Bytenews" */; + buildPhases = ( + 62A994D82D97F38500C8C45D /* Sources */, + 62A994D92D97F38500C8C45D /* Frameworks */, + 62A994DA2D97F38500C8C45D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 62A994DE2D97F38500C8C45D /* Bytenews */, + ); + name = Bytenews; + packageProductDependencies = ( + ); + productName = Bytenews; + productReference = 62A994DC2D97F38500C8C45D /* Bytenews.app */; + productType = "com.apple.product-type.application"; + }; + 62A994EF2D97F38600C8C45D /* BytenewsTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 62A995082D97F38600C8C45D /* Build configuration list for PBXNativeTarget "BytenewsTests" */; + buildPhases = ( + 62A994EC2D97F38600C8C45D /* Sources */, + 62A994ED2D97F38600C8C45D /* Frameworks */, + 62A994EE2D97F38600C8C45D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 62A994F22D97F38600C8C45D /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 62A994F32D97F38600C8C45D /* BytenewsTests */, + ); + name = BytenewsTests; + packageProductDependencies = ( + ); + productName = BytenewsTests; + productReference = 62A994F02D97F38600C8C45D /* BytenewsTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 62A994F92D97F38600C8C45D /* BytenewsUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 62A9950B2D97F38600C8C45D /* Build configuration list for PBXNativeTarget "BytenewsUITests" */; + buildPhases = ( + 62A994F62D97F38600C8C45D /* Sources */, + 62A994F72D97F38600C8C45D /* Frameworks */, + 62A994F82D97F38600C8C45D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 62A994FC2D97F38600C8C45D /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 62A994FD2D97F38600C8C45D /* BytenewsUITests */, + ); + name = BytenewsUITests; + packageProductDependencies = ( + ); + productName = BytenewsUITests; + productReference = 62A994FA2D97F38600C8C45D /* BytenewsUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 62A994D42D97F38500C8C45D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1620; + LastUpgradeCheck = 1620; + TargetAttributes = { + 62A994DB2D97F38500C8C45D = { + CreatedOnToolsVersion = 16.2; + }; + 62A994EF2D97F38600C8C45D = { + CreatedOnToolsVersion = 16.2; + TestTargetID = 62A994DB2D97F38500C8C45D; + }; + 62A994F92D97F38600C8C45D = { + CreatedOnToolsVersion = 16.2; + TestTargetID = 62A994DB2D97F38500C8C45D; + }; + }; + }; + buildConfigurationList = 62A994D72D97F38500C8C45D /* Build configuration list for PBXProject "Bytenews" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 62A994D32D97F38500C8C45D; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 62A994DD2D97F38500C8C45D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 62A994DB2D97F38500C8C45D /* Bytenews */, + 62A994EF2D97F38600C8C45D /* BytenewsTests */, + 62A994F92D97F38600C8C45D /* BytenewsUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 62A994DA2D97F38500C8C45D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 62A994EE2D97F38600C8C45D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 62A994F82D97F38600C8C45D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 62A994D82D97F38500C8C45D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 62A994EC2D97F38600C8C45D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 62A994F62D97F38600C8C45D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 62A994F22D97F38600C8C45D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 62A994DB2D97F38500C8C45D /* Bytenews */; + targetProxy = 62A994F12D97F38600C8C45D /* PBXContainerItemProxy */; + }; + 62A994FC2D97F38600C8C45D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 62A994DB2D97F38500C8C45D /* Bytenews */; + targetProxy = 62A994FB2D97F38600C8C45D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 62A995042D97F38600C8C45D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = Bytenews/Bytenews.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Bytenews/Preview Content\""; + DEVELOPMENT_TEAM = GYC9SFV366; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Bytenews/Info.plist; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + 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 = LumenLabs.Bytenews; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 62A995052D97F38600C8C45D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = Bytenews/Bytenews.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Bytenews/Preview Content\""; + DEVELOPMENT_TEAM = GYC9SFV366; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Bytenews/Info.plist; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + 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 = LumenLabs.Bytenews; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 62A995062D97F38600C8C45D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + 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 = 18.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 62A995072D97F38600C8C45D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + 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; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + 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 = 18.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 62A995092D97F38600C8C45D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = GYC9SFV366; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = LumenLabs.BytenewsTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Bytenews.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Bytenews"; + }; + name = Debug; + }; + 62A9950A2D97F38600C8C45D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = GYC9SFV366; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = LumenLabs.BytenewsTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Bytenews.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Bytenews"; + }; + name = Release; + }; + 62A9950C2D97F38600C8C45D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = GYC9SFV366; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = LumenLabs.BytenewsUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Bytenews; + }; + name = Debug; + }; + 62A9950D2D97F38600C8C45D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = GYC9SFV366; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = LumenLabs.BytenewsUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Bytenews; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 62A994D72D97F38500C8C45D /* Build configuration list for PBXProject "Bytenews" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 62A995062D97F38600C8C45D /* Debug */, + 62A995072D97F38600C8C45D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 62A995032D97F38600C8C45D /* Build configuration list for PBXNativeTarget "Bytenews" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 62A995042D97F38600C8C45D /* Debug */, + 62A995052D97F38600C8C45D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 62A995082D97F38600C8C45D /* Build configuration list for PBXNativeTarget "BytenewsTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 62A995092D97F38600C8C45D /* Debug */, + 62A9950A2D97F38600C8C45D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 62A9950B2D97F38600C8C45D /* Build configuration list for PBXNativeTarget "BytenewsUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 62A9950C2D97F38600C8C45D /* Debug */, + 62A9950D2D97F38600C8C45D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 62A994D42D97F38500C8C45D /* Project object */; +} diff --git a/Bytenews.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Bytenews.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Bytenews.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Bytenews.xcodeproj/xcuserdata/erickahmed.xcuserdatad/xcschemes/xcschememanagement.plist b/Bytenews.xcodeproj/xcuserdata/erickahmed.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..9b36756 --- /dev/null +++ b/Bytenews.xcodeproj/xcuserdata/erickahmed.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Bytenews.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/Bytenews/Assets.xcassets/AccentColor.colorset/Contents.json b/Bytenews/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Bytenews/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Bytenews/Assets.xcassets/AppIcon.appiconset/Contents.json b/Bytenews/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2305880 --- /dev/null +++ b/Bytenews/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Bytenews/Assets.xcassets/Contents.json b/Bytenews/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Bytenews/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Bytenews/Bytenews.entitlements b/Bytenews/Bytenews.entitlements new file mode 100644 index 0000000..cbd408e --- /dev/null +++ b/Bytenews/Bytenews.entitlements @@ -0,0 +1,18 @@ + + + + + aps-environment + development + com.apple.developer.icloud-container-identifiers + + com.apple.developer.icloud-services + + CloudKit + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/Bytenews/BytenewsApp.swift b/Bytenews/BytenewsApp.swift new file mode 100644 index 0000000..3fdcb52 --- /dev/null +++ b/Bytenews/BytenewsApp.swift @@ -0,0 +1,32 @@ +// +// BytenewsApp.swift +// Bytenews +// +// Created by Erick Ahmed on 29/03/25. +// + +import SwiftUI +import SwiftData + +@main +struct BytenewsApp: App { + var sharedModelContainer: ModelContainer = { + let schema = Schema([ + Item.self, + ]) + let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) + + do { + return try ModelContainer(for: schema, configurations: [modelConfiguration]) + } catch { + fatalError("Could not create ModelContainer: \(error)") + } + }() + + var body: some Scene { + WindowGroup { + ContentView() + } + .modelContainer(sharedModelContainer) + } +} diff --git a/Bytenews/ContentView.swift b/Bytenews/ContentView.swift new file mode 100644 index 0000000..24b8e8b --- /dev/null +++ b/Bytenews/ContentView.swift @@ -0,0 +1,61 @@ +// +// ContentView.swift +// Bytenews +// +// Created by Erick Ahmed on 29/03/25. +// + +import SwiftUI +import SwiftData + +struct ContentView: View { + @Environment(\.modelContext) private var modelContext + @Query private var items: [Item] + + var body: some View { + NavigationSplitView { + List { + ForEach(items) { item in + NavigationLink { + Text("Item at \(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard))") + } label: { + Text(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard)) + } + } + .onDelete(perform: deleteItems) + } + .toolbar { + ToolbarItem(placement: .navigationBarTrailing) { + EditButton() + } + ToolbarItem { + Button(action: addItem) { + Label("Add Item", systemImage: "plus") + } + } + } + } detail: { + Text("Select an item") + } + } + + private func addItem() { + withAnimation { + let newItem = Item(timestamp: Date()) + modelContext.insert(newItem) + } + } + + private func deleteItems(offsets: IndexSet) { + withAnimation { + for index in offsets { + modelContext.delete(items[index]) + } + } + } +} + +#Preview { + ContentView() + .modelContainer(for: Item.self, inMemory: true) +} diff --git a/Bytenews/Info.plist b/Bytenews/Info.plist new file mode 100644 index 0000000..ca9a074 --- /dev/null +++ b/Bytenews/Info.plist @@ -0,0 +1,10 @@ + + + + + UIBackgroundModes + + remote-notification + + + diff --git a/Bytenews/Item.swift b/Bytenews/Item.swift new file mode 100644 index 0000000..6e94800 --- /dev/null +++ b/Bytenews/Item.swift @@ -0,0 +1,18 @@ +// +// Item.swift +// Bytenews +// +// Created by Erick Ahmed on 29/03/25. +// + +import Foundation +import SwiftData + +@Model +final class Item { + var timestamp: Date + + init(timestamp: Date) { + self.timestamp = timestamp + } +} diff --git a/Bytenews/Preview Content/Preview Assets.xcassets/Contents.json b/Bytenews/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Bytenews/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/BytenewsTests/BytenewsTests.swift b/BytenewsTests/BytenewsTests.swift new file mode 100644 index 0000000..c12682a --- /dev/null +++ b/BytenewsTests/BytenewsTests.swift @@ -0,0 +1,17 @@ +// +// BytenewsTests.swift +// BytenewsTests +// +// Created by Erick Ahmed on 29/03/25. +// + +import Testing +@testable import Bytenews + +struct BytenewsTests { + + @Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. + } + +} diff --git a/BytenewsUITests/BytenewsUITests.swift b/BytenewsUITests/BytenewsUITests.swift new file mode 100644 index 0000000..b9e2962 --- /dev/null +++ b/BytenewsUITests/BytenewsUITests.swift @@ -0,0 +1,43 @@ +// +// BytenewsUITests.swift +// BytenewsUITests +// +// Created by Erick Ahmed on 29/03/25. +// + +import XCTest + +final class BytenewsUITests: 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. + } + + @MainActor + 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. + } + + @MainActor + 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() + } + } + } +} diff --git a/BytenewsUITests/BytenewsUITestsLaunchTests.swift b/BytenewsUITests/BytenewsUITestsLaunchTests.swift new file mode 100644 index 0000000..f01058f --- /dev/null +++ b/BytenewsUITests/BytenewsUITestsLaunchTests.swift @@ -0,0 +1,33 @@ +// +// BytenewsUITestsLaunchTests.swift +// BytenewsUITests +// +// Created by Erick Ahmed on 29/03/25. +// + +import XCTest + +final class BytenewsUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + @MainActor + 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) + } +}