Compare commits
6 Commits
b27b223a5e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a07814064d | ||
|
|
073c0fa351 | ||
|
|
8b572b8918 | ||
|
|
7fc60e939e | ||
|
|
15525c9abe | ||
|
|
718436764d |
693
GIF Collector.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,693 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 77;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1B29521A2DF0B6A1002148EF /* Messages.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B2952192DF0B6A1002148EF /* Messages.framework */; };
|
||||
1B2952262DF0B6A3002148EF /* GIFCollectorIM.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 1B2952172DF0B6A1002148EF /* GIFCollectorIM.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
1B29523A2DF0B734002148EF /* GIFCollectorShare.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 1B2952302DF0B734002148EF /* GIFCollectorShare.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
1B2952242DF0B6A3002148EF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1B2951FB2DF0B611002148EF /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 1B2952162DF0B6A1002148EF;
|
||||
remoteInfo = "GIF Collector";
|
||||
};
|
||||
1B2952382DF0B734002148EF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1B2951FB2DF0B611002148EF /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 1B29522F2DF0B734002148EF;
|
||||
remoteInfo = share;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
1B29522B2DF0B6A3002148EF /* Embed Foundation Extensions */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 13;
|
||||
files = (
|
||||
1B29523A2DF0B734002148EF /* GIFCollectorShare.appex in Embed Foundation Extensions */,
|
||||
1B2952262DF0B6A3002148EF /* GIFCollectorIM.appex in Embed Foundation Extensions */,
|
||||
);
|
||||
name = "Embed Foundation Extensions";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1B2952032DF0B611002148EF /* GIFCollector.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GIFCollector.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1B2952172DF0B6A1002148EF /* GIFCollectorIM.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = GIFCollectorIM.appex; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1B2952192DF0B6A1002148EF /* Messages.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Messages.framework; path = System/Library/Frameworks/Messages.framework; sourceTree = SDKROOT; };
|
||||
1B2952302DF0B734002148EF /* GIFCollectorShare.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = GIFCollectorShare.appex; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
||||
1B2952272DF0B6A3002148EF /* Exceptions for "GIFCollectorIM" folder in "GIFCollectorIM" target */ = {
|
||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||
membershipExceptions = (
|
||||
Info.plist,
|
||||
);
|
||||
target = 1B2952162DF0B6A1002148EF /* GIFCollectorIM */;
|
||||
};
|
||||
1B29523B2DF0B734002148EF /* Exceptions for "GIFCollectorShare" folder in "GIFCollectorShare" target */ = {
|
||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||
membershipExceptions = (
|
||||
Info.plist,
|
||||
);
|
||||
target = 1B29522F2DF0B734002148EF /* GIFCollectorShare */;
|
||||
};
|
||||
1B4125C72DF0D5FB001B8215 /* Exceptions for "GIFCollector" folder in "GIFCollectorIM" target */ = {
|
||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||
membershipExceptions = (
|
||||
ContentView.swift,
|
||||
GIF.swift,
|
||||
GIFCollectionViewCell.swift,
|
||||
Services/DownloadService.swift,
|
||||
Services/GIFFileManager.swift,
|
||||
Services/GIFStorageService.swift,
|
||||
Views/AddGIFViewController.swift,
|
||||
Views/GIFCollectionViewController.swift,
|
||||
Views/GIFPlayerView.swift,
|
||||
);
|
||||
target = 1B2952162DF0B6A1002148EF /* GIFCollectorIM */;
|
||||
};
|
||||
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
||||
1B2952052DF0B611002148EF /* GIFCollector */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
exceptions = (
|
||||
1B4125C72DF0D5FB001B8215 /* Exceptions for "GIFCollector" folder in "GIFCollectorIM" target */,
|
||||
);
|
||||
path = GIFCollector;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1B29521B2DF0B6A2002148EF /* GIFCollectorIM */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
exceptions = (
|
||||
1B2952272DF0B6A3002148EF /* Exceptions for "GIFCollectorIM" folder in "GIFCollectorIM" target */,
|
||||
);
|
||||
path = GIFCollectorIM;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1B2952312DF0B734002148EF /* GIFCollectorShare */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
exceptions = (
|
||||
1B29523B2DF0B734002148EF /* Exceptions for "GIFCollectorShare" folder in "GIFCollectorShare" target */,
|
||||
);
|
||||
path = GIFCollectorShare;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXFileSystemSynchronizedRootGroup section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
1B2952002DF0B611002148EF /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1B2952142DF0B6A1002148EF /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1B29521A2DF0B6A1002148EF /* Messages.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1B29522D2DF0B734002148EF /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
1B2951FA2DF0B611002148EF = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1B2952052DF0B611002148EF /* GIFCollector */,
|
||||
1B29521B2DF0B6A2002148EF /* GIFCollectorIM */,
|
||||
1B2952312DF0B734002148EF /* GIFCollectorShare */,
|
||||
1B2952182DF0B6A1002148EF /* Frameworks */,
|
||||
1B2952042DF0B611002148EF /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1B2952042DF0B611002148EF /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1B2952032DF0B611002148EF /* GIFCollector.app */,
|
||||
1B2952172DF0B6A1002148EF /* GIFCollectorIM.appex */,
|
||||
1B2952302DF0B734002148EF /* GIFCollectorShare.appex */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1B2952182DF0B6A1002148EF /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1B2952192DF0B6A1002148EF /* Messages.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
1B2952022DF0B611002148EF /* GIFCollector */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1B2952102DF0B613002148EF /* Build configuration list for PBXNativeTarget "GIFCollector" */;
|
||||
buildPhases = (
|
||||
1B2951FF2DF0B611002148EF /* Sources */,
|
||||
1B2952002DF0B611002148EF /* Frameworks */,
|
||||
1B2952012DF0B611002148EF /* Resources */,
|
||||
1B29522B2DF0B6A3002148EF /* Embed Foundation Extensions */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
1B2952252DF0B6A3002148EF /* PBXTargetDependency */,
|
||||
1B2952392DF0B734002148EF /* PBXTargetDependency */,
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
1B2952052DF0B611002148EF /* GIFCollector */,
|
||||
);
|
||||
name = GIFCollector;
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = gif;
|
||||
productReference = 1B2952032DF0B611002148EF /* GIFCollector.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
1B2952162DF0B6A1002148EF /* GIFCollectorIM */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1B2952282DF0B6A3002148EF /* Build configuration list for PBXNativeTarget "GIFCollectorIM" */;
|
||||
buildPhases = (
|
||||
1B2952132DF0B6A1002148EF /* Sources */,
|
||||
1B2952142DF0B6A1002148EF /* Frameworks */,
|
||||
1B2952152DF0B6A1002148EF /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
1B29521B2DF0B6A2002148EF /* GIFCollectorIM */,
|
||||
);
|
||||
name = GIFCollectorIM;
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = "GIF Collector";
|
||||
productReference = 1B2952172DF0B6A1002148EF /* GIFCollectorIM.appex */;
|
||||
productType = "com.apple.product-type.app-extension.messages";
|
||||
};
|
||||
1B29522F2DF0B734002148EF /* GIFCollectorShare */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1B29523C2DF0B734002148EF /* Build configuration list for PBXNativeTarget "GIFCollectorShare" */;
|
||||
buildPhases = (
|
||||
1B29522C2DF0B734002148EF /* Sources */,
|
||||
1B29522D2DF0B734002148EF /* Frameworks */,
|
||||
1B29522E2DF0B734002148EF /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
1B2952312DF0B734002148EF /* GIFCollectorShare */,
|
||||
);
|
||||
name = GIFCollectorShare;
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = share;
|
||||
productReference = 1B2952302DF0B734002148EF /* GIFCollectorShare.appex */;
|
||||
productType = "com.apple.product-type.app-extension";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
1B2951FB2DF0B611002148EF /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = 1;
|
||||
LastSwiftUpdateCheck = 1640;
|
||||
LastUpgradeCheck = 1640;
|
||||
TargetAttributes = {
|
||||
1B2952022DF0B611002148EF = {
|
||||
CreatedOnToolsVersion = 16.4;
|
||||
};
|
||||
1B2952162DF0B6A1002148EF = {
|
||||
CreatedOnToolsVersion = 16.4;
|
||||
};
|
||||
1B29522F2DF0B734002148EF = {
|
||||
CreatedOnToolsVersion = 16.4;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 1B2951FE2DF0B611002148EF /* Build configuration list for PBXProject "GIF Collector" */;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 1B2951FA2DF0B611002148EF;
|
||||
minimizedProjectReferenceProxies = 1;
|
||||
preferredProjectObjectVersion = 77;
|
||||
productRefGroup = 1B2952042DF0B611002148EF /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
1B2952022DF0B611002148EF /* GIFCollector */,
|
||||
1B2952162DF0B6A1002148EF /* GIFCollectorIM */,
|
||||
1B29522F2DF0B734002148EF /* GIFCollectorShare */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
1B2952012DF0B611002148EF /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1B2952152DF0B6A1002148EF /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1B29522E2DF0B734002148EF /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
1B2951FF2DF0B611002148EF /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1B2952132DF0B6A1002148EF /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1B29522C2DF0B734002148EF /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
1B2952252DF0B6A3002148EF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 1B2952162DF0B6A1002148EF /* GIFCollectorIM */;
|
||||
targetProxy = 1B2952242DF0B6A3002148EF /* PBXContainerItemProxy */;
|
||||
};
|
||||
1B2952392DF0B734002148EF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 1B29522F2DF0B734002148EF /* GIFCollectorShare */;
|
||||
targetProxy = 1B2952382DF0B734002148EF /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1B29520E2DF0B613002148EF /* 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.5;
|
||||
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;
|
||||
};
|
||||
1B29520F2DF0B613002148EF /* 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.5;
|
||||
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;
|
||||
};
|
||||
1B2952112DF0B613002148EF /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = GIFCollector/GIFCollector.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 8S7C654DQ4;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "GIF Collector";
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||
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";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 100.4.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.abunchofknowitalls.GIFCollector;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1B2952122DF0B613002148EF /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = GIFCollector/GIFCollector.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 8S7C654DQ4;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "GIF Collector";
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||
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";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 100.4.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.abunchofknowitalls.GIFCollector;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1B2952292DF0B6A3002148EF /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon";
|
||||
CODE_SIGN_ENTITLEMENTS = GIFCollectorIM/GIFCollectorIM.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 8S7C654DQ4;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = GIFCollectorIM/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "GIF Collector";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 100.4.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.abunchofknowitalls.GIFCollector.iMessage;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1B29522A2DF0B6A3002148EF /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon";
|
||||
CODE_SIGN_ENTITLEMENTS = GIFCollectorIM/GIFCollectorIM.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 8S7C654DQ4;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = GIFCollectorIM/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "GIF Collector";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 100.4.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.abunchofknowitalls.GIFCollector.iMessage;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1B29523D2DF0B734002148EF /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = GIFCollectorShare/GIFCollectorShare.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 8S7C654DQ4;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = GIFCollectorShare/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "GIF Collector";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 100.4.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.abunchofknowitalls.GIFCollector.Share;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1B29523E2DF0B734002148EF /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = GIFCollectorShare/GIFCollectorShare.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 8S7C654DQ4;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = GIFCollectorShare/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "GIF Collector";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 100.4.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.abunchofknowitalls.GIFCollector.Share;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
1B2951FE2DF0B611002148EF /* Build configuration list for PBXProject "GIF Collector" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1B29520E2DF0B613002148EF /* Debug */,
|
||||
1B29520F2DF0B613002148EF /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1B2952102DF0B613002148EF /* Build configuration list for PBXNativeTarget "GIFCollector" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1B2952112DF0B613002148EF /* Debug */,
|
||||
1B2952122DF0B613002148EF /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1B2952282DF0B6A3002148EF /* Build configuration list for PBXNativeTarget "GIFCollectorIM" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1B2952292DF0B6A3002148EF /* Debug */,
|
||||
1B29522A2DF0B6A3002148EF /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1B29523C2DF0B734002148EF /* Build configuration list for PBXNativeTarget "GIFCollectorShare" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1B29523D2DF0B734002148EF /* Debug */,
|
||||
1B29523E2DF0B734002148EF /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 1B2951FB2DF0B611002148EF /* Project object */;
|
||||
}
|
||||
@@ -16,10 +16,10 @@
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1B3192802DEDCF86007850B9"
|
||||
BuildableName = "GIFCollector MessagesExtension.appex"
|
||||
BlueprintName = "GIFCollector MessagesExtension"
|
||||
ReferencedContainer = "container:GIFCollector.xcodeproj">
|
||||
BlueprintIdentifier = "1B2952162DF0B6A1002148EF"
|
||||
BuildableName = "GIFCollectorIM.appex"
|
||||
BlueprintName = "GIFCollectorIM"
|
||||
ReferencedContainer = "container:GIF Collector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
@@ -30,10 +30,10 @@
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1B3192772DEDCF83007850B9"
|
||||
BlueprintIdentifier = "1B2952022DF0B611002148EF"
|
||||
BuildableName = "GIFCollector.app"
|
||||
BlueprintName = "GIFCollector"
|
||||
ReferencedContainer = "container:GIFCollector.xcodeproj">
|
||||
ReferencedContainer = "container:GIF Collector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
@@ -57,26 +57,16 @@
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES"
|
||||
launchAutomaticallySubstyle = "2">
|
||||
<RemoteRunnable
|
||||
runnableDebuggingMode = "1"
|
||||
BundleIdentifier = "com.apple.MobileSMS">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1B3192802DEDCF86007850B9"
|
||||
BuildableName = "GIFCollector MessagesExtension.appex"
|
||||
BlueprintName = "GIFCollector MessagesExtension"
|
||||
ReferencedContainer = "container:GIFCollector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</RemoteRunnable>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1B3192772DEDCF83007850B9"
|
||||
BlueprintIdentifier = "1B2952022DF0B611002148EF"
|
||||
BuildableName = "GIFCollector.app"
|
||||
BlueprintName = "GIFCollector"
|
||||
ReferencedContainer = "container:GIFCollector.xcodeproj">
|
||||
ReferencedContainer = "container:GIF Collector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
@@ -90,10 +80,10 @@
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1B3192772DEDCF83007850B9"
|
||||
BlueprintIdentifier = "1B2952022DF0B611002148EF"
|
||||
BuildableName = "GIFCollector.app"
|
||||
BlueprintName = "GIFCollector"
|
||||
ReferencedContainer = "container:GIFCollector.xcodeproj">
|
||||
ReferencedContainer = "container:GIF Collector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
@@ -15,10 +15,10 @@
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1B3192772DEDCF83007850B9"
|
||||
BlueprintIdentifier = "1B2952022DF0B611002148EF"
|
||||
BuildableName = "GIFCollector.app"
|
||||
BlueprintName = "GIFCollector"
|
||||
ReferencedContainer = "container:GIFCollector.xcodeproj">
|
||||
ReferencedContainer = "container:GIF Collector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
@@ -44,10 +44,10 @@
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1B3192772DEDCF83007850B9"
|
||||
BlueprintIdentifier = "1B2952022DF0B611002148EF"
|
||||
BuildableName = "GIFCollector.app"
|
||||
BlueprintName = "GIFCollector"
|
||||
ReferencedContainer = "container:GIFCollector.xcodeproj">
|
||||
ReferencedContainer = "container:GIF Collector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
@@ -61,10 +61,10 @@
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1B3192772DEDCF83007850B9"
|
||||
BlueprintIdentifier = "1B2952022DF0B611002148EF"
|
||||
BuildableName = "GIFCollector.app"
|
||||
BlueprintName = "GIFCollector"
|
||||
ReferencedContainer = "container:GIFCollector.xcodeproj">
|
||||
ReferencedContainer = "container:GIF Collector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1640"
|
||||
wasCreatedForAppExtension = "YES"
|
||||
version = "2.0">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
buildArchitectures = "Automatic">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1B29522F2DF0B734002148EF"
|
||||
BuildableName = "GIFCollectorShare.appex"
|
||||
BlueprintName = "GIFCollectorShare"
|
||||
ReferencedContainer = "container:GIF Collector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1B2952022DF0B611002148EF"
|
||||
BuildableName = "GIFCollector.app"
|
||||
BlueprintName = "GIFCollector"
|
||||
ReferencedContainer = "container:GIF Collector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = ""
|
||||
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
|
||||
launchStyle = "0"
|
||||
askForAppToLaunch = "Yes"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES"
|
||||
launchAutomaticallySubstyle = "2">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1B2952022DF0B611002148EF"
|
||||
BuildableName = "GIFCollector.app"
|
||||
BlueprintName = "GIFCollector"
|
||||
ReferencedContainer = "container:GIF Collector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
askForAppToLaunch = "Yes"
|
||||
launchAutomaticallySubstyle = "2">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1B2952022DF0B611002148EF"
|
||||
BuildableName = "GIFCollector.app"
|
||||
BlueprintName = "GIFCollector"
|
||||
ReferencedContainer = "container:GIF Collector.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,24 +0,0 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
struct GIF: Codable, Identifiable, Equatable {
|
||||
let id: UUID
|
||||
let localFilePath: String
|
||||
let createdAt: Date
|
||||
let originalURL: String
|
||||
|
||||
var fileURL: URL? {
|
||||
return URL(fileURLWithPath: localFilePath)
|
||||
}
|
||||
|
||||
init(localFilePath: String, originalURL: String) {
|
||||
self.id = UUID()
|
||||
self.localFilePath = localFilePath
|
||||
self.originalURL = originalURL
|
||||
self.createdAt = Date()
|
||||
}
|
||||
|
||||
static func == (lhs: GIF, rhs: GIF) -> Bool {
|
||||
return lhs.id == rhs.id
|
||||
}
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
import Foundation
|
||||
|
||||
class GIFStorageService {
|
||||
static let shared = GIFStorageService()
|
||||
|
||||
private let userDefaults = UserDefaults(suiteName: "group.gifcollector")
|
||||
private let savedGIFsKey = "savedGIFs"
|
||||
private let pendingGIFsKey = "pendingGIFs"
|
||||
|
||||
private init() {
|
||||
// Make sure the shared UserDefaults exists
|
||||
if userDefaults == nil {
|
||||
print("Error: Could not create UserDefaults with app group")
|
||||
}
|
||||
|
||||
// Process any pending GIFs from the Share Extension
|
||||
checkForSharedGIFs()
|
||||
}
|
||||
|
||||
func saveGIF(data: Data, fromURL urlString: String, completion: @escaping (GIF?) -> Void) {
|
||||
// First store the GIF data to disk
|
||||
guard let localPath = GIFFileManager.shared.storeGIF(data: data, fromURL: urlString) else {
|
||||
completion(nil)
|
||||
return
|
||||
}
|
||||
|
||||
// Create and save the GIF model
|
||||
let gif = GIF(localFilePath: localPath, originalURL: urlString)
|
||||
|
||||
var savedGIFs = fetchGIFs()
|
||||
|
||||
// Don't save duplicates of the same URL
|
||||
if !savedGIFs.contains(where: { $0.originalURL == urlString }) {
|
||||
savedGIFs.append(gif)
|
||||
saveToUserDefaults(gifs: savedGIFs)
|
||||
}
|
||||
|
||||
// Perform cleanup if needed
|
||||
GIFFileManager.shared.performStorageCleanupIfNeeded()
|
||||
|
||||
completion(gif)
|
||||
}
|
||||
|
||||
func fetchGIFs() -> [GIF] {
|
||||
guard let data = userDefaults?.data(forKey: savedGIFsKey),
|
||||
let gifs = try? JSONDecoder().decode([GIF].self, from: data) else {
|
||||
return []
|
||||
}
|
||||
|
||||
// Filter out any GIFs whose files no longer exist
|
||||
let validGIFs = gifs.filter { GIFFileManager.shared.fileExists(at: $0.localFilePath) }
|
||||
|
||||
// If we filtered any out, save the updated list
|
||||
if validGIFs.count != gifs.count {
|
||||
saveToUserDefaults(gifs: validGIFs)
|
||||
}
|
||||
|
||||
return validGIFs.sorted(by: { $0.createdAt > $1.createdAt })
|
||||
}
|
||||
|
||||
func deleteGIF(with id: UUID) {
|
||||
var savedGIFs = fetchGIFs()
|
||||
|
||||
// Find the GIF to delete
|
||||
if let gifToDelete = savedGIFs.first(where: { $0.id == id }) {
|
||||
// Delete the file from storage
|
||||
GIFFileManager.shared.deleteGIF(at: gifToDelete.localFilePath)
|
||||
|
||||
// Remove from the list
|
||||
savedGIFs.removeAll(where: { $0.id == id })
|
||||
saveToUserDefaults(gifs: savedGIFs)
|
||||
}
|
||||
}
|
||||
|
||||
func clearAllGIFs() {
|
||||
// Delete all GIF files
|
||||
fetchGIFs().forEach { gif in
|
||||
GIFFileManager.shared.deleteGIF(at: gif.localFilePath)
|
||||
}
|
||||
|
||||
// Clear the list
|
||||
saveToUserDefaults(gifs: [])
|
||||
}
|
||||
|
||||
private func saveToUserDefaults(gifs: [GIF]) {
|
||||
guard let data = try? JSONEncoder().encode(gifs) else { return }
|
||||
userDefaults?.set(data, forKey: savedGIFsKey)
|
||||
}
|
||||
|
||||
func getGIFData(for gif: GIF) -> Data? {
|
||||
return GIFFileManager.shared.loadGIFData(from: gif.localFilePath)
|
||||
}
|
||||
|
||||
// MARK: - Share Extension Integration
|
||||
|
||||
func checkForSharedGIFs() {
|
||||
guard let pendingGIFsData = userDefaults?.array(forKey: pendingGIFsKey) as? [[String: Any]] else {
|
||||
return
|
||||
}
|
||||
|
||||
guard !pendingGIFsData.isEmpty else {
|
||||
return
|
||||
}
|
||||
|
||||
var savedGIFs = fetchGIFs()
|
||||
var newGIFsAdded = false
|
||||
|
||||
for gifInfo in pendingGIFsData {
|
||||
if let localFilePath = gifInfo["localFilePath"] as? String,
|
||||
let originalURL = gifInfo["originalURL"] as? String,
|
||||
let createdAt = gifInfo["createdAt"] as? TimeInterval {
|
||||
|
||||
// Create a GIF object
|
||||
let gif = GIF(
|
||||
localFilePath: localFilePath,
|
||||
originalURL: originalURL
|
||||
)
|
||||
|
||||
// Don't add duplicates
|
||||
if !savedGIFs.contains(where: { $0.localFilePath == localFilePath }) {
|
||||
savedGIFs.append(gif)
|
||||
newGIFsAdded = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Save updated GIFs list and clear pending ones
|
||||
if newGIFsAdded {
|
||||
saveToUserDefaults(gifs: savedGIFs)
|
||||
}
|
||||
|
||||
// Clear pending GIFs
|
||||
userDefaults?.removeObject(forKey: pendingGIFsKey)
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
//
|
||||
// ShareViewController.swift
|
||||
// GIFCollector ShareExtension
|
||||
//
|
||||
// Created by Joshua Higgins on 6/3/25.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import Social
|
||||
|
||||
class ShareViewController: SLComposeServiceViewController {
|
||||
|
||||
override func isContentValid() -> Bool {
|
||||
// Do validation of contentText and/or NSExtensionContext attachments here
|
||||
return true
|
||||
}
|
||||
|
||||
override func didSelectPost() {
|
||||
// This is called after the user selects Post. Do the upload of contentText and/or NSExtensionContext attachments.
|
||||
|
||||
// Inform the host that we're done, so it un-blocks its UI. Note: Alternatively you could call super's -didSelectPost, which will similarly complete the extension context.
|
||||
self.extensionContext!.completeRequest(returningItems: [], completionHandler: nil)
|
||||
}
|
||||
|
||||
override func configurationItems() -> [Any]! {
|
||||
// To add configuration options via table cells at the bottom of the sheet, return an array of SLComposeSheetConfigurationItem here.
|
||||
return []
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,813 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 77;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1B3192822DEDCF86007850B9 /* GIFCollector MessagesExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 1B3192812DEDCF86007850B9 /* GIFCollector MessagesExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
1B3192872DEDCF86007850B9 /* Messages.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B3192862DEDCF86007850B9 /* Messages.framework */; };
|
||||
1BDF21552DEFEF6B00128C3C /* GIFCollector ShareExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 1BDF21462DEFE9A500128C3C /* GIFCollector ShareExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
1BDF21722DEFF72800128C3C /* GIFCollector MessagesExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 1B3192812DEDCF86007850B9 /* GIFCollector MessagesExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
1BDF21752DEFF72800128C3C /* GIFCollector ShareExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 1BDF21462DEFE9A500128C3C /* GIFCollector ShareExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
1B3192832DEDCF86007850B9 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1B3192722DEDCF83007850B9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 1B3192802DEDCF86007850B9;
|
||||
remoteInfo = "GIFCollector MessagesExtension";
|
||||
};
|
||||
1BDF21562DEFEF6B00128C3C /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1B3192722DEDCF83007850B9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 1BDF21452DEFE9A500128C3C;
|
||||
remoteInfo = "GIFCollector ShareExtension";
|
||||
};
|
||||
1BDF21732DEFF72800128C3C /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1B3192722DEDCF83007850B9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 1B3192802DEDCF86007850B9;
|
||||
remoteInfo = "GIFCollector MessagesExtension";
|
||||
};
|
||||
1BDF21762DEFF72800128C3C /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1B3192722DEDCF83007850B9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 1BDF21452DEFE9A500128C3C;
|
||||
remoteInfo = "GIFCollector ShareExtension";
|
||||
};
|
||||
1BDF21792DEFF72D00128C3C /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1B3192722DEDCF83007850B9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 1BDF21452DEFE9A500128C3C;
|
||||
remoteInfo = "GIFCollector ShareExtension";
|
||||
};
|
||||
1BDF217B2DEFF73000128C3C /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 1B3192722DEDCF83007850B9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 1B3192802DEDCF86007850B9;
|
||||
remoteInfo = "GIFCollector MessagesExtension";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
1B3192972DEDCF87007850B9 /* Embed Foundation Extensions */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 13;
|
||||
files = (
|
||||
1BDF21552DEFEF6B00128C3C /* GIFCollector ShareExtension.appex in Embed Foundation Extensions */,
|
||||
1B3192822DEDCF86007850B9 /* GIFCollector MessagesExtension.appex in Embed Foundation Extensions */,
|
||||
);
|
||||
name = "Embed Foundation Extensions";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1BDF21782DEFF72800128C3C /* Embed Foundation Extensions */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 13;
|
||||
files = (
|
||||
1BDF21752DEFF72800128C3C /* GIFCollector ShareExtension.appex in Embed Foundation Extensions */,
|
||||
1BDF21722DEFF72800128C3C /* GIFCollector MessagesExtension.appex in Embed Foundation Extensions */,
|
||||
);
|
||||
name = "Embed Foundation Extensions";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1B3192782DEDCF83007850B9 /* GIFCollector.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GIFCollector.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1B3192812DEDCF86007850B9 /* GIFCollector MessagesExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "GIFCollector MessagesExtension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1B3192862DEDCF86007850B9 /* Messages.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Messages.framework; path = System/Library/Frameworks/Messages.framework; sourceTree = SDKROOT; };
|
||||
1BDF21462DEFE9A500128C3C /* GIFCollector ShareExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "GIFCollector ShareExtension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1BDF21652DEFF71200128C3C /* GIFCollector App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "GIFCollector App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
||||
1B3192912DEDCF87007850B9 /* Exceptions for "GIFCollector MessagesExtension" folder in "GIFCollector MessagesExtension" target */ = {
|
||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||
membershipExceptions = (
|
||||
Info.plist,
|
||||
);
|
||||
target = 1B3192802DEDCF86007850B9 /* GIFCollector MessagesExtension */;
|
||||
};
|
||||
1BDF214E2DEFE9A500128C3C /* Exceptions for "GIFCollector ShareExtension" folder in "GIFCollector ShareExtension" target */ = {
|
||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||
membershipExceptions = (
|
||||
Info.plist,
|
||||
);
|
||||
target = 1BDF21452DEFE9A500128C3C /* GIFCollector ShareExtension */;
|
||||
};
|
||||
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
||||
1B31927A2DEDCF83007850B9 /* GIFCollector */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
path = GIFCollector;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1B3192882DEDCF86007850B9 /* GIFCollector MessagesExtension */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
exceptions = (
|
||||
1B3192912DEDCF87007850B9 /* Exceptions for "GIFCollector MessagesExtension" folder in "GIFCollector MessagesExtension" target */,
|
||||
);
|
||||
path = "GIFCollector MessagesExtension";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1BDF21472DEFE9A500128C3C /* GIFCollector ShareExtension */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
exceptions = (
|
||||
1BDF214E2DEFE9A500128C3C /* Exceptions for "GIFCollector ShareExtension" folder in "GIFCollector ShareExtension" target */,
|
||||
);
|
||||
path = "GIFCollector ShareExtension";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXFileSystemSynchronizedRootGroup section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
1B31927E2DEDCF86007850B9 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1B3192872DEDCF86007850B9 /* Messages.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1BDF21432DEFE9A500128C3C /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1BDF21622DEFF71200128C3C /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
1B3192712DEDCF83007850B9 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1B31927A2DEDCF83007850B9 /* GIFCollector */,
|
||||
1B3192882DEDCF86007850B9 /* GIFCollector MessagesExtension */,
|
||||
1BDF21472DEFE9A500128C3C /* GIFCollector ShareExtension */,
|
||||
1B3192852DEDCF86007850B9 /* Frameworks */,
|
||||
1B3192792DEDCF83007850B9 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1B3192792DEDCF83007850B9 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1B3192782DEDCF83007850B9 /* GIFCollector.app */,
|
||||
1B3192812DEDCF86007850B9 /* GIFCollector MessagesExtension.appex */,
|
||||
1BDF21462DEFE9A500128C3C /* GIFCollector ShareExtension.appex */,
|
||||
1BDF21652DEFF71200128C3C /* GIFCollector App.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1B3192852DEDCF86007850B9 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1B3192862DEDCF86007850B9 /* Messages.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
1B3192772DEDCF83007850B9 /* GIFCollector */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1B3192982DEDCF87007850B9 /* Build configuration list for PBXNativeTarget "GIFCollector" */;
|
||||
buildPhases = (
|
||||
1B3192762DEDCF83007850B9 /* Resources */,
|
||||
1B3192972DEDCF87007850B9 /* Embed Foundation Extensions */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
1B3192842DEDCF86007850B9 /* PBXTargetDependency */,
|
||||
1BDF21572DEFEF6B00128C3C /* PBXTargetDependency */,
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
1B31927A2DEDCF83007850B9 /* GIFCollector */,
|
||||
);
|
||||
name = GIFCollector;
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = GIFCollector;
|
||||
productReference = 1B3192782DEDCF83007850B9 /* GIFCollector.app */;
|
||||
productType = "com.apple.product-type.application.messages";
|
||||
};
|
||||
1B3192802DEDCF86007850B9 /* GIFCollector MessagesExtension */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1B3192922DEDCF87007850B9 /* Build configuration list for PBXNativeTarget "GIFCollector MessagesExtension" */;
|
||||
buildPhases = (
|
||||
1B31927D2DEDCF86007850B9 /* Sources */,
|
||||
1B31927E2DEDCF86007850B9 /* Frameworks */,
|
||||
1B31927F2DEDCF86007850B9 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
1B3192882DEDCF86007850B9 /* GIFCollector MessagesExtension */,
|
||||
);
|
||||
name = "GIFCollector MessagesExtension";
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = "GIFCollector MessagesExtension";
|
||||
productReference = 1B3192812DEDCF86007850B9 /* GIFCollector MessagesExtension.appex */;
|
||||
productType = "com.apple.product-type.app-extension.messages";
|
||||
};
|
||||
1BDF21452DEFE9A500128C3C /* GIFCollector ShareExtension */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1BDF214F2DEFE9A500128C3C /* Build configuration list for PBXNativeTarget "GIFCollector ShareExtension" */;
|
||||
buildPhases = (
|
||||
1BDF21422DEFE9A500128C3C /* Sources */,
|
||||
1BDF21432DEFE9A500128C3C /* Frameworks */,
|
||||
1BDF21442DEFE9A500128C3C /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
fileSystemSynchronizedGroups = (
|
||||
1BDF21472DEFE9A500128C3C /* GIFCollector ShareExtension */,
|
||||
);
|
||||
name = "GIFCollector ShareExtension";
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = "GIFCollector ShareExtension";
|
||||
productReference = 1BDF21462DEFE9A500128C3C /* GIFCollector ShareExtension.appex */;
|
||||
productType = "com.apple.product-type.app-extension";
|
||||
};
|
||||
1BDF21642DEFF71200128C3C /* GIFCollector App */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 1BDF216F2DEFF71300128C3C /* Build configuration list for PBXNativeTarget "GIFCollector App" */;
|
||||
buildPhases = (
|
||||
1BDF21612DEFF71200128C3C /* Sources */,
|
||||
1BDF21622DEFF71200128C3C /* Frameworks */,
|
||||
1BDF21632DEFF71200128C3C /* Resources */,
|
||||
1BDF21782DEFF72800128C3C /* Embed Foundation Extensions */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
1BDF21742DEFF72800128C3C /* PBXTargetDependency */,
|
||||
1BDF21772DEFF72800128C3C /* PBXTargetDependency */,
|
||||
1BDF217A2DEFF72D00128C3C /* PBXTargetDependency */,
|
||||
1BDF217C2DEFF73000128C3C /* PBXTargetDependency */,
|
||||
);
|
||||
name = "GIFCollector App";
|
||||
packageProductDependencies = (
|
||||
);
|
||||
productName = "GIFCollector App";
|
||||
productReference = 1BDF21652DEFF71200128C3C /* GIFCollector App.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
1B3192722DEDCF83007850B9 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = 1;
|
||||
LastSwiftUpdateCheck = 1640;
|
||||
LastUpgradeCheck = 1640;
|
||||
TargetAttributes = {
|
||||
1B3192772DEDCF83007850B9 = {
|
||||
CreatedOnToolsVersion = 16.4;
|
||||
};
|
||||
1B3192802DEDCF86007850B9 = {
|
||||
CreatedOnToolsVersion = 16.4;
|
||||
};
|
||||
1BDF21452DEFE9A500128C3C = {
|
||||
CreatedOnToolsVersion = 16.4;
|
||||
};
|
||||
1BDF21642DEFF71200128C3C = {
|
||||
CreatedOnToolsVersion = 16.4;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 1B3192752DEDCF83007850B9 /* Build configuration list for PBXProject "GIFCollector" */;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 1B3192712DEDCF83007850B9;
|
||||
minimizedProjectReferenceProxies = 1;
|
||||
preferredProjectObjectVersion = 77;
|
||||
productRefGroup = 1B3192792DEDCF83007850B9 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
1B3192772DEDCF83007850B9 /* GIFCollector */,
|
||||
1B3192802DEDCF86007850B9 /* GIFCollector MessagesExtension */,
|
||||
1BDF21452DEFE9A500128C3C /* GIFCollector ShareExtension */,
|
||||
1BDF21642DEFF71200128C3C /* GIFCollector App */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
1B3192762DEDCF83007850B9 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1B31927F2DEDCF86007850B9 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1BDF21442DEFE9A500128C3C /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1BDF21632DEFF71200128C3C /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
1B31927D2DEDCF86007850B9 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1BDF21422DEFE9A500128C3C /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
1BDF21612DEFF71200128C3C /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
1B3192842DEDCF86007850B9 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 1B3192802DEDCF86007850B9 /* GIFCollector MessagesExtension */;
|
||||
targetProxy = 1B3192832DEDCF86007850B9 /* PBXContainerItemProxy */;
|
||||
};
|
||||
1BDF21572DEFEF6B00128C3C /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 1BDF21452DEFE9A500128C3C /* GIFCollector ShareExtension */;
|
||||
targetProxy = 1BDF21562DEFEF6B00128C3C /* PBXContainerItemProxy */;
|
||||
};
|
||||
1BDF21742DEFF72800128C3C /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 1B3192802DEDCF86007850B9 /* GIFCollector MessagesExtension */;
|
||||
targetProxy = 1BDF21732DEFF72800128C3C /* PBXContainerItemProxy */;
|
||||
};
|
||||
1BDF21772DEFF72800128C3C /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 1BDF21452DEFE9A500128C3C /* GIFCollector ShareExtension */;
|
||||
targetProxy = 1BDF21762DEFF72800128C3C /* PBXContainerItemProxy */;
|
||||
};
|
||||
1BDF217A2DEFF72D00128C3C /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 1BDF21452DEFE9A500128C3C /* GIFCollector ShareExtension */;
|
||||
targetProxy = 1BDF21792DEFF72D00128C3C /* PBXContainerItemProxy */;
|
||||
};
|
||||
1BDF217C2DEFF73000128C3C /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 1B3192802DEDCF86007850B9 /* GIFCollector MessagesExtension */;
|
||||
targetProxy = 1BDF217B2DEFF73000128C3C /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1B3192932DEDCF87007850B9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon";
|
||||
CODE_SIGN_ENTITLEMENTS = "GIFCollector MessagesExtension/GIFCollector MessagesExtension.entitlements";
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = "GIFCollector MessagesExtension/Info.plist";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "GIF Collector";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 100.2.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.abunchofknowitalls.GIFCollector.MessagesExtension;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1B3192942DEDCF87007850B9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon";
|
||||
CODE_SIGN_ENTITLEMENTS = "GIFCollector MessagesExtension/GIFCollector MessagesExtension.entitlements";
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = "GIFCollector MessagesExtension/Info.plist";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "GIF Collector";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 100.2.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.abunchofknowitalls.GIFCollector.MessagesExtension;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1B3192952DEDCF87007850B9 /* 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.0;
|
||||
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;
|
||||
};
|
||||
1B3192962DEDCF87007850B9 /* 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.0;
|
||||
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;
|
||||
};
|
||||
1B3192992DEDCF87007850B9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "GIF Collector";
|
||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
MARKETING_VERSION = 100.2.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.abunchofknowitalls.GIFCollector;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1B31929A2DEDCF87007850B9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "GIF Collector";
|
||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
MARKETING_VERSION = 100.2.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.abunchofknowitalls.GIFCollector;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1BDF21502DEFE9A500128C3C /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = "GIFCollector ShareExtension/GIFCollector ShareExtension.entitlements";
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = "GIFCollector ShareExtension/Info.plist";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "GIFCollector ShareExtension";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 100.2.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.abunchofknowitalls.GIFCollector.ShareExtension;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1BDF21512DEFE9A500128C3C /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = "GIFCollector ShareExtension/GIFCollector ShareExtension.entitlements";
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES;
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = "GIFCollector ShareExtension/Info.plist";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "GIFCollector ShareExtension";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 100.2.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.abunchofknowitalls.GIFCollector.ShareExtension;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
1BDF21702DEFF71300128C3C /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
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";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 18.5;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.abunchofknowitalls.GIFCollector-App";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
1BDF21712DEFF71300128C3C /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
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";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 18.5;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.abunchofknowitalls.GIFCollector-App";
|
||||
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 */
|
||||
1B3192752DEDCF83007850B9 /* Build configuration list for PBXProject "GIFCollector" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1B3192952DEDCF87007850B9 /* Debug */,
|
||||
1B3192962DEDCF87007850B9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1B3192922DEDCF87007850B9 /* Build configuration list for PBXNativeTarget "GIFCollector MessagesExtension" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1B3192932DEDCF87007850B9 /* Debug */,
|
||||
1B3192942DEDCF87007850B9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1B3192982DEDCF87007850B9 /* Build configuration list for PBXNativeTarget "GIFCollector" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1B3192992DEDCF87007850B9 /* Debug */,
|
||||
1B31929A2DEDCF87007850B9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1BDF214F2DEFE9A500128C3C /* Build configuration list for PBXNativeTarget "GIFCollector ShareExtension" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1BDF21502DEFE9A500128C3C /* Debug */,
|
||||
1BDF21512DEFE9A500128C3C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
1BDF216F2DEFF71300128C3C /* Build configuration list for PBXNativeTarget "GIFCollector App" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
1BDF21702DEFF71300128C3C /* Debug */,
|
||||
1BDF21712DEFF71300128C3C /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 1B3192722DEDCF83007850B9 /* Project object */;
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import UIKit
|
||||
|
||||
@main
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
// Create window
|
||||
window = UIWindow(frame: UIScreen.main.bounds)
|
||||
|
||||
// Create and set the root view controller
|
||||
let viewController = ViewController()
|
||||
window?.rootViewController = viewController
|
||||
|
||||
// Make the window visible
|
||||
window?.makeKeyAndVisible()
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
315
GIFCollector/ContentView.swift
Normal file
@@ -0,0 +1,315 @@
|
||||
import SwiftUI
|
||||
import UIKit
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
struct ContentView: View {
|
||||
@State private var gifs: [GIF] = []
|
||||
@State private var showingAddGIF = false
|
||||
@State private var showingAlert = false
|
||||
@State private var alertTitle = ""
|
||||
@State private var alertMessage = ""
|
||||
|
||||
// For handling app lifecycle notifications
|
||||
@Environment(\.scenePhase) private var scenePhase
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
ZStack {
|
||||
if gifs.isEmpty {
|
||||
VStack {
|
||||
Text("No GIFs saved")
|
||||
.font(.headline)
|
||||
Text("Add your first GIF using the + button")
|
||||
.font(.subheadline)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
} else {
|
||||
ScrollView {
|
||||
LazyVGrid(
|
||||
columns: [
|
||||
GridItem(.flexible(), spacing: 10),
|
||||
GridItem(.flexible(), spacing: 10),
|
||||
], spacing: 10
|
||||
) {
|
||||
ForEach(gifs) { gif in
|
||||
GIFCell(
|
||||
gif: gif,
|
||||
onTap: {
|
||||
copyGIFToClipboard(gif)
|
||||
},
|
||||
onDelete: {
|
||||
deleteGIF(gif)
|
||||
})
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("GIF Collector")
|
||||
.toolbar {
|
||||
Button(action: {
|
||||
showingAddGIF = true
|
||||
}) {
|
||||
Image(systemName: "plus.circle.fill")
|
||||
.resizable()
|
||||
.frame(width: 24, height: 24)
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $showingAddGIF) {
|
||||
AddGIFView { urlString, gifData in
|
||||
saveGIF(urlString: urlString, data: gifData)
|
||||
showingAddGIF = false
|
||||
} onCancel: {
|
||||
showingAddGIF = false
|
||||
}
|
||||
}
|
||||
.alert(isPresented: $showingAlert) {
|
||||
Alert(
|
||||
title: Text(alertTitle), message: Text(alertMessage), dismissButton: .default(Text("OK")))
|
||||
}
|
||||
.onAppear {
|
||||
loadGIFs()
|
||||
|
||||
// Register for foreground notification
|
||||
NotificationCenter.default.addObserver(
|
||||
forName: UIApplication.willEnterForegroundNotification,
|
||||
object: nil,
|
||||
queue: .main
|
||||
) { _ in
|
||||
loadGIFs()
|
||||
}
|
||||
}
|
||||
.onDisappear {
|
||||
// Remove notification observer when view disappears
|
||||
NotificationCenter.default.removeObserver(
|
||||
self,
|
||||
name: UIApplication.willEnterForegroundNotification,
|
||||
object: nil
|
||||
)
|
||||
}
|
||||
// Also monitor scene phase changes
|
||||
.onChange(of: scenePhase) { newPhase in
|
||||
if newPhase == .active {
|
||||
loadGIFs()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func loadGIFs() {
|
||||
// Check for shared GIFs on app launch
|
||||
GIFStorageService.shared.checkForSharedGIFs()
|
||||
gifs = GIFStorageService.shared.fetchGIFs()
|
||||
}
|
||||
|
||||
private func saveGIF(urlString: String, data: Data) {
|
||||
GIFStorageService.shared.saveGIF(data: data, fromURL: urlString) { _ in
|
||||
loadGIFs()
|
||||
}
|
||||
}
|
||||
|
||||
private func deleteGIF(_ gif: GIF) {
|
||||
print("Got delete request for \(gif.id)")
|
||||
GIFStorageService.shared.deleteGIF(with: gif.id)
|
||||
loadGIFs()
|
||||
}
|
||||
|
||||
private func copyGIFToClipboard(_ gif: GIF) {
|
||||
guard let data = GIFStorageService.shared.getGIFData(for: gif) else {
|
||||
showAlert(title: "Error", message: "Could not load GIF data")
|
||||
return
|
||||
}
|
||||
|
||||
let pasteboard = UIPasteboard.general
|
||||
pasteboard.setData(data, forPasteboardType: UTType.gif.identifier)
|
||||
|
||||
showAlert(title: "Copied!", message: "GIF copied to clipboard")
|
||||
}
|
||||
|
||||
private func showAlert(title: String, message: String) {
|
||||
alertTitle = title
|
||||
alertMessage = message
|
||||
showingAlert = true
|
||||
}
|
||||
}
|
||||
|
||||
struct GIFCell: View {
|
||||
let gif: GIF
|
||||
let onTap: () -> Void
|
||||
let onDelete: () -> Void
|
||||
|
||||
@State private var showingDeleteConfirmation = false
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
GIFPlayerUIView(filePath: gif.localFilePath)
|
||||
.aspectRatio(1, contentMode: .fill)
|
||||
.cornerRadius(8)
|
||||
|
||||
// Tap hint overlay
|
||||
Color.black.opacity(0.0001) // Almost transparent for hit testing
|
||||
}
|
||||
.aspectRatio(1, contentMode: .fit)
|
||||
.cornerRadius(8)
|
||||
.clipped()
|
||||
.shadow(radius: 2)
|
||||
.onTapGesture {
|
||||
onTap()
|
||||
}
|
||||
.contextMenu {
|
||||
Button(
|
||||
role: .destructive,
|
||||
action: {
|
||||
onDelete()
|
||||
}
|
||||
) {
|
||||
Label("Delete", systemImage: "trash")
|
||||
}
|
||||
|
||||
Button(action: {
|
||||
onTap()
|
||||
}) {
|
||||
Label("Copy to Clipboard", systemImage: "doc.on.clipboard")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct GIFPlayerUIView: UIViewRepresentable {
|
||||
let filePath: String
|
||||
|
||||
func makeUIView(context: Context) -> UIView {
|
||||
let view = UIView()
|
||||
let gifPlayerView = GIFPlayerView(frame: view.bounds)
|
||||
gifPlayerView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
view.addSubview(gifPlayerView)
|
||||
|
||||
if let data = try? Data(contentsOf: URL(fileURLWithPath: filePath)) {
|
||||
gifPlayerView.loadGIF(from: data)
|
||||
gifPlayerView.startAnimating()
|
||||
}
|
||||
|
||||
return view
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: UIView, context: Context) {
|
||||
// Nothing to update
|
||||
}
|
||||
}
|
||||
|
||||
struct AddGIFView: View {
|
||||
@State private var urlString = ""
|
||||
@State private var isLoading = false
|
||||
@State private var previewData: Data?
|
||||
@State private var showError = false
|
||||
@State private var errorMessage = ""
|
||||
|
||||
let onSave: (String, Data) -> Void
|
||||
let onCancel: () -> Void
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
VStack(spacing: 20) {
|
||||
TextField("Enter GIF URL", text: $urlString)
|
||||
.textFieldStyle(RoundedBorderTextFieldStyle())
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.onChange(of: urlString) { _ in
|
||||
if !urlString.isEmpty {
|
||||
loadPreview()
|
||||
} else {
|
||||
previewData = nil
|
||||
}
|
||||
}
|
||||
|
||||
if isLoading {
|
||||
ProgressView()
|
||||
.frame(height: 200)
|
||||
} else if let data = previewData {
|
||||
GIFPreview(data: data)
|
||||
.frame(height: 200)
|
||||
.cornerRadius(8)
|
||||
} else {
|
||||
Rectangle()
|
||||
.fill(Color.gray.opacity(0.2))
|
||||
.frame(height: 200)
|
||||
.cornerRadius(8)
|
||||
.overlay(
|
||||
Text("GIF Preview")
|
||||
.foregroundColor(.gray)
|
||||
)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding()
|
||||
.navigationTitle("Add New GIF")
|
||||
.navigationBarItems(
|
||||
leading: Button("Cancel") {
|
||||
onCancel()
|
||||
},
|
||||
trailing: Button("Save") {
|
||||
if let data = previewData {
|
||||
onSave(urlString, data)
|
||||
}
|
||||
}
|
||||
.disabled(previewData == nil)
|
||||
)
|
||||
.alert(isPresented: $showError) {
|
||||
Alert(
|
||||
title: Text("Error"), message: Text(errorMessage), dismissButton: .default(Text("OK")))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func loadPreview() {
|
||||
guard URL(string: urlString) != nil else {
|
||||
return
|
||||
}
|
||||
|
||||
isLoading = true
|
||||
previewData = nil
|
||||
|
||||
DownloadService.shared.downloadGIF(from: urlString) { data, error in
|
||||
isLoading = false
|
||||
|
||||
if let error = error {
|
||||
errorMessage = error.localizedDescription
|
||||
showError = true
|
||||
return
|
||||
}
|
||||
|
||||
if let data = data {
|
||||
previewData = data
|
||||
} else {
|
||||
errorMessage = "Failed to load GIF"
|
||||
showError = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct GIFPreview: UIViewRepresentable {
|
||||
let data: Data
|
||||
|
||||
func makeUIView(context: Context) -> UIView {
|
||||
let view = UIView()
|
||||
let gifPlayerView = GIFPlayerView(frame: view.bounds)
|
||||
gifPlayerView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
view.addSubview(gifPlayerView)
|
||||
|
||||
gifPlayerView.loadGIF(from: data)
|
||||
gifPlayerView.startAnimating()
|
||||
|
||||
return view
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: UIView, context: Context) {
|
||||
// Nothing to update
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ContentView()
|
||||
}
|
||||
34
GIFCollector/GIF.swift
Normal file
@@ -0,0 +1,34 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
// Removed SwiftData dependency to ensure compatibility across targets
|
||||
struct GIF: Codable, Identifiable, Equatable {
|
||||
let id: UUID
|
||||
let localFilePath: String
|
||||
let originalURL: String
|
||||
let createdAt: Date
|
||||
|
||||
var fileURL: URL? {
|
||||
return URL(fileURLWithPath: localFilePath)
|
||||
}
|
||||
|
||||
init(localFilePath: String, originalURL: String) {
|
||||
self.id = UUID()
|
||||
self.localFilePath = localFilePath
|
||||
self.originalURL = originalURL
|
||||
self.createdAt = Date()
|
||||
}
|
||||
|
||||
init(localFilePath: String, originalURL: String, id: UUID, createdAt: Date) {
|
||||
self.id = id
|
||||
self.localFilePath = localFilePath
|
||||
self.originalURL = originalURL
|
||||
self.createdAt = createdAt
|
||||
}
|
||||
|
||||
// For equality comparison
|
||||
static func == (lhs: GIF, rhs: GIF) -> Bool {
|
||||
return lhs.id == rhs.id
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,6 @@ class GIFCollectionViewCell: UICollectionViewCell {
|
||||
])
|
||||
|
||||
contentView.layer.cornerRadius = 8
|
||||
contentView.layer.borderWidth = 1
|
||||
contentView.layer.borderColor = UIColor.systemGray4.cgColor
|
||||
}
|
||||
|
||||
@@ -99,4 +98,4 @@ class GIFCollectionViewCell: UICollectionViewCell {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
<dict>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.com.abunchofknowitalls.gif</string>
|
||||
<string>group.com.abunchofknowitalls.GIFCollector</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
16
GIFCollector/GIFCollectorApp.swift
Normal file
@@ -0,0 +1,16 @@
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct GIFCollectorApp: App {
|
||||
init() {
|
||||
// Initialize any services here
|
||||
let _ = GIFStorageService.shared
|
||||
let _ = GIFFileManager.shared
|
||||
}
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
var appGroupID = "group."+Bundle.main.bundleIdentifier.unsafelyUnwrapped.replacing(".iMessage", with:"")
|
||||
|
||||
class GIFFileManager {
|
||||
static let shared = GIFFileManager()
|
||||
|
||||
@@ -10,19 +12,23 @@ class GIFFileManager {
|
||||
|
||||
// MARK: - File Storage
|
||||
|
||||
// Always use the App Group container for consistent storage between extensions
|
||||
private var documentsDirectory: URL {
|
||||
// First try to get the App Group container
|
||||
if let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.gifcollector") {
|
||||
if let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroupID) {
|
||||
return containerURL
|
||||
} else {
|
||||
// This should only happen if App Group capability is not properly set up
|
||||
print("ERROR: App Group container not available. GIFs will not be shared between extensions!")
|
||||
|
||||
// Fall back to the app's documents directory if App Group is not available
|
||||
let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
|
||||
return paths[0]
|
||||
}
|
||||
|
||||
// Fall back to the app's documents directory if App Group is not available
|
||||
let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
|
||||
return paths[0]
|
||||
}
|
||||
|
||||
private var gifsDirectory: URL {
|
||||
return documentsDirectory.appendingPathComponent("SavedGIFs", isDirectory: true)
|
||||
// Use a consistent folder name for GIFs across all extensions
|
||||
return documentsDirectory.appendingPathComponent("SharedGIFs", isDirectory: true)
|
||||
}
|
||||
|
||||
private func createGIFsDirectoryIfNeeded() {
|
||||
@@ -31,9 +37,12 @@ class GIFFileManager {
|
||||
if !fileManager.fileExists(atPath: gifsDirectory.path) {
|
||||
do {
|
||||
try fileManager.createDirectory(at: gifsDirectory, withIntermediateDirectories: true)
|
||||
print("Created shared GIFs directory at: \(gifsDirectory.path)")
|
||||
} catch {
|
||||
print("Error creating GIFs directory: \(error)")
|
||||
print("Error creating shared GIFs directory: \(error)")
|
||||
}
|
||||
} else {
|
||||
print("Using existing shared GIFs directory at: \(gifsDirectory.path)")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,21 +152,16 @@ class GIFFileManager {
|
||||
|
||||
// Check if we already have this GIF in the shared container
|
||||
private func checkForSharedGIF(withURL urlString: String) -> String? {
|
||||
guard let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.gifcollector") else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let sharedGIFsFolder = containerURL.appendingPathComponent("GIFs", isDirectory: true)
|
||||
|
||||
guard FileManager.default.fileExists(atPath: sharedGIFsFolder.path) else {
|
||||
// Use our standard gifsDirectory property instead of recreating the path
|
||||
guard FileManager.default.fileExists(atPath: gifsDirectory.path) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
do {
|
||||
let fileURLs = try FileManager.default.contentsOfDirectory(at: sharedGIFsFolder, includingPropertiesForKeys: nil)
|
||||
let fileURLs = try FileManager.default.contentsOfDirectory(at: gifsDirectory, includingPropertiesForKeys: nil)
|
||||
|
||||
// Find any shared GIF that matches our URL (usually won't find any, but helps avoid duplicates)
|
||||
let userDefaults = UserDefaults(suiteName: "group.gifcollector")
|
||||
let userDefaults = UserDefaults(suiteName: appGroupID)
|
||||
if let pendingGIFs = userDefaults?.array(forKey: "pendingGIFs") as? [[String: Any]] {
|
||||
for gifInfo in pendingGIFs {
|
||||
if let originURL = gifInfo["originalURL"] as? String,
|
||||
@@ -174,4 +178,4 @@ class GIFFileManager {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
219
GIFCollector/Services/GIFStorageService.swift
Normal file
@@ -0,0 +1,219 @@
|
||||
import Foundation
|
||||
|
||||
class GIFStorageService {
|
||||
static let shared = GIFStorageService()
|
||||
|
||||
// Use constant App Group ID to ensure consistency across targets
|
||||
private let userDefaults = UserDefaults(suiteName: appGroupID)
|
||||
|
||||
// Use a consistent key for saved GIFs across all extensions
|
||||
private let savedGIFsKey = "sharedGIFs"
|
||||
private let pendingGIFsKey = "pendingGIFs"
|
||||
|
||||
private init() {
|
||||
// Make sure the shared UserDefaults exists
|
||||
if userDefaults == nil {
|
||||
print("ERROR: Could not create UserDefaults with app group. GIFs will not be shared between extensions!")
|
||||
} else {
|
||||
print("Successfully connected to shared UserDefaults")
|
||||
}
|
||||
|
||||
// Process any pending GIFs from the Share Extension
|
||||
checkForSharedGIFs()
|
||||
|
||||
// Log the number of GIFs found
|
||||
let count = fetchGIFs().count
|
||||
print("Found \(count) GIFs in shared storage")
|
||||
}
|
||||
|
||||
func saveGIF(data: Data, fromURL urlString: String, completion: @escaping (GIF?) -> Void) {
|
||||
// First store the GIF data to disk
|
||||
guard let localPath = GIFFileManager.shared.storeGIF(data: data, fromURL: urlString) else {
|
||||
completion(nil)
|
||||
return
|
||||
}
|
||||
|
||||
// Create and save the GIF model
|
||||
let gif = GIF(localFilePath: localPath, originalURL: urlString)
|
||||
|
||||
var savedGIFs = fetchGIFs()
|
||||
|
||||
// Don't save duplicates of the same URL
|
||||
if !savedGIFs.contains(where: { $0.originalURL == urlString }) {
|
||||
savedGIFs.append(gif)
|
||||
saveToUserDefaults(gifs: savedGIFs)
|
||||
}
|
||||
|
||||
// Perform cleanup if needed
|
||||
GIFFileManager.shared.performStorageCleanupIfNeeded()
|
||||
|
||||
completion(gif)
|
||||
}
|
||||
|
||||
func fetchGIFs() -> [GIF] {
|
||||
guard let userDefaultsInstance = userDefaults else {
|
||||
print("ERROR: UserDefaults is nil, cannot fetch GIFs")
|
||||
return []
|
||||
}
|
||||
|
||||
guard let data = userDefaultsInstance.data(forKey: savedGIFsKey) else {
|
||||
print("No GIFs data found in UserDefaults for key: \(savedGIFsKey)")
|
||||
return []
|
||||
}
|
||||
|
||||
do {
|
||||
let gifs = try JSONDecoder().decode([GIF].self, from: data)
|
||||
print("Fetched \(gifs.count) GIFs from shared storage")
|
||||
|
||||
// Debug IDs
|
||||
if !gifs.isEmpty {
|
||||
print("GIF IDs: \(gifs.map { $0.id.uuidString.prefix(8) }.joined(separator: ", "))")
|
||||
}
|
||||
|
||||
// Filter out any GIFs whose files no longer exist
|
||||
let validGIFs = gifs.filter {
|
||||
let exists = GIFFileManager.shared.fileExists(at: $0.localFilePath)
|
||||
if !exists {
|
||||
print("Warning: GIF file not found at path: \($0.localFilePath)")
|
||||
}
|
||||
return exists
|
||||
}
|
||||
|
||||
// If we filtered any out, save the updated list
|
||||
if validGIFs.count != gifs.count {
|
||||
print("Removed \(gifs.count - validGIFs.count) invalid GIFs from storage")
|
||||
saveToUserDefaults(gifs: validGIFs)
|
||||
}
|
||||
|
||||
return validGIFs.sorted(by: { $0.createdAt > $1.createdAt })
|
||||
} catch {
|
||||
print("ERROR: Failed to decode GIFs from UserDefaults: \(error)")
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
func deleteGIF(with id: UUID) {
|
||||
var savedGIFs = fetchGIFs()
|
||||
|
||||
// Find the GIF to delete
|
||||
if let gifToDelete = savedGIFs.first(where: { $0.id == id }) {
|
||||
print("Deleting GIF with ID: \(id), path: \(gifToDelete.localFilePath)")
|
||||
|
||||
// Delete the file from storage
|
||||
let fileDeleted = GIFFileManager.shared.deleteGIF(at: gifToDelete.localFilePath)
|
||||
if fileDeleted {
|
||||
print("Successfully deleted GIF file from storage")
|
||||
} else {
|
||||
print("Warning: Failed to delete GIF file at path: \(gifToDelete.localFilePath)")
|
||||
}
|
||||
|
||||
// Remove from the list regardless of whether file deletion succeeded
|
||||
let countBefore = savedGIFs.count
|
||||
savedGIFs.removeAll(where: { $0.id == id })
|
||||
|
||||
if savedGIFs.count < countBefore {
|
||||
print("Removed GIF from saved list, count before: \(countBefore), after: \(savedGIFs.count)")
|
||||
saveToUserDefaults(gifs: savedGIFs)
|
||||
} else {
|
||||
print("Error: GIF with ID \(id) was not found in memory array")
|
||||
}
|
||||
} else {
|
||||
print("Error: Could not find GIF with ID \(id) to delete")
|
||||
}
|
||||
}
|
||||
|
||||
func clearAllGIFs() {
|
||||
// Delete all GIF files
|
||||
fetchGIFs().forEach { gif in
|
||||
GIFFileManager.shared.deleteGIF(at: gif.localFilePath)
|
||||
}
|
||||
|
||||
// Clear the list
|
||||
saveToUserDefaults(gifs: [])
|
||||
}
|
||||
|
||||
private func saveToUserDefaults(gifs: [GIF]) {
|
||||
do {
|
||||
let data = try JSONEncoder().encode(gifs)
|
||||
userDefaults?.set(data, forKey: savedGIFsKey)
|
||||
print("Successfully saved \(gifs.count) GIFs to shared storage")
|
||||
|
||||
// Force UserDefaults to synchronize to ensure immediate visibility across extensions
|
||||
if userDefaults?.synchronize() == true {
|
||||
print("UserDefaults successfully synchronized")
|
||||
} else {
|
||||
print("Warning: UserDefaults synchronize may have failed")
|
||||
}
|
||||
|
||||
// Double-check that our changes were actually saved
|
||||
if let checkData = userDefaults?.data(forKey: savedGIFsKey),
|
||||
let checkGifs = try? JSONDecoder().decode([GIF].self, from: checkData) {
|
||||
print("Verified: \(checkGifs.count) GIFs stored in UserDefaults")
|
||||
} else {
|
||||
print("ERROR: Failed to verify GIFs were saved to UserDefaults")
|
||||
}
|
||||
} catch {
|
||||
print("ERROR: Failed to encode GIFs for storage: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
func getGIFData(for gif: GIF) -> Data? {
|
||||
return GIFFileManager.shared.loadGIFData(from: gif.localFilePath)
|
||||
}
|
||||
|
||||
// MARK: - Share Extension Integration
|
||||
|
||||
func checkForSharedGIFs() {
|
||||
guard let pendingGIFsData = userDefaults?.array(forKey: pendingGIFsKey) as? [[String: Any]] else {
|
||||
print("No pending GIFs found in shared storage")
|
||||
return
|
||||
}
|
||||
|
||||
guard !pendingGIFsData.isEmpty else {
|
||||
print("Pending GIFs array is empty")
|
||||
return
|
||||
}
|
||||
|
||||
print("Found \(pendingGIFsData.count) pending GIFs to process")
|
||||
|
||||
var savedGIFs = fetchGIFs()
|
||||
var newGIFsAdded = false
|
||||
|
||||
for gifInfo in pendingGIFsData {
|
||||
if let localFilePath = gifInfo["localFilePath"] as? String,
|
||||
let originalURL = gifInfo["originalURL"] as? String,
|
||||
let createdAt = gifInfo["createdAt"] as? TimeInterval {
|
||||
|
||||
// Create a GIF object - use the provided ID if available, or create a new one
|
||||
let gifId = (gifInfo["id"] as? String).flatMap { UUID(uuidString: $0) } ?? UUID()
|
||||
let gifCreatedAt = Date(timeIntervalSince1970: createdAt)
|
||||
|
||||
let gif = GIF(
|
||||
localFilePath: localFilePath,
|
||||
originalURL: originalURL,
|
||||
id: gifId,
|
||||
createdAt: gifCreatedAt
|
||||
)
|
||||
|
||||
// Don't add duplicates
|
||||
if !savedGIFs.contains(where: { $0.localFilePath == localFilePath }) {
|
||||
savedGIFs.append(gif)
|
||||
newGIFsAdded = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Save updated GIFs list and clear pending ones
|
||||
if newGIFsAdded {
|
||||
print("Added \(pendingGIFsData.count) new GIFs from shared extension")
|
||||
saveToUserDefaults(gifs: savedGIFs)
|
||||
} else {
|
||||
print("No new GIFs were added from pending list")
|
||||
}
|
||||
|
||||
// Clear pending GIFs
|
||||
userDefaults?.removeObject(forKey: pendingGIFsKey)
|
||||
userDefaults?.synchronize()
|
||||
print("Cleared pending GIFs from shared storage")
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
import UIKit
|
||||
|
||||
class ViewController: UIViewController {
|
||||
|
||||
private let helloLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.text = "Hello World!"
|
||||
label.font = UIFont.systemFont(ofSize: 24, weight: .bold)
|
||||
label.textAlignment = .center
|
||||
label.translatesAutoresizingMaskIntoConstraints = false
|
||||
return label
|
||||
}()
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
setupUI()
|
||||
}
|
||||
|
||||
private func setupUI() {
|
||||
view.backgroundColor = .white
|
||||
|
||||
view.addSubview(helloLabel)
|
||||
|
||||
NSLayoutConstraint.activate([
|
||||
helloLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor),
|
||||
helloLabel.centerYAnchor.constraint(equalTo: view.centerYAnchor)
|
||||
])
|
||||
}
|
||||
}
|
||||
@@ -57,8 +57,9 @@ class GIFCollectionViewController: UIViewController {
|
||||
collectionView.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
// Setup Add Button
|
||||
addButton.setImage(UIImage(systemName: "plus.circle.fill"), for: .normal)
|
||||
addButton.setImage(UIImage(systemName: "plus.circle.fill", withConfiguration: UIImage.SymbolConfiguration(paletteColors: [UIColor.white, .systemBlue])), for: .normal)
|
||||
addButton.tintColor = .systemBlue
|
||||
addButton.configuration?.baseForegroundColor = UIColor.white
|
||||
addButton.contentHorizontalAlignment = .fill
|
||||
addButton.contentVerticalAlignment = .fill
|
||||
addButton.addTarget(self, action: #selector(addButtonTapped), for: .touchUpInside)
|
||||
@@ -208,4 +209,4 @@ extension GIFCollectionViewController: UICollectionViewDelegate, UICollectionVie
|
||||
return UIMenu(title: "", children: [deleteAction])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 261 KiB After Width: | Height: | Size: 261 KiB |
|
Before Width: | Height: | Size: 387 KiB After Width: | Height: | Size: 387 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -4,7 +4,7 @@
|
||||
<dict>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.com.abunchofknowitalls.gif</string>
|
||||
<string>group.com.abunchofknowitalls.GIFCollector</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Before Width: | Height: | Size: 261 KiB After Width: | Height: | Size: 261 KiB |
|
Before Width: | Height: | Size: 387 KiB After Width: | Height: | Size: 387 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
10
GIFCollectorShare/GIFCollectorShare.entitlements
Normal file
@@ -0,0 +1,10 @@
|
||||
<?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>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.com.abunchofknowitalls.GIFCollector</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -8,6 +8,20 @@
|
||||
<dict>
|
||||
<key>NSExtensionActivationRule</key>
|
||||
<dict>
|
||||
<key>NSExtensionActivationRule</key>
|
||||
<string>SUBQUERY (
|
||||
extensionItems,
|
||||
$extensionItem,
|
||||
SUBQUERY (
|
||||
$extensionItem.attachments,
|
||||
$attachment,
|
||||
|
||||
(
|
||||
ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "com.compuserve.gif"
|
||||
)
|
||||
|
||||
).@count == $extensionItem.attachments.@count
|
||||
).@count == 1</string>
|
||||
<key>NSExtensionActivationSupportsFileWithMaxCount</key>
|
||||
<integer>1</integer>
|
||||
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
|
||||
354
GIFCollectorShare/ShareViewController.swift
Normal file
@@ -0,0 +1,354 @@
|
||||
//
|
||||
// ShareViewController.swift
|
||||
// GIFCollectorShare
|
||||
//
|
||||
|
||||
import MobileCoreServices
|
||||
import Social
|
||||
import UIKit
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
class ShareViewController: SLComposeServiceViewController {
|
||||
|
||||
private var receivedURL: URL?
|
||||
private var gifData: Data?
|
||||
private var isProcessing = false
|
||||
private var originalURL: String = ""
|
||||
private var debugMessages: [String] = []
|
||||
|
||||
// Use the same constants as in the main app
|
||||
private let appGroupID = "group."+Bundle.main.bundleIdentifier.unsafelyUnwrapped.replacing(".Share", with:"")
|
||||
private let pendingGIFsKey = "pendingGIFs"
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
title = "Save to GIF Collector"
|
||||
placeholder = "Add a note (optional)"
|
||||
|
||||
// Add debug button in development
|
||||
#if DEBUG
|
||||
let debugButton = UIBarButtonItem(
|
||||
title: "Debug", style: .plain, target: self, action: #selector(showDebugInfo))
|
||||
navigationItem.leftBarButtonItem = debugButton
|
||||
#endif
|
||||
|
||||
// Start processing the shared item
|
||||
processSharedItem()
|
||||
|
||||
addDebugMessage("ShareViewController loaded")
|
||||
}
|
||||
|
||||
override func isContentValid() -> Bool {
|
||||
// No validation needed for the text field, we just want the GIF
|
||||
return true
|
||||
}
|
||||
|
||||
override func didSelectPost() {
|
||||
// Show loading
|
||||
isProcessing = true
|
||||
navigationController?.navigationBar.isUserInteractionEnabled = false
|
||||
|
||||
// If we have a URL but no data, we need to download it
|
||||
if let receivedURL = receivedURL, gifData == nil {
|
||||
downloadGIF(from: receivedURL) { [weak self] data, error in
|
||||
guard let self = self else { return }
|
||||
|
||||
if let data = data {
|
||||
self.gifData = data
|
||||
self.saveGIF()
|
||||
} else {
|
||||
self.showError(
|
||||
message: "Could not download GIF: \(error?.localizedDescription ?? "Unknown error")")
|
||||
}
|
||||
}
|
||||
} else if let gifData = gifData {
|
||||
// We already have the data, save it directly
|
||||
saveGIF()
|
||||
} else {
|
||||
// No valid GIF was found
|
||||
showError(message: "No valid GIF found in the shared content")
|
||||
}
|
||||
}
|
||||
|
||||
override func didSelectCancel() {
|
||||
// User canceled, close the extension
|
||||
completeRequest()
|
||||
}
|
||||
|
||||
// MARK: - Private Methods
|
||||
|
||||
private func processSharedItem() {
|
||||
addDebugMessage("Starting to process shared item")
|
||||
|
||||
// Log extension context info
|
||||
if let context = extensionContext {
|
||||
addDebugMessage("Extension context exists")
|
||||
addDebugMessage("Input items count: \(context.inputItems.count)")
|
||||
} else {
|
||||
addDebugMessage("Extension context is nil")
|
||||
}
|
||||
|
||||
guard let extensionItem = extensionContext?.inputItems.first as? NSExtensionItem else {
|
||||
addDebugMessage("No extension item found")
|
||||
showError(message: "No shared content found")
|
||||
return
|
||||
}
|
||||
|
||||
guard let attachments = extensionItem.attachments else {
|
||||
addDebugMessage("No attachments found")
|
||||
showError(message: "No attachments found")
|
||||
return
|
||||
}
|
||||
|
||||
addDebugMessage("Found \(attachments.count) attachments")
|
||||
|
||||
// Process each attachment
|
||||
for attachment in attachments {
|
||||
// Log attachment types
|
||||
let typeIdentifiers = attachment.registeredTypeIdentifiers
|
||||
addDebugMessage("Attachment types: \(typeIdentifiers.joined(separator: ", "))")
|
||||
|
||||
// Check for URLs first (for web links to GIFs)
|
||||
if attachment.hasItemConformingToTypeIdentifier(UTType.url.identifier) {
|
||||
addDebugMessage("Processing URL type attachment")
|
||||
attachment.loadItem(forTypeIdentifier: UTType.url.identifier, options: nil) {
|
||||
[weak self] item, error in
|
||||
guard let self = self else { return }
|
||||
|
||||
if let url = item as? URL, url.absoluteString.lowercased().hasSuffix(".gif") {
|
||||
DispatchQueue.main.async {
|
||||
self.receivedURL = url
|
||||
self.originalURL = url.absoluteString
|
||||
self.updateUI()
|
||||
}
|
||||
} else if let url = item as? URL {
|
||||
// It's a URL but not directly to a GIF, might be a webpage containing a GIF
|
||||
DispatchQueue.main.async {
|
||||
self.originalURL = url.absoluteString
|
||||
self.receivedURL = url
|
||||
self.updateUI()
|
||||
self.addDebugMessage("URL processed: \(url.absoluteString)")
|
||||
}
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
// Check for GIF files
|
||||
if attachment.hasItemConformingToTypeIdentifier("com.compuserve.gif")
|
||||
|| attachment.hasItemConformingToTypeIdentifier("public.gif")
|
||||
{
|
||||
addDebugMessage("Processing GIF type attachment")
|
||||
attachment.loadItem(forTypeIdentifier: "com.compuserve.gif", options: nil) {
|
||||
[weak self] item, error in
|
||||
guard let self = self else { return }
|
||||
|
||||
if let url = item as? URL {
|
||||
DispatchQueue.main.async {
|
||||
self.receivedURL = url
|
||||
self.originalURL = url.absoluteString
|
||||
self.loadGIFData(from: url)
|
||||
self.updateUI()
|
||||
}
|
||||
} else if let data = item as? Data {
|
||||
DispatchQueue.main.async {
|
||||
self.gifData = data
|
||||
self.updateUI()
|
||||
}
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
// Check for images that might be GIFs
|
||||
if attachment.hasItemConformingToTypeIdentifier(UTType.image.identifier) {
|
||||
attachment.loadItem(forTypeIdentifier: UTType.image.identifier, options: nil) {
|
||||
[weak self] item, error in
|
||||
guard let self = self else { return }
|
||||
|
||||
if let url = item as? URL, url.pathExtension.lowercased() == "gif" {
|
||||
DispatchQueue.main.async {
|
||||
self.receivedURL = url
|
||||
self.originalURL = url.absoluteString
|
||||
self.loadGIFData(from: url)
|
||||
self.updateUI()
|
||||
}
|
||||
} else if let data = item as? Data, self.isGIFData(data) {
|
||||
DispatchQueue.main.async {
|
||||
self.gifData = data
|
||||
self.updateUI()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func updateUI() {
|
||||
// Enable the Post button if we have a URL or data
|
||||
navigationItem.rightBarButtonItem?.isEnabled = (receivedURL != nil || gifData != nil)
|
||||
|
||||
// Update content area
|
||||
if let url = receivedURL {
|
||||
let displayText = "GIF from: \(url.host ?? "URL")"
|
||||
if contentText.isEmpty {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func loadGIFData(from url: URL) {
|
||||
do {
|
||||
let data = try Data(contentsOf: url)
|
||||
if isGIFData(data) {
|
||||
gifData = data
|
||||
}
|
||||
} catch {
|
||||
print("Error loading GIF data: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
private func isGIFData(_ data: Data) -> Bool {
|
||||
// Simple check for GIF file signature: "GIF87a" or "GIF89a"
|
||||
guard data.count > 6 else { return false }
|
||||
|
||||
let header = data.prefix(6)
|
||||
let gif87a = Data([0x47, 0x49, 0x46, 0x38, 0x37, 0x61]) // "GIF87a"
|
||||
let gif89a = Data([0x47, 0x49, 0x46, 0x38, 0x39, 0x61]) // "GIF89a"
|
||||
|
||||
return header == gif87a || header == gif89a
|
||||
}
|
||||
|
||||
private func downloadGIF(from url: URL, completion: @escaping (Data?, Error?) -> Void) {
|
||||
URLSession.shared.dataTask(with: url) { data, response, error in
|
||||
DispatchQueue.main.async {
|
||||
if let data = data, self.isGIFData(data) {
|
||||
completion(data, nil)
|
||||
} else {
|
||||
completion(
|
||||
nil,
|
||||
error
|
||||
?? NSError(
|
||||
domain: "GIFShare", code: -1,
|
||||
userInfo: [NSLocalizedDescriptionKey: "Invalid GIF data"]))
|
||||
}
|
||||
}
|
||||
}.resume()
|
||||
}
|
||||
|
||||
private func saveGIF() {
|
||||
guard let gifData = gifData else {
|
||||
showError(message: "No GIF data to save")
|
||||
return
|
||||
}
|
||||
|
||||
addDebugMessage("Starting to save GIF, size: \(gifData.count) bytes")
|
||||
|
||||
// Save the GIF using the shared App Group container
|
||||
let userDefaults = UserDefaults(suiteName: appGroupID)
|
||||
let fileManager = FileManager.default
|
||||
|
||||
// IMPORTANT: Use the same path conventions as GIFFileManager
|
||||
guard
|
||||
let containerURL = fileManager.containerURL(forSecurityApplicationGroupIdentifier: appGroupID)
|
||||
else {
|
||||
showError(message: "Could not access shared container")
|
||||
return
|
||||
}
|
||||
|
||||
// Use the same folder name as in GIFFileManager
|
||||
let gifsFolder = containerURL.appendingPathComponent("SharedGIFs", isDirectory: true)
|
||||
|
||||
// Create GIFs directory if needed
|
||||
if !fileManager.fileExists(atPath: gifsFolder.path) {
|
||||
do {
|
||||
try fileManager.createDirectory(at: gifsFolder, withIntermediateDirectories: true)
|
||||
addDebugMessage("Created shared GIFs directory")
|
||||
} catch {
|
||||
showError(message: "Could not create GIFs directory: \(error.localizedDescription)")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Create a unique filename using the same pattern as GIFFileManager
|
||||
let urlHash = originalURL.hashValue
|
||||
let timestamp = Int(Date().timeIntervalSince1970)
|
||||
let filename = "gif_\(urlHash)_\(timestamp).gif"
|
||||
let fileURL = gifsFolder.appendingPathComponent(filename)
|
||||
|
||||
// Save the GIF file
|
||||
do {
|
||||
try gifData.write(to: fileURL)
|
||||
addDebugMessage("GIF saved to: \(fileURL.path)")
|
||||
|
||||
// Create a UUID that will be used consistently across the app
|
||||
let gifId = UUID()
|
||||
|
||||
// Store GIF entry in UserDefaults to notify main app
|
||||
let gifInfo: [String: Any] = [
|
||||
"localFilePath": fileURL.path,
|
||||
"originalURL": originalURL,
|
||||
"createdAt": Date().timeIntervalSince1970,
|
||||
"id": gifId.uuidString,
|
||||
]
|
||||
|
||||
// Add to pending GIFs list (using the same key as in GIFStorageService)
|
||||
var pendingGIFs = userDefaults?.array(forKey: pendingGIFsKey) as? [[String: Any]] ?? []
|
||||
pendingGIFs.append(gifInfo)
|
||||
userDefaults?.set(pendingGIFs, forKey: pendingGIFsKey)
|
||||
|
||||
// Force synchronize to ensure changes are visible immediately
|
||||
userDefaults?.synchronize()
|
||||
addDebugMessage("GIF info saved to UserDefaults")
|
||||
|
||||
// Success
|
||||
completeRequest()
|
||||
|
||||
} catch {
|
||||
showError(message: "Error saving GIF: \(error.localizedDescription)")
|
||||
}
|
||||
}
|
||||
|
||||
private func addDebugMessage(_ message: String) {
|
||||
let timestamp = DateFormatter.localizedString(
|
||||
from: Date(), dateStyle: .none, timeStyle: .medium)
|
||||
debugMessages.append("[\(timestamp)] \(message)")
|
||||
print("GIFCollector Debug: \(message)")
|
||||
}
|
||||
|
||||
@objc private func showDebugInfo() {
|
||||
let debugText = debugMessages.joined(separator: "\n\n")
|
||||
let alert = UIAlertController(
|
||||
title: "Debug Information", message: debugText, preferredStyle: .alert)
|
||||
alert.addAction(
|
||||
UIAlertAction(title: "Copy", style: .default) { _ in
|
||||
UIPasteboard.general.string = debugText
|
||||
})
|
||||
alert.addAction(UIAlertAction(title: "OK", style: .cancel))
|
||||
present(alert, animated: true)
|
||||
}
|
||||
|
||||
private func showError(message: String) {
|
||||
addDebugMessage("ERROR: \(message)")
|
||||
let alert = UIAlertController(title: "Error", message: message, preferredStyle: .alert)
|
||||
alert.addAction(
|
||||
UIAlertAction(title: "OK", style: .default) { [weak self] _ in
|
||||
self?.completeRequest()
|
||||
})
|
||||
|
||||
// Add debug info button
|
||||
#if DEBUG
|
||||
alert.addAction(
|
||||
UIAlertAction(title: "Debug Info", style: .default) { [weak self] _ in
|
||||
self?.showDebugInfo()
|
||||
})
|
||||
#endif
|
||||
|
||||
present(alert, animated: true)
|
||||
}
|
||||
|
||||
private func completeRequest() {
|
||||
addDebugMessage("Completing extension request")
|
||||
extensionContext?.completeRequest(returningItems: [], completionHandler: nil)
|
||||
}
|
||||
}
|
||||