diff --git a/placement-ios/swift/PlacementDemo/.gitignore b/placement-ios/swift/PlacementDemo/.gitignore new file mode 100644 index 000000000..a09b1bae1 --- /dev/null +++ b/placement-ios/swift/PlacementDemo/.gitignore @@ -0,0 +1,34 @@ +# macOS +.DS_Store + +# Xcode +DerivedData/ +build/ +*.xcuserstate + +# User-specific Xcode data +*.xcworkspace/xcuserdata/ +*.xcodeproj/xcuserdata/ + +# Swift Package Manager +.build/ + +# CocoaPods +Pods/ +*.xcworkspace + +# Carthage +Carthage/Build/ + +# Fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output + +# SwiftPM artifacts +.swiftpm + +# Other +.idea/ +.vscode/ diff --git a/placement-ios/swift/PlacementDemo/PlacementDemo.xcodeproj/project.pbxproj b/placement-ios/swift/PlacementDemo/PlacementDemo.xcodeproj/project.pbxproj new file mode 100644 index 000000000..21285e4d6 --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemo.xcodeproj/project.pbxproj @@ -0,0 +1,634 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 40BED76A2EFA7EAE00E1EF51 /* StorylyBannerWrapper in Frameworks */ = {isa = PBXBuildFile; productRef = 40BED7692EFA7EAE00E1EF51 /* StorylyBannerWrapper */; }; + 40BED76C2EFA7EAE00E1EF51 /* StorylyPlacement in Frameworks */ = {isa = PBXBuildFile; productRef = 40BED76B2EFA7EAE00E1EF51 /* StorylyPlacement */; }; + 40BED76E2EFA7EAE00E1EF51 /* StorylyStoryBarWrapper in Frameworks */ = {isa = PBXBuildFile; productRef = 40BED76D2EFA7EAE00E1EF51 /* StorylyStoryBarWrapper */; }; + 40BED7702EFA7EAE00E1EF51 /* StorylySwipeCardWrapper in Frameworks */ = {isa = PBXBuildFile; productRef = 40BED76F2EFA7EAE00E1EF51 /* StorylySwipeCardWrapper */; }; + 40BED7722EFA7EAE00E1EF51 /* StorylyVideoFeedWrapper in Frameworks */ = {isa = PBXBuildFile; productRef = 40BED7712EFA7EAE00E1EF51 /* StorylyVideoFeedWrapper */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 400BC6072EDF14520018947D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 400BC5E82EDF14500018947D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 400BC5EF2EDF14500018947D; + remoteInfo = PlacementTestIOS3; + }; + 400BC6112EDF14520018947D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 400BC5E82EDF14500018947D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 400BC5EF2EDF14500018947D; + remoteInfo = PlacementTestIOS3; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 400BC5F02EDF14500018947D /* PlacementDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PlacementDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 400BC6062EDF14520018947D /* PlacementDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PlacementDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 400BC6102EDF14520018947D /* PlacementDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PlacementDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + 400BC6182EDF14520018947D /* Exceptions for "PlacementDemo" folder in "PlacementDemo" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 400BC5EF2EDF14500018947D /* PlacementDemo */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 400BC5F22EDF14500018947D /* PlacementDemo */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 400BC6182EDF14520018947D /* Exceptions for "PlacementDemo" folder in "PlacementDemo" target */, + ); + path = PlacementDemo; + sourceTree = ""; + }; + 400BC6092EDF14520018947D /* PlacementDemoTests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = PlacementDemoTests; + sourceTree = ""; + }; + 400BC6132EDF14520018947D /* PlacementDemoUITests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = PlacementDemoUITests; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 400BC5ED2EDF14500018947D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 40BED7702EFA7EAE00E1EF51 /* StorylySwipeCardWrapper in Frameworks */, + 40BED76A2EFA7EAE00E1EF51 /* StorylyBannerWrapper in Frameworks */, + 40BED7722EFA7EAE00E1EF51 /* StorylyVideoFeedWrapper in Frameworks */, + 40BED76E2EFA7EAE00E1EF51 /* StorylyStoryBarWrapper in Frameworks */, + 40BED76C2EFA7EAE00E1EF51 /* StorylyPlacement in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 400BC6032EDF14520018947D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 400BC60D2EDF14520018947D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 400BC5E72EDF14500018947D = { + isa = PBXGroup; + children = ( + 400BC5F22EDF14500018947D /* PlacementDemo */, + 400BC6092EDF14520018947D /* PlacementDemoTests */, + 400BC6132EDF14520018947D /* PlacementDemoUITests */, + 400BC5F12EDF14500018947D /* Products */, + ); + sourceTree = ""; + }; + 400BC5F12EDF14500018947D /* Products */ = { + isa = PBXGroup; + children = ( + 400BC5F02EDF14500018947D /* PlacementDemo.app */, + 400BC6062EDF14520018947D /* PlacementDemoTests.xctest */, + 400BC6102EDF14520018947D /* PlacementDemoUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 400BC5EF2EDF14500018947D /* PlacementDemo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 400BC6192EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementDemo" */; + buildPhases = ( + 400BC5EC2EDF14500018947D /* Sources */, + 400BC5ED2EDF14500018947D /* Frameworks */, + 400BC5EE2EDF14500018947D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 400BC5F22EDF14500018947D /* PlacementDemo */, + ); + name = PlacementDemo; + packageProductDependencies = ( + 40BED7692EFA7EAE00E1EF51 /* StorylyBannerWrapper */, + 40BED76B2EFA7EAE00E1EF51 /* StorylyPlacement */, + 40BED76D2EFA7EAE00E1EF51 /* StorylyStoryBarWrapper */, + 40BED76F2EFA7EAE00E1EF51 /* StorylySwipeCardWrapper */, + 40BED7712EFA7EAE00E1EF51 /* StorylyVideoFeedWrapper */, + ); + productName = PlacementTestIOS3; + productReference = 400BC5F02EDF14500018947D /* PlacementDemo.app */; + productType = "com.apple.product-type.application"; + }; + 400BC6052EDF14520018947D /* PlacementDemoTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 400BC61E2EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementDemoTests" */; + buildPhases = ( + 400BC6022EDF14520018947D /* Sources */, + 400BC6032EDF14520018947D /* Frameworks */, + 400BC6042EDF14520018947D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 400BC6082EDF14520018947D /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 400BC6092EDF14520018947D /* PlacementDemoTests */, + ); + name = PlacementDemoTests; + packageProductDependencies = ( + ); + productName = PlacementTestIOS3Tests; + productReference = 400BC6062EDF14520018947D /* PlacementDemoTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 400BC60F2EDF14520018947D /* PlacementDemoUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 400BC6212EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementDemoUITests" */; + buildPhases = ( + 400BC60C2EDF14520018947D /* Sources */, + 400BC60D2EDF14520018947D /* Frameworks */, + 400BC60E2EDF14520018947D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 400BC6122EDF14520018947D /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 400BC6132EDF14520018947D /* PlacementDemoUITests */, + ); + name = PlacementDemoUITests; + packageProductDependencies = ( + ); + productName = PlacementTestIOS3UITests; + productReference = 400BC6102EDF14520018947D /* PlacementDemoUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 400BC5E82EDF14500018947D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1600; + LastUpgradeCheck = 1600; + TargetAttributes = { + 400BC5EF2EDF14500018947D = { + CreatedOnToolsVersion = 16.0; + }; + 400BC6052EDF14520018947D = { + CreatedOnToolsVersion = 16.0; + TestTargetID = 400BC5EF2EDF14500018947D; + }; + 400BC60F2EDF14520018947D = { + CreatedOnToolsVersion = 16.0; + TestTargetID = 400BC5EF2EDF14500018947D; + }; + }; + }; + buildConfigurationList = 400BC5EB2EDF14500018947D /* Build configuration list for PBXProject "PlacementDemo" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 400BC5E72EDF14500018947D; + minimizedProjectReferenceProxies = 1; + packageReferences = ( + 40BED7682EFA7EAE00E1EF51 /* XCRemoteSwiftPackageReference "storyly-placement-ios" */, + ); + preferredProjectObjectVersion = 77; + productRefGroup = 400BC5F12EDF14500018947D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 400BC5EF2EDF14500018947D /* PlacementDemo */, + 400BC6052EDF14520018947D /* PlacementDemoTests */, + 400BC60F2EDF14520018947D /* PlacementDemoUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 400BC5EE2EDF14500018947D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 400BC6042EDF14520018947D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 400BC60E2EDF14520018947D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 400BC5EC2EDF14500018947D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 400BC6022EDF14520018947D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 400BC60C2EDF14520018947D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 400BC6082EDF14520018947D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 400BC5EF2EDF14500018947D /* PlacementDemo */; + targetProxy = 400BC6072EDF14520018947D /* PBXContainerItemProxy */; + }; + 400BC6122EDF14520018947D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 400BC5EF2EDF14500018947D /* PlacementDemo */; + targetProxy = 400BC6112EDF14520018947D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 400BC61A2EDF14520018947D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 2LJL988799; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = PlacementDemo/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.PlacementDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 400BC61B2EDF14520018947D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 2LJL988799; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = PlacementDemo/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.PlacementDemo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 400BC61C2EDF14520018947D /* 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; + }; + 400BC61D2EDF14520018947D /* 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; + }; + 400BC61F2EDF14520018947D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 2LJL988799; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.PlacementTestIOS3Tests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PlacementDemo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/PlacementDemo"; + }; + name = Debug; + }; + 400BC6202EDF14520018947D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 2LJL988799; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.PlacementTestIOS3Tests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PlacementDemo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/PlacementDemo"; + }; + name = Release; + }; + 400BC6222EDF14520018947D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 2LJL988799; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.PlacementTestIOS3UITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = PlacementTestIOS3; + }; + name = Debug; + }; + 400BC6232EDF14520018947D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 2LJL988799; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.PlacementTestIOS3UITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = PlacementTestIOS3; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 400BC5EB2EDF14500018947D /* Build configuration list for PBXProject "PlacementDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 400BC61C2EDF14520018947D /* Debug */, + 400BC61D2EDF14520018947D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 400BC6192EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementDemo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 400BC61A2EDF14520018947D /* Debug */, + 400BC61B2EDF14520018947D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 400BC61E2EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementDemoTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 400BC61F2EDF14520018947D /* Debug */, + 400BC6202EDF14520018947D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 400BC6212EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementDemoUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 400BC6222EDF14520018947D /* Debug */, + 400BC6232EDF14520018947D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 40BED7682EFA7EAE00E1EF51 /* XCRemoteSwiftPackageReference "storyly-placement-ios" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/Netvent/storyly-placement-ios"; + requirement = { + kind = exactVersion; + version = 1.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 40BED7692EFA7EAE00E1EF51 /* StorylyBannerWrapper */ = { + isa = XCSwiftPackageProductDependency; + package = 40BED7682EFA7EAE00E1EF51 /* XCRemoteSwiftPackageReference "storyly-placement-ios" */; + productName = StorylyBannerWrapper; + }; + 40BED76B2EFA7EAE00E1EF51 /* StorylyPlacement */ = { + isa = XCSwiftPackageProductDependency; + package = 40BED7682EFA7EAE00E1EF51 /* XCRemoteSwiftPackageReference "storyly-placement-ios" */; + productName = StorylyPlacement; + }; + 40BED76D2EFA7EAE00E1EF51 /* StorylyStoryBarWrapper */ = { + isa = XCSwiftPackageProductDependency; + package = 40BED7682EFA7EAE00E1EF51 /* XCRemoteSwiftPackageReference "storyly-placement-ios" */; + productName = StorylyStoryBarWrapper; + }; + 40BED76F2EFA7EAE00E1EF51 /* StorylySwipeCardWrapper */ = { + isa = XCSwiftPackageProductDependency; + package = 40BED7682EFA7EAE00E1EF51 /* XCRemoteSwiftPackageReference "storyly-placement-ios" */; + productName = StorylySwipeCardWrapper; + }; + 40BED7712EFA7EAE00E1EF51 /* StorylyVideoFeedWrapper */ = { + isa = XCSwiftPackageProductDependency; + package = 40BED7682EFA7EAE00E1EF51 /* XCRemoteSwiftPackageReference "storyly-placement-ios" */; + productName = StorylyVideoFeedWrapper; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 400BC5E82EDF14500018947D /* Project object */; +} diff --git a/placement-ios/swift/PlacementDemo/PlacementDemo/AppDelegate.swift b/placement-ios/swift/PlacementDemo/PlacementDemo/AppDelegate.swift new file mode 100644 index 000000000..1a678f7ef --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemo/AppDelegate.swift @@ -0,0 +1,40 @@ +// +// AppDelegate.swift +// PlacementTestIOS3 +// +// Created by Yiğit Atik on 2.12.2025. +// + +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + // You can customize global setup here if needed. + return true + } + + // MARK: UISceneSession Lifecycle + + func application( + _ application: UIApplication, + configurationForConnecting connectingSceneSession: UISceneSession, + options: UIScene.ConnectionOptions + ) -> UISceneConfiguration { + return UISceneConfiguration( + name: "Default Configuration", + sessionRole: connectingSceneSession.role + ) + } + + func application( + _ application: UIApplication, + didDiscardSceneSessions sceneSessions: Set + ) { + // No-op for this simple demo + } +} diff --git a/placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/AccentColor.colorset/Contents.json b/placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..eb8789700 --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..230588010 --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/Contents.json b/placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/placement-ios/swift/PlacementDemo/PlacementDemo/Base.lproj/LaunchScreen.storyboard b/placement-ios/swift/PlacementDemo/PlacementDemo/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemo/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/placement-ios/swift/PlacementDemo/PlacementDemo/Base.lproj/Main.storyboard b/placement-ios/swift/PlacementDemo/PlacementDemo/Base.lproj/Main.storyboard new file mode 100644 index 000000000..25a763858 --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemo/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/placement-ios/swift/PlacementDemo/PlacementDemo/Info.plist b/placement-ios/swift/PlacementDemo/PlacementDemo/Info.plist new file mode 100644 index 000000000..0eb786dc1 --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemo/Info.plist @@ -0,0 +1,23 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + + + diff --git a/placement-ios/swift/PlacementDemo/PlacementDemo/SceneDelegate.swift b/placement-ios/swift/PlacementDemo/PlacementDemo/SceneDelegate.swift new file mode 100644 index 000000000..cc29c686f --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemo/SceneDelegate.swift @@ -0,0 +1,38 @@ +// +// SceneDelegate.swift +// PlacementTestIOS3 +// +// Created by Yiğit Atik on 2.12.2025. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + func scene( + _ scene: UIScene, + willConnectTo session: UISceneSession, + options connectionOptions: UIScene.ConnectionOptions + ) { + guard let windowScene = scene as? UIWindowScene else { return } + + let window = UIWindow(windowScene: windowScene) + + // Root VC is our Placement demo + let rootViewController = ViewController() + + window.rootViewController = rootViewController + self.window = window + window.makeKeyAndVisible() + } + + // The rest of these are optional / unused in this simple demo + func sceneDidDisconnect(_ scene: UIScene) { } + func sceneDidBecomeActive(_ scene: UIScene) { } + func sceneWillResignActive(_ scene: UIScene) { } + func sceneWillEnterForeground(_ scene: UIScene) { } + func sceneDidEnterBackground(_ scene: UIScene) { } +} + diff --git a/placement-ios/swift/PlacementDemo/PlacementDemo/ViewController.swift b/placement-ios/swift/PlacementDemo/PlacementDemo/ViewController.swift new file mode 100644 index 000000000..776ee33f9 --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemo/ViewController.swift @@ -0,0 +1,107 @@ +// +// ViewController.swift +// PlacementTestIOS3 +// +// Created by Yiğit Atik on 2.12.2025. +// + +import UIKit +import StorylyCore +import StorylyPlacement + +class ViewController: UIViewController { + + // Adjust this when widget reports its ratio + private var placementHeightConstraint: NSLayoutConstraint? + + + private lazy var placementProvider: PlacementDataProvider = { + let provider = PlacementDataProvider() + provider.delegate = self + return provider + }() + + + private var placementView: STRPlacementView! + + + + override func viewDidLoad() { + + super.viewDidLoad() + view.backgroundColor = .systemBackground + + setupPlacementConfig() + setupPlacementView() + } +} + + +extension ViewController { + private func setupPlacementConfig() { + placementProvider.config = STRPlacementConfig.Builder() + .build(token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NfaWQiOjIzODAsImFwcF9pZCI6MTcxODUsImluc19pZCI6MTkxMDB9.AmtkzTlj_g3RQwwHZTz6rsozH8VFqAogeSwgBdXLMDU") + } + + private func setupPlacementView() { + placementView = STRPlacementView(dataProvider: placementProvider) + placementView.delegate = self + placementView.rootViewController = self + placementView.translatesAutoresizingMaskIntoConstraints = false + view.addSubview(placementView) + + let guide = view.safeAreaLayoutGuide + + self.placementHeightConstraint = placementView.heightAnchor.constraint(equalToConstant: 0) + placementHeightConstraint?.isActive = true + NSLayoutConstraint.activate([ + placementView.leadingAnchor.constraint(equalTo: guide.leadingAnchor), + placementView.trailingAnchor.constraint(equalTo: guide.trailingAnchor), + placementView.topAnchor.constraint(equalTo: guide.topAnchor, constant: 16) + ]) + } +} + + + +extension ViewController: STRProviderDelegate { + func onLoad(data: STRDataPayload, dataSource: STRDataSource) { + print("placementProvider onLoad: dataSource=\(dataSource)") + } + + func onLoadFail(errorMessage: String) { + print("placementProvider onLoadFail: \(errorMessage)") + } +} + + + +extension ViewController: STRDelegate { + + func onWidgetReady(widget: STRWidgetController, ratio: CGFloat) { + + let height = self.view.frame.width / ratio + placementHeightConstraint?.constant = height + + UIView.animate(withDuration: 0.25) { + self.view.layoutIfNeeded() + } + + print("onWidgetReady: widget=\(type(of: widget)), ratio=\(ratio)") + } + + func onActionClicked(widget: STRWidgetController, url: String, payload: STRPayload) { + print("onActionClicked url=\(url), payload=\(payload)") + // In real use: open deep link or implement routing + } + + func onEvent(widget: STRWidgetController, payload: STREventPayload) { + // Forward to your analytics system if desired + print("onEvent: \(payload)") + } + + func onFail(widget: STRWidgetController, payload: STRErrorPayload) { + // Widget-level error fallback (different from provider load fail) + print("Widget onFail: \(payload)") + } +} diff --git a/placement-ios/swift/PlacementDemo/PlacementDemoTests/PlacementTestIOS3Tests.swift b/placement-ios/swift/PlacementDemo/PlacementDemoTests/PlacementTestIOS3Tests.swift new file mode 100644 index 000000000..6a60f9188 --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemoTests/PlacementTestIOS3Tests.swift @@ -0,0 +1,17 @@ +// +// PlacementTestIOS3Tests.swift +// PlacementTestIOS3Tests +// +// Created by appsamurai on 2.12.2025. +// + +import Testing +@testable import PlacementTestIOS3 + +struct PlacementTestIOS3Tests { + + @Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. + } + +} diff --git a/placement-ios/swift/PlacementDemo/PlacementDemoUITests/PlacementTestIOS3UITests.swift b/placement-ios/swift/PlacementDemo/PlacementDemoUITests/PlacementTestIOS3UITests.swift new file mode 100644 index 000000000..7695c5cb6 --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemoUITests/PlacementTestIOS3UITests.swift @@ -0,0 +1,43 @@ +// +// PlacementTestIOS3UITests.swift +// PlacementTestIOS3UITests +// +// Created by appsamurai on 2.12.2025. +// + +import XCTest + +final class PlacementTestIOS3UITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + @MainActor + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + @MainActor + func testLaunchPerformance() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/placement-ios/swift/PlacementDemo/PlacementDemoUITests/PlacementTestIOS3UITestsLaunchTests.swift b/placement-ios/swift/PlacementDemo/PlacementDemoUITests/PlacementTestIOS3UITestsLaunchTests.swift new file mode 100644 index 000000000..c782cc040 --- /dev/null +++ b/placement-ios/swift/PlacementDemo/PlacementDemoUITests/PlacementTestIOS3UITestsLaunchTests.swift @@ -0,0 +1,33 @@ +// +// PlacementTestIOS3UITestsLaunchTests.swift +// PlacementTestIOS3UITests +// +// Created by appsamurai on 2.12.2025. +// + +import XCTest + +final class PlacementTestIOS3UITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + @MainActor + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +}