diff --git a/Example/SwiftUI/ExampleSwiftUI.xcodeproj/project.pbxproj b/Example/SwiftUI/ExampleSwiftUI.xcodeproj/project.pbxproj new file mode 100644 index 000000000..5334407c2 --- /dev/null +++ b/Example/SwiftUI/ExampleSwiftUI.xcodeproj/project.pbxproj @@ -0,0 +1,410 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 0179F7272A0D40E8002BE91B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0179F7262A0D40E8002BE91B /* AppDelegate.swift */; }; + 0179F7342A0D49BE002BE91B /* ApptentiveKit in Frameworks */ = {isa = PBXBuildFile; productRef = 0179F7332A0D49BE002BE91B /* ApptentiveKit */; }; + 017EECD52A02E53700A4B113 /* ExampleSwiftUIApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017EECD42A02E53700A4B113 /* ExampleSwiftUIApp.swift */; }; + 017EECD72A02E53700A4B113 /* GalleryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017EECD62A02E53700A4B113 /* GalleryView.swift */; }; + 017EECD92A02E53800A4B113 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 017EECD82A02E53800A4B113 /* Assets.xcassets */; }; + 017EECDC2A02E53800A4B113 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 017EECDB2A02E53800A4B113 /* Preview Assets.xcassets */; }; + 017EECE32A02E71500A4B113 /* PhotoListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017EECE22A02E71500A4B113 /* PhotoListView.swift */; }; + 017EECE52A02E73D00A4B113 /* PhotoManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017EECE42A02E73D00A4B113 /* PhotoManager.swift */; }; + 017EECE72A02E74F00A4B113 /* Photos in Resources */ = {isa = PBXBuildFile; fileRef = 017EECE62A02E74F00A4B113 /* Photos */; }; + 017EECE92A02F15300A4B113 /* PhotoCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017EECE82A02F15300A4B113 /* PhotoCard.swift */; }; + 2EE549822F9A75AB0013FF63 /* ApptentiveKit in Frameworks */ = {isa = PBXBuildFile; productRef = 2EE549812F9A75AB0013FF63 /* ApptentiveKit */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0179F7262A0D40E8002BE91B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 017EECD12A02E53700A4B113 /* ExampleSwiftUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ExampleSwiftUI.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 017EECD42A02E53700A4B113 /* ExampleSwiftUIApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleSwiftUIApp.swift; sourceTree = ""; }; + 017EECD62A02E53700A4B113 /* GalleryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GalleryView.swift; sourceTree = ""; }; + 017EECD82A02E53800A4B113 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 017EECDB2A02E53800A4B113 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 017EECE22A02E71500A4B113 /* PhotoListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoListView.swift; sourceTree = ""; }; + 017EECE42A02E73D00A4B113 /* PhotoManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhotoManager.swift; sourceTree = ""; }; + 017EECE62A02E74F00A4B113 /* Photos */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Photos; sourceTree = ""; }; + 017EECE82A02F15300A4B113 /* PhotoCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoCard.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 017EECCE2A02E53700A4B113 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0179F7342A0D49BE002BE91B /* ApptentiveKit in Frameworks */, + 2EE549822F9A75AB0013FF63 /* ApptentiveKit in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0179F7322A0D49BE002BE91B /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + 017EECC82A02E53700A4B113 = { + isa = PBXGroup; + children = ( + 017EECD32A02E53700A4B113 /* ExampleSwiftUI */, + 017EECD22A02E53700A4B113 /* Products */, + 0179F7322A0D49BE002BE91B /* Frameworks */, + ); + sourceTree = ""; + }; + 017EECD22A02E53700A4B113 /* Products */ = { + isa = PBXGroup; + children = ( + 017EECD12A02E53700A4B113 /* ExampleSwiftUI.app */, + ); + name = Products; + sourceTree = ""; + }; + 017EECD32A02E53700A4B113 /* ExampleSwiftUI */ = { + isa = PBXGroup; + children = ( + 017EECE62A02E74F00A4B113 /* Photos */, + 017EECD42A02E53700A4B113 /* ExampleSwiftUIApp.swift */, + 017EECD62A02E53700A4B113 /* GalleryView.swift */, + 017EECE22A02E71500A4B113 /* PhotoListView.swift */, + 017EECE82A02F15300A4B113 /* PhotoCard.swift */, + 017EECE42A02E73D00A4B113 /* PhotoManager.swift */, + 0179F7262A0D40E8002BE91B /* AppDelegate.swift */, + 017EECD82A02E53800A4B113 /* Assets.xcassets */, + 017EECDA2A02E53800A4B113 /* Preview Content */, + ); + path = ExampleSwiftUI; + sourceTree = ""; + }; + 017EECDA2A02E53800A4B113 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 017EECDB2A02E53800A4B113 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 017EECD02A02E53700A4B113 /* ExampleSwiftUI */ = { + isa = PBXNativeTarget; + buildConfigurationList = 017EECDF2A02E53800A4B113 /* Build configuration list for PBXNativeTarget "ExampleSwiftUI" */; + buildPhases = ( + 017EECCD2A02E53700A4B113 /* Sources */, + 017EECCE2A02E53700A4B113 /* Frameworks */, + 017EECCF2A02E53700A4B113 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ExampleSwiftUI; + packageProductDependencies = ( + 0179F7332A0D49BE002BE91B /* ApptentiveKit */, + 2EE549812F9A75AB0013FF63 /* ApptentiveKit */, + ); + productName = ExampleSwiftUI; + productReference = 017EECD12A02E53700A4B113 /* ExampleSwiftUI.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 017EECC92A02E53700A4B113 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1430; + LastUpgradeCheck = 1430; + TargetAttributes = { + 017EECD02A02E53700A4B113 = { + CreatedOnToolsVersion = 14.3; + }; + }; + }; + buildConfigurationList = 017EECCC2A02E53700A4B113 /* Build configuration list for PBXProject "ExampleSwiftUI" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 017EECC82A02E53700A4B113; + packageReferences = ( + 2EE549802F9A75AB0013FF63 /* XCRemoteSwiftPackageReference "apptentive-kit-ios" */, + ); + productRefGroup = 017EECD22A02E53700A4B113 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 017EECD02A02E53700A4B113 /* ExampleSwiftUI */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 017EECCF2A02E53700A4B113 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 017EECE72A02E74F00A4B113 /* Photos in Resources */, + 017EECDC2A02E53800A4B113 /* Preview Assets.xcassets in Resources */, + 017EECD92A02E53800A4B113 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 017EECCD2A02E53700A4B113 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0179F7272A0D40E8002BE91B /* AppDelegate.swift in Sources */, + 017EECD72A02E53700A4B113 /* GalleryView.swift in Sources */, + 017EECD52A02E53700A4B113 /* ExampleSwiftUIApp.swift in Sources */, + 017EECE92A02F15300A4B113 /* PhotoCard.swift in Sources */, + 017EECE52A02E73D00A4B113 /* PhotoManager.swift in Sources */, + 017EECE32A02E71500A4B113 /* PhotoListView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 017EECDD2A02E53800A4B113 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 017EECDE2A02E53800A4B113 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 017EECE02A02E53800A4B113 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"ExampleSwiftUI/Preview Content\""; + DEVELOPMENT_TEAM = ""; + 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 = 17.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.apptentive.ExampleSwiftUI; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 017EECE12A02E53800A4B113 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"ExampleSwiftUI/Preview Content\""; + DEVELOPMENT_TEAM = ""; + 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 = 17.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.apptentive.ExampleSwiftUI; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 017EECCC2A02E53700A4B113 /* Build configuration list for PBXProject "ExampleSwiftUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 017EECDD2A02E53800A4B113 /* Debug */, + 017EECDE2A02E53800A4B113 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 017EECDF2A02E53800A4B113 /* Build configuration list for PBXNativeTarget "ExampleSwiftUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 017EECE02A02E53800A4B113 /* Debug */, + 017EECE12A02E53800A4B113 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 2EE549802F9A75AB0013FF63 /* XCRemoteSwiftPackageReference "apptentive-kit-ios" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/apptentive/apptentive-kit-ios"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 6.0.1; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 0179F7332A0D49BE002BE91B /* ApptentiveKit */ = { + isa = XCSwiftPackageProductDependency; + productName = ApptentiveKit; + }; + 2EE549812F9A75AB0013FF63 /* ApptentiveKit */ = { + isa = XCSwiftPackageProductDependency; + package = 2EE549802F9A75AB0013FF63 /* XCRemoteSwiftPackageReference "apptentive-kit-ios" */; + productName = ApptentiveKit; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 017EECC92A02E53700A4B113 /* Project object */; +} diff --git a/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/SwiftUI/ExampleSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Example/SwiftUI/ExampleSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/SwiftUI/ExampleSwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Example/SwiftUI/ExampleSwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Example/SwiftUI/ExampleSwiftUI/AppDelegate.swift b/Example/SwiftUI/ExampleSwiftUI/AppDelegate.swift new file mode 100644 index 000000000..8125ef28e --- /dev/null +++ b/Example/SwiftUI/ExampleSwiftUI/AppDelegate.swift @@ -0,0 +1,18 @@ +// +// AppDelegate.swift +// ExampleSwiftUI +// +// Created by Frank Schmitt on 5/11/23. +// + +import UIKit +import ApptentiveKit + +class AppDelegate: NSObject, UIApplicationDelegate { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { + + Apptentive.shared.register(with: .init(key: "<#Your Apptentive App Key#>", signature: "<#Your Apptentive App Signature#>")) + + return true + } +} diff --git a/Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json b/Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..eb8789700 --- /dev/null +++ b/Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..13613e3ee --- /dev/null +++ b/Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/Example/Assets.xcassets/Contents.json b/Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/Contents.json similarity index 100% rename from Example/Example/Assets.xcassets/Contents.json rename to Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/Contents.json diff --git a/Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/Placeholder.imageset/Contents.json b/Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/Placeholder.imageset/Contents.json new file mode 100644 index 000000000..3ed2d694f --- /dev/null +++ b/Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/Placeholder.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "P1040311.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/Example/Photos/P1040311.jpg b/Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/Placeholder.imageset/P1040311.jpg similarity index 100% rename from Example/Example/Photos/P1040311.jpg rename to Example/SwiftUI/ExampleSwiftUI/Assets.xcassets/Placeholder.imageset/P1040311.jpg diff --git a/Example/SwiftUI/ExampleSwiftUI/ExampleSwiftUIApp.swift b/Example/SwiftUI/ExampleSwiftUI/ExampleSwiftUIApp.swift new file mode 100644 index 000000000..d1df0e359 --- /dev/null +++ b/Example/SwiftUI/ExampleSwiftUI/ExampleSwiftUIApp.swift @@ -0,0 +1,28 @@ +// +// ExampleSwiftUIApp.swift +// ExampleSwiftUI +// +// Created by Frank Schmitt on 5/3/23. +// + +import SwiftUI +import ApptentiveKit + +@main +struct ExampleSwiftUIApp: App { + @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate + + @State private var photoManager = PhotoManager.shared + + var body: some Scene { + WindowGroup { + GalleryView() + .environment(photoManager) + .tint(.red) + } + } + + init() { + PhotoManager.shared.load() + } +} diff --git a/Example/SwiftUI/ExampleSwiftUI/GalleryView.swift b/Example/SwiftUI/ExampleSwiftUI/GalleryView.swift new file mode 100644 index 000000000..97b06a25f --- /dev/null +++ b/Example/SwiftUI/ExampleSwiftUI/GalleryView.swift @@ -0,0 +1,55 @@ +// +// ContentView.swift +// ExampleSwiftUI +// +// Created by Frank Schmitt on 5/3/23. +// + +import SwiftUI +import ApptentiveKit + +struct GalleryView: View { + @Environment(PhotoManager.self) private var photoManager + @State private var selectedTabIndex = 0 + + var body: some View { + TabView(selection: $selectedTabIndex) { + NavigationStack() { + PhotoListView(photoList: photoManager.allItems) + .navigationTitle("Photos") + } + .tabItem { + Label("Photos", systemImage: "photo") + } + .tag(1) + + NavigationStack() { + PhotoListView(photoList: photoManager.favoriteItems) + .navigationTitle("Favorites") + } + .tabItem { + Label("Favorites", systemImage: "heart") + } + .tag(2) + }.onChange(of: selectedTabIndex) { _, newValue in + if newValue == 2 { + Apptentive.shared.engage(event: "favorite_photos") + } else { + Apptentive.shared.engage(event: "all_photos") + } + } + } +} + +#Preview { + let photoManager = { + let result = PhotoManager() + + result.load() + + return result + }() + + GalleryView() + .environment(photoManager) +} diff --git a/Example/SwiftUI/ExampleSwiftUI/PhotoCard.swift b/Example/SwiftUI/ExampleSwiftUI/PhotoCard.swift new file mode 100644 index 000000000..7fb348534 --- /dev/null +++ b/Example/SwiftUI/ExampleSwiftUI/PhotoCard.swift @@ -0,0 +1,51 @@ +// +// PhotoCard.swift +// ExampleSwiftUI +// +// Created by Frank Schmitt on 5/3/23. +// + +import SwiftUI +import ApptentiveKit + +struct PhotoCard: View { + @Binding var isFavorite: Bool + let image: UIImage + + var body: some View { + ZStack(alignment: .bottomTrailing) { + Image(uiImage: self.image) + .resizable() + .aspectRatio(contentMode: .fill) + .containerRelativeFrame( + .horizontal + ) { length, axis in + if axis == .vertical { + return length + } else { + return length / 1.1 + } + } + .clipShape(RoundedRectangle(cornerRadius: 20, style: .continuous)) + + Button(action: { + self.isFavorite.toggle() + Apptentive.shared.engage(event: "toggle_favorite") + }) { + if self.isFavorite { + Image(systemName: "heart.fill") + } else { + Image(systemName: "heart") + } + } + .padding(8) + .background(.thinMaterial, in: Circle()) + .padding() + } + .aspectRatio(1, contentMode: .fit) + } +} + +#Preview { + PhotoCard(isFavorite: .constant(false), image: UIImage(named: "Placeholder")!) +} diff --git a/Example/SwiftUI/ExampleSwiftUI/PhotoListView.swift b/Example/SwiftUI/ExampleSwiftUI/PhotoListView.swift new file mode 100644 index 000000000..e5902666b --- /dev/null +++ b/Example/SwiftUI/ExampleSwiftUI/PhotoListView.swift @@ -0,0 +1,50 @@ +// +// PhotoListView.swift +// ExampleSwiftUI +// +// Created by Frank Schmitt on 5/3/23. +// + +import SwiftUI + +struct PhotoListView: View { + @Environment(PhotoManager.self) private var photoManager + var photoList: [PhotoManager.Photo] + + var body: some View { + if photoList.isEmpty { + ContentUnavailableView("No Photos", systemImage: "photo.on.rectangle.angled") + } else { + ScrollView { + LazyVGrid(columns: [GridItem(.flexible())], spacing: 16) { + ForEach(self.photoList) { photo in + PhotoCard( + isFavorite: + Binding( + get: { photo.isFavorite }, + set: { photoManager.setFavorite($0, for: photo.tag) } + ), + image: photo.image + ) + + } + } + .animation(.default, value: photoList) + } + } + } +} + +#Preview("No Photos") { + PhotoListView(photoList: []) + .environment(PhotoManager()) +} + +#Preview("With Photos") { @MainActor in + let photoManager = PhotoManager() + photoManager.load() + + return PhotoListView(photoList: photoManager.allItems) + .environment(photoManager) +} + diff --git a/Example/SwiftUI/ExampleSwiftUI/PhotoManager.swift b/Example/SwiftUI/ExampleSwiftUI/PhotoManager.swift new file mode 100644 index 000000000..804f32548 --- /dev/null +++ b/Example/SwiftUI/ExampleSwiftUI/PhotoManager.swift @@ -0,0 +1,57 @@ +// +// PhotoManager.swift +// Example +// +// Created by Frank Schmitt on 6/24/21. +// + +import UIKit +import Observation + +@Observable +@MainActor +class PhotoManager { + struct Photo: Hashable, Identifiable { + var id: Int { tag } + let image: UIImage + let tag: Int + var isFavorite: Bool + } + + @ObservationIgnored private let imageURLs: [URL] + @ObservationIgnored private var images = [UIImage]() + + private static let userDefaultsKey = "FavoritePhotos" + + static let shared = PhotoManager() + + var allItems = [Photo]() { + didSet { + self.favoriteItems = self.allItems.filter { $0.isFavorite } + UserDefaults.standard.set(self.favoriteItems.map { $0.tag }, forKey: Self.userDefaultsKey) + } + } + + var favoriteItems = [Photo]() + + init() { + self.imageURLs = Bundle.main.urls(forResourcesWithExtension: "jpg", subdirectory: "Photos") ?? [] + } + + func load() { + self.images = self.imageURLs.compactMap { url in + UIImage(contentsOfFile: url.path) + } + + let defaultFavorites = Set(UserDefaults.standard.array(forKey: Self.userDefaultsKey) as? [Int] ?? []) + + self.allItems = self.images.enumerated().map { (index, image) in + return Photo(image: image, tag: index, isFavorite: defaultFavorites.contains(index)) + } + } + + func setFavorite(_ isFavorite: Bool, for tag: Int) { + self.allItems[tag].isFavorite = isFavorite + } +} + diff --git a/Example/SwiftUI/ExampleSwiftUI/Photos/P1040311.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/P1040311.jpg new file mode 100644 index 000000000..61d0c4d7b Binary files /dev/null and b/Example/SwiftUI/ExampleSwiftUI/Photos/P1040311.jpg differ diff --git a/Example/Example/Photos/RpgvvtYAQeqAIs1knERU_vegetables.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/RpgvvtYAQeqAIs1knERU_vegetables.jpg similarity index 100% rename from Example/Example/Photos/RpgvvtYAQeqAIs1knERU_vegetables.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/RpgvvtYAQeqAIs1knERU_vegetables.jpg diff --git a/Example/Example/Photos/Y1hediOeRoya666XCjYg_forest.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/Y1hediOeRoya666XCjYg_forest.jpg similarity index 100% rename from Example/Example/Photos/Y1hediOeRoya666XCjYg_forest.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/Y1hediOeRoya666XCjYg_forest.jpg diff --git a/Example/Example/Photos/ad50c1f0.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/ad50c1f0.jpg similarity index 100% rename from Example/Example/Photos/ad50c1f0.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/ad50c1f0.jpg diff --git a/Example/Example/Photos/bnW1TuTV2YGcoh1HyWNQ_IMG_0207.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/bnW1TuTV2YGcoh1HyWNQ_IMG_0207.jpg similarity index 100% rename from Example/Example/Photos/bnW1TuTV2YGcoh1HyWNQ_IMG_0207.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/bnW1TuTV2YGcoh1HyWNQ_IMG_0207.jpg diff --git a/Example/Example/Photos/lynDyjGSR9eR57ouPIEE_IMG_woods.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/lynDyjGSR9eR57ouPIEE_IMG_woods.jpg similarity index 100% rename from Example/Example/Photos/lynDyjGSR9eR57ouPIEE_IMG_woods.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/lynDyjGSR9eR57ouPIEE_IMG_woods.jpg diff --git a/Example/Example/Photos/oMRKkMc4RSq7N91OZl0O_IMG_8309.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/oMRKkMc4RSq7N91OZl0O_IMG_8309.jpg similarity index 100% rename from Example/Example/Photos/oMRKkMc4RSq7N91OZl0O_IMG_8309.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/oMRKkMc4RSq7N91OZl0O_IMG_8309.jpg diff --git a/Example/Example/Photos/peak.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/peak.jpg similarity index 100% rename from Example/Example/Photos/peak.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/peak.jpg diff --git a/Example/Example/Photos/photo-1413752567787-baa02dde3c65.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1413752567787-baa02dde3c65.jpg similarity index 100% rename from Example/Example/Photos/photo-1413752567787-baa02dde3c65.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1413752567787-baa02dde3c65.jpg diff --git a/Example/Example/Photos/photo-1416949929422-a1d9c8fe84af.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1416949929422-a1d9c8fe84af.jpg similarity index 100% rename from Example/Example/Photos/photo-1416949929422-a1d9c8fe84af.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1416949929422-a1d9c8fe84af.jpg diff --git a/Example/Example/Photos/photo-1418225043143-90858d2301b4.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1418225043143-90858d2301b4.jpg similarity index 100% rename from Example/Example/Photos/photo-1418225043143-90858d2301b4.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1418225043143-90858d2301b4.jpg diff --git a/Example/Example/Photos/photo-1420730614543-e39f93134b0d.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1420730614543-e39f93134b0d.jpg similarity index 100% rename from Example/Example/Photos/photo-1420730614543-e39f93134b0d.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1420730614543-e39f93134b0d.jpg diff --git a/Example/Example/Photos/photo-1422207199074-a7cbd3fd1ae5.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1422207199074-a7cbd3fd1ae5.jpg similarity index 100% rename from Example/Example/Photos/photo-1422207199074-a7cbd3fd1ae5.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1422207199074-a7cbd3fd1ae5.jpg diff --git a/Example/Example/Photos/photo-1422255198496-21531f12a6e8.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1422255198496-21531f12a6e8.jpg similarity index 100% rename from Example/Example/Photos/photo-1422255198496-21531f12a6e8.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1422255198496-21531f12a6e8.jpg diff --git a/Example/Example/Photos/photo-1423483641154-5411ec9c0ddf.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1423483641154-5411ec9c0ddf.jpg similarity index 100% rename from Example/Example/Photos/photo-1423483641154-5411ec9c0ddf.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1423483641154-5411ec9c0ddf.jpg diff --git a/Example/Example/Photos/photo-1424847651672-bf20a4b0982b.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1424847651672-bf20a4b0982b.jpg similarity index 100% rename from Example/Example/Photos/photo-1424847651672-bf20a4b0982b.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1424847651672-bf20a4b0982b.jpg diff --git a/Example/Example/Photos/photo-1426170042593-200f250dfdaf.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1426170042593-200f250dfdaf.jpg similarity index 100% rename from Example/Example/Photos/photo-1426170042593-200f250dfdaf.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1426170042593-200f250dfdaf.jpg diff --git a/Example/Example/Photos/photo-1426869884541-df7117556757.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1426869884541-df7117556757.jpg similarity index 100% rename from Example/Example/Photos/photo-1426869884541-df7117556757.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1426869884541-df7117556757.jpg diff --git a/Example/Example/Photos/photo-1428509774491-cfac96e12253.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1428509774491-cfac96e12253.jpg similarity index 100% rename from Example/Example/Photos/photo-1428509774491-cfac96e12253.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1428509774491-cfac96e12253.jpg diff --git a/Example/Example/Photos/photo-1429012178110-d7a734a56176.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1429012178110-d7a734a56176.jpg similarity index 100% rename from Example/Example/Photos/photo-1429012178110-d7a734a56176.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1429012178110-d7a734a56176.jpg diff --git a/Example/Example/Photos/photo-1429516387459-9891b7b96c78.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1429516387459-9891b7b96c78.jpg similarity index 100% rename from Example/Example/Photos/photo-1429516387459-9891b7b96c78.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1429516387459-9891b7b96c78.jpg diff --git a/Example/Example/Photos/photo-1430163393927-3dab9af7ea38.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1430163393927-3dab9af7ea38.jpg similarity index 100% rename from Example/Example/Photos/photo-1430163393927-3dab9af7ea38.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1430163393927-3dab9af7ea38.jpg diff --git a/Example/Example/Photos/photo-1430769860170-bea225f02277.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1430769860170-bea225f02277.jpg similarity index 100% rename from Example/Example/Photos/photo-1430769860170-bea225f02277.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1430769860170-bea225f02277.jpg diff --git a/Example/Example/Photos/photo-1431794015670-1761ebb156ba.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1431794015670-1761ebb156ba.jpg similarity index 100% rename from Example/Example/Photos/photo-1431794015670-1761ebb156ba.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1431794015670-1761ebb156ba.jpg diff --git a/Example/Example/Photos/photo-1431794062232-2a99a5431c6c.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1431794062232-2a99a5431c6c.jpg similarity index 100% rename from Example/Example/Photos/photo-1431794062232-2a99a5431c6c.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1431794062232-2a99a5431c6c.jpg diff --git a/Example/Example/Photos/photo-1433967158952-3ed126074305.jpg b/Example/SwiftUI/ExampleSwiftUI/Photos/photo-1433967158952-3ed126074305.jpg similarity index 100% rename from Example/Example/Photos/photo-1433967158952-3ed126074305.jpg rename to Example/SwiftUI/ExampleSwiftUI/Photos/photo-1433967158952-3ed126074305.jpg diff --git a/Example/SwiftUI/ExampleSwiftUI/Preview Content/Preview Assets.xcassets/Contents.json b/Example/SwiftUI/ExampleSwiftUI/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/Example/SwiftUI/ExampleSwiftUI/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/SwiftUI/LICENSE b/Example/SwiftUI/LICENSE new file mode 100644 index 000000000..596fe580f --- /dev/null +++ b/Example/SwiftUI/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Apptentive, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Example/SwiftUI/README.md b/Example/SwiftUI/README.md new file mode 100644 index 000000000..68ce482f7 --- /dev/null +++ b/Example/SwiftUI/README.md @@ -0,0 +1,2 @@ +# ExampleSwiftUI +Example of Integrating ApptentiveKit into a SwiftUI App diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/UIKit/Example.xcodeproj/project.pbxproj similarity index 96% rename from Example/Example.xcodeproj/project.pbxproj rename to Example/UIKit/Example.xcodeproj/project.pbxproj index e00f6bf26..a2aab736d 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/UIKit/Example.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -42,6 +42,7 @@ 01B12C4A268D135D00C1F3F5 /* photo-1424847651672-bf20a4b0982b.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 01B12C30268D135C00C1F3F5 /* photo-1424847651672-bf20a4b0982b.jpg */; }; 01B12C4B268D135D00C1F3F5 /* photo-1433967158952-3ed126074305.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 01B12C31268D135C00C1F3F5 /* photo-1433967158952-3ed126074305.jpg */; }; 01B12C4C268D135D00C1F3F5 /* bnW1TuTV2YGcoh1HyWNQ_IMG_0207.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 01B12C32268D135C00C1F3F5 /* bnW1TuTV2YGcoh1HyWNQ_IMG_0207.jpg */; }; + 2EE58CC62FA212970013FF63 /* ApptentiveKit in Frameworks */ = {isa = PBXBuildFile; productRef = 2EE58CC52FA212970013FF63 /* ApptentiveKit */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -90,6 +91,7 @@ buildActionMask = 2147483647; files = ( 0181451A268CE586003F6B1F /* ApptentiveKit in Frameworks */, + 2EE58CC62FA212970013FF63 /* ApptentiveKit in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -189,6 +191,7 @@ name = Example; packageProductDependencies = ( 01814519268CE586003F6B1F /* ApptentiveKit */, + 2EE58CC52FA212970013FF63 /* ApptentiveKit */, ); productName = Example; productReference = 017BAB0B2683DD4F0035DA1E /* Example.app */; @@ -217,6 +220,9 @@ Base, ); mainGroup = 017BAB022683DD4F0035DA1E; + packageReferences = ( + 2EE58CC42FA212970013FF63 /* XCRemoteSwiftPackageReference "apptentive-kit-ios" */, + ); productRefGroup = 017BAB0C2683DD4F0035DA1E /* Products */; projectDirPath = ""; projectRoot = ""; @@ -477,11 +483,27 @@ }; /* End XCConfigurationList section */ +/* Begin XCRemoteSwiftPackageReference section */ + 2EE58CC42FA212970013FF63 /* XCRemoteSwiftPackageReference "apptentive-kit-ios" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/apptentive/apptentive-kit-ios"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 6.0.1; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + /* Begin XCSwiftPackageProductDependency section */ 01814519268CE586003F6B1F /* ApptentiveKit */ = { isa = XCSwiftPackageProductDependency; productName = ApptentiveKit; }; + 2EE58CC52FA212970013FF63 /* ApptentiveKit */ = { + isa = XCSwiftPackageProductDependency; + package = 2EE58CC42FA212970013FF63 /* XCRemoteSwiftPackageReference "apptentive-kit-ios" */; + productName = ApptentiveKit; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 017BAB032683DD4F0035DA1E /* Project object */; diff --git a/Example/UIKit/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/UIKit/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/Example/UIKit/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/UIKit/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/UIKit/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/Example/UIKit/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/Example/AppDelegate.swift b/Example/UIKit/Example/AppDelegate.swift similarity index 100% rename from Example/Example/AppDelegate.swift rename to Example/UIKit/Example/AppDelegate.swift diff --git a/Example/Example/Assets.xcassets/AccentColor.colorset/Contents.json b/Example/UIKit/Example/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from Example/Example/Assets.xcassets/AccentColor.colorset/Contents.json rename to Example/UIKit/Example/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/UIKit/Example/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Example/UIKit/Example/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Example/Example/Assets.xcassets/AppIcon.appiconset/Icon-1024.png b/Example/UIKit/Example/Assets.xcassets/AppIcon.appiconset/Icon-1024.png similarity index 100% rename from Example/Example/Assets.xcassets/AppIcon.appiconset/Icon-1024.png rename to Example/UIKit/Example/Assets.xcassets/AppIcon.appiconset/Icon-1024.png diff --git a/Example/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/Example/UIKit/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png similarity index 100% rename from Example/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png rename to Example/UIKit/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png diff --git a/Example/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png b/Example/UIKit/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png similarity index 100% rename from Example/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png rename to Example/UIKit/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png diff --git a/Example/Example/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png b/Example/UIKit/Example/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png similarity index 100% rename from Example/Example/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png rename to Example/UIKit/Example/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png diff --git a/Example/Example/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/Example/UIKit/Example/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png similarity index 100% rename from Example/Example/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png rename to Example/UIKit/Example/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png diff --git a/Example/UIKit/Example/Assets.xcassets/Contents.json b/Example/UIKit/Example/Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/Example/UIKit/Example/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/Example/Assets.xcassets/LaunchLogo.imageset/Contents.json b/Example/UIKit/Example/Assets.xcassets/LaunchLogo.imageset/Contents.json similarity index 100% rename from Example/Example/Assets.xcassets/LaunchLogo.imageset/Contents.json rename to Example/UIKit/Example/Assets.xcassets/LaunchLogo.imageset/Contents.json diff --git a/Example/Example/Assets.xcassets/LaunchLogo.imageset/LaunchLogo@2x.png b/Example/UIKit/Example/Assets.xcassets/LaunchLogo.imageset/LaunchLogo@2x.png similarity index 100% rename from Example/Example/Assets.xcassets/LaunchLogo.imageset/LaunchLogo@2x.png rename to Example/UIKit/Example/Assets.xcassets/LaunchLogo.imageset/LaunchLogo@2x.png diff --git a/Example/Example/Assets.xcassets/LaunchLogo.imageset/LaunchLogo@3x.png b/Example/UIKit/Example/Assets.xcassets/LaunchLogo.imageset/LaunchLogo@3x.png similarity index 100% rename from Example/Example/Assets.xcassets/LaunchLogo.imageset/LaunchLogo@3x.png rename to Example/UIKit/Example/Assets.xcassets/LaunchLogo.imageset/LaunchLogo@3x.png diff --git a/Example/Example/Base.lproj/LaunchScreen.storyboard b/Example/UIKit/Example/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from Example/Example/Base.lproj/LaunchScreen.storyboard rename to Example/UIKit/Example/Base.lproj/LaunchScreen.storyboard diff --git a/Example/Example/Base.lproj/Main.storyboard b/Example/UIKit/Example/Base.lproj/Main.storyboard similarity index 100% rename from Example/Example/Base.lproj/Main.storyboard rename to Example/UIKit/Example/Base.lproj/Main.storyboard diff --git a/Example/Example/Info.plist b/Example/UIKit/Example/Info.plist similarity index 100% rename from Example/Example/Info.plist rename to Example/UIKit/Example/Info.plist diff --git a/Example/Example/PhotoCell.swift b/Example/UIKit/Example/PhotoCell.swift similarity index 100% rename from Example/Example/PhotoCell.swift rename to Example/UIKit/Example/PhotoCell.swift diff --git a/Example/Example/PhotoManager.swift b/Example/UIKit/Example/PhotoManager.swift similarity index 100% rename from Example/Example/PhotoManager.swift rename to Example/UIKit/Example/PhotoManager.swift diff --git a/Example/UIKit/Example/Photos/P1040311.jpg b/Example/UIKit/Example/Photos/P1040311.jpg new file mode 100644 index 000000000..61d0c4d7b Binary files /dev/null and b/Example/UIKit/Example/Photos/P1040311.jpg differ diff --git a/Example/UIKit/Example/Photos/RpgvvtYAQeqAIs1knERU_vegetables.jpg b/Example/UIKit/Example/Photos/RpgvvtYAQeqAIs1knERU_vegetables.jpg new file mode 100755 index 000000000..fc8232857 Binary files /dev/null and b/Example/UIKit/Example/Photos/RpgvvtYAQeqAIs1knERU_vegetables.jpg differ diff --git a/Example/UIKit/Example/Photos/Y1hediOeRoya666XCjYg_forest.jpg b/Example/UIKit/Example/Photos/Y1hediOeRoya666XCjYg_forest.jpg new file mode 100755 index 000000000..090239f8f Binary files /dev/null and b/Example/UIKit/Example/Photos/Y1hediOeRoya666XCjYg_forest.jpg differ diff --git a/Example/UIKit/Example/Photos/ad50c1f0.jpg b/Example/UIKit/Example/Photos/ad50c1f0.jpg new file mode 100755 index 000000000..8b6548630 Binary files /dev/null and b/Example/UIKit/Example/Photos/ad50c1f0.jpg differ diff --git a/Example/UIKit/Example/Photos/bnW1TuTV2YGcoh1HyWNQ_IMG_0207.jpg b/Example/UIKit/Example/Photos/bnW1TuTV2YGcoh1HyWNQ_IMG_0207.jpg new file mode 100755 index 000000000..f681f96af Binary files /dev/null and b/Example/UIKit/Example/Photos/bnW1TuTV2YGcoh1HyWNQ_IMG_0207.jpg differ diff --git a/Example/UIKit/Example/Photos/lynDyjGSR9eR57ouPIEE_IMG_woods.jpg b/Example/UIKit/Example/Photos/lynDyjGSR9eR57ouPIEE_IMG_woods.jpg new file mode 100755 index 000000000..462513132 Binary files /dev/null and b/Example/UIKit/Example/Photos/lynDyjGSR9eR57ouPIEE_IMG_woods.jpg differ diff --git a/Example/UIKit/Example/Photos/oMRKkMc4RSq7N91OZl0O_IMG_8309.jpg b/Example/UIKit/Example/Photos/oMRKkMc4RSq7N91OZl0O_IMG_8309.jpg new file mode 100755 index 000000000..a97d481e6 Binary files /dev/null and b/Example/UIKit/Example/Photos/oMRKkMc4RSq7N91OZl0O_IMG_8309.jpg differ diff --git a/Example/UIKit/Example/Photos/peak.jpg b/Example/UIKit/Example/Photos/peak.jpg new file mode 100755 index 000000000..3101dc13c Binary files /dev/null and b/Example/UIKit/Example/Photos/peak.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1413752567787-baa02dde3c65.jpg b/Example/UIKit/Example/Photos/photo-1413752567787-baa02dde3c65.jpg new file mode 100755 index 000000000..5884e142d Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1413752567787-baa02dde3c65.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1416949929422-a1d9c8fe84af.jpg b/Example/UIKit/Example/Photos/photo-1416949929422-a1d9c8fe84af.jpg new file mode 100755 index 000000000..2bf7a8552 Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1416949929422-a1d9c8fe84af.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1418225043143-90858d2301b4.jpg b/Example/UIKit/Example/Photos/photo-1418225043143-90858d2301b4.jpg new file mode 100755 index 000000000..69e9e8566 Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1418225043143-90858d2301b4.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1420730614543-e39f93134b0d.jpg b/Example/UIKit/Example/Photos/photo-1420730614543-e39f93134b0d.jpg new file mode 100755 index 000000000..7273b9bae Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1420730614543-e39f93134b0d.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1422207199074-a7cbd3fd1ae5.jpg b/Example/UIKit/Example/Photos/photo-1422207199074-a7cbd3fd1ae5.jpg new file mode 100755 index 000000000..bedc13028 Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1422207199074-a7cbd3fd1ae5.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1422255198496-21531f12a6e8.jpg b/Example/UIKit/Example/Photos/photo-1422255198496-21531f12a6e8.jpg new file mode 100755 index 000000000..e0b83678a Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1422255198496-21531f12a6e8.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1423483641154-5411ec9c0ddf.jpg b/Example/UIKit/Example/Photos/photo-1423483641154-5411ec9c0ddf.jpg new file mode 100755 index 000000000..d33be409e Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1423483641154-5411ec9c0ddf.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1424847651672-bf20a4b0982b.jpg b/Example/UIKit/Example/Photos/photo-1424847651672-bf20a4b0982b.jpg new file mode 100755 index 000000000..8079c3943 Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1424847651672-bf20a4b0982b.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1426170042593-200f250dfdaf.jpg b/Example/UIKit/Example/Photos/photo-1426170042593-200f250dfdaf.jpg new file mode 100755 index 000000000..439eafc66 Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1426170042593-200f250dfdaf.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1426869884541-df7117556757.jpg b/Example/UIKit/Example/Photos/photo-1426869884541-df7117556757.jpg new file mode 100755 index 000000000..b0d9ff1ed Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1426869884541-df7117556757.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1428509774491-cfac96e12253.jpg b/Example/UIKit/Example/Photos/photo-1428509774491-cfac96e12253.jpg new file mode 100755 index 000000000..acee20f71 Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1428509774491-cfac96e12253.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1429012178110-d7a734a56176.jpg b/Example/UIKit/Example/Photos/photo-1429012178110-d7a734a56176.jpg new file mode 100755 index 000000000..8cc71a00b Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1429012178110-d7a734a56176.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1429516387459-9891b7b96c78.jpg b/Example/UIKit/Example/Photos/photo-1429516387459-9891b7b96c78.jpg new file mode 100755 index 000000000..312747d1d Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1429516387459-9891b7b96c78.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1430163393927-3dab9af7ea38.jpg b/Example/UIKit/Example/Photos/photo-1430163393927-3dab9af7ea38.jpg new file mode 100755 index 000000000..c9de1d6e8 Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1430163393927-3dab9af7ea38.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1430769860170-bea225f02277.jpg b/Example/UIKit/Example/Photos/photo-1430769860170-bea225f02277.jpg new file mode 100755 index 000000000..1c9d639ac Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1430769860170-bea225f02277.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1431794015670-1761ebb156ba.jpg b/Example/UIKit/Example/Photos/photo-1431794015670-1761ebb156ba.jpg new file mode 100755 index 000000000..68df7dd91 Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1431794015670-1761ebb156ba.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1431794062232-2a99a5431c6c.jpg b/Example/UIKit/Example/Photos/photo-1431794062232-2a99a5431c6c.jpg new file mode 100755 index 000000000..01c7d6d77 Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1431794062232-2a99a5431c6c.jpg differ diff --git a/Example/UIKit/Example/Photos/photo-1433967158952-3ed126074305.jpg b/Example/UIKit/Example/Photos/photo-1433967158952-3ed126074305.jpg new file mode 100755 index 000000000..22dbf88ea Binary files /dev/null and b/Example/UIKit/Example/Photos/photo-1433967158952-3ed126074305.jpg differ diff --git a/Example/Example/PhotosViewController.swift b/Example/UIKit/Example/PhotosViewController.swift similarity index 100% rename from Example/Example/PhotosViewController.swift rename to Example/UIKit/Example/PhotosViewController.swift diff --git a/Example/Example/SceneDelegate.swift b/Example/UIKit/Example/SceneDelegate.swift similarity index 100% rename from Example/Example/SceneDelegate.swift rename to Example/UIKit/Example/SceneDelegate.swift diff --git a/Example/README.md b/Example/UIKit/README.md similarity index 100% rename from Example/README.md rename to Example/UIKit/README.md