diff --git a/ios-interactions/Interactions.xcodeproj/project.pbxproj b/ios-interactions/Interactions.xcodeproj/project.pbxproj new file mode 100644 index 0000000..1a00305 --- /dev/null +++ b/ios-interactions/Interactions.xcodeproj/project.pbxproj @@ -0,0 +1,614 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 73EE73132DCE3F87001A4EC7 /* MapboxMaps in Frameworks */ = {isa = PBXBuildFile; productRef = 73EE73122DCE3F87001A4EC7 /* MapboxMaps */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 73EE72F22DCE3EB9001A4EC7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 73EE72DC2DCE3EB8001A4EC7 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 73EE72E32DCE3EB8001A4EC7; + remoteInfo = Interactions; + }; + 73EE72FC2DCE3EB9001A4EC7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 73EE72DC2DCE3EB8001A4EC7 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 73EE72E32DCE3EB8001A4EC7; + remoteInfo = Interactions; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 73EE72E42DCE3EB8001A4EC7 /* Interactions.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Interactions.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 73EE72F12DCE3EB9001A4EC7 /* InteractionsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteractionsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 73EE72FB2DCE3EB9001A4EC7 /* InteractionsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteractionsUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + 73EE73102DCE3F30001A4EC7 /* Exceptions for "Interactions" folder in "Interactions" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 73EE72E32DCE3EB8001A4EC7 /* Interactions */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 73EE72E62DCE3EB8001A4EC7 /* Interactions */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 73EE73102DCE3F30001A4EC7 /* Exceptions for "Interactions" folder in "Interactions" target */, + ); + path = Interactions; + sourceTree = ""; + }; + 73EE72F42DCE3EB9001A4EC7 /* InteractionsTests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = InteractionsTests; + sourceTree = ""; + }; + 73EE72FE2DCE3EB9001A4EC7 /* InteractionsUITests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = InteractionsUITests; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 73EE72E12DCE3EB8001A4EC7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 73EE73132DCE3F87001A4EC7 /* MapboxMaps in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 73EE72EE2DCE3EB9001A4EC7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 73EE72F82DCE3EB9001A4EC7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 73EE72DB2DCE3EB8001A4EC7 = { + isa = PBXGroup; + children = ( + 73EE72E62DCE3EB8001A4EC7 /* Interactions */, + 73EE72F42DCE3EB9001A4EC7 /* InteractionsTests */, + 73EE72FE2DCE3EB9001A4EC7 /* InteractionsUITests */, + 73EE73112DCE3F87001A4EC7 /* Frameworks */, + 73EE72E52DCE3EB8001A4EC7 /* Products */, + ); + sourceTree = ""; + }; + 73EE72E52DCE3EB8001A4EC7 /* Products */ = { + isa = PBXGroup; + children = ( + 73EE72E42DCE3EB8001A4EC7 /* Interactions.app */, + 73EE72F12DCE3EB9001A4EC7 /* InteractionsTests.xctest */, + 73EE72FB2DCE3EB9001A4EC7 /* InteractionsUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 73EE73112DCE3F87001A4EC7 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 73EE72E32DCE3EB8001A4EC7 /* Interactions */ = { + isa = PBXNativeTarget; + buildConfigurationList = 73EE73052DCE3EB9001A4EC7 /* Build configuration list for PBXNativeTarget "Interactions" */; + buildPhases = ( + 73EE72E02DCE3EB8001A4EC7 /* Sources */, + 73EE72E12DCE3EB8001A4EC7 /* Frameworks */, + 73EE72E22DCE3EB8001A4EC7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 73EE72E62DCE3EB8001A4EC7 /* Interactions */, + ); + name = Interactions; + packageProductDependencies = ( + 73EE73122DCE3F87001A4EC7 /* MapboxMaps */, + ); + productName = Interactions; + productReference = 73EE72E42DCE3EB8001A4EC7 /* Interactions.app */; + productType = "com.apple.product-type.application"; + }; + 73EE72F02DCE3EB9001A4EC7 /* InteractionsTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 73EE73082DCE3EB9001A4EC7 /* Build configuration list for PBXNativeTarget "InteractionsTests" */; + buildPhases = ( + 73EE72ED2DCE3EB9001A4EC7 /* Sources */, + 73EE72EE2DCE3EB9001A4EC7 /* Frameworks */, + 73EE72EF2DCE3EB9001A4EC7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 73EE72F32DCE3EB9001A4EC7 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 73EE72F42DCE3EB9001A4EC7 /* InteractionsTests */, + ); + name = InteractionsTests; + packageProductDependencies = ( + ); + productName = InteractionsTests; + productReference = 73EE72F12DCE3EB9001A4EC7 /* InteractionsTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 73EE72FA2DCE3EB9001A4EC7 /* InteractionsUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 73EE730B2DCE3EB9001A4EC7 /* Build configuration list for PBXNativeTarget "InteractionsUITests" */; + buildPhases = ( + 73EE72F72DCE3EB9001A4EC7 /* Sources */, + 73EE72F82DCE3EB9001A4EC7 /* Frameworks */, + 73EE72F92DCE3EB9001A4EC7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 73EE72FD2DCE3EB9001A4EC7 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 73EE72FE2DCE3EB9001A4EC7 /* InteractionsUITests */, + ); + name = InteractionsUITests; + packageProductDependencies = ( + ); + productName = InteractionsUITests; + productReference = 73EE72FB2DCE3EB9001A4EC7 /* InteractionsUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 73EE72DC2DCE3EB8001A4EC7 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1630; + LastUpgradeCheck = 1630; + TargetAttributes = { + 73EE72E32DCE3EB8001A4EC7 = { + CreatedOnToolsVersion = 16.3; + }; + 73EE72F02DCE3EB9001A4EC7 = { + CreatedOnToolsVersion = 16.3; + TestTargetID = 73EE72E32DCE3EB8001A4EC7; + }; + 73EE72FA2DCE3EB9001A4EC7 = { + CreatedOnToolsVersion = 16.3; + TestTargetID = 73EE72E32DCE3EB8001A4EC7; + }; + }; + }; + buildConfigurationList = 73EE72DF2DCE3EB8001A4EC7 /* Build configuration list for PBXProject "Interactions" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 73EE72DB2DCE3EB8001A4EC7; + minimizedProjectReferenceProxies = 1; + packageReferences = ( + 73EE730E2DCE3F1E001A4EC7 /* XCRemoteSwiftPackageReference "mapbox-maps-ios" */, + ); + preferredProjectObjectVersion = 77; + productRefGroup = 73EE72E52DCE3EB8001A4EC7 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 73EE72E32DCE3EB8001A4EC7 /* Interactions */, + 73EE72F02DCE3EB9001A4EC7 /* InteractionsTests */, + 73EE72FA2DCE3EB9001A4EC7 /* InteractionsUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 73EE72E22DCE3EB8001A4EC7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 73EE72EF2DCE3EB9001A4EC7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 73EE72F92DCE3EB9001A4EC7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 73EE72E02DCE3EB8001A4EC7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 73EE72ED2DCE3EB9001A4EC7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 73EE72F72DCE3EB9001A4EC7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 73EE72F32DCE3EB9001A4EC7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 73EE72E32DCE3EB8001A4EC7 /* Interactions */; + targetProxy = 73EE72F22DCE3EB9001A4EC7 /* PBXContainerItemProxy */; + }; + 73EE72FD2DCE3EB9001A4EC7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 73EE72E32DCE3EB8001A4EC7 /* Interactions */; + targetProxy = 73EE72FC2DCE3EB9001A4EC7 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 73EE73032DCE3EB9001A4EC7 /* 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; + DEVELOPMENT_TEAM = MCAQ3C87X5; + 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.4; + 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; + }; + 73EE73042DCE3EB9001A4EC7 /* 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"; + DEVELOPMENT_TEAM = MCAQ3C87X5; + 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.4; + 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; + }; + 73EE73062DCE3EB9001A4EC7 /* 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 = MCAQ3C87X5; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Interactions/Info.plist; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.Mapbox.Interactions; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 73EE73072DCE3EB9001A4EC7 /* 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 = MCAQ3C87X5; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = Interactions/Info.plist; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.Mapbox.Interactions; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 73EE73092DCE3EB9001A4EC7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = MCAQ3C87X5; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.4; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.Mapbox.InteractionsTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Interactions.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Interactions"; + }; + name = Debug; + }; + 73EE730A2DCE3EB9001A4EC7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = MCAQ3C87X5; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.4; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.Mapbox.InteractionsTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Interactions.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Interactions"; + }; + name = Release; + }; + 73EE730C2DCE3EB9001A4EC7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = MCAQ3C87X5; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.Mapbox.InteractionsUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Interactions; + }; + name = Debug; + }; + 73EE730D2DCE3EB9001A4EC7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = MCAQ3C87X5; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.Mapbox.InteractionsUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Interactions; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 73EE72DF2DCE3EB8001A4EC7 /* Build configuration list for PBXProject "Interactions" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 73EE73032DCE3EB9001A4EC7 /* Debug */, + 73EE73042DCE3EB9001A4EC7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 73EE73052DCE3EB9001A4EC7 /* Build configuration list for PBXNativeTarget "Interactions" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 73EE73062DCE3EB9001A4EC7 /* Debug */, + 73EE73072DCE3EB9001A4EC7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 73EE73082DCE3EB9001A4EC7 /* Build configuration list for PBXNativeTarget "InteractionsTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 73EE73092DCE3EB9001A4EC7 /* Debug */, + 73EE730A2DCE3EB9001A4EC7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 73EE730B2DCE3EB9001A4EC7 /* Build configuration list for PBXNativeTarget "InteractionsUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 73EE730C2DCE3EB9001A4EC7 /* Debug */, + 73EE730D2DCE3EB9001A4EC7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 73EE730E2DCE3F1E001A4EC7 /* XCRemoteSwiftPackageReference "mapbox-maps-ios" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/mapbox/mapbox-maps-ios.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 11.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 73EE73122DCE3F87001A4EC7 /* MapboxMaps */ = { + isa = XCSwiftPackageProductDependency; + package = 73EE730E2DCE3F1E001A4EC7 /* XCRemoteSwiftPackageReference "mapbox-maps-ios" */; + productName = MapboxMaps; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 73EE72DC2DCE3EB8001A4EC7 /* Project object */; +} diff --git a/ios-interactions/Interactions.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios-interactions/Interactions.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios-interactions/Interactions.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios-interactions/Interactions.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios-interactions/Interactions.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..b2f866a --- /dev/null +++ b/ios-interactions/Interactions.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,42 @@ +{ + "originHash" : "c48d77ebe93e854e8e2b4bbddf1d5fe4977e5a87efa4e14ea29c90b3e5919e31", + "pins" : [ + { + "identity" : "mapbox-common-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mapbox/mapbox-common-ios.git", + "state" : { + "revision" : "316a4f97bcf45aaae632327b69fac545cc38e42f", + "version" : "24.12.0" + } + }, + { + "identity" : "mapbox-core-maps-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", + "state" : { + "revision" : "853cfc3c431d42291e1c4a0d550fc8cf6ea90015", + "version" : "11.12.0" + } + }, + { + "identity" : "mapbox-maps-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mapbox/mapbox-maps-ios.git", + "state" : { + "revision" : "c141954157c3aaf09bc1bc3d233239666421b96e", + "version" : "11.12.0" + } + }, + { + "identity" : "turf-swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mapbox/turf-swift.git", + "state" : { + "revision" : "bf840e6b9529d105687840fe2c9dcd74197d46d1", + "version" : "4.0.0" + } + } + ], + "version" : 3 +} diff --git a/ios-interactions/Interactions/Assets.xcassets/AccentColor.colorset/Contents.json b/ios-interactions/Interactions/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/ios-interactions/Interactions/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios-interactions/Interactions/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios-interactions/Interactions/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2305880 --- /dev/null +++ b/ios-interactions/Interactions/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/ios-interactions/Interactions/Assets.xcassets/Contents.json b/ios-interactions/Interactions/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/ios-interactions/Interactions/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios-interactions/Interactions/ContentView.swift b/ios-interactions/Interactions/ContentView.swift new file mode 100644 index 0000000..d73c3c5 --- /dev/null +++ b/ios-interactions/Interactions/ContentView.swift @@ -0,0 +1,85 @@ +import SwiftUI +import MapboxMaps + +struct ContentView: View { + @State var selectedPlaces = [StandardPlaceLabelsFeature]() + @State private var selectedPriceLabel: FeaturesetFeature? + + var body: some View { + Map(initialViewport: .camera(center: .init(latitude: 40.72, longitude: -73.99), zoom: 11, pitch: 45)) { + StyleImport(id: "new-york-hotels", uri: StyleURI(url: styleURL)!) + + TapInteraction(.standardPlaceLabels) { placeLabel, _ in + selectedPlaces.append(placeLabel) + return true + } + + ForEvery(selectedPlaces, id: \.id) { placeLabel in + FeatureState(placeLabel, .init(select: true)) + } + + LongPressInteraction { _ in + selectedPlaces.removeAll() + return true + } + + TapInteraction(.featureset("hotels-price", importId: "new-york-hotels")) { priceLabel, _ in + /// Select a price label when it's clicked + selectedPriceLabel = priceLabel + return true + } + + if let selectedPriceLabel, let coordinate = selectedPriceLabel.geometry.point?.coordinates { + /// When there's a selected price label, we use it to set a feature state. + /// The `hidden` state is implemented in `new-york-hotels.json` and hides label and icon. + FeatureState(selectedPriceLabel, ["hidden": true]) + + /// Instead of label we show a callout annotation with animation. + MapViewAnnotation(coordinate: coordinate) { + HotelCallout(feature: selectedPriceLabel) + /// The `id` makes the view to be re-created for each unique feature + /// so appearing animation plays each time. + .id(selectedPriceLabel.id) + } + .variableAnchors([.init(anchor: .bottom)]) + } + } + .mapStyle(.standard( + lightPreset: .dawn + )) + .ignoresSafeArea() + } +} + +private struct HotelCallout: View { + var feature: FeaturesetFeature + + @State private var scale: CGFloat = 0.1 + + var body: some View { + VStack(alignment: .center, spacing: 2) { + Text(feature.properties["name"]??.string ?? "—") + .font(.headline) + .foregroundColor(.black) + Text(feature.properties["price"]??.number.map { "$ \(Int($0))" } ?? "—") + .font(.subheadline) + .foregroundColor(.green) + .fontWeight(.bold) + } + .padding(6) + .background(Color.white.opacity(0.9)) + .cornerRadius(8) + .scaleEffect(scale, anchor: .bottom) + .onAppear { + withAnimation(Animation.interpolatingSpring(stiffness: 200, damping: 16)) { + scale = 1.0 + } + } + } +} + +private let styleURL = Bundle.main.url(forResource: "new-york-hotels", withExtension: "json")! + +#Preview { + ContentView() +} diff --git a/ios-interactions/Interactions/Info.plist b/ios-interactions/Interactions/Info.plist new file mode 100644 index 0000000..331db3f --- /dev/null +++ b/ios-interactions/Interactions/Info.plist @@ -0,0 +1,8 @@ + + + + + MBXAccessToken + YOUR_MAPBOX_ACCESS_TOKEN + + diff --git a/ios-interactions/Interactions/InteractionsApp.swift b/ios-interactions/Interactions/InteractionsApp.swift new file mode 100644 index 0000000..4022444 --- /dev/null +++ b/ios-interactions/Interactions/InteractionsApp.swift @@ -0,0 +1,10 @@ +import SwiftUI + +@main +struct InteractionsApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/ios-interactions/Interactions/new-york-hotels.json b/ios-interactions/Interactions/new-york-hotels.json new file mode 100644 index 0000000..6f7315a --- /dev/null +++ b/ios-interactions/Interactions/new-york-hotels.json @@ -0,0 +1,233 @@ +{ + "version": 8, + "sprite": "mapbox://sprites/examples/clkiip5x600b501pb4al5g7wv/du1h5vs55f48z8rgjod0dggl9", + "projection": { "name": "globe" }, + "sources": { + "water_source": { + "type": "vector", + "url": "mapbox://mapbox.mapbox-streets-v8" + }, + "ny_subway": { + "url": "mapbox://examples.clkicyt9103ld2hnxxfo3vpnm-3wmoh", + "type": "vector" + }, + "hotels_data": { + "type": "vector", + "url": "mapbox://examples.clkiiizwk04l62jo3rjx61lgj-7xsxp" + } + }, + "featuresets": { + "hotels-price": { + "selectors": [{ "layer": "NY-hotels-price" }] + } + }, + "layers": [ + { + "id": "subway-lines", + "type": "line", + "slot": "middle", + "source": "ny_subway", + "source-layer": "NY_subway", + "minzoom": 9, + "layout": {}, + "paint": { + "line-emissive-strength": 1, + "line-depth-occlusion-factor": 0.9, + "line-color": [ + "match", + ["get", "name"], + ["A", "C", "E"], + "#0039a6", + ["B", "D", "F", "M"], + "#ff6319", + ["N-Q-R-W"], + "hsl(245, 65%, 55%)", + ["N-R", "Q", "W"], + "#fccc0a", + ["1", "2-3"], + "#EE352e", + ["G"], + "#6cbe45", + ["L"], + "#a7a9ac", + ["6", "4-5"], + "#00933c", + ["7"], + "#b933ad", + ["J-Z"], + "#996333", + ["S"], + "#808183", + ["T"], + "#00add0", + "#000000" + ], + "line-opacity": ["interpolate", ["linear"], ["zoom"], 9, 0, 10, 1], + "line-width": ["interpolate", ["linear"], ["zoom"], 9, 1, 13, 2, 22, 7] + } + }, + { + "id": "subway-entrances", + "type": "symbol", + "slot": "top", + "source": "ny_subway", + "source-layer": "NY_subway", + "minzoom": 16, + "filter": ["all", ["match", ["geometry-type"], ["Point"], true, false]], + "layout": { + "text-size": 12, + "icon-image": "new-york-subway", + "text-font": ["DIN Pro Medium", "Arial Unicode MS Regular"], + "text-justify": [ + "match", + ["get", "stop_type"], + "entrance", + "left", + "center" + ], + "text-offset": [ + "match", + ["get", "stop_type"], + "entrance", + ["literal", [1, 0]], + ["literal", [0, 0.8]] + ], + "text-anchor": [ + "match", + ["get", "stop_type"], + "entrance", + "left", + "top" + ], + "text-field": ["to-string", ["get", "name"]], + "text-letter-spacing": 0.01, + "text-max-width": ["match", ["get", "stop_type"], "entrance", 15, 9] + }, + "paint": { + "text-halo-color": [ + "interpolate", + ["linear"], + ["measure-light", "brightness"], + 0.25, + "hsl(0, 0%, 0%)", + 0.3, + "hsl(0, 0%, 100%)" + ], + "text-halo-blur": 0.5, + "text-halo-width": 0.5, + "text-color": [ + "interpolate", + ["linear"], + ["measure-light", "brightness"], + 0.25, + "hsl(225, 80%, 90%)", + 0.3, + "hsl(225, 60%, 58%)" + ] + } + }, + { + "id": "subway-lines-text", + "type": "symbol", + "slot": "middle", + "source": "ny_subway", + "source-layer": "NY_subway", + "minzoom": 12, + "layout": { + "text-field": ["to-string", ["get", "name"]], + "text-font": ["Montserrat Bold", "Arial Unicode MS Regular"], + "text-size": ["interpolate", ["linear"], ["zoom"], 12, 8, 22, 12], + "text-opacity": ["interpolate", ["linear"], ["zoom"], 11.5, 0, 12, 1], + "symbol-placement": "line", + "symbol-spacing": ["interpolate", ["linear"], ["zoom"], 0, 50, 16, 200], + "text-pitch-alignment": "viewport" + }, + "paint": { + "text-halo-color": [ + "match", + ["get", "name"], + ["A", "C", "E"], + "#0039a6", + ["B", "D", "F", "M"], + "#ff6319", + ["N-Q-R-W"], + "hsl(245, 65%, 55%)", + ["N-R", "Q", "W"], + "#fccc0a", + ["1", "2-3"], + "#EE352e", + ["G"], + "#6cbe45", + ["L"], + "#a7a9ac", + ["6", "4-5"], + "#00933c", + ["7"], + "#b933ad", + ["J-Z"], + "#996333", + ["S"], + "#808183", + ["T"], + "#00add0", + "#000000" + ], + "text-halo-width": 40, + "text-color": "#ffffff" + } + }, + { + "id": "NY-hotels", + "type": "circle", + "slot": "top", + "source": "hotels_data", + "source-layer": "NY_hotels", + "minzoom": 9, + "paint": { + "circle-emissive-strength": 1, + "circle-radius": ["interpolate", ["linear"], ["zoom"], 8, 2, 22, 4], + "circle-color": "hsl(220, 100%, 100%)", + "circle-stroke-color": [ + "interpolate", + ["linear"], + ["measure-light", "brightness"], + 0.25, + "hsl(0, 0%, 0%)", + 0.3, + "hsl(220, 100%, 20%)" + ], + "circle-stroke-width": 1 + } + }, + { + "id": "NY-hotels-price", + "type": "symbol", + "slot": "top", + "source": "hotels_data", + "source-layer": "NY_hotels", + "minzoom": 9, + "layout": { + "text-field": ["to-string", ["concat", "$ ", ["get", "price"]]], + "text-offset": [0, -0.2], + "text-size": 14, + "icon-image": "price_1.2", + "text-font": ["Open Sans ExtraBold", "Arial Unicode MS Regular"] + }, + "paint": { + "text-color": "hsl(220, 100%, 20%)", + "text-opacity": [ + "case", + ["to-boolean", ["feature-state", "hidden"]], + 0, + 1 + ], + "icon-opacity": [ + "case", + ["to-boolean", ["feature-state", "hidden"]], + 0, + 1 + ] + } + } + ] +} diff --git a/ios-interactions/InteractionsTests/InteractionsTests.swift b/ios-interactions/InteractionsTests/InteractionsTests.swift new file mode 100644 index 0000000..be71a38 --- /dev/null +++ b/ios-interactions/InteractionsTests/InteractionsTests.swift @@ -0,0 +1,10 @@ +import Testing +@testable import Interactions + +struct InteractionsTests { + + @Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. + } + +} diff --git a/ios-interactions/InteractionsUITests/InteractionsUITests.swift b/ios-interactions/InteractionsUITests/InteractionsUITests.swift new file mode 100644 index 0000000..68c6eeb --- /dev/null +++ b/ios-interactions/InteractionsUITests/InteractionsUITests.swift @@ -0,0 +1,34 @@ +import XCTest + +final class InteractionsUITests: 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 { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } +} diff --git a/ios-interactions/InteractionsUITests/InteractionsUITestsLaunchTests.swift b/ios-interactions/InteractionsUITests/InteractionsUITestsLaunchTests.swift new file mode 100644 index 0000000..be85173 --- /dev/null +++ b/ios-interactions/InteractionsUITests/InteractionsUITestsLaunchTests.swift @@ -0,0 +1,26 @@ +import XCTest + +final class InteractionsUITestsLaunchTests: 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) + } +} diff --git a/ios-interactions/README.md b/ios-interactions/README.md new file mode 100644 index 0000000..a955e1d --- /dev/null +++ b/ios-interactions/README.md @@ -0,0 +1,26 @@ +## Mapbox Maps SDK for iOS Interactions App + +This repo is a demo application to help developers understand how to use the [Interactions API](https://docs.mapbox.com/ios/maps/guides/user-interaction/Interactions/) in the [Mapbox Maps SDK for iOS](https://docs.mapbox.com/ios/maps). + +The app demonstrates basic functionality including: + +- Adding a TapInteraction to a Standard style featureset +- Adding a LongPressInteraction to remove selected features +- Importing a custom style to your map, and add a TapInteraction to one of its featuresets +- Creating a custom MapViewAnnotation + +You can follow the tutorial step-by-step here: https://docs.mapbox.com/help/tutorials/ios-interactions/. + + ### Requirements + - A [Mapbox Account](https://console.mapbox.com) and Access Token + - Xcode + +#### Add your Access Token +As outlined in the [Install Guide](https://docs.mapbox.com/ios/maps/guides/install/) you **must** configure your public token to make requests to Mapbox services. Add your access token to the `Info.plist` file and replace `YOUR_MAPBOX_ACCESS_TOKEN` with your public token. Find your token in the [Mapbox Console](https://console.mapbox.com). + +### Custom New York Hotels Style + +This app uses a local style file called `new-york-hotels.json`, which will be imported into the app. You can find this file in the `Interactions` folder. + + +