From f0a6ca5c638c261033dc30c8927d6a7c33fe1186 Mon Sep 17 00:00:00 2001 From: YigitAtik1 Date: Tue, 23 Dec 2025 17:52:34 +0300 Subject: [PATCH 1/4] Add iOS Placement sample project --- .../Sample/PlacementTestIOS3/.gitignore | 34 + .../project.pbxproj | 634 ++++++++++++++++++ .../PlacementTestIOS3/AppDelegate.swift | 40 ++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 35 + .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 + .../Base.lproj/Main.storyboard | 24 + .../PlacementTestIOS3/Info.plist | 23 + .../PlacementTestIOS3/SceneDelegate.swift | 38 ++ .../PlacementTestIOS3/ViewController.swift | 130 ++++ .../PlacementTestIOS3Tests.swift | 17 + .../PlacementTestIOS3UITests.swift | 43 ++ .../PlacementTestIOS3UITestsLaunchTests.swift | 33 + 14 files changed, 1093 insertions(+) create mode 100644 placement-ios/Sample/PlacementTestIOS3/.gitignore create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3.xcodeproj/project.pbxproj create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/AppDelegate.swift create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/Contents.json create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Base.lproj/LaunchScreen.storyboard create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Base.lproj/Main.storyboard create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Info.plist create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/SceneDelegate.swift create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/ViewController.swift create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3Tests/PlacementTestIOS3Tests.swift create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3UITests/PlacementTestIOS3UITests.swift create mode 100644 placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3UITests/PlacementTestIOS3UITestsLaunchTests.swift diff --git a/placement-ios/Sample/PlacementTestIOS3/.gitignore b/placement-ios/Sample/PlacementTestIOS3/.gitignore new file mode 100644 index 000000000..a09b1bae1 --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/.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/Sample/PlacementTestIOS3/PlacementTestIOS3.xcodeproj/project.pbxproj b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3.xcodeproj/project.pbxproj new file mode 100644 index 000000000..7aa16ffb5 --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3.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 /* PlacementTestIOS3.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PlacementTestIOS3.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 400BC6062EDF14520018947D /* PlacementTestIOS3Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PlacementTestIOS3Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 400BC6102EDF14520018947D /* PlacementTestIOS3UITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PlacementTestIOS3UITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + 400BC6182EDF14520018947D /* Exceptions for "PlacementTestIOS3" folder in "PlacementTestIOS3" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 400BC5EF2EDF14500018947D /* PlacementTestIOS3 */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 400BC5F22EDF14500018947D /* PlacementTestIOS3 */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 400BC6182EDF14520018947D /* Exceptions for "PlacementTestIOS3" folder in "PlacementTestIOS3" target */, + ); + path = PlacementTestIOS3; + sourceTree = ""; + }; + 400BC6092EDF14520018947D /* PlacementTestIOS3Tests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = PlacementTestIOS3Tests; + sourceTree = ""; + }; + 400BC6132EDF14520018947D /* PlacementTestIOS3UITests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = PlacementTestIOS3UITests; + 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 /* PlacementTestIOS3 */, + 400BC6092EDF14520018947D /* PlacementTestIOS3Tests */, + 400BC6132EDF14520018947D /* PlacementTestIOS3UITests */, + 400BC5F12EDF14500018947D /* Products */, + ); + sourceTree = ""; + }; + 400BC5F12EDF14500018947D /* Products */ = { + isa = PBXGroup; + children = ( + 400BC5F02EDF14500018947D /* PlacementTestIOS3.app */, + 400BC6062EDF14520018947D /* PlacementTestIOS3Tests.xctest */, + 400BC6102EDF14520018947D /* PlacementTestIOS3UITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 400BC5EF2EDF14500018947D /* PlacementTestIOS3 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 400BC6192EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementTestIOS3" */; + buildPhases = ( + 400BC5EC2EDF14500018947D /* Sources */, + 400BC5ED2EDF14500018947D /* Frameworks */, + 400BC5EE2EDF14500018947D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 400BC5F22EDF14500018947D /* PlacementTestIOS3 */, + ); + name = PlacementTestIOS3; + packageProductDependencies = ( + 40BED7692EFA7EAE00E1EF51 /* StorylyBannerWrapper */, + 40BED76B2EFA7EAE00E1EF51 /* StorylyPlacement */, + 40BED76D2EFA7EAE00E1EF51 /* StorylyStoryBarWrapper */, + 40BED76F2EFA7EAE00E1EF51 /* StorylySwipeCardWrapper */, + 40BED7712EFA7EAE00E1EF51 /* StorylyVideoFeedWrapper */, + ); + productName = PlacementTestIOS3; + productReference = 400BC5F02EDF14500018947D /* PlacementTestIOS3.app */; + productType = "com.apple.product-type.application"; + }; + 400BC6052EDF14520018947D /* PlacementTestIOS3Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 400BC61E2EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementTestIOS3Tests" */; + buildPhases = ( + 400BC6022EDF14520018947D /* Sources */, + 400BC6032EDF14520018947D /* Frameworks */, + 400BC6042EDF14520018947D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 400BC6082EDF14520018947D /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 400BC6092EDF14520018947D /* PlacementTestIOS3Tests */, + ); + name = PlacementTestIOS3Tests; + packageProductDependencies = ( + ); + productName = PlacementTestIOS3Tests; + productReference = 400BC6062EDF14520018947D /* PlacementTestIOS3Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 400BC60F2EDF14520018947D /* PlacementTestIOS3UITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 400BC6212EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementTestIOS3UITests" */; + buildPhases = ( + 400BC60C2EDF14520018947D /* Sources */, + 400BC60D2EDF14520018947D /* Frameworks */, + 400BC60E2EDF14520018947D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 400BC6122EDF14520018947D /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 400BC6132EDF14520018947D /* PlacementTestIOS3UITests */, + ); + name = PlacementTestIOS3UITests; + packageProductDependencies = ( + ); + productName = PlacementTestIOS3UITests; + productReference = 400BC6102EDF14520018947D /* PlacementTestIOS3UITests.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 "PlacementTestIOS3" */; + 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 /* PlacementTestIOS3 */, + 400BC6052EDF14520018947D /* PlacementTestIOS3Tests */, + 400BC60F2EDF14520018947D /* PlacementTestIOS3UITests */, + ); + }; +/* 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 /* PlacementTestIOS3 */; + targetProxy = 400BC6072EDF14520018947D /* PBXContainerItemProxy */; + }; + 400BC6122EDF14520018947D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 400BC5EF2EDF14500018947D /* PlacementTestIOS3 */; + 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 = PlacementTestIOS3/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.PlacementTestIOS3; + 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 = PlacementTestIOS3/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.PlacementTestIOS3; + 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)/PlacementTestIOS3.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/PlacementTestIOS3"; + }; + 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)/PlacementTestIOS3.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/PlacementTestIOS3"; + }; + 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 "PlacementTestIOS3" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 400BC61C2EDF14520018947D /* Debug */, + 400BC61D2EDF14520018947D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 400BC6192EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementTestIOS3" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 400BC61A2EDF14520018947D /* Debug */, + 400BC61B2EDF14520018947D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 400BC61E2EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementTestIOS3Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 400BC61F2EDF14520018947D /* Debug */, + 400BC6202EDF14520018947D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 400BC6212EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementTestIOS3UITests" */ = { + 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/Sample/PlacementTestIOS3/PlacementTestIOS3/AppDelegate.swift b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/AppDelegate.swift new file mode 100644 index 000000000..1a678f7ef --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/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/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/AccentColor.colorset/Contents.json b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 000000000..eb8789700 --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/AppIcon.appiconset/Contents.json b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..230588010 --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/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/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/Contents.json b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Base.lproj/LaunchScreen.storyboard b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..865e9329f --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Base.lproj/Main.storyboard b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Base.lproj/Main.storyboard new file mode 100644 index 000000000..25a763858 --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Info.plist b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Info.plist new file mode 100644 index 000000000..0eb786dc1 --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Info.plist @@ -0,0 +1,23 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + + + diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/SceneDelegate.swift b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/SceneDelegate.swift new file mode 100644 index 000000000..cc29c686f --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/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/Sample/PlacementTestIOS3/PlacementTestIOS3/ViewController.swift b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/ViewController.swift new file mode 100644 index 000000000..856c54d68 --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/ViewController.swift @@ -0,0 +1,130 @@ +// +// 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? + + // MARK: - Core Placement Blocks + + // 1) Placement Data Provider + private lazy var placementProvider: PlacementDataProvider = { + let provider = PlacementDataProvider() + provider.delegate = self // STRProviderDelegate + // If you need hydration later: + // provider.productDelegate = self // STRProviderProductDelegate + return provider + }() + + // 2) Placement View + private var placementView: STRPlacementView! + + // MARK: - Lifecycle + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .systemBackground + + setupPlacementConfig() + setupPlacementView() + } +} + +// MARK: - Placement Config + +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 // STRDelegate + // NOTE: we do NOT add to the hierarchy here. + // Layout is handled in onWidgetReady. + } +} + +// MARK: - STRProviderDelegate + +extension ViewController: STRProviderDelegate { + func onLoad(data: STRDataPayload, dataSource: STRDataSource) { + print("placementProvider onLoad: dataSource=\(dataSource)") + // Ideal place to hide skeletons, etc. + } + + func onLoadFail(errorMessage: String) { + print("placementProvider onLoadFail: \(errorMessage)") + // Show fallback UI if needed + } +} + +// MARK: - STRDelegate (Widget lifecycle / sizing / actions) + +extension ViewController: STRDelegate { + + func onWidgetReady(widget: STRWidgetController, ratio: CGFloat) { + print("Hello ONwİDGETr") + // Attach placementView to the hierarchy when the widget is ready + if placementView.superview == nil { + placementView.rootViewController = self + placementView.translatesAutoresizingMaskIntoConstraints = false + + view.addSubview(placementView) + + let guide = view.safeAreaLayoutGuide + + NSLayoutConstraint.activate([ + placementView.leadingAnchor.constraint(equalTo: guide.leadingAnchor), + placementView.trailingAnchor.constraint(equalTo: guide.trailingAnchor), + placementView.topAnchor.constraint(equalTo: guide.topAnchor, constant: 16) + ]) + + // Create a height constraint; we'll update it using the ratio + let heightConstraint = placementView.heightAnchor.constraint(equalToConstant: 0) + heightConstraint.isActive = true + placementHeightConstraint = heightConstraint + } + + // Handle size based on the reported ratio + let width = view.bounds.width + guard width > 0 else { + print("onWidgetReady: width is 0, skipping layout") + return + } + + let height = 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 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/Sample/PlacementTestIOS3/PlacementTestIOS3Tests/PlacementTestIOS3Tests.swift b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3Tests/PlacementTestIOS3Tests.swift new file mode 100644 index 000000000..6a60f9188 --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3Tests/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/Sample/PlacementTestIOS3/PlacementTestIOS3UITests/PlacementTestIOS3UITests.swift b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3UITests/PlacementTestIOS3UITests.swift new file mode 100644 index 000000000..7695c5cb6 --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3UITests/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/Sample/PlacementTestIOS3/PlacementTestIOS3UITests/PlacementTestIOS3UITestsLaunchTests.swift b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3UITests/PlacementTestIOS3UITestsLaunchTests.swift new file mode 100644 index 000000000..c782cc040 --- /dev/null +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3UITests/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) + } +} From 7e3cb6455a23982d64e4c5f04792d97896cacd0b Mon Sep 17 00:00:00 2001 From: YigitAtik1 Date: Wed, 24 Dec 2025 18:16:53 +0300 Subject: [PATCH 2/4] Update iOS Placement sample demo layout and token placeholder --- .../project.pbxproj | 66 +++++++++--------- .../PlacementTestIOS3/ViewController.swift | 69 +++++++------------ 2 files changed, 56 insertions(+), 79 deletions(-) rename placement-ios/Sample/PlacementTestIOS3/{PlacementTestIOS3.xcodeproj => PlacementDemo.xcodeproj}/project.pbxproj (89%) diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3.xcodeproj/project.pbxproj b/placement-ios/Sample/PlacementTestIOS3/PlacementDemo.xcodeproj/project.pbxproj similarity index 89% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3.xcodeproj/project.pbxproj rename to placement-ios/Sample/PlacementTestIOS3/PlacementDemo.xcodeproj/project.pbxproj index 7aa16ffb5..679d24040 100644 --- a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3.xcodeproj/project.pbxproj +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementDemo.xcodeproj/project.pbxproj @@ -32,18 +32,18 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 400BC5F02EDF14500018947D /* PlacementTestIOS3.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PlacementTestIOS3.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 400BC6062EDF14520018947D /* PlacementTestIOS3Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PlacementTestIOS3Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 400BC6102EDF14520018947D /* PlacementTestIOS3UITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PlacementTestIOS3UITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 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 "PlacementTestIOS3" folder in "PlacementTestIOS3" target */ = { + 400BC6182EDF14520018947D /* Exceptions for "PlacementTestIOS3" folder in "PlacementDemo" target */ = { isa = PBXFileSystemSynchronizedBuildFileExceptionSet; membershipExceptions = ( Info.plist, ); - target = 400BC5EF2EDF14500018947D /* PlacementTestIOS3 */; + target = 400BC5EF2EDF14500018947D /* PlacementDemo */; }; /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ @@ -51,7 +51,7 @@ 400BC5F22EDF14500018947D /* PlacementTestIOS3 */ = { isa = PBXFileSystemSynchronizedRootGroup; exceptions = ( - 400BC6182EDF14520018947D /* Exceptions for "PlacementTestIOS3" folder in "PlacementTestIOS3" target */, + 400BC6182EDF14520018947D /* Exceptions for "PlacementTestIOS3" folder in "PlacementDemo" target */, ); path = PlacementTestIOS3; sourceTree = ""; @@ -111,9 +111,9 @@ 400BC5F12EDF14500018947D /* Products */ = { isa = PBXGroup; children = ( - 400BC5F02EDF14500018947D /* PlacementTestIOS3.app */, - 400BC6062EDF14520018947D /* PlacementTestIOS3Tests.xctest */, - 400BC6102EDF14520018947D /* PlacementTestIOS3UITests.xctest */, + 400BC5F02EDF14500018947D /* PlacementDemo.app */, + 400BC6062EDF14520018947D /* PlacementDemoTests.xctest */, + 400BC6102EDF14520018947D /* PlacementDemoUITests.xctest */, ); name = Products; sourceTree = ""; @@ -121,9 +121,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 400BC5EF2EDF14500018947D /* PlacementTestIOS3 */ = { + 400BC5EF2EDF14500018947D /* PlacementDemo */ = { isa = PBXNativeTarget; - buildConfigurationList = 400BC6192EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementTestIOS3" */; + buildConfigurationList = 400BC6192EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementDemo" */; buildPhases = ( 400BC5EC2EDF14500018947D /* Sources */, 400BC5ED2EDF14500018947D /* Frameworks */, @@ -136,7 +136,7 @@ fileSystemSynchronizedGroups = ( 400BC5F22EDF14500018947D /* PlacementTestIOS3 */, ); - name = PlacementTestIOS3; + name = PlacementDemo; packageProductDependencies = ( 40BED7692EFA7EAE00E1EF51 /* StorylyBannerWrapper */, 40BED76B2EFA7EAE00E1EF51 /* StorylyPlacement */, @@ -145,12 +145,12 @@ 40BED7712EFA7EAE00E1EF51 /* StorylyVideoFeedWrapper */, ); productName = PlacementTestIOS3; - productReference = 400BC5F02EDF14500018947D /* PlacementTestIOS3.app */; + productReference = 400BC5F02EDF14500018947D /* PlacementDemo.app */; productType = "com.apple.product-type.application"; }; - 400BC6052EDF14520018947D /* PlacementTestIOS3Tests */ = { + 400BC6052EDF14520018947D /* PlacementDemoTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 400BC61E2EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementTestIOS3Tests" */; + buildConfigurationList = 400BC61E2EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementDemoTests" */; buildPhases = ( 400BC6022EDF14520018947D /* Sources */, 400BC6032EDF14520018947D /* Frameworks */, @@ -164,16 +164,16 @@ fileSystemSynchronizedGroups = ( 400BC6092EDF14520018947D /* PlacementTestIOS3Tests */, ); - name = PlacementTestIOS3Tests; + name = PlacementDemoTests; packageProductDependencies = ( ); productName = PlacementTestIOS3Tests; - productReference = 400BC6062EDF14520018947D /* PlacementTestIOS3Tests.xctest */; + productReference = 400BC6062EDF14520018947D /* PlacementDemoTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 400BC60F2EDF14520018947D /* PlacementTestIOS3UITests */ = { + 400BC60F2EDF14520018947D /* PlacementDemoUITests */ = { isa = PBXNativeTarget; - buildConfigurationList = 400BC6212EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementTestIOS3UITests" */; + buildConfigurationList = 400BC6212EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementDemoUITests" */; buildPhases = ( 400BC60C2EDF14520018947D /* Sources */, 400BC60D2EDF14520018947D /* Frameworks */, @@ -187,11 +187,11 @@ fileSystemSynchronizedGroups = ( 400BC6132EDF14520018947D /* PlacementTestIOS3UITests */, ); - name = PlacementTestIOS3UITests; + name = PlacementDemoUITests; packageProductDependencies = ( ); productName = PlacementTestIOS3UITests; - productReference = 400BC6102EDF14520018947D /* PlacementTestIOS3UITests.xctest */; + productReference = 400BC6102EDF14520018947D /* PlacementDemoUITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; }; /* End PBXNativeTarget section */ @@ -217,7 +217,7 @@ }; }; }; - buildConfigurationList = 400BC5EB2EDF14500018947D /* Build configuration list for PBXProject "PlacementTestIOS3" */; + buildConfigurationList = 400BC5EB2EDF14500018947D /* Build configuration list for PBXProject "PlacementDemo" */; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -234,9 +234,9 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 400BC5EF2EDF14500018947D /* PlacementTestIOS3 */, - 400BC6052EDF14520018947D /* PlacementTestIOS3Tests */, - 400BC60F2EDF14520018947D /* PlacementTestIOS3UITests */, + 400BC5EF2EDF14500018947D /* PlacementDemo */, + 400BC6052EDF14520018947D /* PlacementDemoTests */, + 400BC60F2EDF14520018947D /* PlacementDemoUITests */, ); }; /* End PBXProject section */ @@ -292,12 +292,12 @@ /* Begin PBXTargetDependency section */ 400BC6082EDF14520018947D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 400BC5EF2EDF14500018947D /* PlacementTestIOS3 */; + target = 400BC5EF2EDF14500018947D /* PlacementDemo */; targetProxy = 400BC6072EDF14520018947D /* PBXContainerItemProxy */; }; 400BC6122EDF14520018947D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 400BC5EF2EDF14500018947D /* PlacementTestIOS3 */; + target = 400BC5EF2EDF14500018947D /* PlacementDemo */; targetProxy = 400BC6112EDF14520018947D /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -493,7 +493,7 @@ SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PlacementTestIOS3.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/PlacementTestIOS3"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PlacementDemo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/PlacementDemo"; }; name = Debug; }; @@ -512,7 +512,7 @@ SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PlacementTestIOS3.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/PlacementTestIOS3"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PlacementDemo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/PlacementDemo"; }; name = Release; }; @@ -553,7 +553,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 400BC5EB2EDF14500018947D /* Build configuration list for PBXProject "PlacementTestIOS3" */ = { + 400BC5EB2EDF14500018947D /* Build configuration list for PBXProject "PlacementDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( 400BC61C2EDF14520018947D /* Debug */, @@ -562,7 +562,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 400BC6192EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementTestIOS3" */ = { + 400BC6192EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( 400BC61A2EDF14520018947D /* Debug */, @@ -571,7 +571,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 400BC61E2EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementTestIOS3Tests" */ = { + 400BC61E2EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementDemoTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 400BC61F2EDF14520018947D /* Debug */, @@ -580,7 +580,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 400BC6212EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementTestIOS3UITests" */ = { + 400BC6212EDF14520018947D /* Build configuration list for PBXNativeTarget "PlacementDemoUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( 400BC6222EDF14520018947D /* Debug */, diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/ViewController.swift b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/ViewController.swift index 856c54d68..03ab97694 100644 --- a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/ViewController.swift +++ b/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/ViewController.swift @@ -14,23 +14,20 @@ class ViewController: UIViewController { // Adjust this when widget reports its ratio private var placementHeightConstraint: NSLayoutConstraint? - // MARK: - Core Placement Blocks - // 1) Placement Data Provider private lazy var placementProvider: PlacementDataProvider = { let provider = PlacementDataProvider() - provider.delegate = self // STRProviderDelegate - // If you need hydration later: - // provider.productDelegate = self // STRProviderProductDelegate + provider.delegate = self return provider }() - // 2) Placement View + private var placementView: STRPlacementView! - // MARK: - Lifecycle + override func viewDidLoad() { + super.viewDidLoad() view.backgroundColor = .systemBackground @@ -39,71 +36,51 @@ class ViewController: UIViewController { } } -// MARK: - Placement Config extension ViewController { private func setupPlacementConfig() { placementProvider.config = STRPlacementConfig.Builder() - .build(token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NfaWQiOjIzODAsImFwcF9pZCI6MTcxODUsImluc19pZCI6MTkxMDB9.AmtkzTlj_g3RQwwHZTz6rsozH8VFqAogeSwgBdXLMDU") + .build(token: "your-placement-token") } private func setupPlacementView() { placementView = STRPlacementView(dataProvider: placementProvider) - placementView.delegate = self // STRDelegate - // NOTE: we do NOT add to the hierarchy here. - // Layout is handled in onWidgetReady. + 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) + ]) } } -// MARK: - STRProviderDelegate + extension ViewController: STRProviderDelegate { func onLoad(data: STRDataPayload, dataSource: STRDataSource) { print("placementProvider onLoad: dataSource=\(dataSource)") - // Ideal place to hide skeletons, etc. } func onLoadFail(errorMessage: String) { print("placementProvider onLoadFail: \(errorMessage)") - // Show fallback UI if needed } } -// MARK: - STRDelegate (Widget lifecycle / sizing / actions) + extension ViewController: STRDelegate { func onWidgetReady(widget: STRWidgetController, ratio: CGFloat) { - print("Hello ONwİDGETr") - // Attach placementView to the hierarchy when the widget is ready - if placementView.superview == nil { - placementView.rootViewController = self - placementView.translatesAutoresizingMaskIntoConstraints = false - - view.addSubview(placementView) - - let guide = view.safeAreaLayoutGuide - - NSLayoutConstraint.activate([ - placementView.leadingAnchor.constraint(equalTo: guide.leadingAnchor), - placementView.trailingAnchor.constraint(equalTo: guide.trailingAnchor), - placementView.topAnchor.constraint(equalTo: guide.topAnchor, constant: 16) - ]) - - // Create a height constraint; we'll update it using the ratio - let heightConstraint = placementView.heightAnchor.constraint(equalToConstant: 0) - heightConstraint.isActive = true - placementHeightConstraint = heightConstraint - } - - // Handle size based on the reported ratio - let width = view.bounds.width - guard width > 0 else { - print("onWidgetReady: width is 0, skipping layout") - return - } - let height = width / ratio + let height = self.view.frame.width / ratio placementHeightConstraint?.constant = height UIView.animate(withDuration: 0.25) { @@ -115,7 +92,7 @@ extension ViewController: STRDelegate { func onActionClicked(widget: STRWidgetController, url: String, payload: STRPayload) { print("onActionClicked url=\(url), payload=\(payload)") - // In real use: open deep link or routing + // In real use: open deep link or implement routing } func onEvent(widget: STRWidgetController, payload: STREventPayload) { From b5175d9934e7f8e06bef51220fd2a8f221aa9935 Mon Sep 17 00:00:00 2001 From: YigitAtik1 Date: Wed, 24 Dec 2025 18:50:39 +0300 Subject: [PATCH 3/4] Move iOS Placement sample to placement-ios/swift/PlacementDemo --- .../{Sample/PlacementTestIOS3 => swift/PlacementDemo}/.gitignore | 0 .../PlacementDemo}/PlacementDemo.xcodeproj/project.pbxproj | 0 .../PlacementDemo}/PlacementTestIOS3/AppDelegate.swift | 0 .../Assets.xcassets/AccentColor.colorset/Contents.json | 0 .../Assets.xcassets/AppIcon.appiconset/Contents.json | 0 .../PlacementTestIOS3/Assets.xcassets/Contents.json | 0 .../PlacementTestIOS3/Base.lproj/LaunchScreen.storyboard | 0 .../PlacementDemo}/PlacementTestIOS3/Base.lproj/Main.storyboard | 0 .../PlacementDemo}/PlacementTestIOS3/Info.plist | 0 .../PlacementDemo}/PlacementTestIOS3/SceneDelegate.swift | 0 .../PlacementDemo}/PlacementTestIOS3/ViewController.swift | 0 .../PlacementTestIOS3Tests/PlacementTestIOS3Tests.swift | 0 .../PlacementTestIOS3UITests/PlacementTestIOS3UITests.swift | 0 .../PlacementTestIOS3UITestsLaunchTests.swift | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/.gitignore (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementDemo.xcodeproj/project.pbxproj (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementTestIOS3/AppDelegate.swift (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementTestIOS3/Assets.xcassets/AccentColor.colorset/Contents.json (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementTestIOS3/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementTestIOS3/Assets.xcassets/Contents.json (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementTestIOS3/Base.lproj/LaunchScreen.storyboard (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementTestIOS3/Base.lproj/Main.storyboard (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementTestIOS3/Info.plist (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementTestIOS3/SceneDelegate.swift (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementTestIOS3/ViewController.swift (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementTestIOS3Tests/PlacementTestIOS3Tests.swift (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementTestIOS3UITests/PlacementTestIOS3UITests.swift (100%) rename placement-ios/{Sample/PlacementTestIOS3 => swift/PlacementDemo}/PlacementTestIOS3UITests/PlacementTestIOS3UITestsLaunchTests.swift (100%) diff --git a/placement-ios/Sample/PlacementTestIOS3/.gitignore b/placement-ios/swift/PlacementDemo/.gitignore similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/.gitignore rename to placement-ios/swift/PlacementDemo/.gitignore diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementDemo.xcodeproj/project.pbxproj b/placement-ios/swift/PlacementDemo/PlacementDemo.xcodeproj/project.pbxproj similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementDemo.xcodeproj/project.pbxproj rename to placement-ios/swift/PlacementDemo/PlacementDemo.xcodeproj/project.pbxproj diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/AppDelegate.swift b/placement-ios/swift/PlacementDemo/PlacementTestIOS3/AppDelegate.swift similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/AppDelegate.swift rename to placement-ios/swift/PlacementDemo/PlacementTestIOS3/AppDelegate.swift diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/AccentColor.colorset/Contents.json b/placement-ios/swift/PlacementDemo/PlacementTestIOS3/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/AccentColor.colorset/Contents.json rename to placement-ios/swift/PlacementDemo/PlacementTestIOS3/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/AppIcon.appiconset/Contents.json b/placement-ios/swift/PlacementDemo/PlacementTestIOS3/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/AppIcon.appiconset/Contents.json rename to placement-ios/swift/PlacementDemo/PlacementTestIOS3/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/Contents.json b/placement-ios/swift/PlacementDemo/PlacementTestIOS3/Assets.xcassets/Contents.json similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Assets.xcassets/Contents.json rename to placement-ios/swift/PlacementDemo/PlacementTestIOS3/Assets.xcassets/Contents.json diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Base.lproj/LaunchScreen.storyboard b/placement-ios/swift/PlacementDemo/PlacementTestIOS3/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Base.lproj/LaunchScreen.storyboard rename to placement-ios/swift/PlacementDemo/PlacementTestIOS3/Base.lproj/LaunchScreen.storyboard diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Base.lproj/Main.storyboard b/placement-ios/swift/PlacementDemo/PlacementTestIOS3/Base.lproj/Main.storyboard similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Base.lproj/Main.storyboard rename to placement-ios/swift/PlacementDemo/PlacementTestIOS3/Base.lproj/Main.storyboard diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Info.plist b/placement-ios/swift/PlacementDemo/PlacementTestIOS3/Info.plist similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/Info.plist rename to placement-ios/swift/PlacementDemo/PlacementTestIOS3/Info.plist diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/SceneDelegate.swift b/placement-ios/swift/PlacementDemo/PlacementTestIOS3/SceneDelegate.swift similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/SceneDelegate.swift rename to placement-ios/swift/PlacementDemo/PlacementTestIOS3/SceneDelegate.swift diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/ViewController.swift b/placement-ios/swift/PlacementDemo/PlacementTestIOS3/ViewController.swift similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3/ViewController.swift rename to placement-ios/swift/PlacementDemo/PlacementTestIOS3/ViewController.swift diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3Tests/PlacementTestIOS3Tests.swift b/placement-ios/swift/PlacementDemo/PlacementTestIOS3Tests/PlacementTestIOS3Tests.swift similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3Tests/PlacementTestIOS3Tests.swift rename to placement-ios/swift/PlacementDemo/PlacementTestIOS3Tests/PlacementTestIOS3Tests.swift diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3UITests/PlacementTestIOS3UITests.swift b/placement-ios/swift/PlacementDemo/PlacementTestIOS3UITests/PlacementTestIOS3UITests.swift similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3UITests/PlacementTestIOS3UITests.swift rename to placement-ios/swift/PlacementDemo/PlacementTestIOS3UITests/PlacementTestIOS3UITests.swift diff --git a/placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3UITests/PlacementTestIOS3UITestsLaunchTests.swift b/placement-ios/swift/PlacementDemo/PlacementTestIOS3UITests/PlacementTestIOS3UITestsLaunchTests.swift similarity index 100% rename from placement-ios/Sample/PlacementTestIOS3/PlacementTestIOS3UITests/PlacementTestIOS3UITestsLaunchTests.swift rename to placement-ios/swift/PlacementDemo/PlacementTestIOS3UITests/PlacementTestIOS3UITestsLaunchTests.swift From 90e73ebee072667f1bdddc0c70a37e6d9caa3269 Mon Sep 17 00:00:00 2001 From: YigitAtik1 Date: Wed, 24 Dec 2025 21:25:38 +0300 Subject: [PATCH 4/4] Rename iOS Placement sample groups to PlacementDemo --- .../PlacementDemo.xcodeproj/project.pbxproj | 36 +++++++++---------- .../AppDelegate.swift | 0 .../AccentColor.colorset/Contents.json | 0 .../AppIcon.appiconset/Contents.json | 0 .../Assets.xcassets/Contents.json | 0 .../Base.lproj/LaunchScreen.storyboard | 0 .../Base.lproj/Main.storyboard | 0 .../Info.plist | 0 .../SceneDelegate.swift | 0 .../ViewController.swift | 2 +- .../PlacementTestIOS3Tests.swift | 0 .../PlacementTestIOS3UITests.swift | 0 .../PlacementTestIOS3UITestsLaunchTests.swift | 0 13 files changed, 19 insertions(+), 19 deletions(-) rename placement-ios/swift/PlacementDemo/{PlacementTestIOS3 => PlacementDemo}/AppDelegate.swift (100%) rename placement-ios/swift/PlacementDemo/{PlacementTestIOS3 => PlacementDemo}/Assets.xcassets/AccentColor.colorset/Contents.json (100%) rename placement-ios/swift/PlacementDemo/{PlacementTestIOS3 => PlacementDemo}/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename placement-ios/swift/PlacementDemo/{PlacementTestIOS3 => PlacementDemo}/Assets.xcassets/Contents.json (100%) rename placement-ios/swift/PlacementDemo/{PlacementTestIOS3 => PlacementDemo}/Base.lproj/LaunchScreen.storyboard (100%) rename placement-ios/swift/PlacementDemo/{PlacementTestIOS3 => PlacementDemo}/Base.lproj/Main.storyboard (100%) rename placement-ios/swift/PlacementDemo/{PlacementTestIOS3 => PlacementDemo}/Info.plist (100%) rename placement-ios/swift/PlacementDemo/{PlacementTestIOS3 => PlacementDemo}/SceneDelegate.swift (100%) rename placement-ios/swift/PlacementDemo/{PlacementTestIOS3 => PlacementDemo}/ViewController.swift (94%) rename placement-ios/swift/PlacementDemo/{PlacementTestIOS3Tests => PlacementDemoTests}/PlacementTestIOS3Tests.swift (100%) rename placement-ios/swift/PlacementDemo/{PlacementTestIOS3UITests => PlacementDemoUITests}/PlacementTestIOS3UITests.swift (100%) rename placement-ios/swift/PlacementDemo/{PlacementTestIOS3UITests => PlacementDemoUITests}/PlacementTestIOS3UITestsLaunchTests.swift (100%) diff --git a/placement-ios/swift/PlacementDemo/PlacementDemo.xcodeproj/project.pbxproj b/placement-ios/swift/PlacementDemo/PlacementDemo.xcodeproj/project.pbxproj index 679d24040..21285e4d6 100644 --- a/placement-ios/swift/PlacementDemo/PlacementDemo.xcodeproj/project.pbxproj +++ b/placement-ios/swift/PlacementDemo/PlacementDemo.xcodeproj/project.pbxproj @@ -38,7 +38,7 @@ /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ - 400BC6182EDF14520018947D /* Exceptions for "PlacementTestIOS3" folder in "PlacementDemo" target */ = { + 400BC6182EDF14520018947D /* Exceptions for "PlacementDemo" folder in "PlacementDemo" target */ = { isa = PBXFileSystemSynchronizedBuildFileExceptionSet; membershipExceptions = ( Info.plist, @@ -48,22 +48,22 @@ /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ /* Begin PBXFileSystemSynchronizedRootGroup section */ - 400BC5F22EDF14500018947D /* PlacementTestIOS3 */ = { + 400BC5F22EDF14500018947D /* PlacementDemo */ = { isa = PBXFileSystemSynchronizedRootGroup; exceptions = ( - 400BC6182EDF14520018947D /* Exceptions for "PlacementTestIOS3" folder in "PlacementDemo" target */, + 400BC6182EDF14520018947D /* Exceptions for "PlacementDemo" folder in "PlacementDemo" target */, ); - path = PlacementTestIOS3; + path = PlacementDemo; sourceTree = ""; }; - 400BC6092EDF14520018947D /* PlacementTestIOS3Tests */ = { + 400BC6092EDF14520018947D /* PlacementDemoTests */ = { isa = PBXFileSystemSynchronizedRootGroup; - path = PlacementTestIOS3Tests; + path = PlacementDemoTests; sourceTree = ""; }; - 400BC6132EDF14520018947D /* PlacementTestIOS3UITests */ = { + 400BC6132EDF14520018947D /* PlacementDemoUITests */ = { isa = PBXFileSystemSynchronizedRootGroup; - path = PlacementTestIOS3UITests; + path = PlacementDemoUITests; sourceTree = ""; }; /* End PBXFileSystemSynchronizedRootGroup section */ @@ -101,9 +101,9 @@ 400BC5E72EDF14500018947D = { isa = PBXGroup; children = ( - 400BC5F22EDF14500018947D /* PlacementTestIOS3 */, - 400BC6092EDF14520018947D /* PlacementTestIOS3Tests */, - 400BC6132EDF14520018947D /* PlacementTestIOS3UITests */, + 400BC5F22EDF14500018947D /* PlacementDemo */, + 400BC6092EDF14520018947D /* PlacementDemoTests */, + 400BC6132EDF14520018947D /* PlacementDemoUITests */, 400BC5F12EDF14500018947D /* Products */, ); sourceTree = ""; @@ -134,7 +134,7 @@ dependencies = ( ); fileSystemSynchronizedGroups = ( - 400BC5F22EDF14500018947D /* PlacementTestIOS3 */, + 400BC5F22EDF14500018947D /* PlacementDemo */, ); name = PlacementDemo; packageProductDependencies = ( @@ -162,7 +162,7 @@ 400BC6082EDF14520018947D /* PBXTargetDependency */, ); fileSystemSynchronizedGroups = ( - 400BC6092EDF14520018947D /* PlacementTestIOS3Tests */, + 400BC6092EDF14520018947D /* PlacementDemoTests */, ); name = PlacementDemoTests; packageProductDependencies = ( @@ -185,7 +185,7 @@ 400BC6122EDF14520018947D /* PBXTargetDependency */, ); fileSystemSynchronizedGroups = ( - 400BC6132EDF14520018947D /* PlacementTestIOS3UITests */, + 400BC6132EDF14520018947D /* PlacementDemoUITests */, ); name = PlacementDemoUITests; packageProductDependencies = ( @@ -312,7 +312,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 2LJL988799; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = PlacementTestIOS3/Info.plist; + INFOPLIST_FILE = PlacementDemo/Info.plist; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UIMainStoryboardFile = Main; @@ -323,7 +323,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.PlacementTestIOS3; + PRODUCT_BUNDLE_IDENTIFIER = com.example.PlacementDemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -340,7 +340,7 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 2LJL988799; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = PlacementTestIOS3/Info.plist; + INFOPLIST_FILE = PlacementDemo/Info.plist; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; INFOPLIST_KEY_UIMainStoryboardFile = Main; @@ -351,7 +351,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.PlacementTestIOS3; + PRODUCT_BUNDLE_IDENTIFIER = com.example.PlacementDemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; diff --git a/placement-ios/swift/PlacementDemo/PlacementTestIOS3/AppDelegate.swift b/placement-ios/swift/PlacementDemo/PlacementDemo/AppDelegate.swift similarity index 100% rename from placement-ios/swift/PlacementDemo/PlacementTestIOS3/AppDelegate.swift rename to placement-ios/swift/PlacementDemo/PlacementDemo/AppDelegate.swift diff --git a/placement-ios/swift/PlacementDemo/PlacementTestIOS3/Assets.xcassets/AccentColor.colorset/Contents.json b/placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from placement-ios/swift/PlacementDemo/PlacementTestIOS3/Assets.xcassets/AccentColor.colorset/Contents.json rename to placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/placement-ios/swift/PlacementDemo/PlacementTestIOS3/Assets.xcassets/AppIcon.appiconset/Contents.json b/placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from placement-ios/swift/PlacementDemo/PlacementTestIOS3/Assets.xcassets/AppIcon.appiconset/Contents.json rename to placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/placement-ios/swift/PlacementDemo/PlacementTestIOS3/Assets.xcassets/Contents.json b/placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/Contents.json similarity index 100% rename from placement-ios/swift/PlacementDemo/PlacementTestIOS3/Assets.xcassets/Contents.json rename to placement-ios/swift/PlacementDemo/PlacementDemo/Assets.xcassets/Contents.json diff --git a/placement-ios/swift/PlacementDemo/PlacementTestIOS3/Base.lproj/LaunchScreen.storyboard b/placement-ios/swift/PlacementDemo/PlacementDemo/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from placement-ios/swift/PlacementDemo/PlacementTestIOS3/Base.lproj/LaunchScreen.storyboard rename to placement-ios/swift/PlacementDemo/PlacementDemo/Base.lproj/LaunchScreen.storyboard diff --git a/placement-ios/swift/PlacementDemo/PlacementTestIOS3/Base.lproj/Main.storyboard b/placement-ios/swift/PlacementDemo/PlacementDemo/Base.lproj/Main.storyboard similarity index 100% rename from placement-ios/swift/PlacementDemo/PlacementTestIOS3/Base.lproj/Main.storyboard rename to placement-ios/swift/PlacementDemo/PlacementDemo/Base.lproj/Main.storyboard diff --git a/placement-ios/swift/PlacementDemo/PlacementTestIOS3/Info.plist b/placement-ios/swift/PlacementDemo/PlacementDemo/Info.plist similarity index 100% rename from placement-ios/swift/PlacementDemo/PlacementTestIOS3/Info.plist rename to placement-ios/swift/PlacementDemo/PlacementDemo/Info.plist diff --git a/placement-ios/swift/PlacementDemo/PlacementTestIOS3/SceneDelegate.swift b/placement-ios/swift/PlacementDemo/PlacementDemo/SceneDelegate.swift similarity index 100% rename from placement-ios/swift/PlacementDemo/PlacementTestIOS3/SceneDelegate.swift rename to placement-ios/swift/PlacementDemo/PlacementDemo/SceneDelegate.swift diff --git a/placement-ios/swift/PlacementDemo/PlacementTestIOS3/ViewController.swift b/placement-ios/swift/PlacementDemo/PlacementDemo/ViewController.swift similarity index 94% rename from placement-ios/swift/PlacementDemo/PlacementTestIOS3/ViewController.swift rename to placement-ios/swift/PlacementDemo/PlacementDemo/ViewController.swift index 03ab97694..776ee33f9 100644 --- a/placement-ios/swift/PlacementDemo/PlacementTestIOS3/ViewController.swift +++ b/placement-ios/swift/PlacementDemo/PlacementDemo/ViewController.swift @@ -40,7 +40,7 @@ class ViewController: UIViewController { extension ViewController { private func setupPlacementConfig() { placementProvider.config = STRPlacementConfig.Builder() - .build(token: "your-placement-token") + .build(token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NfaWQiOjIzODAsImFwcF9pZCI6MTcxODUsImluc19pZCI6MTkxMDB9.AmtkzTlj_g3RQwwHZTz6rsozH8VFqAogeSwgBdXLMDU") } private func setupPlacementView() { diff --git a/placement-ios/swift/PlacementDemo/PlacementTestIOS3Tests/PlacementTestIOS3Tests.swift b/placement-ios/swift/PlacementDemo/PlacementDemoTests/PlacementTestIOS3Tests.swift similarity index 100% rename from placement-ios/swift/PlacementDemo/PlacementTestIOS3Tests/PlacementTestIOS3Tests.swift rename to placement-ios/swift/PlacementDemo/PlacementDemoTests/PlacementTestIOS3Tests.swift diff --git a/placement-ios/swift/PlacementDemo/PlacementTestIOS3UITests/PlacementTestIOS3UITests.swift b/placement-ios/swift/PlacementDemo/PlacementDemoUITests/PlacementTestIOS3UITests.swift similarity index 100% rename from placement-ios/swift/PlacementDemo/PlacementTestIOS3UITests/PlacementTestIOS3UITests.swift rename to placement-ios/swift/PlacementDemo/PlacementDemoUITests/PlacementTestIOS3UITests.swift diff --git a/placement-ios/swift/PlacementDemo/PlacementTestIOS3UITests/PlacementTestIOS3UITestsLaunchTests.swift b/placement-ios/swift/PlacementDemo/PlacementDemoUITests/PlacementTestIOS3UITestsLaunchTests.swift similarity index 100% rename from placement-ios/swift/PlacementDemo/PlacementTestIOS3UITests/PlacementTestIOS3UITestsLaunchTests.swift rename to placement-ios/swift/PlacementDemo/PlacementDemoUITests/PlacementTestIOS3UITestsLaunchTests.swift