create iOS app
This commit is contained in:
parent
f4e4ed02c7
commit
62e91b264e
475
Fuzzy/Fuzzy.xcodeproj/project.pbxproj
Normal file
475
Fuzzy/Fuzzy.xcodeproj/project.pbxproj
Normal file
@ -0,0 +1,475 @@
|
|||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 56;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
52571C6429718D0500FF1027 /* FuzzyApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52571C6329718D0500FF1027 /* FuzzyApp.swift */; };
|
||||||
|
52571C6629718D0500FF1027 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52571C6529718D0500FF1027 /* ContentView.swift */; };
|
||||||
|
52571C6829718D0600FF1027 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 52571C6729718D0600FF1027 /* Assets.xcassets */; };
|
||||||
|
52571C6B29718D0600FF1027 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 52571C6A29718D0600FF1027 /* Preview Assets.xcassets */; };
|
||||||
|
529C993029721AEE00AB0020 /* only_titles.csv in Resources */ = {isa = PBXBuildFile; fileRef = 529C992F29721AEE00AB0020 /* only_titles.csv */; };
|
||||||
|
52D2A73C2971A51500BCA112 /* Api.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A73B2971A51500BCA112 /* Api.swift */; };
|
||||||
|
52D2A73F2971A53A00BCA112 /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = 52D2A73E2971A53A00BCA112 /* Alamofire */; };
|
||||||
|
52D2A7412971B51000BCA112 /* SearchBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A7402971B51000BCA112 /* SearchBarView.swift */; };
|
||||||
|
52D2A7472971BB6E00BCA112 /* DataFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A7462971BB6E00BCA112 /* DataFactory.swift */; };
|
||||||
|
52D2A7502971D61200BCA112 /* MovieView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A74F2971D61200BCA112 /* MovieView.swift */; };
|
||||||
|
52D2A7532971DC9400BCA112 /* MovieModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A7522971DC9400BCA112 /* MovieModel.swift */; };
|
||||||
|
52D2A7562971DD4C00BCA112 /* MovieData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A7552971DD4C00BCA112 /* MovieData.swift */; };
|
||||||
|
52D2A75A2971F8D200BCA112 /* SuggestionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A7592971F8D200BCA112 /* SuggestionView.swift */; };
|
||||||
|
52D2A75C2971FC0E00BCA112 /* WaitData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A75B2971FC0D00BCA112 /* WaitData.swift */; };
|
||||||
|
52D2A75E2971FC2D00BCA112 /* LoaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A75D2971FC2D00BCA112 /* LoaderView.swift */; };
|
||||||
|
52D2A7602971FFCC00BCA112 /* SuggestionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A75F2971FFCC00BCA112 /* SuggestionModel.swift */; };
|
||||||
|
52D2A7622972001B00BCA112 /* SuggestionsData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A7612972001B00BCA112 /* SuggestionsData.swift */; };
|
||||||
|
52D2A76629720B3600BCA112 /* SuggestionMovieTitleModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A76529720B3600BCA112 /* SuggestionMovieTitleModel.swift */; };
|
||||||
|
52D2A76A2972114400BCA112 /* SuggestionMovieView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52D2A7692972114400BCA112 /* SuggestionMovieView.swift */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
52571C6029718D0500FF1027 /* Fuzzy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Fuzzy.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
52571C6329718D0500FF1027 /* FuzzyApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FuzzyApp.swift; sourceTree = "<group>"; };
|
||||||
|
52571C6529718D0500FF1027 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
|
||||||
|
52571C6729718D0600FF1027 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
52571C6A29718D0600FF1027 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
|
||||||
|
529C992F29721AEE00AB0020 /* only_titles.csv */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = only_titles.csv; sourceTree = "<group>"; };
|
||||||
|
52D2A73B2971A51500BCA112 /* Api.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Api.swift; sourceTree = "<group>"; };
|
||||||
|
52D2A7402971B51000BCA112 /* SearchBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchBarView.swift; sourceTree = "<group>"; };
|
||||||
|
52D2A7462971BB6E00BCA112 /* DataFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataFactory.swift; sourceTree = "<group>"; };
|
||||||
|
52D2A74F2971D61200BCA112 /* MovieView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovieView.swift; sourceTree = "<group>"; };
|
||||||
|
52D2A7522971DC9400BCA112 /* MovieModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovieModel.swift; sourceTree = "<group>"; };
|
||||||
|
52D2A7552971DD4C00BCA112 /* MovieData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovieData.swift; sourceTree = "<group>"; };
|
||||||
|
52D2A7592971F8D200BCA112 /* SuggestionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SuggestionView.swift; sourceTree = "<group>"; };
|
||||||
|
52D2A75B2971FC0D00BCA112 /* WaitData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitData.swift; sourceTree = "<group>"; };
|
||||||
|
52D2A75D2971FC2D00BCA112 /* LoaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoaderView.swift; sourceTree = "<group>"; };
|
||||||
|
52D2A75F2971FFCC00BCA112 /* SuggestionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SuggestionModel.swift; sourceTree = "<group>"; };
|
||||||
|
52D2A7612972001B00BCA112 /* SuggestionsData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SuggestionsData.swift; sourceTree = "<group>"; };
|
||||||
|
52D2A76529720B3600BCA112 /* SuggestionMovieTitleModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SuggestionMovieTitleModel.swift; sourceTree = "<group>"; };
|
||||||
|
52D2A7692972114400BCA112 /* SuggestionMovieView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SuggestionMovieView.swift; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
52571C5D29718D0500FF1027 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
52D2A73F2971A53A00BCA112 /* Alamofire in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
52571C5729718D0500FF1027 = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
52571C6229718D0500FF1027 /* Fuzzy */,
|
||||||
|
52571C6129718D0500FF1027 /* Products */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
52571C6129718D0500FF1027 /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
52571C6029718D0500FF1027 /* Fuzzy.app */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
52571C6229718D0500FF1027 /* Fuzzy */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
52571C6329718D0500FF1027 /* FuzzyApp.swift */,
|
||||||
|
52D2A76329720B1000BCA112 /* Models */,
|
||||||
|
52D2A74E2971CD1800BCA112 /* View */,
|
||||||
|
52D2A7572971DDEF00BCA112 /* Api */,
|
||||||
|
52D2A7542971DD3F00BCA112 /* Data */,
|
||||||
|
52D2A7582971DE0300BCA112 /* Another */,
|
||||||
|
52571C6729718D0600FF1027 /* Assets.xcassets */,
|
||||||
|
529C992F29721AEE00AB0020 /* only_titles.csv */,
|
||||||
|
52571C6929718D0600FF1027 /* Preview Content */,
|
||||||
|
);
|
||||||
|
path = Fuzzy;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
52571C6929718D0600FF1027 /* Preview Content */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
52571C6A29718D0600FF1027 /* Preview Assets.xcassets */,
|
||||||
|
);
|
||||||
|
path = "Preview Content";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
52D2A74E2971CD1800BCA112 /* View */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
52D2A7402971B51000BCA112 /* SearchBarView.swift */,
|
||||||
|
52571C6529718D0500FF1027 /* ContentView.swift */,
|
||||||
|
52D2A74F2971D61200BCA112 /* MovieView.swift */,
|
||||||
|
52D2A7592971F8D200BCA112 /* SuggestionView.swift */,
|
||||||
|
52D2A7692972114400BCA112 /* SuggestionMovieView.swift */,
|
||||||
|
52D2A75D2971FC2D00BCA112 /* LoaderView.swift */,
|
||||||
|
);
|
||||||
|
path = View;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
52D2A7512971DC7200BCA112 /* ApiModels */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
52D2A7522971DC9400BCA112 /* MovieModel.swift */,
|
||||||
|
52D2A75F2971FFCC00BCA112 /* SuggestionModel.swift */,
|
||||||
|
);
|
||||||
|
path = ApiModels;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
52D2A7542971DD3F00BCA112 /* Data */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
52D2A7552971DD4C00BCA112 /* MovieData.swift */,
|
||||||
|
52D2A7612972001B00BCA112 /* SuggestionsData.swift */,
|
||||||
|
52D2A75B2971FC0D00BCA112 /* WaitData.swift */,
|
||||||
|
);
|
||||||
|
path = Data;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
52D2A7572971DDEF00BCA112 /* Api */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
52D2A73B2971A51500BCA112 /* Api.swift */,
|
||||||
|
);
|
||||||
|
path = Api;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
52D2A7582971DE0300BCA112 /* Another */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
52D2A7462971BB6E00BCA112 /* DataFactory.swift */,
|
||||||
|
);
|
||||||
|
path = Another;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
52D2A76329720B1000BCA112 /* Models */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
52D2A7512971DC7200BCA112 /* ApiModels */,
|
||||||
|
52D2A76529720B3600BCA112 /* SuggestionMovieTitleModel.swift */,
|
||||||
|
);
|
||||||
|
path = Models;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
52571C5F29718D0500FF1027 /* Fuzzy */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 52571C6E29718D0600FF1027 /* Build configuration list for PBXNativeTarget "Fuzzy" */;
|
||||||
|
buildPhases = (
|
||||||
|
52571C5C29718D0500FF1027 /* Sources */,
|
||||||
|
52571C5D29718D0500FF1027 /* Frameworks */,
|
||||||
|
52571C5E29718D0500FF1027 /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = Fuzzy;
|
||||||
|
packageProductDependencies = (
|
||||||
|
52D2A73E2971A53A00BCA112 /* Alamofire */,
|
||||||
|
);
|
||||||
|
productName = Fuzzy;
|
||||||
|
productReference = 52571C6029718D0500FF1027 /* Fuzzy.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
52571C5829718D0500FF1027 /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
BuildIndependentTargetsInParallel = 1;
|
||||||
|
LastSwiftUpdateCheck = 1400;
|
||||||
|
LastUpgradeCheck = 1400;
|
||||||
|
TargetAttributes = {
|
||||||
|
52571C5F29718D0500FF1027 = {
|
||||||
|
CreatedOnToolsVersion = 14.0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 52571C5B29718D0500FF1027 /* Build configuration list for PBXProject "Fuzzy" */;
|
||||||
|
compatibilityVersion = "Xcode 14.0";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
Base,
|
||||||
|
);
|
||||||
|
mainGroup = 52571C5729718D0500FF1027;
|
||||||
|
packageReferences = (
|
||||||
|
52D2A73D2971A53900BCA112 /* XCRemoteSwiftPackageReference "Alamofire" */,
|
||||||
|
);
|
||||||
|
productRefGroup = 52571C6129718D0500FF1027 /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
52571C5F29718D0500FF1027 /* Fuzzy */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
52571C5E29718D0500FF1027 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
529C993029721AEE00AB0020 /* only_titles.csv in Resources */,
|
||||||
|
52571C6B29718D0600FF1027 /* Preview Assets.xcassets in Resources */,
|
||||||
|
52571C6829718D0600FF1027 /* Assets.xcassets in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
52571C5C29718D0500FF1027 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
52D2A73C2971A51500BCA112 /* Api.swift in Sources */,
|
||||||
|
52D2A75E2971FC2D00BCA112 /* LoaderView.swift in Sources */,
|
||||||
|
52D2A75A2971F8D200BCA112 /* SuggestionView.swift in Sources */,
|
||||||
|
52D2A7532971DC9400BCA112 /* MovieModel.swift in Sources */,
|
||||||
|
52D2A7412971B51000BCA112 /* SearchBarView.swift in Sources */,
|
||||||
|
52D2A7502971D61200BCA112 /* MovieView.swift in Sources */,
|
||||||
|
52D2A7562971DD4C00BCA112 /* MovieData.swift in Sources */,
|
||||||
|
52D2A7472971BB6E00BCA112 /* DataFactory.swift in Sources */,
|
||||||
|
52571C6629718D0500FF1027 /* ContentView.swift in Sources */,
|
||||||
|
52D2A7602971FFCC00BCA112 /* SuggestionModel.swift in Sources */,
|
||||||
|
52D2A75C2971FC0E00BCA112 /* WaitData.swift in Sources */,
|
||||||
|
52D2A76629720B3600BCA112 /* SuggestionMovieTitleModel.swift in Sources */,
|
||||||
|
52571C6429718D0500FF1027 /* FuzzyApp.swift in Sources */,
|
||||||
|
52D2A7622972001B00BCA112 /* SuggestionsData.swift in Sources */,
|
||||||
|
52D2A76A2972114400BCA112 /* SuggestionMovieView.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
52571C6C29718D0600FF1027 /* 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++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;
|
||||||
|
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 = 16.0;
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
52571C6D29718D0600FF1027 /* 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++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;
|
||||||
|
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 = 16.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
52571C6F29718D0600FF1027 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEVELOPMENT_ASSET_PATHS = "\"Fuzzy/Preview Content\"";
|
||||||
|
DEVELOPMENT_TEAM = VKJ3MY4S58;
|
||||||
|
ENABLE_PREVIEWS = YES;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
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 = com.maciejczajka.Fuzzy;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
52571C7029718D0600FF1027 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEVELOPMENT_ASSET_PATHS = "\"Fuzzy/Preview Content\"";
|
||||||
|
DEVELOPMENT_TEAM = VKJ3MY4S58;
|
||||||
|
ENABLE_PREVIEWS = YES;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
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 = com.maciejczajka.Fuzzy;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
52571C5B29718D0500FF1027 /* Build configuration list for PBXProject "Fuzzy" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
52571C6C29718D0600FF1027 /* Debug */,
|
||||||
|
52571C6D29718D0600FF1027 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
52571C6E29718D0600FF1027 /* Build configuration list for PBXNativeTarget "Fuzzy" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
52571C6F29718D0600FF1027 /* Debug */,
|
||||||
|
52571C7029718D0600FF1027 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
|
||||||
|
/* Begin XCRemoteSwiftPackageReference section */
|
||||||
|
52D2A73D2971A53900BCA112 /* XCRemoteSwiftPackageReference "Alamofire" */ = {
|
||||||
|
isa = XCRemoteSwiftPackageReference;
|
||||||
|
repositoryURL = "https://github.com/Alamofire/Alamofire.git";
|
||||||
|
requirement = {
|
||||||
|
kind = upToNextMajorVersion;
|
||||||
|
minimumVersion = 5.0.0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
/* End XCRemoteSwiftPackageReference section */
|
||||||
|
|
||||||
|
/* Begin XCSwiftPackageProductDependency section */
|
||||||
|
52D2A73E2971A53A00BCA112 /* Alamofire */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
package = 52D2A73D2971A53900BCA112 /* XCRemoteSwiftPackageReference "Alamofire" */;
|
||||||
|
productName = Alamofire;
|
||||||
|
};
|
||||||
|
/* End XCSwiftPackageProductDependency section */
|
||||||
|
};
|
||||||
|
rootObject = 52571C5829718D0500FF1027 /* Project object */;
|
||||||
|
}
|
7
Fuzzy/Fuzzy.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
Fuzzy/Fuzzy.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "self:">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
@ -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>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"pins" : [
|
||||||
|
{
|
||||||
|
"identity" : "alamofire",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/Alamofire/Alamofire.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "78424be314842833c04bc3bef5b72e85fff99204",
|
||||||
|
"version" : "5.6.4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version" : 2
|
||||||
|
}
|
BIN
Fuzzy/Fuzzy.xcodeproj/project.xcworkspace/xcuserdata/maciej.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
BIN
Fuzzy/Fuzzy.xcodeproj/project.xcworkspace/xcuserdata/maciej.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
Binary file not shown.
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Bucket
|
||||||
|
uuid = "E3A9FCA3-4005-4440-8634-11A6593C591D"
|
||||||
|
type = "1"
|
||||||
|
version = "2.0">
|
||||||
|
</Bucket>
|
@ -0,0 +1,14 @@
|
|||||||
|
<?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>SchemeUserState</key>
|
||||||
|
<dict>
|
||||||
|
<key>Fuzzy.xcscheme_^#shared#^_</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
53
Fuzzy/Fuzzy/Another/DataFactory.swift
Normal file
53
Fuzzy/Fuzzy/Another/DataFactory.swift
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
//
|
||||||
|
// DataFactory.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
struct Movie: Identifiable {
|
||||||
|
|
||||||
|
var id = UUID()
|
||||||
|
var id_movie: String = ""
|
||||||
|
var title: String = ""
|
||||||
|
|
||||||
|
init(raw: [String]) {
|
||||||
|
id_movie = raw[0]
|
||||||
|
title = raw[1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func loadCSV(from csvName: String) -> [Movie] {
|
||||||
|
var csvToStruct = [Movie]()
|
||||||
|
|
||||||
|
guard let filePath = Bundle.main.path(forResource: csvName, ofType: "csv") else {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
|
var data = ""
|
||||||
|
do {
|
||||||
|
data = try String(contentsOfFile: filePath)
|
||||||
|
} catch {
|
||||||
|
print(error)
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
|
var rows = data.components(separatedBy: "\n")
|
||||||
|
|
||||||
|
let columnCount = rows.first?.components(separatedBy: ";").count
|
||||||
|
|
||||||
|
//remove heder row
|
||||||
|
rows.removeFirst()
|
||||||
|
|
||||||
|
for row in rows {
|
||||||
|
let csvColumns = row.components(separatedBy: ";")
|
||||||
|
if csvColumns.count == columnCount {
|
||||||
|
let movieStruct = Movie.init(raw: csvColumns)
|
||||||
|
csvToStruct.append(movieStruct)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return csvToStruct
|
||||||
|
}
|
94
Fuzzy/Fuzzy/Api/Api.swift
Normal file
94
Fuzzy/Fuzzy/Api/Api.swift
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
//
|
||||||
|
// Api.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import Alamofire
|
||||||
|
|
||||||
|
let evaluators:[String:ServerTrustEvaluating]=[
|
||||||
|
"127.0.0.1":DisabledTrustEvaluator()
|
||||||
|
]
|
||||||
|
let manager=ServerTrustManager(evaluators: evaluators)
|
||||||
|
let session=Session.init(serverTrustManager:manager)
|
||||||
|
|
||||||
|
class Api {
|
||||||
|
|
||||||
|
func getMovieDetails(id_movie: String, completion: @escaping(Bool?) -> Void) {
|
||||||
|
let req = session.request("http://127.0.0.1:8000/details/\(id_movie)/",method:.get, encoding: JSONEncoding.default).response { response in
|
||||||
|
switch response.result {
|
||||||
|
case.success:
|
||||||
|
if response.response?.statusCode == 200 {
|
||||||
|
let jsonData = response.data
|
||||||
|
do {
|
||||||
|
let allReplies = try JSONDecoder().decode(MovieItem.self, from: jsonData!)
|
||||||
|
MovieData.shared.title = allReplies.title
|
||||||
|
MovieData.shared.type = allReplies.type
|
||||||
|
MovieData.shared.description = allReplies.description
|
||||||
|
MovieData.shared.year = allReplies.year
|
||||||
|
MovieData.shared.runtime = allReplies.runtime
|
||||||
|
MovieData.shared.genres = allReplies.genres
|
||||||
|
completion(true)
|
||||||
|
} catch {
|
||||||
|
print("Error: \(error)")
|
||||||
|
completion(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else { completion(false) }
|
||||||
|
case.failure:
|
||||||
|
completion(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func getSuggestionMovieDetails(id_movie: String, completion: @escaping(Bool?) -> Void) {
|
||||||
|
let req = session.request("http://127.0.0.1:8000/details/\(id_movie)/",method:.get, encoding: JSONEncoding.default).response { response in
|
||||||
|
switch response.result {
|
||||||
|
case.success:
|
||||||
|
if response.response?.statusCode == 200 {
|
||||||
|
let jsonData = response.data
|
||||||
|
do {
|
||||||
|
let allReplies = try JSONDecoder().decode(MovieItem.self, from: jsonData!)
|
||||||
|
SuggestionMovieData.shared.title = allReplies.title
|
||||||
|
SuggestionMovieData.shared.type = allReplies.type
|
||||||
|
SuggestionMovieData.shared.description = allReplies.description
|
||||||
|
SuggestionMovieData.shared.year = allReplies.year
|
||||||
|
SuggestionMovieData.shared.runtime = allReplies.runtime
|
||||||
|
SuggestionMovieData.shared.genres = allReplies.genres
|
||||||
|
completion(true)
|
||||||
|
} catch {
|
||||||
|
print("Error: \(error)")
|
||||||
|
completion(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else { completion(false) }
|
||||||
|
case.failure:
|
||||||
|
completion(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func getSuggestions(id_movie: String, completion: @escaping(Bool?) -> Void) {
|
||||||
|
let req = session.request("http://127.0.0.1:8000/recs/\(id_movie)/",method:.get, encoding: JSONEncoding.default).response { response in
|
||||||
|
switch response.result {
|
||||||
|
case.success:
|
||||||
|
if response.response?.statusCode == 200 {
|
||||||
|
let jsonData = response.data
|
||||||
|
do {
|
||||||
|
let allReplies = try JSONDecoder().decode(SuggestionItem.self, from: jsonData!)
|
||||||
|
SuggestionData.shared.id = allReplies.id
|
||||||
|
completion(true)
|
||||||
|
} catch {
|
||||||
|
print("Error: \(error)")
|
||||||
|
completion(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else { completion(false) }
|
||||||
|
case.failure:
|
||||||
|
completion(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
13
Fuzzy/Fuzzy/Assets.xcassets/AppIcon.appiconset/Contents.json
Normal file
13
Fuzzy/Fuzzy/Assets.xcassets/AppIcon.appiconset/Contents.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"platform" : "ios",
|
||||||
|
"size" : "1024x1024"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
6
Fuzzy/Fuzzy/Assets.xcassets/Contents.json
Normal file
6
Fuzzy/Fuzzy/Assets.xcassets/Contents.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
Fuzzy/Fuzzy/Assets.xcassets/netflix.imageset/4846304 1.png
vendored
Normal file
BIN
Fuzzy/Fuzzy/Assets.xcassets/netflix.imageset/4846304 1.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
Fuzzy/Fuzzy/Assets.xcassets/netflix.imageset/4846304 2.png
vendored
Normal file
BIN
Fuzzy/Fuzzy/Assets.xcassets/netflix.imageset/4846304 2.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
Fuzzy/Fuzzy/Assets.xcassets/netflix.imageset/4846304.png
vendored
Normal file
BIN
Fuzzy/Fuzzy/Assets.xcassets/netflix.imageset/4846304.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
23
Fuzzy/Fuzzy/Assets.xcassets/netflix.imageset/Contents.json
vendored
Normal file
23
Fuzzy/Fuzzy/Assets.xcassets/netflix.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "4846304.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "4846304 1.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "4846304 2.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"colors" : [
|
||||||
|
{
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "15",
|
||||||
|
"green" : "6",
|
||||||
|
"red" : "177"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"color" : {
|
||||||
|
"color-space" : "srgb",
|
||||||
|
"components" : {
|
||||||
|
"alpha" : "1.000",
|
||||||
|
"blue" : "15",
|
||||||
|
"green" : "6",
|
||||||
|
"red" : "177"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
33
Fuzzy/Fuzzy/Data/MovieData.swift
Normal file
33
Fuzzy/Fuzzy/Data/MovieData.swift
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
//
|
||||||
|
// MovieData.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
class MovieData: ObservableObject {
|
||||||
|
@Published var title: String = ""
|
||||||
|
@Published var id: String = ""
|
||||||
|
@Published var type: String = ""
|
||||||
|
@Published var description: String = ""
|
||||||
|
@Published var year: Int = -1
|
||||||
|
@Published var runtime: Int = -1
|
||||||
|
@Published var genres: [String] = [""]
|
||||||
|
@Published var csv: [Movie] = loadCSV(from: "only_titles")
|
||||||
|
|
||||||
|
static let shared = MovieData()
|
||||||
|
}
|
||||||
|
|
||||||
|
class SuggestionMovieData: ObservableObject {
|
||||||
|
@Published var title: String = ""
|
||||||
|
@Published var id: String = ""
|
||||||
|
@Published var type: String = ""
|
||||||
|
@Published var description: String = ""
|
||||||
|
@Published var year: Int = -1
|
||||||
|
@Published var runtime: Int = -1
|
||||||
|
@Published var genres: [String] = [""]
|
||||||
|
|
||||||
|
static let shared = SuggestionMovieData()
|
||||||
|
}
|
20
Fuzzy/Fuzzy/Data/SuggestionsData.swift
Normal file
20
Fuzzy/Fuzzy/Data/SuggestionsData.swift
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
//
|
||||||
|
// SuggestionsData.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
class SuggestionData: ObservableObject {
|
||||||
|
@Published var id: [String] = [""]
|
||||||
|
|
||||||
|
static let shared = SuggestionData()
|
||||||
|
}
|
||||||
|
|
||||||
|
class SuggestionsMoviesListData: ObservableObject {
|
||||||
|
@Published var titles: [SuggestonMovieTitle] = []
|
||||||
|
|
||||||
|
static let shared = SuggestionsMoviesListData()
|
||||||
|
}
|
14
Fuzzy/Fuzzy/Data/WaitData.swift
Normal file
14
Fuzzy/Fuzzy/Data/WaitData.swift
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
//
|
||||||
|
// WaitData.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
class Wait: ObservableObject {
|
||||||
|
@Published var wait: Bool = false
|
||||||
|
|
||||||
|
static let shared = Wait()
|
||||||
|
}
|
17
Fuzzy/Fuzzy/FuzzyApp.swift
Normal file
17
Fuzzy/Fuzzy/FuzzyApp.swift
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// FuzzyApp.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
@main
|
||||||
|
struct FuzzyApp: App {
|
||||||
|
var body: some Scene {
|
||||||
|
WindowGroup {
|
||||||
|
ContentView()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
Fuzzy/Fuzzy/Models/ApiModels/MovieModel.swift
Normal file
17
Fuzzy/Fuzzy/Models/ApiModels/MovieModel.swift
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// MovieDetails.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
struct MovieItem: Codable {
|
||||||
|
let title: String
|
||||||
|
let type: String
|
||||||
|
let description: String
|
||||||
|
let year: Int
|
||||||
|
let runtime: Int
|
||||||
|
let genres: [String]
|
||||||
|
}
|
12
Fuzzy/Fuzzy/Models/ApiModels/SuggestionModel.swift
Normal file
12
Fuzzy/Fuzzy/Models/ApiModels/SuggestionModel.swift
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
//
|
||||||
|
// SuggestionsModel.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
struct SuggestionItem: Codable {
|
||||||
|
let id: [String]
|
||||||
|
}
|
14
Fuzzy/Fuzzy/Models/SuggestionMovieTitleModel.swift
Normal file
14
Fuzzy/Fuzzy/Models/SuggestionMovieTitleModel.swift
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
//
|
||||||
|
// SuggestionModel.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
struct SuggestonMovieTitle {
|
||||||
|
var id = UUID()
|
||||||
|
var id_movie: String
|
||||||
|
var title: String
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
60
Fuzzy/Fuzzy/View/ContentView.swift
Normal file
60
Fuzzy/Fuzzy/View/ContentView.swift
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
//
|
||||||
|
// ContentView.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct ContentView: View {
|
||||||
|
|
||||||
|
@Environment(\.colorScheme) var colorScheme
|
||||||
|
@ObservedObject var movie = MovieData.shared
|
||||||
|
@State private var selection: String? = nil
|
||||||
|
@State private var searchText = ""
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
NavigationView {
|
||||||
|
ZStack(alignment: .top) {
|
||||||
|
|
||||||
|
GeometryReader { reader in
|
||||||
|
Color("netflixRed")
|
||||||
|
.frame(height: reader.safeAreaInsets.top + 50, alignment: .top)
|
||||||
|
.ignoresSafeArea()
|
||||||
|
}
|
||||||
|
|
||||||
|
NavigationLink(destination: MovieView(), tag: "Success", selection: $selection) { EmptyView() }
|
||||||
|
.navigationTitle("Search")
|
||||||
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
|
|
||||||
|
VStack {
|
||||||
|
Spacer()
|
||||||
|
SearchBarView(text: $searchText)
|
||||||
|
.padding(.top, -10)
|
||||||
|
|
||||||
|
List(movie.csv.filter({ searchText.isEmpty ? true : $0.title.lowercased().contains(searchText.lowercased()) })) { item in
|
||||||
|
Button {
|
||||||
|
Api().getMovieDetails(id_movie: item.id_movie) { res in
|
||||||
|
if res == true {
|
||||||
|
movie.id = item.id_movie
|
||||||
|
selection = "Success"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} label: {
|
||||||
|
Spacer()
|
||||||
|
Text(item.title)
|
||||||
|
.foregroundColor(colorScheme == .dark ? .white : .black)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct ContentView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
ContentView()
|
||||||
|
}
|
||||||
|
}
|
32
Fuzzy/Fuzzy/View/LoaderView.swift
Normal file
32
Fuzzy/Fuzzy/View/LoaderView.swift
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
//
|
||||||
|
// WaitView.swift
|
||||||
|
// ArdaghGroupApp
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 03/12/2021.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct LoaderView: View {
|
||||||
|
|
||||||
|
@State var animate: Bool = false
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
VStack{
|
||||||
|
Circle()
|
||||||
|
.trim(from: 0.025, to: 0.82)
|
||||||
|
.stroke(AngularGradient(gradient: .init(colors: [Color("netflixRed"), Color(.white)]), center: .center), style: StrokeStyle(lineWidth: 8, lineCap: .round))
|
||||||
|
.frame(width: 45, height: 45)
|
||||||
|
.rotationEffect(.init(degrees: self.animate ? 360 : 0))
|
||||||
|
.animation(Animation.linear(duration: 0.7).repeatForever(autoreverses: false))
|
||||||
|
}
|
||||||
|
.background(Color.clear)
|
||||||
|
.onAppear { self.animate.toggle() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Loader_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
LoaderView()
|
||||||
|
}
|
||||||
|
}
|
115
Fuzzy/Fuzzy/View/MovieView.swift
Normal file
115
Fuzzy/Fuzzy/View/MovieView.swift
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
//
|
||||||
|
// Movie.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct MovieView: View {
|
||||||
|
|
||||||
|
@ObservedObject var movie = MovieData.shared
|
||||||
|
@ObservedObject var suggestion = SuggestionData.shared
|
||||||
|
@ObservedObject var suggestionsList = SuggestionsMoviesListData.shared
|
||||||
|
@ObservedObject var wait = Wait.shared
|
||||||
|
@State private var selection: String? = nil
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
ZStack {
|
||||||
|
VStack{
|
||||||
|
NavigationLink(destination: SuggestionView(), tag: "Success", selection: $selection) { EmptyView() }
|
||||||
|
.navigationTitle(movie.title)
|
||||||
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
|
|
||||||
|
VStack {
|
||||||
|
Image("netflix")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 128.0, height: 128.0)
|
||||||
|
Text(movie.title)
|
||||||
|
.font(.system(size: 30))
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
|
Text("(\(movie.type))")
|
||||||
|
.font(.system(size: 14))
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
|
Text("\(movie.runtime) min")
|
||||||
|
.padding(.top, 10)
|
||||||
|
Text("\(movie.year)")
|
||||||
|
.padding(.top, 10)
|
||||||
|
JustifiedText(movie.description)
|
||||||
|
.padding(.top, 10)
|
||||||
|
}
|
||||||
|
.padding(.top, UIScreen.main.bounds.height/10)
|
||||||
|
.padding(.horizontal, 20)
|
||||||
|
|
||||||
|
Button {
|
||||||
|
wait.wait = true
|
||||||
|
Api().getSuggestions(id_movie: movie.id) { res in
|
||||||
|
if res == true {
|
||||||
|
suggestionsList.titles.removeAll()
|
||||||
|
for s in suggestion.id {
|
||||||
|
for t in movie.csv {
|
||||||
|
if s == t.id_movie {
|
||||||
|
suggestionsList.titles.append(SuggestonMovieTitle(id_movie: t.id_movie, title: t.title))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
wait.wait = false
|
||||||
|
selection = "Success"
|
||||||
|
// print("show list of movies")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} label: {
|
||||||
|
Text("Suggest Similar")
|
||||||
|
}
|
||||||
|
.padding(.horizontal, 60)
|
||||||
|
.padding(.vertical, 10)
|
||||||
|
.background(Color("netflixRed"))
|
||||||
|
.cornerRadius(40)
|
||||||
|
.foregroundColor(Color(.white))
|
||||||
|
.padding(10)
|
||||||
|
.overlay(RoundedRectangle(cornerRadius: 40).stroke(Color("netflixRed"), lineWidth: 3.0))
|
||||||
|
.padding()
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if wait.wait {
|
||||||
|
GeometryReader { _ in
|
||||||
|
LoaderView().frame(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)
|
||||||
|
}
|
||||||
|
.background(Color.black.opacity(0.45))
|
||||||
|
.edgesIgnoringSafeArea(.all)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct MovieView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
MovieView()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct JustifiedText: UIViewRepresentable {
|
||||||
|
private let text: String
|
||||||
|
private let font: UIFont
|
||||||
|
|
||||||
|
init(_ text: String, font: UIFont = .systemFont(ofSize: 18)) {
|
||||||
|
self.text = text
|
||||||
|
self.font = font
|
||||||
|
}
|
||||||
|
|
||||||
|
func makeUIView(context: Context) -> UITextView {
|
||||||
|
let textView = UITextView()
|
||||||
|
textView.font = font
|
||||||
|
textView.textAlignment = .justified
|
||||||
|
return textView
|
||||||
|
}
|
||||||
|
|
||||||
|
func updateUIView(_ uiView: UITextView, context: Context) {
|
||||||
|
uiView.text = text
|
||||||
|
}
|
||||||
|
}
|
63
Fuzzy/Fuzzy/View/SearchBarView.swift
Normal file
63
Fuzzy/Fuzzy/View/SearchBarView.swift
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct SearchBarView: View {
|
||||||
|
@Binding var text: String
|
||||||
|
|
||||||
|
@State private var isEditing = false
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
HStack {
|
||||||
|
|
||||||
|
TextField("Search ...", text: $text)
|
||||||
|
.padding(7)
|
||||||
|
.padding(.horizontal, 25)
|
||||||
|
.background(Color(.systemGray6))
|
||||||
|
.cornerRadius(8)
|
||||||
|
.overlay(
|
||||||
|
HStack {
|
||||||
|
Image(systemName: "magnifyingglass")
|
||||||
|
.foregroundColor(.gray)
|
||||||
|
.frame(minWidth: 0, maxWidth: .infinity, alignment: .leading)
|
||||||
|
.padding(.leading, 8)
|
||||||
|
|
||||||
|
if isEditing {
|
||||||
|
Button(action: {
|
||||||
|
self.text = ""
|
||||||
|
|
||||||
|
}) {
|
||||||
|
Image(systemName: "multiply.circle.fill")
|
||||||
|
.foregroundColor(.gray)
|
||||||
|
.padding(.trailing, 8)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.padding(.horizontal, 10)
|
||||||
|
.onTapGesture {
|
||||||
|
self.isEditing = true
|
||||||
|
}
|
||||||
|
|
||||||
|
if isEditing {
|
||||||
|
Button(action: {
|
||||||
|
self.isEditing = false
|
||||||
|
self.text = ""
|
||||||
|
|
||||||
|
// Dismiss the keyboard
|
||||||
|
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
|
||||||
|
}) {
|
||||||
|
Text("Cancel")
|
||||||
|
.foregroundColor(.black)
|
||||||
|
}
|
||||||
|
.padding(.trailing, 10)
|
||||||
|
.transition(.move(edge: .trailing))
|
||||||
|
.animation(.default)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct SearchBar_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
SearchBarView(text: .constant(""))
|
||||||
|
}
|
||||||
|
}
|
43
Fuzzy/Fuzzy/View/SuggestionMovieView.swift
Normal file
43
Fuzzy/Fuzzy/View/SuggestionMovieView.swift
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
//
|
||||||
|
// SuggestionMovieView.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct SuggestionMovieView: View {
|
||||||
|
|
||||||
|
@ObservedObject var suggestionMovie = SuggestionMovieData.shared
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
VStack {
|
||||||
|
Image("netflix")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 128.0, height: 128.0)
|
||||||
|
Text(suggestionMovie.title)
|
||||||
|
.font(.system(size: 30))
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
|
Text("(\(suggestionMovie.type))")
|
||||||
|
.font(.system(size: 14))
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
|
Text("\(suggestionMovie.runtime) min")
|
||||||
|
.padding(.top, 10)
|
||||||
|
Text("\(suggestionMovie.year)")
|
||||||
|
.padding(.top, 10)
|
||||||
|
JustifiedText(suggestionMovie.description)
|
||||||
|
.padding(.top, 10)
|
||||||
|
}
|
||||||
|
.navigationTitle(suggestionMovie.title)
|
||||||
|
.padding(.top, UIScreen.main.bounds.height/10)
|
||||||
|
.padding(.horizontal, 20)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct SuggestionMovieView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
SuggestionMovieView()
|
||||||
|
}
|
||||||
|
}
|
47
Fuzzy/Fuzzy/View/SuggestionView.swift
Normal file
47
Fuzzy/Fuzzy/View/SuggestionView.swift
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
//
|
||||||
|
// SuggestionView.swift
|
||||||
|
// Fuzzy
|
||||||
|
//
|
||||||
|
// Created by Maciej Czajka on 13/01/2023.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct SuggestionView: View {
|
||||||
|
|
||||||
|
@ObservedObject var suggestionsList = SuggestionsMoviesListData.shared
|
||||||
|
@Environment(\.colorScheme) var colorScheme
|
||||||
|
@ObservedObject var movie = MovieData.shared
|
||||||
|
@State private var selection: String? = nil
|
||||||
|
@State private var searchText = ""
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
NavigationLink(destination: SuggestionMovieView(), tag: "Success", selection: $selection) { EmptyView() }
|
||||||
|
.navigationTitle("Recomendations")
|
||||||
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
|
|
||||||
|
VStack {
|
||||||
|
List {
|
||||||
|
ForEach(suggestionsList.titles, id: \.id) { item in
|
||||||
|
Button {
|
||||||
|
Api().getSuggestionMovieDetails(id_movie: item.id_movie) { res in
|
||||||
|
if res == true {
|
||||||
|
selection = "Success"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} label: {
|
||||||
|
Spacer()
|
||||||
|
Text(item.title)
|
||||||
|
.foregroundColor(colorScheme == .dark ? .white : .black)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct SuggestionView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
SuggestionView()
|
||||||
|
}
|
||||||
|
}
|
5581
Fuzzy/Fuzzy/only_titles.csv
Normal file
5581
Fuzzy/Fuzzy/only_titles.csv
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user