diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..e644113 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..1aa94a4 --- /dev/null +++ b/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..7101f8e --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/iosApp/AI_PROMPTS.md b/iosApp/AI_PROMPTS.md new file mode 100644 index 0000000..6c0b46f --- /dev/null +++ b/iosApp/AI_PROMPTS.md @@ -0,0 +1,38 @@ + +## AI Usage Log + +### Prompt 1 — Architecture planning +> *"Design an iOS architecture that safely bridges KMP StateFlow to SwiftUI, resolves Koin DI from Swift without modifying the shared module, and supports list/detail/favourites screens."* + +**Used:** Store pattern, `StateFlowCollector`, `AsyncStream` extension, `ViewModelFactory` + `EnvironmentKey` shape. +**Changed:** Replaced `DispatchQueue.main.async` with `await MainActor.run` throughout for structured concurrency consistency. + +### Prompt 2 — Koin DI from Swift +> *"Koin's reified get() doesn't work from Swift and I can't modify the shared module. How do I resolve PokemonRepository from the Koin container?"* + +**Used:** `instanceRegistry.instances` iteration + `qualifiedName` match in `KoinDependencyManager`. +**Changed:** Added `fatalError` guards for clearer startup failure messages. + +### Prompt 3 — StateFlow AsyncStream bridge +> *"Build a type-safe Swift AsyncStream wrapper around Kotlinx_coroutines_coreFlowCollector for use with for-await loops."* + +**Used:** `StateFlowCollector` + `stream(of:)` extension directly. +**Changed:** Added `withExtendedLifetime(collector)` in `onTermination` to prevent premature ARC dealloc. + +### Prompt 4 — Image caching +> *"Build a custom ObservableObject image loader with NSCache and retry logic, safe for @MainActor SwiftUI views."* + +**Used:** `PokemonImageLoader` structure (cache lookup, retry loop, `URLSessionDataTask`). +**Changed:** Switched to `Task { @MainActor in }` for actor isolation; added `hasFailed` for placeholder rendering. + +### Prompt 5 — Detail screen layout +> *"Build a SwiftUI detail screen with: Swift Charts stat bars, abilities grid"* + +**Used:** Decomposed view structure (`PokemonHeaderView`, `PokemonStatsSectionView`, `PokemonAbilitiesSectionView`), pulsing circle animation. +**Changed:** Replaced `GeometryReader` header with `ZStack` + `HStack` overlay; switched abilities to `adaptive(minimum: 60)` grid for variable-length names. added a haptics feedback on favourites. minor UI tweaks to make it look good. + +### Prompt 7 — TypeColors +> *"Map all 18 Pokémon types to SwiftUI Colors for type chips and background glows."* + +**Used:** Type → colour dictionary directly. +**Changed:** Adjusted Fire and Ghost colours to work better on dark mode. diff --git a/iosApp/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp/iosApp.xcodeproj/project.pbxproj new file mode 100644 index 0000000..f2e55af --- /dev/null +++ b/iosApp/iosApp/iosApp.xcodeproj/project.pbxproj @@ -0,0 +1,521 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXContainerItemProxy section */ + 381729C42F8DF9F00064C89B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3869BED82F8B6CA300A211E4 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3869BEDF2F8B6CA300A211E4; + remoteInfo = iosApp; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 381729C02F8DF9F00064C89B /* iosAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iosAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3869BEE02F8B6CA300A211E4 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 381729C12F8DF9F00064C89B /* iosAppTests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = iosAppTests; + sourceTree = ""; + }; + 3869BEE22F8B6CA300A211E4 /* iosApp */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = iosApp; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 381729BD2F8DF9F00064C89B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3869BEDD2F8B6CA300A211E4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3869BED72F8B6CA300A211E4 = { + isa = PBXGroup; + children = ( + 3869BEE22F8B6CA300A211E4 /* iosApp */, + 381729C12F8DF9F00064C89B /* iosAppTests */, + 3869BEE12F8B6CA300A211E4 /* Products */, + ); + sourceTree = ""; + }; + 3869BEE12F8B6CA300A211E4 /* Products */ = { + isa = PBXGroup; + children = ( + 3869BEE02F8B6CA300A211E4 /* iosApp.app */, + 381729C02F8DF9F00064C89B /* iosAppTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 381729BF2F8DF9F00064C89B /* iosAppTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 381729C62F8DF9F00064C89B /* Build configuration list for PBXNativeTarget "iosAppTests" */; + buildPhases = ( + 381729BC2F8DF9F00064C89B /* Sources */, + 381729BD2F8DF9F00064C89B /* Frameworks */, + 381729BE2F8DF9F00064C89B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 381729C52F8DF9F00064C89B /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 381729C12F8DF9F00064C89B /* iosAppTests */, + ); + name = iosAppTests; + packageProductDependencies = ( + ); + productName = iosAppTests; + productReference = 381729C02F8DF9F00064C89B /* iosAppTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 3869BEDF2F8B6CA300A211E4 /* iosApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3869BEEB2F8B6CA400A211E4 /* Build configuration list for PBXNativeTarget "iosApp" */; + buildPhases = ( + 3869BEDC2F8B6CA300A211E4 /* Sources */, + 381729A22F8DF6690064C89B /* swift lint */, + 3869BEDD2F8B6CA300A211E4 /* Frameworks */, + 3869BEDE2F8B6CA300A211E4 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 3869BEE22F8B6CA300A211E4 /* iosApp */, + ); + name = iosApp; + packageProductDependencies = ( + ); + productName = iosApp; + productReference = 3869BEE02F8B6CA300A211E4 /* iosApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 3869BED82F8B6CA300A211E4 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 2640; + LastUpgradeCheck = 2640; + TargetAttributes = { + 381729BF2F8DF9F00064C89B = { + CreatedOnToolsVersion = 26.4; + TestTargetID = 3869BEDF2F8B6CA300A211E4; + }; + 3869BEDF2F8B6CA300A211E4 = { + CreatedOnToolsVersion = 26.4; + }; + }; + }; + buildConfigurationList = 3869BEDB2F8B6CA300A211E4 /* Build configuration list for PBXProject "iosApp" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 3869BED72F8B6CA300A211E4; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 3869BEE12F8B6CA300A211E4 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 3869BEDF2F8B6CA300A211E4 /* iosApp */, + 381729BF2F8DF9F00064C89B /* iosAppTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 381729BE2F8DF9F00064C89B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3869BEDE2F8B6CA300A211E4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 381729A22F8DF6690064C89B /* swift lint */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 8; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "swift lint"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 1; + shellPath = /bin/sh; + shellScript = "if [[ \"$(uname -m)\" == arm64 ]]\nthen\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif command -v swiftlint >/dev/null 2>&1\nthen\n swiftlint\nelse\n echo \"warning: `swiftlint` command not found - See https://github.com/realm/SwiftLint#installation for installation instructions.\"\nfi\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 381729BC2F8DF9F00064C89B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3869BEDC2F8B6CA300A211E4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 381729C52F8DF9F00064C89B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3869BEDF2F8B6CA300A211E4 /* iosApp */; + targetProxy = 381729C42F8DF9F00064C89B /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 381729C72F8DF9F00064C89B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 2BMUKRTSZ6; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; + MACOSX_DEPLOYMENT_TARGET = 26.4; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.akash.pokedex.iosAppTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + STRING_CATALOG_GENERATE_SYMBOLS = NO; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iosApp.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/iosApp"; + XROS_DEPLOYMENT_TARGET = 26.4; + }; + name = Debug; + }; + 381729C82F8DF9F00064C89B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 2BMUKRTSZ6; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; + MACOSX_DEPLOYMENT_TARGET = 26.4; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.akash.pokedex.iosAppTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + STRING_CATALOG_GENERATE_SYMBOLS = NO; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iosApp.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/iosApp"; + XROS_DEPLOYMENT_TARGET = 26.4; + }; + name = Release; + }; + 3869BEE92F8B6CA400A211E4 /* 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 = 2BMUKRTSZ6; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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 = 16.6; + 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; + }; + 3869BEEA2F8B6CA400A211E4 /* 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 = 2BMUKRTSZ6; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + 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 = 16.6; + 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; + }; + 3869BEEC2F8B6CA400A211E4 /* 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 = 2BMUKRTSZ6; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = "Pokédesk"; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games"; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-lsqlite3", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.akash.pokedex.iosApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 3869BEED2F8B6CA400A211E4 /* 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 = 2BMUKRTSZ6; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = "Pokédesk"; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games"; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-lsqlite3", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.akash.pokedex.iosApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 381729C62F8DF9F00064C89B /* Build configuration list for PBXNativeTarget "iosAppTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 381729C72F8DF9F00064C89B /* Debug */, + 381729C82F8DF9F00064C89B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3869BEDB2F8B6CA300A211E4 /* Build configuration list for PBXProject "iosApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3869BEE92F8B6CA400A211E4 /* Debug */, + 3869BEEA2F8B6CA400A211E4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3869BEEB2F8B6CA400A211E4 /* Build configuration list for PBXNativeTarget "iosApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3869BEEC2F8B6CA400A211E4 /* Debug */, + 3869BEED2F8B6CA400A211E4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 3869BED82F8B6CA300A211E4 /* Project object */; +} diff --git a/iosApp/iosApp/iosApp.xcodeproj/xcshareddata/xcschemes/iosApp.xcscheme b/iosApp/iosApp/iosApp.xcodeproj/xcshareddata/xcschemes/iosApp.xcscheme new file mode 100644 index 0000000..a1d99f8 --- /dev/null +++ b/iosApp/iosApp/iosApp.xcodeproj/xcshareddata/xcschemes/iosApp.xcscheme @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iosApp/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json b/iosApp/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/iosApp/iosApp/iosApp/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iosApp/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/iosApp/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2305880 --- /dev/null +++ b/iosApp/iosApp/iosApp/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/iosApp/iosApp/iosApp/Assets.xcassets/Contents.json b/iosApp/iosApp/iosApp/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/iosApp/iosApp/iosApp/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iosApp/iosApp/iosApp/Components/DimensionView.swift b/iosApp/iosApp/iosApp/Components/DimensionView.swift new file mode 100644 index 0000000..a9e5523 --- /dev/null +++ b/iosApp/iosApp/iosApp/Components/DimensionView.swift @@ -0,0 +1,60 @@ +// +// DimensionView.swift +// iosApp +// +// Created by Akash K on 13/04/26. +// + +import SwiftUI +import Foundation +import shared + +struct DimensionView: View { + + let pokemonDetail: PokemonDetail + + var body: some View { + VStack(spacing: 8) { + detailCard( + iconName: "ruler", + title: "Height", + value: formattedHeight + ) + + detailCard( + iconName: "scalemass", + title: "Weight", + value: formattedWeight + ) + } + .frame(maxWidth: 80) + } + + private var formattedHeight: String { + let meters = Double(pokemonDetail.height) / 10.0 + return String(format: "%.1f m", meters) + } + + private var formattedWeight: String { + let kilograms = Double(pokemonDetail.weight) / 10.0 + return String(format: "%.1f kg", kilograms) + } + + private func detailCard(iconName: String, title: String, value: String) -> some View { + VStack(spacing: 4) { + Text(value) + .font(.system(.footnote, weight: .semibold)) + Image(systemName: iconName) + .font(.footnote) + .foregroundStyle(.secondary) + .accessibilityLabel(title) + } + .frame(maxWidth: .infinity) + .padding(.vertical, 10) + .padding(.horizontal, 6) + .background( + RoundedRectangle(cornerRadius: 12, style: .continuous) + .fill(.ultraThinMaterial) + ) + } +} diff --git a/iosApp/iosApp/iosApp/Components/EmptyStateView.swift b/iosApp/iosApp/iosApp/Components/EmptyStateView.swift new file mode 100644 index 0000000..5c36291 --- /dev/null +++ b/iosApp/iosApp/iosApp/Components/EmptyStateView.swift @@ -0,0 +1,34 @@ +// +// FavoritesEmptyStateView.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import SwiftUI + +struct EmptyStateView: View { + var iconName: String + var title: String + var subtitle: String? + + var body: some View { + VStack(spacing: 12) { + Image(systemName: iconName) + .font(.system(size: 48)) + .foregroundStyle(.secondary) + + Text(title) + .font(.title3.weight(.semibold)) + + if let subtitle { + Text(subtitle) + .font(.subheadline) + .foregroundStyle(.secondary) + .multilineTextAlignment(.center) + } + + } + .frame(maxWidth: .infinity, maxHeight: .infinity) + } +} diff --git a/iosApp/iosApp/iosApp/Components/FavoriteRowView.swift b/iosApp/iosApp/iosApp/Components/FavoriteRowView.swift new file mode 100644 index 0000000..b74cecf --- /dev/null +++ b/iosApp/iosApp/iosApp/Components/FavoriteRowView.swift @@ -0,0 +1,52 @@ +// +// FavoriteRowView.swift +// iosApp +// +// Created by Akash K on 13/04/26. +// + +import SwiftUI +import shared + +struct FavoriteRowView: View { + let pokemon: Pokemon + + var body: some View { + HStack(spacing: 14) { + AsyncImage(url: URL(string: pokemon.imageUrl)) { image in + image + .resizable() + .scaledToFit() + } placeholder: { + ProgressView() + } + .frame(width: 56, height: 56) + .background(Color(.systemGray6)) + .clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous)) + + VStack(alignment: .leading, spacing: 2) { + Text(PokemonDisplayFormatter.formattedName(pokemon.name)) + .font(.body.weight(.semibold)) + + Text(PokemonDisplayFormatter.formattedID(pokemon.id)) + .font(.caption) + .foregroundStyle(.secondary) + } + + Spacer() + + Image(systemName: "heart.fill") + .foregroundStyle(.red) + } + .padding(12) + .background( + RoundedRectangle(cornerRadius: 16, style: .continuous) + .fill(Color(uiColor: .secondarySystemBackground)) + ) + .overlay( + RoundedRectangle(cornerRadius: 16, style: .continuous) + .strokeBorder(.quaternary, lineWidth: 1) + ) + .shadow(color: .black.opacity(0.04), radius: 4, x: 0, y: 2) + } +} diff --git a/iosApp/iosApp/iosApp/Components/GridCell.swift b/iosApp/iosApp/iosApp/Components/GridCell.swift new file mode 100644 index 0000000..2ba02e1 --- /dev/null +++ b/iosApp/iosApp/iosApp/Components/GridCell.swift @@ -0,0 +1,95 @@ +// +// GridCell.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import SwiftUI +import shared +import UIKit +import Combine + +struct GridCell: View { + let pokemon: Pokemon + + @Environment(\.colorScheme) private var colorScheme + @StateObject private var imageLoader: PokemonImageLoader + + private var cardFill: Color { + Color(uiColor: .secondarySystemBackground) + } + + private var cardStroke: Color { + colorScheme == .dark ? .white.opacity(0.18) : .black.opacity(0.08) + } + + private var cardShadow: Color { + colorScheme == .dark ? .clear : .black.opacity(0.08) + } + + init(pokemon: Pokemon) { + self.pokemon = pokemon + _imageLoader = StateObject(wrappedValue: PokemonImageLoader(urlString: pokemon.imageUrl)) + } + + var body: some View { + ZStack(alignment: .top) { + VStack(spacing: 10) { + imageContent + .frame(width: 96, height: 96) + + Text(pokemon.name.capitalized) + .font(.subheadline.weight(.semibold)) + .foregroundStyle(.primary) + .lineLimit(1) + .frame(maxWidth: .infinity) + } + .padding(.horizontal, 12) + .padding(.vertical, 14) + .frame(maxWidth: .infinity, minHeight: 150, alignment: .top) + .background( + RoundedRectangle(cornerRadius: 14, style: .continuous) + .fill(cardFill) + ) + .overlay( + RoundedRectangle(cornerRadius: 14, style: .continuous) + .stroke(cardStroke, lineWidth: 1) + ) + .shadow(color: cardShadow, radius: 6, x: 0, y: 2) + + Text(PokemonDisplayFormatter.formattedID(pokemon.id)) + .font(.caption) + .foregroundStyle(.secondary) + .padding(.horizontal, 4) + .padding(.vertical, 2) + .background( + Capsule() + .stroke(.secondary.opacity(0.4), lineWidth: 1) + ) + .padding(8) + .frame(maxWidth: .infinity, alignment: .trailing) + } + + .task { + imageLoader.loadIfNeeded() + } + } + + @ViewBuilder + private var imageContent: some View { + if let uiImage = imageLoader.image { + Image(uiImage: uiImage) + .resizable() + .scaledToFit() + } else if imageLoader.isLoading { + ProgressView() + .frame(maxWidth: .infinity, maxHeight: .infinity) + } else { + Image(systemName: imageLoader.hasFailed ? "exclamationmark.triangle" : "photo") + .font(.largeTitle) + .foregroundStyle(.secondary) + .frame(maxWidth: .infinity, maxHeight: .infinity) + } + } +} diff --git a/iosApp/iosApp/iosApp/Components/PokemonAbilitiesSectionView.swift b/iosApp/iosApp/iosApp/Components/PokemonAbilitiesSectionView.swift new file mode 100644 index 0000000..aa3a1ea --- /dev/null +++ b/iosApp/iosApp/iosApp/Components/PokemonAbilitiesSectionView.swift @@ -0,0 +1,43 @@ +// +// PokemonAbilitiesSectionView.swift +// iosApp +// +// Created by Akash K on 13/04/26. +// + +import SwiftUI + +struct PokemonAbilitiesSectionView: View { + let abilities: [String] + + private let abilityColumns = [ + GridItem(.adaptive(minimum: 100), spacing: 8, alignment: .leading) + ] + + var body: some View { + VStack(alignment: .leading, spacing: 12) { + SectionTitleView(title: "Abilities") + + LazyVGrid(columns: abilityColumns, alignment: .leading, spacing: 8) { + ForEach(abilities, id: \.self) { ability in + Text(ability.replacingOccurrences(of: "-", with: " ").capitalized) + .font(.subheadline.weight(.medium)) + .lineLimit(1) + .frame(maxWidth: .infinity, alignment: .center) + .padding(.horizontal, 12) + .padding(.vertical, 8) + .background( + RoundedRectangle(cornerRadius: 10, style: .continuous) + .fill(.ultraThinMaterial) + ) + } + } + } + .padding(12) + .frame(maxWidth: .infinity, alignment: .leading) + .overlay( + RoundedRectangle(cornerRadius: 16, style: .continuous) + .strokeBorder(.quaternary, lineWidth: 1) + ) + } +} diff --git a/iosApp/iosApp/iosApp/Components/StatsView.swift b/iosApp/iosApp/iosApp/Components/StatsView.swift new file mode 100644 index 0000000..f9b4c08 --- /dev/null +++ b/iosApp/iosApp/iosApp/Components/StatsView.swift @@ -0,0 +1,90 @@ +// +// StatBarView.swift +// iosApp +// +// Created by Akash K on 13/04/26. +// + +import SwiftUI +import Charts +import shared + +struct StatsView: View { + + let pokemonDetail: PokemonDetail + + private let pastelPalette: [Color] = [ + Color(red: 0.95, green: 0.66, blue: 0.66), + Color(red: 0.98, green: 0.78, blue: 0.56), + Color(red: 0.98, green: 0.89, blue: 0.60), + Color(red: 0.72, green: 0.87, blue: 0.68), + Color(red: 0.67, green: 0.83, blue: 0.95), + Color(red: 0.82, green: 0.74, blue: 0.95) + ] + + var body: some View { + Chart { + ForEach(Array(pokemonDetail.stats.enumerated()), id: \.element.name) { index, stat in + let color = pastelPalette[index % pastelPalette.count] + + BarMark( + x: .value("Value", Int(stat.value)), + y: .value("Stat", statLabel(stat.name)) + ) + .foregroundStyle(color.gradient) + .cornerRadius(8) + + PointMark( + x: .value("Value", Int(stat.value)), + y: .value("Stat", statLabel(stat.name)) + ) + .annotation(position: .trailing, spacing: 6) { + Text("\(stat.value)") + .font(.caption2.weight(.semibold)) + .foregroundStyle(.secondary) + } + .opacity(0.001) + } + } + .chartXScale(domain: 0...max(120, maxStatValue + 10)) + .chartXAxis { + AxisMarks(position: .bottom) + } + .chartYAxis { + AxisMarks(position: .leading) + } + .chartPlotStyle { plotArea in + plotArea + .background(.white.opacity(0.08)) + .clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous)) + } + .frame(height: 280) + .padding(14) + .background( + RoundedRectangle(cornerRadius: 16, style: .continuous) + .fill(.ultraThinMaterial) + ) + .overlay( + RoundedRectangle(cornerRadius: 16, style: .continuous) + .strokeBorder(.quaternary, lineWidth: 1) + ) + } + + private var maxStatValue: Int { + pokemonDetail.stats.map { Int($0.value) }.max() ?? 100 + } + + func statLabel(_ statName: String) -> String { + switch statName.lowercased() { + case "hp": + return statName.uppercased() + case "attack", "defense", "speed": + return statName.capitalized + case "special-attack", "special-defense": + return statName.replacingOccurrences(of: "-", with: " ").capitalized + default: + return statName.uppercased() + } + } + +} diff --git a/iosApp/iosApp/iosApp/Components/TypeChipView.swift b/iosApp/iosApp/iosApp/Components/TypeChipView.swift new file mode 100644 index 0000000..386e639 --- /dev/null +++ b/iosApp/iosApp/iosApp/Components/TypeChipView.swift @@ -0,0 +1,25 @@ +// +// TypeChipView.swift +// iosApp +// +// Created by Akash K on 13/04/26. +// + +import SwiftUI + +struct TypeChipView: View { + + let type: String + + var body: some View { + Text(type.capitalized) + .font(.system(.caption, weight: .bold)) + .foregroundStyle(.white) + .padding(.horizontal, 12) + .padding(.vertical, 6) + .background( + Capsule() + .fill(TypeColors.color(for: type).gradient) + ) + } +} diff --git a/iosApp/iosApp/iosApp/Helpers/AppDependencies.swift b/iosApp/iosApp/iosApp/Helpers/AppDependencies.swift new file mode 100644 index 0000000..3f73ef4 --- /dev/null +++ b/iosApp/iosApp/iosApp/Helpers/AppDependencies.swift @@ -0,0 +1,60 @@ +// +// AppDependencies.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import shared +import SwiftUI + +protocol ViewModelFactory { + func makeListViewModel() -> ListViewModel + func makeDetailsViewModel(name: String) -> DetailsViewModel + func makeFavouritesViewModel() -> FavouritesViewModel +} + +final class AppDependencies: ViewModelFactory { + private let repository: PokemonRepository + + init(koinDependencyManager: KoinDependencyManager = .shared) { + self.repository = koinDependencyManager.repository + } + + func makeListViewModel() -> ListViewModel { + ListViewModel(repository: repository) + } + + func makeDetailsViewModel(name: String) -> DetailsViewModel { + DetailsViewModel(name: name, repository: repository) + } + + func makeFavouritesViewModel() -> FavouritesViewModel { + FavouritesViewModel(repository: repository) + } +} + +private final class DefaultViewModelFactory: ViewModelFactory { + func makeListViewModel() -> ListViewModel { + fatalError("ViewModelFactory not configured in Environment") + } + + func makeDetailsViewModel(name: String) -> DetailsViewModel { + fatalError("ViewModelFactory not configured in Environment") + } + + func makeFavouritesViewModel() -> FavouritesViewModel { + fatalError("ViewModelFactory not configured in Environment") + } +} + +private struct ViewModelFactoryKey: EnvironmentKey { + static let defaultValue: ViewModelFactory = DefaultViewModelFactory() +} + +extension EnvironmentValues { + var viewModelFactory: ViewModelFactory { + get { self[ViewModelFactoryKey.self] } + set { self[ViewModelFactoryKey.self] = newValue } + } +} diff --git a/iosApp/iosApp/iosApp/Helpers/GenericStateFlowCollector.swift b/iosApp/iosApp/iosApp/Helpers/GenericStateFlowCollector.swift new file mode 100644 index 0000000..a201be7 --- /dev/null +++ b/iosApp/iosApp/iosApp/Helpers/GenericStateFlowCollector.swift @@ -0,0 +1,42 @@ +// +// GenericStateFlowCollector.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import shared + +final class StateFlowCollector: Kotlinx_coroutines_coreFlowCollector { + private let onEachValue: (Any?) -> Void + + init(onEach: @escaping (State) -> Void) { + self.onEachValue = { value in + guard let state = value as? State else { return } + onEach(state) + } + } + + func emit(value: Any?, completionHandler: @escaping (Error?) -> Void) { + onEachValue(value) + completionHandler(nil) + } +} + +extension Kotlinx_coroutines_coreFlow { + func stream(of type: Value.Type = Value.self) -> AsyncStream { + AsyncStream { continuation in + let collector = StateFlowCollector { (value: Value) in + continuation.yield(value) + } + + collect(collector: collector) { _ in + continuation.finish() + } + + continuation.onTermination = { [collector] _ in + withExtendedLifetime(collector) {} + } + } + } +} diff --git a/iosApp/iosApp/iosApp/Helpers/HapticsManager.swift b/iosApp/iosApp/iosApp/Helpers/HapticsManager.swift new file mode 100644 index 0000000..5f6b91e --- /dev/null +++ b/iosApp/iosApp/iosApp/Helpers/HapticsManager.swift @@ -0,0 +1,24 @@ +// +// HapticsManager.swift +// iosApp +// +// Created by Akash K on 13/04/26. +// + +import UIKit + +protocol HapticsProviding { + func favouriteAdded() +} + +final class HapticsManager: HapticsProviding { + static let shared = HapticsManager() + + private init() {} + + func favouriteAdded() { + let generator = UINotificationFeedbackGenerator() + generator.prepare() + generator.notificationOccurred(.success) + } +} diff --git a/iosApp/iosApp/iosApp/Helpers/KoinDependencyManager.swift b/iosApp/iosApp/iosApp/Helpers/KoinDependencyManager.swift new file mode 100644 index 0000000..331efbb --- /dev/null +++ b/iosApp/iosApp/iosApp/Helpers/KoinDependencyManager.swift @@ -0,0 +1,51 @@ +// +// PokemonRespositoryManager.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import shared + +class KoinDependencyManager { + static let shared = KoinDependencyManager() + + private let koin: Koin_coreKoin + let repository: PokemonRepository + + private init() { + var koinRef: Koin_coreKoin? + + ModulesKt.doInitKoin( + driverFactory: DatabaseDriverFactory(), + enableNetworkLogs: true, + appDeclaration: { app in + koinRef = app.koin + } + ) + + guard let koinRef else { + fatalError("failed to initialise koin") + } + + koin = koinRef + let instances = koin.instanceRegistry.instances + var repoKotlinClass: KotlinKClass? + + for (_, factory) in instances { + let primaryType = factory.beanDefinition.primaryType + if primaryType.qualifiedName == + "com.assignment.pokemon.data.repository.PokemonRepository" { + repoKotlinClass = primaryType + break + } + } + + guard let repoKotlinClass, + let repo = koin.get(clazz: repoKotlinClass, qualifier: nil, parameters: nil) as? PokemonRepository else { + fatalError("PokemonRepository not found in Koin") + } + + self.repository = repo + } +} diff --git a/iosApp/iosApp/iosApp/Helpers/PokemonDisplayFormatter.swift b/iosApp/iosApp/iosApp/Helpers/PokemonDisplayFormatter.swift new file mode 100644 index 0000000..7ec93c9 --- /dev/null +++ b/iosApp/iosApp/iosApp/Helpers/PokemonDisplayFormatter.swift @@ -0,0 +1,22 @@ +// +// PokemonDisplayFormatter.swift +// iosApp +// +// Created by Akash K on 13/04/26. +// + +import Foundation + +enum PokemonDisplayFormatter { + static func formattedID(_ id: Int32) -> String { + String(format: "#%03d", Int(id)) + } + + static func formattedID(_ id: Int64) -> String { + String(format: "#%03d", Int(id)) + } + + static func formattedName(_ name: String) -> String { + name.capitalized + } +} diff --git a/iosApp/iosApp/iosApp/Helpers/PokemonImageLoader.swift b/iosApp/iosApp/iosApp/Helpers/PokemonImageLoader.swift new file mode 100644 index 0000000..280f2d5 --- /dev/null +++ b/iosApp/iosApp/iosApp/Helpers/PokemonImageLoader.swift @@ -0,0 +1,76 @@ +// +// PokemonImageLoader.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import Combine +import Foundation +import UIKit + +@MainActor +final class PokemonImageLoader: ObservableObject { + @Published var image: UIImage? + @Published var isLoading = false + @Published var hasFailed = false + + private static let cache = NSCache() + private let url: URL? + private let cacheKey: NSString + private var task: URLSessionDataTask? + + init(urlString: String) { + self.url = URL(string: urlString) + self.cacheKey = urlString as NSString + } + + deinit { + task?.cancel() + } + + func loadIfNeeded() { + guard image == nil, !isLoading else { return } + + if let cached = Self.cache.object(forKey: cacheKey) { + image = cached + return + } + + load(retryCount: 2) + } + + private func load(retryCount: Int) { + guard let url else { + hasFailed = true + return + } + + isLoading = true + hasFailed = false + + task?.cancel() + task = URLSession.shared.dataTask(with: url) { [weak self] data, response, error in + guard let self else { return } + + Task { @MainActor in + self.isLoading = false + + let statusCode = (response as? HTTPURLResponse)?.statusCode ?? 0 + if let data, error == nil, (200..<300).contains(statusCode), let image = UIImage(data: data) { + Self.cache.setObject(image, forKey: self.cacheKey) + self.image = image + return + } + + if retryCount > 0 { + try? await Task.sleep(for: .milliseconds(250)) + self.load(retryCount: retryCount - 1) + } else { + self.hasFailed = true + } + } + } + task?.resume() + } +} diff --git a/iosApp/iosApp/iosApp/Helpers/TypeColors.swift b/iosApp/iosApp/iosApp/Helpers/TypeColors.swift new file mode 100644 index 0000000..4870602 --- /dev/null +++ b/iosApp/iosApp/iosApp/Helpers/TypeColors.swift @@ -0,0 +1,41 @@ +// +// TypeColors.swift +// iosApp +// +// Created by Akash K on 13/04/26. +// + +import UIKit +import SwiftUI + +enum TypeColors { + + static func color(for type: String) -> Color { + switch type.lowercased() { + case "normal": return Color(red: 0.66, green: 0.65, blue: 0.48) + case "fire": return Color(red: 0.93, green: 0.51, blue: 0.19) + case "water": return Color(red: 0.39, green: 0.56, blue: 0.94) + case "electric": return Color(red: 0.97, green: 0.82, blue: 0.17) + case "grass": return Color(red: 0.48, green: 0.78, blue: 0.30) + case "ice": return Color(red: 0.59, green: 0.85, blue: 0.84) + case "fighting": return Color(red: 0.76, green: 0.18, blue: 0.16) + case "poison": return Color(red: 0.64, green: 0.24, blue: 0.63) + case "ground": return Color(red: 0.89, green: 0.75, blue: 0.40) + case "flying": return Color(red: 0.66, green: 0.56, blue: 0.95) + case "psychic": return Color(red: 0.98, green: 0.33, blue: 0.53) + case "bug": return Color(red: 0.65, green: 0.73, blue: 0.10) + case "rock": return Color(red: 0.71, green: 0.63, blue: 0.21) + case "ghost": return Color(red: 0.45, green: 0.34, blue: 0.59) + case "dragon": return Color(red: 0.44, green: 0.21, blue: 0.99) + case "dark": return Color(red: 0.44, green: 0.34, blue: 0.27) + case "steel": return Color(red: 0.72, green: 0.72, blue: 0.81) + case "fairy": return Color(red: 0.84, green: 0.52, blue: 0.68) + default: return .gray + } + } + + static func background(for type: String?) -> Color { + guard let type else { return color(for: "normal") } + return color(for: type).opacity(0.3) + } +} diff --git a/iosApp/iosApp/iosApp/ViewModels/DetailsViewModel.swift b/iosApp/iosApp/iosApp/ViewModels/DetailsViewModel.swift new file mode 100644 index 0000000..7fee963 --- /dev/null +++ b/iosApp/iosApp/iosApp/ViewModels/DetailsViewModel.swift @@ -0,0 +1,54 @@ +// +// DetailsViewModel.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import shared +import Combine + +final class DetailsViewModel: ObservableObject { + @Published private(set) var detailState: PokemonDetailState = .Loading() + private let viewModel: PokemonDetailViewModel + private var stateTask: Task? + + init(name: String, repository: PokemonRepository) { + viewModel = PokemonDetailViewModel( + pokemonName: name, + repository: repository + ) + + if let currentState = viewModel.state.value as? PokemonDetailState { + detailState = currentState + } + + observeState() + } + + deinit { + viewModel.onCleared() + stateTask?.cancel() + } + + func toggleFavourite() { + viewModel.toggleFavorite() + } + + func retry() { + viewModel.retry() + } + + private func observeState() { + let stateFlow = viewModel.state + + stateTask = Task { [weak self] in + for await state in stateFlow.stream(of: PokemonDetailState.self) { + guard let self else { return } + await MainActor.run { + self.detailState = state + } + } + } + } +} diff --git a/iosApp/iosApp/iosApp/ViewModels/FavouritesViewModel.swift b/iosApp/iosApp/iosApp/ViewModels/FavouritesViewModel.swift new file mode 100644 index 0000000..0d333bb --- /dev/null +++ b/iosApp/iosApp/iosApp/ViewModels/FavouritesViewModel.swift @@ -0,0 +1,64 @@ +// +// FavouritesViewModel.swift +// iosApp +// +// Created by Akash K on 13/04/26. +// + +import Foundation +import Combine +import shared + +final class FavouritesViewModel: ObservableObject { + + @Published private(set) var favorites: [Pokemon] = [] + @Published private(set) var lastErrorMessage: String? + private let repository: PokemonRepository + private let viewModel: FavoritesViewModel + private var favoritesTask: Task? + + init(repository: PokemonRepository) { + self.repository = repository + self.viewModel = FavoritesViewModel(repository: repository) + + if let currentFavorites = viewModel.favorites.value as? [Pokemon] { + favorites = currentFavorites + } + + observeFavorites() + } + + deinit { + favoritesTask?.cancel() + viewModel.onCleared() + } + + func unfavourite(_ pokemon: Pokemon) { + repository.setFavorite( + id: pokemon.id, + name: pokemon.name, + imageUrl: pokemon.imageUrl, + isFavorite: false + ) { [weak self] error in + guard let self else { return } + if let error { + Task { @MainActor in + self.lastErrorMessage = error.localizedDescription + } + } + } + } + + private func observeFavorites() { + let favoritesFlow = viewModel.favorites + + favoritesTask = Task { [weak self] in + for await items in favoritesFlow.stream(of: [Pokemon].self) { + guard let self else { return } + await MainActor.run { + self.favorites = items + } + } + } + } +} diff --git a/iosApp/iosApp/iosApp/ViewModels/ListViewModel.swift b/iosApp/iosApp/iosApp/ViewModels/ListViewModel.swift new file mode 100644 index 0000000..71d8e61 --- /dev/null +++ b/iosApp/iosApp/iosApp/ViewModels/ListViewModel.swift @@ -0,0 +1,56 @@ +// +// ListViewModel.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import shared +import Combine + +final class ListViewModel: ObservableObject { + + @Published private(set) var listState: PokemonListState = .Loading() + private let viewModel: PokemonListViewModel + private var stateTask: Task? + + init(repository: PokemonRepository) { + self.viewModel = PokemonListViewModel(repository: repository) + + if let currentState = viewModel.state.value as? PokemonListState { + listState = currentState + } + + observeState() + } + + deinit { + stateTask?.cancel() + viewModel.onCleared() + } + + func refresh() { + viewModel.refresh() + } + + func loadNextPage() { + viewModel.loadNextPage() + } + + func search(_ searchText: String) { + viewModel.search(query: searchText) + } + + private func observeState() { + let stateFlow = viewModel.state + + stateTask = Task { [weak self] in + for await state in stateFlow.stream(of: PokemonListState.self) { + guard let self else { return } + await MainActor.run { + self.listState = state + } + } + } + } +} diff --git a/iosApp/iosApp/iosApp/Views/DetailsView.swift b/iosApp/iosApp/iosApp/Views/DetailsView.swift new file mode 100644 index 0000000..9f436fb --- /dev/null +++ b/iosApp/iosApp/iosApp/Views/DetailsView.swift @@ -0,0 +1,203 @@ +// +// DetailsView.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import SwiftUI +import shared +import Charts + +struct DetailsView: View { + let name: String + @StateObject private var viewModel: DetailsViewModel + private let hapticsManager: HapticsProviding + + init( + name: String, + viewModel: @escaping (String) -> DetailsViewModel, + hapticsManager: HapticsProviding = HapticsManager.shared + ) { + self.name = name + self.hapticsManager = hapticsManager + _viewModel = StateObject(wrappedValue: viewModel(name)) + } + + private let bgFill = Color(uiColor: UIColor.secondarySystemBackground) + + var body: some View { + Group { + switch viewModel.detailState { + case is PokemonDetailState.Loading: + ProgressView() + case let success as PokemonDetailState.Success: + let pokemonDetail = success.pokemon + ScrollView { + VStack(spacing: 12) { + PokemonHeaderView(pokemonDetail: pokemonDetail) + + PokemonTypeListView(types: pokemonDetail.types) + + PokemonStatsSectionView(pokemonDetail: pokemonDetail) + + PokemonAbilitiesSectionView(abilities: pokemonDetail.abilities) + } + } + .scrollIndicators(.hidden) + .padding(.horizontal) + .toolbar { + ToolbarItem(placement: .topBarTrailing) { + Button { + let willBecomeFavourite = !pokemonDetail.isFavorite + viewModel.toggleFavourite() + if willBecomeFavourite { + hapticsManager.favouriteAdded() + } + } label: { + Image(systemName: pokemonDetail.isFavorite ? "heart.fill" : "heart") + } + } + } + .navigationTitle(pokemonDetail.name.capitalized) + .navigationBarTitleDisplayMode(.inline) + case let error as PokemonDetailState.Error: + Text(error.message) + default: + EmptyView() + } + } + .onAppear { + viewModel.retry() + } + } +} + +struct PokemonHeaderView: View { + let pokemonDetail: PokemonDetail + + var body: some View { + ZStack(alignment: .center) { + + VStack(spacing: 0) { + Text(PokemonDisplayFormatter.formattedID(pokemonDetail.id)) + .font(.caption) + .foregroundStyle(.secondary) + .padding(.horizontal, 4) + .padding(.vertical, 2) + .background( + Capsule() + .stroke(.secondary.opacity(0.4), lineWidth: 1) + ) + .padding(8) + .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top) + + PokemonImageView(imageUrl: pokemonDetail.imageUrl, firstType: pokemonDetail.types.first) + } + + HStack { + DimensionView(pokemonDetail: pokemonDetail) + Spacer() + } + } + .frame(maxWidth: .infinity) + } +} + +struct PokemonImageView: View { + let imageUrl: String + let firstType: String? + @StateObject private var imageLoader: PokemonImageLoader + @State private var isPulsing = false + + init(imageUrl: String, firstType: String?) { + self.imageUrl = imageUrl + self.firstType = firstType + _imageLoader = StateObject(wrappedValue: PokemonImageLoader(urlString: imageUrl)) + } + + var body: some View { + imageContent + .frame(height: 200) + .background { + Circle() + .fill(TypeColors.background(for: firstType)) + .blur(radius: 40) + .scaleEffect(isPulsing ? 1.2 : 0.8) + .frame(maxWidth: .infinity, maxHeight: .infinity) + .onAppear { + withAnimation( + .easeIn(duration: 2) + .repeatForever(autoreverses: true) + ) { + isPulsing = true + } + } + .onDisappear { + isPulsing = false + } + } + .transition(.opacity) + .task { + imageLoader.loadIfNeeded() + } + } + + @ViewBuilder + private var imageContent: some View { + if let uiImage = imageLoader.image { + Image(uiImage: uiImage) + .resizable() + .aspectRatio(contentMode: .fit) + } else if imageLoader.isLoading { + ProgressView() + .frame(maxWidth: .infinity, maxHeight: .infinity) + } else { + Image(systemName: imageLoader.hasFailed ? "photo.badge.exclamationmark" : "photo") + .resizable() + .aspectRatio(contentMode: .fit) + .foregroundStyle(.secondary) + .padding(40) + } + } +} + +struct PokemonTypeListView: View { + let types: [String] + + var body: some View { + HStack(spacing: 8) { + ForEach(types, id: \.self) { type in + TypeChipView(type: type) + } + } + } +} + +struct PokemonStatsSectionView: View { + let pokemonDetail: PokemonDetail + + var body: some View { + VStack(alignment: .leading, spacing: 8) { + SectionTitleView(title: "Stats") + .padding(.leading) + .padding(.top) + StatsView(pokemonDetail: pokemonDetail) + } + .frame(maxWidth: .infinity, alignment: .leading) + .overlay( + RoundedRectangle(cornerRadius: 16, style: .continuous) + .strokeBorder(.quaternary, lineWidth: 1) + ) + } +} + +struct SectionTitleView: View { + let title: String + + var body: some View { + Text(title) + .font(.headline) + .frame(maxWidth: .infinity, alignment: .leading) + } +} diff --git a/iosApp/iosApp/iosApp/Views/FavouritesView.swift b/iosApp/iosApp/iosApp/Views/FavouritesView.swift new file mode 100644 index 0000000..7f479d6 --- /dev/null +++ b/iosApp/iosApp/iosApp/Views/FavouritesView.swift @@ -0,0 +1,53 @@ +// +// FavouritesView.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import SwiftUI +import shared + +struct FavouritesView: View { + @StateObject private var viewModel: FavouritesViewModel + + init(viewModel: @escaping () -> FavouritesViewModel) { + _viewModel = StateObject(wrappedValue: viewModel()) + } + + var body: some View { + NavigationStack { + Group { + if viewModel.favorites.isEmpty { + EmptyStateView( + iconName: "heart.slash", + title: "No Favourites Yet" + ) + } else { + VStack(alignment: .leading, spacing: 8) { + List(viewModel.favorites, id: \.id) { pokemon in + FavoriteRowView(pokemon: pokemon) + .swipeActions(edge: .trailing, allowsFullSwipe: true) { + Button(role: .destructive) { + viewModel.unfavourite(pokemon) + } label: { + Label("Unfavourite", systemImage: "heart.slash") + } + } + .listRowInsets(EdgeInsets(top: 4, leading: 12, bottom: 4, trailing: 12)) + .listRowSeparator(.hidden) + .listRowBackground(Color.clear) + } + .listStyle(.plain) + .scrollContentBackground(.hidden) + } + } + } + .navigationTitle("Favourites") + } + } +} + +#Preview { + FavouritesView(viewModel: { AppDependencies().makeFavouritesViewModel() }) +} diff --git a/iosApp/iosApp/iosApp/Views/ListView.swift b/iosApp/iosApp/iosApp/Views/ListView.swift new file mode 100644 index 0000000..8f25c51 --- /dev/null +++ b/iosApp/iosApp/iosApp/Views/ListView.swift @@ -0,0 +1,101 @@ +// +// ListView.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import SwiftUI +import shared + +struct ListView: View { + @Environment(\.viewModelFactory) private var viewModelFactory + @StateObject private var viewModel: ListViewModel + @State private var searchText = "" + + init(viewModel: @escaping () -> ListViewModel) { + _viewModel = StateObject(wrappedValue: viewModel()) + } + + private let column = [ + GridItem(.flexible(minimum: 0, maximum: .infinity), spacing: 12), + GridItem(.flexible(minimum: 0, maximum: .infinity), spacing: 12) + ] + + var body: some View { + NavigationStack { + Group { + switch viewModel.listState { + case is PokemonListState.Loading: + ProgressView("Loading Pokémon…") + .frame(maxWidth: .infinity, maxHeight: .infinity) + case let error as PokemonListState.Error: + VStack(spacing: 16) { + Image(systemName: "wifi.exclamationmark") + .font(.system(size: 48)) + .foregroundStyle(.secondary) + Text("Something went wrong") + .font(.title3.weight(.semibold)) + Text(error.message) + .font(.subheadline) + .foregroundStyle(.secondary) + .multilineTextAlignment(.center) + .padding(.horizontal) + Button { + viewModel.refresh() + } label: { + Label("Retry", systemImage: "arrow.clockwise") + .font(.subheadline.weight(.medium)) + .padding(.horizontal, 20) + .padding(.vertical, 10) + .background(.tint.opacity(0.12), in: Capsule()) + } + } + .frame(maxWidth: .infinity, maxHeight: .infinity) + case let success as PokemonListState.Success: + let list = success.pokemon + if list.isEmpty { + EmptyStateView( + iconName: "exclamationmark.magnifyingglass", + title: "No Pokémon Found" + ) + } else { + ScrollView { + LazyVGrid(columns: column, spacing: 12) { + ForEach(list, id: \.id) { pokemon in + NavigationLink { + DetailsView( + name: pokemon.name, + viewModel: viewModelFactory.makeDetailsViewModel + ) + } label: { + GridCell(pokemon: pokemon) + } + .buttonStyle(.plain) + .onAppear { + if pokemon.id == list.last?.id { + viewModel.loadNextPage() + } + } + } + } + .padding(.vertical, 12) + } + .scrollIndicators(.hidden) + .padding(.horizontal, 12) + .refreshable { + viewModel.refresh() + } + } + default: + EmptyView() + } + } + .searchable(text: $searchText) + .navigationTitle("Pokédex") + } + .onChange(of: searchText) { newValue in + viewModel.search(newValue) + } + } +} diff --git a/iosApp/iosApp/iosApp/Views/RootView.swift b/iosApp/iosApp/iosApp/Views/RootView.swift new file mode 100644 index 0000000..70e699d --- /dev/null +++ b/iosApp/iosApp/iosApp/Views/RootView.swift @@ -0,0 +1,30 @@ +// +// RootView.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import SwiftUI + +struct RootView: View { + @Environment(\.viewModelFactory) private var viewModelFactory + + var body: some View { + TabView { + ListView(viewModel: viewModelFactory.makeListViewModel) + .tabItem { + Label("Pokédex", systemImage: "square.grid.2x2.fill") + } + FavouritesView(viewModel: viewModelFactory.makeFavouritesViewModel) + .tabItem { + Label("Favourites", systemImage: "heart.fill") + } + }.tint(.red) + } +} + +#Preview { + RootView() + .environment(\.viewModelFactory, AppDependencies()) +} diff --git a/iosApp/iosApp/iosApp/iosAppApp.swift b/iosApp/iosApp/iosApp/iosAppApp.swift new file mode 100644 index 0000000..cd4a97b --- /dev/null +++ b/iosApp/iosApp/iosApp/iosAppApp.swift @@ -0,0 +1,24 @@ +// +// iosAppApp.swift +// iosApp +// +// Created by Akash K on 12/04/26. +// + +import SwiftUI + +@main +struct IosApp: App { + private let dependencies: ViewModelFactory + + init() { + self.dependencies = AppDependencies() + } + + var body: some Scene { + WindowGroup { + RootView() + .environment(\.viewModelFactory, dependencies) + } + } +} diff --git a/iosApp/iosApp/iosApp/shared.xcframework/Info.plist b/iosApp/iosApp/iosApp/shared.xcframework/Info.plist new file mode 100644 index 0000000..7f78951 --- /dev/null +++ b/iosApp/iosApp/iosApp/shared.xcframework/Info.plist @@ -0,0 +1,44 @@ + + + + + AvailableLibraries + + + BinaryPath + shared.framework/shared + LibraryIdentifier + ios-arm64 + LibraryPath + shared.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + ios + + + BinaryPath + shared.framework/shared + LibraryIdentifier + ios-arm64_x86_64-simulator + LibraryPath + shared.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + ios + SupportedPlatformVariant + simulator + + + CFBundlePackageType + XFWK + XCFrameworkFormatVersion + 1.0 + + diff --git a/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64/shared.framework/Headers/shared.h b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64/shared.framework/Headers/shared.h new file mode 100644 index 0000000..278e45b --- /dev/null +++ b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64/shared.framework/Headers/shared.h @@ -0,0 +1,1717 @@ +#import +#import +#import +#import +#import +#import +#import + +@class SharedFavoritePokemon, SharedKotlinUnit, SharedRuntimeTransacterTransaction, SharedKotlinThrowable, SharedRuntimeBaseTransacterImpl, SharedRuntimeTransacterImpl, SharedRuntimeQuery<__covariant RowType>, SharedPokemon, SharedPokemonStat, SharedPokemonDetail, SharedNamedResourceDto, SharedAbilitySlotDtoCompanion, SharedAbilitySlotDto, SharedNamedResourceDtoCompanion, SharedTypeSlotDto, SharedStatEntryDto, SharedPokemonDetailDtoCompanion, SharedPokemonDetailDto, SharedPokemonDtoCompanion, SharedPokemonDto, SharedPokemonListDtoCompanion, SharedPokemonListDto, SharedStatEntryDtoCompanion, SharedTypeSlotDtoCompanion, SharedPokemonPage, SharedFavoritePokemonQueries, SharedPokemonDatabaseCompanion, SharedBaseViewModel, SharedPokemonDetailState, SharedPokemonDetailStateError, SharedPokemonDetailStateLoading, SharedPokemonDetailStateSuccess, SharedPokemonListState, SharedPokemonListStateError, SharedPokemonListStateLoading, SharedPokemonListStateSuccess, SharedPokemonListViewModelCompanion, SharedDatabaseDriverFactory, SharedKoin_coreKoinApplication, SharedKoin_coreModule, SharedKotlinArray, SharedRuntimeExecutableQuery<__covariant RowType>, SharedKotlinException, SharedKotlinRuntimeException, SharedKotlinIllegalStateException, SharedRuntimeAfterVersion, SharedKoin_coreKoinApplicationCompanion, SharedKoin_coreLogger, SharedKoin_coreLevel, SharedKoin_coreKoin, SharedKoin_coreKoinDefinition, SharedKoin_coreScope, SharedKoin_coreParametersHolder, SharedKoin_coreInstanceFactory, SharedKoin_coreSingleInstanceFactory, SharedKoin_coreScopeDSL, SharedKotlinByteArray, SharedKotlinx_serialization_coreSerializersModule, SharedKotlinx_serialization_coreSerialKind, SharedKotlinNothing, SharedKotlinEnumCompanion, SharedKotlinEnum, SharedKotlinLazyThreadSafetyMode, SharedKoin_coreExtensionManager, SharedKoin_coreInstanceRegistry, SharedKoin_corePropertyRegistry, SharedKoin_coreScopeRegistry, SharedKoin_coreLockable, SharedKoin_coreBeanDefinition, SharedKoin_coreInstanceFactoryCompanion, SharedKoin_coreResolutionContext, SharedKotlinByteIterator, SharedKoin_coreScopeRegistryCompanion, SharedKoin_coreKind, SharedKoin_coreCallbacks; + +@protocol SharedRuntimeSqlDriver, SharedRuntimeTransactionWithoutReturn, SharedRuntimeTransactionWithReturn, SharedRuntimeTransacterBase, SharedRuntimeTransacter, SharedKotlinx_serialization_coreKSerializer, SharedKotlinx_coroutines_coreFlow, SharedPokemonDatabase, SharedRuntimeSqlSchema, SharedKotlinx_coroutines_coreCoroutineScope, SharedPokemonRepository, SharedKotlinx_coroutines_coreStateFlow, SharedRuntimeQueryListener, SharedRuntimeQueryResult, SharedRuntimeSqlPreparedStatement, SharedRuntimeSqlCursor, SharedRuntimeCloseable, SharedRuntimeTransactionCallbacks, SharedKotlinx_serialization_coreEncoder, SharedKotlinx_serialization_coreSerialDescriptor, SharedKotlinx_serialization_coreSerializationStrategy, SharedKotlinx_serialization_coreDecoder, SharedKotlinx_serialization_coreDeserializationStrategy, SharedKotlinx_coroutines_coreFlowCollector, SharedKotlinCoroutineContext, SharedKotlinx_coroutines_coreSharedFlow, SharedKoin_coreQualifier, SharedKotlinIterator, SharedKotlinx_serialization_coreCompositeEncoder, SharedKotlinAnnotation, SharedKotlinx_serialization_coreCompositeDecoder, SharedKotlinCoroutineContextElement, SharedKotlinCoroutineContextKey, SharedKotlinComparable, SharedKoin_coreKoinScopeComponent, SharedKotlinKClass, SharedKotlinLazy, SharedKoin_coreScopeCallback, SharedKotlinx_serialization_coreSerializersModuleCollector, SharedKoin_coreKoinComponent, SharedKotlinKDeclarationContainer, SharedKotlinKAnnotatedElement, SharedKotlinKClassifier, SharedKoin_coreKoinExtension; + +NS_ASSUME_NONNULL_BEGIN +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunknown-warning-option" +#pragma clang diagnostic ignored "-Wincompatible-property-type" +#pragma clang diagnostic ignored "-Wnullability" + +#pragma push_macro("_Nullable_result") +#if !__has_feature(nullability_nullable_result) +#undef _Nullable_result +#define _Nullable_result _Nullable +#endif + +__attribute__((swift_name("KotlinBase"))) +@interface SharedBase : NSObject +- (instancetype)init __attribute__((unavailable)); ++ (instancetype)new __attribute__((unavailable)); ++ (void)initialize __attribute__((objc_requires_super)); +@end + +@interface SharedBase (SharedBaseCopying) +@end + +__attribute__((swift_name("KotlinMutableSet"))) +@interface SharedMutableSet : NSMutableSet +@end + +__attribute__((swift_name("KotlinMutableDictionary"))) +@interface SharedMutableDictionary : NSMutableDictionary +@end + +@interface NSError (NSErrorSharedKotlinException) +@property (readonly) id _Nullable kotlinException; +@end + +__attribute__((swift_name("KotlinNumber"))) +@interface SharedNumber : NSNumber +- (instancetype)initWithChar:(char)value __attribute__((unavailable)); +- (instancetype)initWithUnsignedChar:(unsigned char)value __attribute__((unavailable)); +- (instancetype)initWithShort:(short)value __attribute__((unavailable)); +- (instancetype)initWithUnsignedShort:(unsigned short)value __attribute__((unavailable)); +- (instancetype)initWithInt:(int)value __attribute__((unavailable)); +- (instancetype)initWithUnsignedInt:(unsigned int)value __attribute__((unavailable)); +- (instancetype)initWithLong:(long)value __attribute__((unavailable)); +- (instancetype)initWithUnsignedLong:(unsigned long)value __attribute__((unavailable)); +- (instancetype)initWithLongLong:(long long)value __attribute__((unavailable)); +- (instancetype)initWithUnsignedLongLong:(unsigned long long)value __attribute__((unavailable)); +- (instancetype)initWithFloat:(float)value __attribute__((unavailable)); +- (instancetype)initWithDouble:(double)value __attribute__((unavailable)); +- (instancetype)initWithBool:(BOOL)value __attribute__((unavailable)); +- (instancetype)initWithInteger:(NSInteger)value __attribute__((unavailable)); +- (instancetype)initWithUnsignedInteger:(NSUInteger)value __attribute__((unavailable)); ++ (instancetype)numberWithChar:(char)value __attribute__((unavailable)); ++ (instancetype)numberWithUnsignedChar:(unsigned char)value __attribute__((unavailable)); ++ (instancetype)numberWithShort:(short)value __attribute__((unavailable)); ++ (instancetype)numberWithUnsignedShort:(unsigned short)value __attribute__((unavailable)); ++ (instancetype)numberWithInt:(int)value __attribute__((unavailable)); ++ (instancetype)numberWithUnsignedInt:(unsigned int)value __attribute__((unavailable)); ++ (instancetype)numberWithLong:(long)value __attribute__((unavailable)); ++ (instancetype)numberWithUnsignedLong:(unsigned long)value __attribute__((unavailable)); ++ (instancetype)numberWithLongLong:(long long)value __attribute__((unavailable)); ++ (instancetype)numberWithUnsignedLongLong:(unsigned long long)value __attribute__((unavailable)); ++ (instancetype)numberWithFloat:(float)value __attribute__((unavailable)); ++ (instancetype)numberWithDouble:(double)value __attribute__((unavailable)); ++ (instancetype)numberWithBool:(BOOL)value __attribute__((unavailable)); ++ (instancetype)numberWithInteger:(NSInteger)value __attribute__((unavailable)); ++ (instancetype)numberWithUnsignedInteger:(NSUInteger)value __attribute__((unavailable)); +@end + +__attribute__((swift_name("KotlinByte"))) +@interface SharedByte : SharedNumber +- (instancetype)initWithChar:(char)value; ++ (instancetype)numberWithChar:(char)value; +@end + +__attribute__((swift_name("KotlinUByte"))) +@interface SharedUByte : SharedNumber +- (instancetype)initWithUnsignedChar:(unsigned char)value; ++ (instancetype)numberWithUnsignedChar:(unsigned char)value; +@end + +__attribute__((swift_name("KotlinShort"))) +@interface SharedShort : SharedNumber +- (instancetype)initWithShort:(short)value; ++ (instancetype)numberWithShort:(short)value; +@end + +__attribute__((swift_name("KotlinUShort"))) +@interface SharedUShort : SharedNumber +- (instancetype)initWithUnsignedShort:(unsigned short)value; ++ (instancetype)numberWithUnsignedShort:(unsigned short)value; +@end + +__attribute__((swift_name("KotlinInt"))) +@interface SharedInt : SharedNumber +- (instancetype)initWithInt:(int)value; ++ (instancetype)numberWithInt:(int)value; +@end + +__attribute__((swift_name("KotlinUInt"))) +@interface SharedUInt : SharedNumber +- (instancetype)initWithUnsignedInt:(unsigned int)value; ++ (instancetype)numberWithUnsignedInt:(unsigned int)value; +@end + +__attribute__((swift_name("KotlinLong"))) +@interface SharedLong : SharedNumber +- (instancetype)initWithLongLong:(long long)value; ++ (instancetype)numberWithLongLong:(long long)value; +@end + +__attribute__((swift_name("KotlinULong"))) +@interface SharedULong : SharedNumber +- (instancetype)initWithUnsignedLongLong:(unsigned long long)value; ++ (instancetype)numberWithUnsignedLongLong:(unsigned long long)value; +@end + +__attribute__((swift_name("KotlinFloat"))) +@interface SharedFloat : SharedNumber +- (instancetype)initWithFloat:(float)value; ++ (instancetype)numberWithFloat:(float)value; +@end + +__attribute__((swift_name("KotlinDouble"))) +@interface SharedDouble : SharedNumber +- (instancetype)initWithDouble:(double)value; ++ (instancetype)numberWithDouble:(double)value; +@end + +__attribute__((swift_name("KotlinBoolean"))) +@interface SharedBoolean : SharedNumber +- (instancetype)initWithBool:(BOOL)value; ++ (instancetype)numberWithBool:(BOOL)value; +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("FavoritePokemon"))) +@interface SharedFavoritePokemon : SharedBase +- (instancetype)initWithId:(int64_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl __attribute__((swift_name("init(id:name:imageUrl:)"))) __attribute__((objc_designated_initializer)); +- (SharedFavoritePokemon *)doCopyId:(int64_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl __attribute__((swift_name("doCopy(id:name:imageUrl:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) int64_t id __attribute__((swift_name("id"))); +@property (readonly) NSString *imageUrl __attribute__((swift_name("imageUrl"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@end + +__attribute__((swift_name("RuntimeBaseTransacterImpl"))) +@interface SharedRuntimeBaseTransacterImpl : SharedBase +- (instancetype)initWithDriver:(id)driver __attribute__((swift_name("init(driver:)"))) __attribute__((objc_designated_initializer)); + +/** + * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +- (NSString *)createArgumentsCount:(int32_t)count __attribute__((swift_name("createArguments(count:)"))); + +/** + * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +- (void)notifyQueriesIdentifier:(int32_t)identifier tableProvider:(void (^)(SharedKotlinUnit *(^)(NSString *)))tableProvider __attribute__((swift_name("notifyQueries(identifier:tableProvider:)"))); + +/** + * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +- (id _Nullable)postTransactionCleanupTransaction:(SharedRuntimeTransacterTransaction *)transaction enclosing:(SharedRuntimeTransacterTransaction * _Nullable)enclosing thrownException:(SharedKotlinThrowable * _Nullable)thrownException returnValue:(id _Nullable)returnValue __attribute__((swift_name("postTransactionCleanup(transaction:enclosing:thrownException:returnValue:)"))); + +/** + * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +@property (readonly) id driver __attribute__((swift_name("driver"))); +@end + +__attribute__((swift_name("RuntimeTransacterBase"))) +@protocol SharedRuntimeTransacterBase +@required +@end + +__attribute__((swift_name("RuntimeTransacter"))) +@protocol SharedRuntimeTransacter +@required +- (void)transactionNoEnclosing:(BOOL)noEnclosing body:(void (^)(id))body __attribute__((swift_name("transaction(noEnclosing:body:)"))); +- (id _Nullable)transactionWithResultNoEnclosing:(BOOL)noEnclosing bodyWithReturn:(id _Nullable (^)(id))bodyWithReturn __attribute__((swift_name("transactionWithResult(noEnclosing:bodyWithReturn:)"))); +@end + +__attribute__((swift_name("RuntimeTransacterImpl"))) +@interface SharedRuntimeTransacterImpl : SharedRuntimeBaseTransacterImpl +- (instancetype)initWithDriver:(id)driver __attribute__((swift_name("init(driver:)"))) __attribute__((objc_designated_initializer)); +- (void)transactionNoEnclosing:(BOOL)noEnclosing body:(void (^)(id))body __attribute__((swift_name("transaction(noEnclosing:body:)"))); +- (id _Nullable)transactionWithResultNoEnclosing:(BOOL)noEnclosing bodyWithReturn:(id _Nullable (^)(id))bodyWithReturn __attribute__((swift_name("transactionWithResult(noEnclosing:bodyWithReturn:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("FavoritePokemonQueries"))) +@interface SharedFavoritePokemonQueries : SharedRuntimeTransacterImpl +- (instancetype)initWithDriver:(id)driver __attribute__((swift_name("init(driver:)"))) __attribute__((objc_designated_initializer)); +- (void)deleteFavoriteId:(int64_t)id __attribute__((swift_name("deleteFavorite(id:)"))); +- (SharedRuntimeQuery *)getAllFavorites __attribute__((swift_name("getAllFavorites()"))); +- (SharedRuntimeQuery *)getAllFavoritesMapper:(id (^)(SharedLong *, NSString *, NSString *))mapper __attribute__((swift_name("getAllFavorites(mapper:)"))); +- (void)insertFavoriteId:(SharedLong * _Nullable)id name:(NSString *)name imageUrl:(NSString *)imageUrl __attribute__((swift_name("insertFavorite(id:name:imageUrl:)"))); +- (SharedRuntimeQuery *)isFavoriteId:(int64_t)id __attribute__((swift_name("isFavorite(id:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("DatabaseDriverFactory"))) +@interface SharedDatabaseDriverFactory : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (id)createDriver __attribute__((swift_name("createDriver()"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Pokemon"))) +@interface SharedPokemon : SharedBase +- (instancetype)initWithId:(int32_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl __attribute__((swift_name("init(id:name:imageUrl:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemon *)doCopyId:(int32_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl __attribute__((swift_name("doCopy(id:name:imageUrl:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) int32_t id __attribute__((swift_name("id"))); +@property (readonly) NSString *imageUrl __attribute__((swift_name("imageUrl"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetail"))) +@interface SharedPokemonDetail : SharedBase +- (instancetype)initWithId:(int32_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl height:(int32_t)height weight:(int32_t)weight types:(NSArray *)types stats:(NSArray *)stats abilities:(NSArray *)abilities isFavorite:(BOOL)isFavorite __attribute__((swift_name("init(id:name:imageUrl:height:weight:types:stats:abilities:isFavorite:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonDetail *)doCopyId:(int32_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl height:(int32_t)height weight:(int32_t)weight types:(NSArray *)types stats:(NSArray *)stats abilities:(NSArray *)abilities isFavorite:(BOOL)isFavorite __attribute__((swift_name("doCopy(id:name:imageUrl:height:weight:types:stats:abilities:isFavorite:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSArray *abilities __attribute__((swift_name("abilities"))); +@property (readonly) int32_t height __attribute__((swift_name("height"))); +@property (readonly) int32_t id __attribute__((swift_name("id"))); +@property (readonly) NSString *imageUrl __attribute__((swift_name("imageUrl"))); +@property (readonly) BOOL isFavorite __attribute__((swift_name("isFavorite"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@property (readonly) NSArray *stats __attribute__((swift_name("stats"))); +@property (readonly) NSArray *types __attribute__((swift_name("types"))); +@property (readonly) int32_t weight __attribute__((swift_name("weight"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonStat"))) +@interface SharedPokemonStat : SharedBase +- (instancetype)initWithName:(NSString *)name value:(int32_t)value __attribute__((swift_name("init(name:value:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonStat *)doCopyName:(NSString *)name value:(int32_t)value __attribute__((swift_name("doCopy(name:value:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@property (readonly) int32_t value __attribute__((swift_name("value"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("AbilitySlotDto"))) +@interface SharedAbilitySlotDto : SharedBase +- (instancetype)initWithIsHidden:(BOOL)isHidden ability:(SharedNamedResourceDto *)ability __attribute__((swift_name("init(isHidden:ability:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedAbilitySlotDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedAbilitySlotDto *)doCopyIsHidden:(BOOL)isHidden ability:(SharedNamedResourceDto *)ability __attribute__((swift_name("doCopy(isHidden:ability:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) SharedNamedResourceDto *ability __attribute__((swift_name("ability"))); + +/** + * @note annotations + * kotlinx.serialization.SerialName(value="is_hidden") +*/ +@property (readonly) BOOL isHidden __attribute__((swift_name("isHidden"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("AbilitySlotDto.Companion"))) +@interface SharedAbilitySlotDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedAbilitySlotDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("NamedResourceDto"))) +@interface SharedNamedResourceDto : SharedBase +- (instancetype)initWithName:(NSString *)name __attribute__((swift_name("init(name:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedNamedResourceDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedNamedResourceDto *)doCopyName:(NSString *)name __attribute__((swift_name("doCopy(name:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("NamedResourceDto.Companion"))) +@interface SharedNamedResourceDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedNamedResourceDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetailDto"))) +@interface SharedPokemonDetailDto : SharedBase +- (instancetype)initWithId:(int32_t)id name:(NSString *)name height:(int32_t)height weight:(int32_t)weight types:(NSArray *)types stats:(NSArray *)stats abilities:(NSArray *)abilities __attribute__((swift_name("init(id:name:height:weight:types:stats:abilities:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedPokemonDetailDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedPokemonDetailDto *)doCopyId:(int32_t)id name:(NSString *)name height:(int32_t)height weight:(int32_t)weight types:(NSArray *)types stats:(NSArray *)stats abilities:(NSArray *)abilities __attribute__((swift_name("doCopy(id:name:height:weight:types:stats:abilities:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSArray *abilities __attribute__((swift_name("abilities"))); +@property (readonly) int32_t height __attribute__((swift_name("height"))); +@property (readonly) int32_t id __attribute__((swift_name("id"))); +@property (readonly) NSString *imageUrl __attribute__((swift_name("imageUrl"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@property (readonly) NSArray *stats __attribute__((swift_name("stats"))); +@property (readonly) NSArray *types __attribute__((swift_name("types"))); +@property (readonly) int32_t weight __attribute__((swift_name("weight"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetailDto.Companion"))) +@interface SharedPokemonDetailDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonDetailDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDto"))) +@interface SharedPokemonDto : SharedBase +- (instancetype)initWithName:(NSString *)name url:(NSString *)url __attribute__((swift_name("init(name:url:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedPokemonDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedPokemonDto *)doCopyName:(NSString *)name url:(NSString *)url __attribute__((swift_name("doCopy(name:url:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) int32_t id __attribute__((swift_name("id"))); +@property (readonly) NSString *imageUrl __attribute__((swift_name("imageUrl"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@property (readonly) NSString *url __attribute__((swift_name("url"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDto.Companion"))) +@interface SharedPokemonDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListDto"))) +@interface SharedPokemonListDto : SharedBase +- (instancetype)initWithCount:(int32_t)count next:(NSString * _Nullable)next results:(NSArray *)results __attribute__((swift_name("init(count:next:results:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedPokemonListDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedPokemonListDto *)doCopyCount:(int32_t)count next:(NSString * _Nullable)next results:(NSArray *)results __attribute__((swift_name("doCopy(count:next:results:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) int32_t count __attribute__((swift_name("count"))); +@property (readonly) NSString * _Nullable next __attribute__((swift_name("next"))); +@property (readonly) NSArray *results __attribute__((swift_name("results"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListDto.Companion"))) +@interface SharedPokemonListDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonListDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("StatEntryDto"))) +@interface SharedStatEntryDto : SharedBase +- (instancetype)initWithBaseStat:(int32_t)baseStat stat:(SharedNamedResourceDto *)stat __attribute__((swift_name("init(baseStat:stat:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedStatEntryDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedStatEntryDto *)doCopyBaseStat:(int32_t)baseStat stat:(SharedNamedResourceDto *)stat __attribute__((swift_name("doCopy(baseStat:stat:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); + +/** + * @note annotations + * kotlinx.serialization.SerialName(value="base_stat") +*/ +@property (readonly) int32_t baseStat __attribute__((swift_name("baseStat"))); +@property (readonly) SharedNamedResourceDto *stat __attribute__((swift_name("stat"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("StatEntryDto.Companion"))) +@interface SharedStatEntryDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedStatEntryDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("TypeSlotDto"))) +@interface SharedTypeSlotDto : SharedBase +- (instancetype)initWithSlot:(int32_t)slot type:(SharedNamedResourceDto *)type __attribute__((swift_name("init(slot:type:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedTypeSlotDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedTypeSlotDto *)doCopySlot:(int32_t)slot type:(SharedNamedResourceDto *)type __attribute__((swift_name("doCopy(slot:type:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) int32_t slot __attribute__((swift_name("slot"))); +@property (readonly) SharedNamedResourceDto *type __attribute__((swift_name("type"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("TypeSlotDto.Companion"))) +@interface SharedTypeSlotDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedTypeSlotDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonPage"))) +@interface SharedPokemonPage : SharedBase +- (instancetype)initWithPokemon:(NSArray *)pokemon hasMore:(BOOL)hasMore __attribute__((swift_name("init(pokemon:hasMore:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonPage *)doCopyPokemon:(NSArray *)pokemon hasMore:(BOOL)hasMore __attribute__((swift_name("doCopy(pokemon:hasMore:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) BOOL hasMore __attribute__((swift_name("hasMore"))); +@property (readonly) NSArray *pokemon __attribute__((swift_name("pokemon"))); +@end + +__attribute__((swift_name("PokemonRepository"))) +@protocol SharedPokemonRepository +@required + +/** + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. +*/ +- (void)getPokemonDetailName:(NSString *)name completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("getPokemonDetail(name:completionHandler:)"))); + +/** + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. +*/ +- (void)getPokemonPageLimit:(int32_t)limit offset:(int32_t)offset completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("getPokemonPage(limit:offset:completionHandler:)"))); +- (id)observeFavorites __attribute__((swift_name("observeFavorites()"))); + +/** + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. +*/ +- (void)setFavoriteId:(int32_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl isFavorite:(BOOL)isFavorite completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("setFavorite(id:name:imageUrl:isFavorite:completionHandler:)"))); +@end + +__attribute__((swift_name("PokemonDatabase"))) +@protocol SharedPokemonDatabase +@required +@property (readonly) SharedFavoritePokemonQueries *favoritePokemonQueries __attribute__((swift_name("favoritePokemonQueries"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDatabaseCompanion"))) +@interface SharedPokemonDatabaseCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonDatabaseCompanion *shared __attribute__((swift_name("shared"))); +- (id)invokeDriver:(id)driver __attribute__((swift_name("invoke(driver:)"))); +@property (readonly) id Schema __attribute__((swift_name("Schema"))); +@end + +__attribute__((swift_name("BaseViewModel"))) +@interface SharedBaseViewModel : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (void)onCleared __attribute__((swift_name("onCleared()"))); +@property (readonly) id viewModelScope __attribute__((swift_name("viewModelScope"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("FavoritesViewModel"))) +@interface SharedFavoritesViewModel : SharedBaseViewModel +- (instancetype)initWithRepository:(id)repository __attribute__((swift_name("init(repository:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); ++ (instancetype)new __attribute__((unavailable)); +@property (readonly) id favorites __attribute__((swift_name("favorites"))); +@end + +__attribute__((swift_name("PokemonDetailState"))) +@interface SharedPokemonDetailState : SharedBase +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetailState.Error"))) +@interface SharedPokemonDetailStateError : SharedPokemonDetailState +- (instancetype)initWithMessage:(NSString *)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonDetailStateError *)doCopyMessage:(NSString *)message __attribute__((swift_name("doCopy(message:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSString *message __attribute__((swift_name("message"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetailState.Loading"))) +@interface SharedPokemonDetailStateLoading : SharedPokemonDetailState ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)loading __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonDetailStateLoading *shared __attribute__((swift_name("shared"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetailState.Success"))) +@interface SharedPokemonDetailStateSuccess : SharedPokemonDetailState +- (instancetype)initWithPokemon:(SharedPokemonDetail *)pokemon __attribute__((swift_name("init(pokemon:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonDetailStateSuccess *)doCopyPokemon:(SharedPokemonDetail *)pokemon __attribute__((swift_name("doCopy(pokemon:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) SharedPokemonDetail *pokemon __attribute__((swift_name("pokemon"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetailViewModel"))) +@interface SharedPokemonDetailViewModel : SharedBaseViewModel +- (instancetype)initWithPokemonName:(NSString *)pokemonName repository:(id)repository __attribute__((swift_name("init(pokemonName:repository:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); ++ (instancetype)new __attribute__((unavailable)); +- (void)retry __attribute__((swift_name("retry()"))); +- (void)toggleFavorite __attribute__((swift_name("toggleFavorite()"))); +@property (readonly) id state __attribute__((swift_name("state"))); +@end + +__attribute__((swift_name("PokemonListState"))) +@interface SharedPokemonListState : SharedBase +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListState.Error"))) +@interface SharedPokemonListStateError : SharedPokemonListState +- (instancetype)initWithMessage:(NSString *)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonListStateError *)doCopyMessage:(NSString *)message __attribute__((swift_name("doCopy(message:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSString *message __attribute__((swift_name("message"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListState.Loading"))) +@interface SharedPokemonListStateLoading : SharedPokemonListState ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)loading __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonListStateLoading *shared __attribute__((swift_name("shared"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListState.Success"))) +@interface SharedPokemonListStateSuccess : SharedPokemonListState +- (instancetype)initWithPokemon:(NSArray *)pokemon isLoadingMore:(BOOL)isLoadingMore canLoadMore:(BOOL)canLoadMore __attribute__((swift_name("init(pokemon:isLoadingMore:canLoadMore:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonListStateSuccess *)doCopyPokemon:(NSArray *)pokemon isLoadingMore:(BOOL)isLoadingMore canLoadMore:(BOOL)canLoadMore __attribute__((swift_name("doCopy(pokemon:isLoadingMore:canLoadMore:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) BOOL canLoadMore __attribute__((swift_name("canLoadMore"))); +@property (readonly) BOOL isLoadingMore __attribute__((swift_name("isLoadingMore"))); +@property (readonly) NSArray *pokemon __attribute__((swift_name("pokemon"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListViewModel"))) +@interface SharedPokemonListViewModel : SharedBaseViewModel +- (instancetype)initWithRepository:(id)repository __attribute__((swift_name("init(repository:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); ++ (instancetype)new __attribute__((unavailable)); +@property (class, readonly, getter=companion) SharedPokemonListViewModelCompanion *companion __attribute__((swift_name("companion"))); +- (void)loadNextPage __attribute__((swift_name("loadNextPage()"))); +- (void)refresh __attribute__((swift_name("refresh()"))); +- (void)searchQuery:(NSString *)query __attribute__((swift_name("search(query:)"))); +@property (readonly) id state __attribute__((swift_name("state"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListViewModel.Companion"))) +@interface SharedPokemonListViewModelCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonListViewModelCompanion *shared __attribute__((swift_name("shared"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("ModulesKt"))) +@interface SharedModulesKt : SharedBase ++ (void)doInitKoinDriverFactory:(SharedDatabaseDriverFactory *)driverFactory enableNetworkLogs:(BOOL)enableNetworkLogs appDeclaration:(void (^)(SharedKoin_coreKoinApplication *))appDeclaration __attribute__((swift_name("doInitKoin(driverFactory:enableNetworkLogs:appDeclaration:)"))); +@property (class, readonly) SharedKoin_coreModule *viewModelModule __attribute__((swift_name("viewModelModule"))); +@end + +__attribute__((swift_name("RuntimeCloseable"))) +@protocol SharedRuntimeCloseable +@required +- (void)close __attribute__((swift_name("close()"))); +@end + +__attribute__((swift_name("RuntimeSqlDriver"))) +@protocol SharedRuntimeSqlDriver +@required +- (void)addListenerQueryKeys:(SharedKotlinArray *)queryKeys listener:(id)listener __attribute__((swift_name("addListener(queryKeys:listener:)"))); +- (SharedRuntimeTransacterTransaction * _Nullable)currentTransaction __attribute__((swift_name("currentTransaction()"))); +- (id)executeIdentifier:(SharedInt * _Nullable)identifier sql:(NSString *)sql parameters:(int32_t)parameters binders:(void (^ _Nullable)(id))binders __attribute__((swift_name("execute(identifier:sql:parameters:binders:)"))); +- (id)executeQueryIdentifier:(SharedInt * _Nullable)identifier sql:(NSString *)sql mapper:(id (^)(id))mapper parameters:(int32_t)parameters binders:(void (^ _Nullable)(id))binders __attribute__((swift_name("executeQuery(identifier:sql:mapper:parameters:binders:)"))); +- (id)doNewTransaction __attribute__((swift_name("doNewTransaction()"))); +- (void)notifyListenersQueryKeys:(SharedKotlinArray *)queryKeys __attribute__((swift_name("notifyListeners(queryKeys:)"))); +- (void)removeListenerQueryKeys:(SharedKotlinArray *)queryKeys listener:(id)listener __attribute__((swift_name("removeListener(queryKeys:listener:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("KotlinUnit"))) +@interface SharedKotlinUnit : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)unit __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedKotlinUnit *shared __attribute__((swift_name("shared"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@end + +__attribute__((swift_name("RuntimeTransactionCallbacks"))) +@protocol SharedRuntimeTransactionCallbacks +@required +- (void)afterCommitFunction:(void (^)(void))function __attribute__((swift_name("afterCommit(function:)"))); +- (void)afterRollbackFunction:(void (^)(void))function __attribute__((swift_name("afterRollback(function:)"))); +@end + +__attribute__((swift_name("RuntimeTransacterTransaction"))) +@interface SharedRuntimeTransacterTransaction : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (void)afterCommitFunction:(void (^)(void))function __attribute__((swift_name("afterCommit(function:)"))); +- (void)afterRollbackFunction:(void (^)(void))function __attribute__((swift_name("afterRollback(function:)"))); + +/** + * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +- (id)endTransactionSuccessful:(BOOL)successful __attribute__((swift_name("endTransaction(successful:)"))); + +/** + * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +@property (readonly) SharedRuntimeTransacterTransaction * _Nullable enclosingTransaction __attribute__((swift_name("enclosingTransaction"))); +@end + +__attribute__((swift_name("KotlinThrowable"))) +@interface SharedKotlinThrowable : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithCause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); + +/** + * @note annotations + * kotlin.experimental.ExperimentalNativeApi +*/ +- (SharedKotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); +- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) SharedKotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); +@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); +- (NSError *)asError __attribute__((swift_name("asError()"))); +@end + +__attribute__((swift_name("RuntimeTransactionWithoutReturn"))) +@protocol SharedRuntimeTransactionWithoutReturn +@required +- (void)rollback __attribute__((swift_name("rollback()"))); +- (void)transactionBody:(void (^)(id))body __attribute__((swift_name("transaction(body:)"))); +@end + +__attribute__((swift_name("RuntimeTransactionWithReturn"))) +@protocol SharedRuntimeTransactionWithReturn +@required +- (void)rollbackReturnValue:(id _Nullable)returnValue __attribute__((swift_name("rollback(returnValue:)"))); +- (id _Nullable)transactionBody_:(id _Nullable (^)(id))body __attribute__((swift_name("transaction(body_:)"))); +@end + +__attribute__((swift_name("RuntimeExecutableQuery"))) +@interface SharedRuntimeExecutableQuery<__covariant RowType> : SharedBase +- (instancetype)initWithMapper:(RowType (^)(id))mapper __attribute__((swift_name("init(mapper:)"))) __attribute__((objc_designated_initializer)); +- (id)executeMapper:(id (^)(id))mapper __attribute__((swift_name("execute(mapper:)"))); +- (NSArray *)executeAsList __attribute__((swift_name("executeAsList()"))); +- (RowType)executeAsOne __attribute__((swift_name("executeAsOne()"))); +- (RowType _Nullable)executeAsOneOrNull __attribute__((swift_name("executeAsOneOrNull()"))); +@property (readonly) RowType (^mapper)(id) __attribute__((swift_name("mapper"))); +@end + +__attribute__((swift_name("RuntimeQuery"))) +@interface SharedRuntimeQuery<__covariant RowType> : SharedRuntimeExecutableQuery +- (instancetype)initWithMapper:(RowType (^)(id))mapper __attribute__((swift_name("init(mapper:)"))) __attribute__((objc_designated_initializer)); +- (void)addListenerListener:(id)listener __attribute__((swift_name("addListener(listener:)"))); +- (void)removeListenerListener:(id)listener __attribute__((swift_name("removeListener(listener:)"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreSerializationStrategy"))) +@protocol SharedKotlinx_serialization_coreSerializationStrategy +@required +- (void)serializeEncoder:(id)encoder value:(id _Nullable)value __attribute__((swift_name("serialize(encoder:value:)"))); +@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreDeserializationStrategy"))) +@protocol SharedKotlinx_serialization_coreDeserializationStrategy +@required +- (id _Nullable)deserializeDecoder:(id)decoder __attribute__((swift_name("deserialize(decoder:)"))); +@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreKSerializer"))) +@protocol SharedKotlinx_serialization_coreKSerializer +@required +@end + +__attribute__((swift_name("KotlinException"))) +@interface SharedKotlinException : SharedKotlinThrowable +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithCause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); +@end + +__attribute__((swift_name("KotlinRuntimeException"))) +@interface SharedKotlinRuntimeException : SharedKotlinException +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithCause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); +@end + +__attribute__((swift_name("KotlinIllegalStateException"))) +@interface SharedKotlinIllegalStateException : SharedKotlinRuntimeException +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithCause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); +@end + + +/** + * @note annotations + * kotlin.SinceKotlin(version="1.4") +*/ +__attribute__((swift_name("KotlinCancellationException"))) +@interface SharedKotlinCancellationException : SharedKotlinIllegalStateException +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithCause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); +@end + +__attribute__((swift_name("Kotlinx_coroutines_coreFlow"))) +@protocol SharedKotlinx_coroutines_coreFlow +@required + +/** + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. +*/ +- (void)collectCollector:(id)collector completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("collect(collector:completionHandler:)"))); +@end + +__attribute__((swift_name("RuntimeSqlSchema"))) +@protocol SharedRuntimeSqlSchema +@required +- (id)createDriver:(id)driver __attribute__((swift_name("create(driver:)"))); +- (id)migrateDriver:(id)driver oldVersion:(int64_t)oldVersion newVersion:(int64_t)newVersion callbacks:(SharedKotlinArray *)callbacks __attribute__((swift_name("migrate(driver:oldVersion:newVersion:callbacks:)"))); +@property (readonly) int64_t version __attribute__((swift_name("version"))); +@end + +__attribute__((swift_name("Kotlinx_coroutines_coreCoroutineScope"))) +@protocol SharedKotlinx_coroutines_coreCoroutineScope +@required +@property (readonly) id coroutineContext __attribute__((swift_name("coroutineContext"))); +@end + +__attribute__((swift_name("Kotlinx_coroutines_coreSharedFlow"))) +@protocol SharedKotlinx_coroutines_coreSharedFlow +@required +@property (readonly) NSArray *replayCache __attribute__((swift_name("replayCache"))); +@end + +__attribute__((swift_name("Kotlinx_coroutines_coreStateFlow"))) +@protocol SharedKotlinx_coroutines_coreStateFlow +@required +@property (readonly) id _Nullable value __attribute__((swift_name("value"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreKoinApplication"))) +@interface SharedKoin_coreKoinApplication : SharedBase +@property (class, readonly, getter=companion) SharedKoin_coreKoinApplicationCompanion *companion __attribute__((swift_name("companion"))); +- (void)allowOverrideOverride:(BOOL)override __attribute__((swift_name("allowOverride(override:)"))); +- (void)close __attribute__((swift_name("close()"))); +- (void)createEagerInstances __attribute__((swift_name("createEagerInstances()"))); +- (SharedKoin_coreKoinApplication *)loggerLogger:(SharedKoin_coreLogger *)logger __attribute__((swift_name("logger(logger:)"))); +- (SharedKoin_coreKoinApplication *)modulesModules:(SharedKotlinArray *)modules __attribute__((swift_name("modules(modules:)"))); +- (SharedKoin_coreKoinApplication *)modulesModules_:(NSArray *)modules __attribute__((swift_name("modules(modules_:)"))); +- (SharedKoin_coreKoinApplication *)modulesModules__:(SharedKoin_coreModule *)modules __attribute__((swift_name("modules(modules__:)"))); +- (SharedKoin_coreKoinApplication *)printLoggerLevel:(SharedKoin_coreLevel *)level __attribute__((swift_name("printLogger(level:)"))); +- (SharedKoin_coreKoinApplication *)propertiesValues:(NSDictionary *)values __attribute__((swift_name("properties(values:)"))); +@property (readonly) SharedKoin_coreKoin *koin __attribute__((swift_name("koin"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreModule"))) +@interface SharedKoin_coreModule : SharedBase +- (instancetype)initWith_createdAtStart:(BOOL)_createdAtStart __attribute__((swift_name("init(_createdAtStart:)"))) __attribute__((objc_designated_initializer)); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (SharedKoin_coreKoinDefinition *)factoryQualifier:(id _Nullable)qualifier definition:(id _Nullable (^)(SharedKoin_coreScope *, SharedKoin_coreParametersHolder *))definition __attribute__((swift_name("factory(qualifier:definition:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (void)includesModule:(SharedKotlinArray *)module __attribute__((swift_name("includes(module:)"))); +- (void)includesModule_:(id)module __attribute__((swift_name("includes(module_:)"))); +- (void)indexPrimaryTypeInstanceFactory:(SharedKoin_coreInstanceFactory *)instanceFactory __attribute__((swift_name("indexPrimaryType(instanceFactory:)"))); +- (void)indexSecondaryTypesInstanceFactory:(SharedKoin_coreInstanceFactory *)instanceFactory __attribute__((swift_name("indexSecondaryTypes(instanceFactory:)"))); +- (NSArray *)plusModules:(NSArray *)modules __attribute__((swift_name("plus(modules:)"))); +- (NSArray *)plusModule:(SharedKoin_coreModule *)module __attribute__((swift_name("plus(module:)"))); +- (void)prepareForCreationAtStartInstanceFactory:(SharedKoin_coreSingleInstanceFactory *)instanceFactory __attribute__((swift_name("prepareForCreationAtStart(instanceFactory:)"))); +- (void)scopeScopeSet:(void (^)(SharedKoin_coreScopeDSL *))scopeSet __attribute__((swift_name("scope(scopeSet:)"))); +- (void)scopeQualifier:(id)qualifier scopeSet:(void (^)(SharedKoin_coreScopeDSL *))scopeSet __attribute__((swift_name("scope(qualifier:scopeSet:)"))); +- (SharedKoin_coreKoinDefinition *)singleQualifier:(id _Nullable)qualifier createdAtStart:(BOOL)createdAtStart definition:(id _Nullable (^)(SharedKoin_coreScope *, SharedKoin_coreParametersHolder *))definition __attribute__((swift_name("single(qualifier:createdAtStart:definition:)"))); +@property (readonly) SharedMutableSet *> *eagerInstances __attribute__((swift_name("eagerInstances"))); +@property (readonly) NSString *id __attribute__((swift_name("id"))); +@property (readonly) NSMutableArray *includedModules __attribute__((swift_name("includedModules"))); +@property (readonly) BOOL isLoaded __attribute__((swift_name("isLoaded"))); +@property (readonly) SharedMutableDictionary *> *mappings __attribute__((swift_name("mappings"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("KotlinArray"))) +@interface SharedKotlinArray : SharedBase ++ (instancetype)arrayWithSize:(int32_t)size init:(T _Nullable (^)(SharedInt *))init __attribute__((swift_name("init(size:init:)"))); ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); +- (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); +- (id)iterator __attribute__((swift_name("iterator()"))); +- (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); +@property (readonly) int32_t size __attribute__((swift_name("size"))); +@end + +__attribute__((swift_name("RuntimeQueryListener"))) +@protocol SharedRuntimeQueryListener +@required +- (void)queryResultsChanged __attribute__((swift_name("queryResultsChanged()"))); +@end + +__attribute__((swift_name("RuntimeQueryResult"))) +@protocol SharedRuntimeQueryResult +@required + +/** + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. +*/ +- (void)awaitWithCompletionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("await(completionHandler:)"))); +@property (readonly) id _Nullable value __attribute__((swift_name("value"))); +@end + +__attribute__((swift_name("RuntimeSqlPreparedStatement"))) +@protocol SharedRuntimeSqlPreparedStatement +@required +- (void)bindBooleanIndex:(int32_t)index boolean:(SharedBoolean * _Nullable)boolean __attribute__((swift_name("bindBoolean(index:boolean:)"))); +- (void)bindBytesIndex:(int32_t)index bytes:(SharedKotlinByteArray * _Nullable)bytes __attribute__((swift_name("bindBytes(index:bytes:)"))); +- (void)bindDoubleIndex:(int32_t)index double:(SharedDouble * _Nullable)double_ __attribute__((swift_name("bindDouble(index:double:)"))); +- (void)bindLongIndex:(int32_t)index long:(SharedLong * _Nullable)long_ __attribute__((swift_name("bindLong(index:long:)"))); +- (void)bindStringIndex:(int32_t)index string:(NSString * _Nullable)string __attribute__((swift_name("bindString(index:string:)"))); +@end + +__attribute__((swift_name("RuntimeSqlCursor"))) +@protocol SharedRuntimeSqlCursor +@required +- (SharedBoolean * _Nullable)getBooleanIndex:(int32_t)index __attribute__((swift_name("getBoolean(index:)"))); +- (SharedKotlinByteArray * _Nullable)getBytesIndex:(int32_t)index __attribute__((swift_name("getBytes(index:)"))); +- (SharedDouble * _Nullable)getDoubleIndex:(int32_t)index __attribute__((swift_name("getDouble(index:)"))); +- (SharedLong * _Nullable)getLongIndex:(int32_t)index __attribute__((swift_name("getLong(index:)"))); +- (NSString * _Nullable)getStringIndex:(int32_t)index __attribute__((swift_name("getString(index:)"))); +- (id)next __attribute__((swift_name("next()"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreEncoder"))) +@protocol SharedKotlinx_serialization_coreEncoder +@required +- (id)beginCollectionDescriptor:(id)descriptor collectionSize:(int32_t)collectionSize __attribute__((swift_name("beginCollection(descriptor:collectionSize:)"))); +- (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); +- (void)encodeBooleanValue:(BOOL)value __attribute__((swift_name("encodeBoolean(value:)"))); +- (void)encodeByteValue:(int8_t)value __attribute__((swift_name("encodeByte(value:)"))); +- (void)encodeCharValue:(unichar)value __attribute__((swift_name("encodeChar(value:)"))); +- (void)encodeDoubleValue:(double)value __attribute__((swift_name("encodeDouble(value:)"))); +- (void)encodeEnumEnumDescriptor:(id)enumDescriptor index:(int32_t)index __attribute__((swift_name("encodeEnum(enumDescriptor:index:)"))); +- (void)encodeFloatValue:(float)value __attribute__((swift_name("encodeFloat(value:)"))); +- (id)encodeInlineDescriptor:(id)descriptor __attribute__((swift_name("encodeInline(descriptor:)"))); +- (void)encodeIntValue:(int32_t)value __attribute__((swift_name("encodeInt(value:)"))); +- (void)encodeLongValue:(int64_t)value __attribute__((swift_name("encodeLong(value:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (void)encodeNotNullMark __attribute__((swift_name("encodeNotNullMark()"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (void)encodeNull __attribute__((swift_name("encodeNull()"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (void)encodeNullableSerializableValueSerializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeNullableSerializableValue(serializer:value:)"))); +- (void)encodeSerializableValueSerializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableValue(serializer:value:)"))); +- (void)encodeShortValue:(int16_t)value __attribute__((swift_name("encodeShort(value:)"))); +- (void)encodeStringValue:(NSString *)value __attribute__((swift_name("encodeString(value:)"))); +@property (readonly) SharedKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreSerialDescriptor"))) +@protocol SharedKotlinx_serialization_coreSerialDescriptor +@required + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (NSArray> *)getElementAnnotationsIndex:(int32_t)index __attribute__((swift_name("getElementAnnotations(index:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (id)getElementDescriptorIndex:(int32_t)index __attribute__((swift_name("getElementDescriptor(index:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (int32_t)getElementIndexName:(NSString *)name __attribute__((swift_name("getElementIndex(name:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (NSString *)getElementNameIndex:(int32_t)index __attribute__((swift_name("getElementName(index:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (BOOL)isElementOptionalIndex:(int32_t)index __attribute__((swift_name("isElementOptional(index:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +@property (readonly) NSArray> *annotations __attribute__((swift_name("annotations"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +@property (readonly) int32_t elementsCount __attribute__((swift_name("elementsCount"))); +@property (readonly) BOOL isInline __attribute__((swift_name("isInline"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +@property (readonly) BOOL isNullable __attribute__((swift_name("isNullable"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +@property (readonly) SharedKotlinx_serialization_coreSerialKind *kind __attribute__((swift_name("kind"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +@property (readonly) NSString *serialName __attribute__((swift_name("serialName"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreDecoder"))) +@protocol SharedKotlinx_serialization_coreDecoder +@required +- (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); +- (BOOL)decodeBoolean __attribute__((swift_name("decodeBoolean()"))); +- (int8_t)decodeByte __attribute__((swift_name("decodeByte()"))); +- (unichar)decodeChar __attribute__((swift_name("decodeChar()"))); +- (double)decodeDouble __attribute__((swift_name("decodeDouble()"))); +- (int32_t)decodeEnumEnumDescriptor:(id)enumDescriptor __attribute__((swift_name("decodeEnum(enumDescriptor:)"))); +- (float)decodeFloat __attribute__((swift_name("decodeFloat()"))); +- (id)decodeInlineDescriptor:(id)descriptor __attribute__((swift_name("decodeInline(descriptor:)"))); +- (int32_t)decodeInt __attribute__((swift_name("decodeInt()"))); +- (int64_t)decodeLong __attribute__((swift_name("decodeLong()"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (BOOL)decodeNotNullMark __attribute__((swift_name("decodeNotNullMark()"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (SharedKotlinNothing * _Nullable)decodeNull __attribute__((swift_name("decodeNull()"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (id _Nullable)decodeNullableSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeNullableSerializableValue(deserializer:)"))); +- (id _Nullable)decodeSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeSerializableValue(deserializer:)"))); +- (int16_t)decodeShort __attribute__((swift_name("decodeShort()"))); +- (NSString *)decodeString __attribute__((swift_name("decodeString()"))); +@property (readonly) SharedKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@end + +__attribute__((swift_name("Kotlinx_coroutines_coreFlowCollector"))) +@protocol SharedKotlinx_coroutines_coreFlowCollector +@required + +/** + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. +*/ +- (void)emitValue:(id _Nullable)value completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("emit(value:completionHandler:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("RuntimeAfterVersion"))) +@interface SharedRuntimeAfterVersion : SharedBase +- (instancetype)initWithAfterVersion:(int64_t)afterVersion block:(void (^)(id))block __attribute__((swift_name("init(afterVersion:block:)"))) __attribute__((objc_designated_initializer)); +@property (readonly) int64_t afterVersion __attribute__((swift_name("afterVersion"))); +@property (readonly) void (^block)(id) __attribute__((swift_name("block"))); +@end + + +/** + * @note annotations + * kotlin.SinceKotlin(version="1.3") +*/ +__attribute__((swift_name("KotlinCoroutineContext"))) +@protocol SharedKotlinCoroutineContext +@required +- (id _Nullable)foldInitial:(id _Nullable)initial operation:(id _Nullable (^)(id _Nullable, id))operation __attribute__((swift_name("fold(initial:operation:)"))); +- (id _Nullable)getKey:(id)key __attribute__((swift_name("get(key:)"))); +- (id)minusKeyKey:(id)key __attribute__((swift_name("minusKey(key:)"))); +- (id)plusContext:(id)context __attribute__((swift_name("plus(context:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreKoinApplication.Companion"))) +@interface SharedKoin_coreKoinApplicationCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedKoin_coreKoinApplicationCompanion *shared __attribute__((swift_name("shared"))); +- (SharedKoin_coreKoinApplication *)doInit __attribute__((swift_name("doInit()"))); +@end + +__attribute__((swift_name("Koin_coreLogger"))) +@interface SharedKoin_coreLogger : SharedBase +- (instancetype)initWithLevel:(SharedKoin_coreLevel *)level __attribute__((swift_name("init(level:)"))) __attribute__((objc_designated_initializer)); +- (void)debugMsg:(NSString *)msg __attribute__((swift_name("debug(msg:)"))); +- (void)displayLevel:(SharedKoin_coreLevel *)level msg:(NSString *)msg __attribute__((swift_name("display(level:msg:)"))); +- (void)errorMsg:(NSString *)msg __attribute__((swift_name("error(msg:)"))); +- (void)infoMsg:(NSString *)msg __attribute__((swift_name("info(msg:)"))); +- (BOOL)isAtLvl:(SharedKoin_coreLevel *)lvl __attribute__((swift_name("isAt(lvl:)"))); +- (void)logLvl:(SharedKoin_coreLevel *)lvl msg:(NSString *(^)(void))msg __attribute__((swift_name("log(lvl:msg:)"))); +- (void)logLvl:(SharedKoin_coreLevel *)lvl msg_:(NSString *)msg __attribute__((swift_name("log(lvl:msg_:)"))); +- (void)warnMsg:(NSString *)msg __attribute__((swift_name("warn(msg:)"))); +@property SharedKoin_coreLevel *level __attribute__((swift_name("level"))); +@end + +__attribute__((swift_name("KotlinComparable"))) +@protocol SharedKotlinComparable +@required +- (int32_t)compareToOther:(id _Nullable)other __attribute__((swift_name("compareTo(other:)"))); +@end + +__attribute__((swift_name("KotlinEnum"))) +@interface SharedKotlinEnum : SharedBase +- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedKotlinEnumCompanion *companion __attribute__((swift_name("companion"))); +- (int32_t)compareToOther:(E)other __attribute__((swift_name("compareTo(other:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@property (readonly) int32_t ordinal __attribute__((swift_name("ordinal"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreLevel"))) +@interface SharedKoin_coreLevel : SharedKotlinEnum ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); +- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +@property (class, readonly) SharedKoin_coreLevel *debug __attribute__((swift_name("debug"))); +@property (class, readonly) SharedKoin_coreLevel *info __attribute__((swift_name("info"))); +@property (class, readonly) SharedKoin_coreLevel *warning __attribute__((swift_name("warning"))); +@property (class, readonly) SharedKoin_coreLevel *error __attribute__((swift_name("error"))); +@property (class, readonly) SharedKoin_coreLevel *none __attribute__((swift_name("none"))); ++ (SharedKotlinArray *)values __attribute__((swift_name("values()"))); +@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreKoin"))) +@interface SharedKoin_coreKoin : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (void)close __attribute__((swift_name("close()"))); +- (void)createEagerInstances __attribute__((swift_name("createEagerInstances()"))); +- (SharedKoin_coreScope *)createScopeT:(id)t __attribute__((swift_name("createScope(t:)"))); +- (SharedKoin_coreScope *)createScopeScopeId:(NSString *)scopeId __attribute__((swift_name("createScope(scopeId:)"))); +- (SharedKoin_coreScope *)createScopeScopeId:(NSString *)scopeId source:(id _Nullable)source __attribute__((swift_name("createScope(scopeId:source:)"))); +- (SharedKoin_coreScope *)createScopeScopeId:(NSString *)scopeId qualifier:(id)qualifier source:(id _Nullable)source __attribute__((swift_name("createScope(scopeId:qualifier:source:)"))); +- (void)declareInstance:(id _Nullable)instance qualifier:(id _Nullable)qualifier secondaryTypes:(NSArray> *)secondaryTypes allowOverride:(BOOL)allowOverride __attribute__((swift_name("declare(instance:qualifier:secondaryTypes:allowOverride:)"))); +- (void)deletePropertyKey:(NSString *)key __attribute__((swift_name("deleteProperty(key:)"))); +- (void)deleteScopeScopeId:(NSString *)scopeId __attribute__((swift_name("deleteScope(scopeId:)"))); +- (id)getQualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("get(qualifier:parameters:)"))); +- (id _Nullable)getClazz:(id)clazz qualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("get(clazz:qualifier:parameters:)"))); +- (NSArray *)getAll __attribute__((swift_name("getAll()"))); +- (SharedKoin_coreScope *)getOrCreateScopeScopeId:(NSString *)scopeId __attribute__((swift_name("getOrCreateScope(scopeId:)"))); +- (SharedKoin_coreScope *)getOrCreateScopeScopeId:(NSString *)scopeId qualifier:(id)qualifier source:(id _Nullable)source __attribute__((swift_name("getOrCreateScope(scopeId:qualifier:source:)"))); +- (id _Nullable)getOrNullQualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("getOrNull(qualifier:parameters:)"))); +- (id _Nullable)getOrNullClazz:(id)clazz qualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("getOrNull(clazz:qualifier:parameters:)"))); +- (id _Nullable)getPropertyKey:(NSString *)key __attribute__((swift_name("getProperty(key:)"))); +- (id)getPropertyKey:(NSString *)key defaultValue:(id)defaultValue __attribute__((swift_name("getProperty(key:defaultValue:)"))); +- (SharedKoin_coreScope *)getScopeScopeId:(NSString *)scopeId __attribute__((swift_name("getScope(scopeId:)"))); +- (SharedKoin_coreScope * _Nullable)getScopeOrNullScopeId:(NSString *)scopeId __attribute__((swift_name("getScopeOrNull(scopeId:)"))); +- (id)injectQualifier:(id _Nullable)qualifier mode:(SharedKotlinLazyThreadSafetyMode *)mode parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("inject(qualifier:mode:parameters:)"))); +- (id)injectOrNullQualifier:(id _Nullable)qualifier mode:(SharedKotlinLazyThreadSafetyMode *)mode parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("injectOrNull(qualifier:mode:parameters:)"))); +- (void)loadModulesModules:(NSArray *)modules allowOverride:(BOOL)allowOverride createEagerInstances:(BOOL)createEagerInstances __attribute__((swift_name("loadModules(modules:allowOverride:createEagerInstances:)"))); +- (void)setPropertyKey:(NSString *)key value:(id)value __attribute__((swift_name("setProperty(key:value:)"))); +- (void)setupLoggerLogger:(SharedKoin_coreLogger *)logger __attribute__((swift_name("setupLogger(logger:)"))); +- (void)unloadModulesModules:(NSArray *)modules __attribute__((swift_name("unloadModules(modules:)"))); +@property (readonly) SharedKoin_coreExtensionManager *extensionManager __attribute__((swift_name("extensionManager"))); +@property (readonly) SharedKoin_coreInstanceRegistry *instanceRegistry __attribute__((swift_name("instanceRegistry"))); +@property (readonly) SharedKoin_coreLogger *logger __attribute__((swift_name("logger"))); +@property (readonly) SharedKoin_corePropertyRegistry *propertyRegistry __attribute__((swift_name("propertyRegistry"))); +@property (readonly) SharedKoin_coreScopeRegistry *scopeRegistry __attribute__((swift_name("scopeRegistry"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreKoinDefinition"))) +@interface SharedKoin_coreKoinDefinition : SharedBase +- (instancetype)initWithModule:(SharedKoin_coreModule *)module factory:(SharedKoin_coreInstanceFactory *)factory __attribute__((swift_name("init(module:factory:)"))) __attribute__((objc_designated_initializer)); +- (SharedKoin_coreKoinDefinition *)doCopyModule:(SharedKoin_coreModule *)module factory:(SharedKoin_coreInstanceFactory *)factory __attribute__((swift_name("doCopy(module:factory:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) SharedKoin_coreInstanceFactory *factory __attribute__((swift_name("factory"))); +@property (readonly) SharedKoin_coreModule *module __attribute__((swift_name("module"))); +@end + +__attribute__((swift_name("Koin_coreQualifier"))) +@protocol SharedKoin_coreQualifier +@required +@property (readonly) NSString *value __attribute__((swift_name("value"))); +@end + +__attribute__((swift_name("Koin_coreLockable"))) +@interface SharedKoin_coreLockable : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreScope"))) +@interface SharedKoin_coreScope : SharedKoin_coreLockable +- (instancetype)initWithScopeQualifier:(id)scopeQualifier id:(NSString *)id isRoot:(BOOL)isRoot _koin:(SharedKoin_coreKoin *)_koin __attribute__((swift_name("init(scopeQualifier:id:isRoot:_koin:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); ++ (instancetype)new __attribute__((unavailable)); +- (void)close __attribute__((swift_name("close()"))); +- (void)declareInstance:(id _Nullable)instance qualifier:(id _Nullable)qualifier secondaryTypes:(NSArray> *)secondaryTypes allowOverride:(BOOL)allowOverride __attribute__((swift_name("declare(instance:qualifier:secondaryTypes:allowOverride:)"))); +- (id)getQualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("get(qualifier:parameters:)"))); +- (id _Nullable)getClazz:(id)clazz qualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("get(clazz:qualifier:parameters:)"))); +- (NSArray *)getAll __attribute__((swift_name("getAll()"))); +- (NSArray *)getAllClazz:(id)clazz __attribute__((swift_name("getAll(clazz:)"))); +- (SharedKoin_coreKoin *)getKoin __attribute__((swift_name("getKoin()"))); +- (id _Nullable)getOrNullQualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("getOrNull(qualifier:parameters:)"))); +- (id _Nullable)getOrNullClazz:(id)clazz qualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("getOrNull(clazz:qualifier:parameters:)"))); +- (id)getPropertyKey:(NSString *)key __attribute__((swift_name("getProperty(key:)"))); +- (id)getPropertyKey:(NSString *)key defaultValue:(id)defaultValue __attribute__((swift_name("getProperty(key:defaultValue:)"))); +- (id _Nullable)getPropertyOrNullKey:(NSString *)key __attribute__((swift_name("getPropertyOrNull(key:)"))); +- (SharedKoin_coreScope *)getScopeScopeID:(NSString *)scopeID __attribute__((swift_name("getScope(scopeID:)"))); +- (id _Nullable)getSource __attribute__((swift_name("getSource()"))); +- (id)injectQualifier:(id _Nullable)qualifier mode:(SharedKotlinLazyThreadSafetyMode *)mode parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("inject(qualifier:mode:parameters:)"))); +- (id)injectOrNullQualifier:(id _Nullable)qualifier mode:(SharedKotlinLazyThreadSafetyMode *)mode parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("injectOrNull(qualifier:mode:parameters:)"))); +- (BOOL)isNotClosed __attribute__((swift_name("isNotClosed()"))); +- (void)linkToScopes:(SharedKotlinArray *)scopes __attribute__((swift_name("linkTo(scopes:)"))); +- (void)registerCallbackCallback:(id)callback __attribute__((swift_name("registerCallback(callback:)"))); +- (NSString *)description __attribute__((swift_name("description()"))); +- (void)unlinkScopes:(SharedKotlinArray *)scopes __attribute__((swift_name("unlink(scopes:)"))); +@property (readonly) BOOL closed __attribute__((swift_name("closed"))); +@property (readonly) NSString *id __attribute__((swift_name("id"))); +@property (readonly) BOOL isRoot __attribute__((swift_name("isRoot"))); +@property (readonly) SharedKoin_coreLogger *logger __attribute__((swift_name("logger"))); +@property (readonly) id scopeQualifier __attribute__((swift_name("scopeQualifier"))); +@property id _Nullable sourceValue __attribute__((swift_name("sourceValue"))); +@end + +__attribute__((swift_name("Koin_coreParametersHolder"))) +@interface SharedKoin_coreParametersHolder : SharedBase +- (instancetype)initWith_values:(NSMutableArray *)_values useIndexedValues:(SharedBoolean * _Nullable)useIndexedValues __attribute__((swift_name("init(_values:useIndexedValues:)"))) __attribute__((objc_designated_initializer)); +- (SharedKoin_coreParametersHolder *)addValue:(id)value __attribute__((swift_name("add(value:)"))); +- (id _Nullable)component1 __attribute__((swift_name("component1()"))); +- (id _Nullable)component2 __attribute__((swift_name("component2()"))); +- (id _Nullable)component3 __attribute__((swift_name("component3()"))); +- (id _Nullable)component4 __attribute__((swift_name("component4()"))); +- (id _Nullable)component5 __attribute__((swift_name("component5()"))); +- (id _Nullable)elementAtI:(int32_t)i clazz:(id)clazz __attribute__((swift_name("elementAt(i:clazz:)"))); +- (id)get __attribute__((swift_name("get()"))); +- (id _Nullable)getI:(int32_t)i __attribute__((swift_name("get(i:)"))); +- (id _Nullable)getOrNull __attribute__((swift_name("getOrNull()"))); +- (id _Nullable)getOrNullClazz:(id)clazz __attribute__((swift_name("getOrNull(clazz:)"))); +- (SharedKoin_coreParametersHolder *)insertIndex:(int32_t)index value:(id)value __attribute__((swift_name("insert(index:value:)"))); +- (BOOL)isEmpty __attribute__((swift_name("isEmpty()"))); +- (BOOL)isNotEmpty __attribute__((swift_name("isNotEmpty()"))); +- (void)setI:(int32_t)i t:(id _Nullable)t __attribute__((swift_name("set(i:t:)"))); +- (int32_t)size __attribute__((swift_name("size()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property int32_t index __attribute__((swift_name("index"))); +@property (readonly) SharedBoolean * _Nullable useIndexedValues __attribute__((swift_name("useIndexedValues"))); +@property (readonly) NSArray *values __attribute__((swift_name("values"))); +@end + +__attribute__((swift_name("Koin_coreInstanceFactory"))) +@interface SharedKoin_coreInstanceFactory : SharedKoin_coreLockable +- (instancetype)initWithBeanDefinition:(SharedKoin_coreBeanDefinition *)beanDefinition __attribute__((swift_name("init(beanDefinition:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); ++ (instancetype)new __attribute__((unavailable)); +@property (class, readonly, getter=companion) SharedKoin_coreInstanceFactoryCompanion *companion __attribute__((swift_name("companion"))); +- (T _Nullable)createContext:(SharedKoin_coreResolutionContext *)context __attribute__((swift_name("create(context:)"))); +- (void)dropScope:(SharedKoin_coreScope * _Nullable)scope __attribute__((swift_name("drop(scope:)"))); +- (void)dropAll __attribute__((swift_name("dropAll()"))); +- (T _Nullable)getContext:(SharedKoin_coreResolutionContext *)context __attribute__((swift_name("get(context:)"))); +- (BOOL)isCreatedContext:(SharedKoin_coreResolutionContext * _Nullable)context __attribute__((swift_name("isCreated(context:)"))); +@property (readonly) SharedKoin_coreBeanDefinition *beanDefinition __attribute__((swift_name("beanDefinition"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreSingleInstanceFactory"))) +@interface SharedKoin_coreSingleInstanceFactory : SharedKoin_coreInstanceFactory +- (instancetype)initWithBeanDefinition:(SharedKoin_coreBeanDefinition *)beanDefinition __attribute__((swift_name("init(beanDefinition:)"))) __attribute__((objc_designated_initializer)); +- (T _Nullable)createContext:(SharedKoin_coreResolutionContext *)context __attribute__((swift_name("create(context:)"))); +- (void)dropScope:(SharedKoin_coreScope * _Nullable)scope __attribute__((swift_name("drop(scope:)"))); +- (void)dropAll __attribute__((swift_name("dropAll()"))); +- (T _Nullable)getContext:(SharedKoin_coreResolutionContext *)context __attribute__((swift_name("get(context:)"))); +- (BOOL)isCreatedContext:(SharedKoin_coreResolutionContext * _Nullable)context __attribute__((swift_name("isCreated(context:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreScopeDSL"))) +@interface SharedKoin_coreScopeDSL : SharedBase +- (instancetype)initWithScopeQualifier:(id)scopeQualifier module:(SharedKoin_coreModule *)module __attribute__((swift_name("init(scopeQualifier:module:)"))) __attribute__((objc_designated_initializer)); +- (SharedKoin_coreKoinDefinition *)factoryQualifier:(id _Nullable)qualifier definition:(id _Nullable (^)(SharedKoin_coreScope *, SharedKoin_coreParametersHolder *))definition __attribute__((swift_name("factory(qualifier:definition:)"))); +- (SharedKoin_coreKoinDefinition *)scopedQualifier:(id _Nullable)qualifier definition:(id _Nullable (^)(SharedKoin_coreScope *, SharedKoin_coreParametersHolder *))definition __attribute__((swift_name("scoped(qualifier:definition:)"))); +@property (readonly) SharedKoin_coreModule *module __attribute__((swift_name("module"))); +@property (readonly) id scopeQualifier __attribute__((swift_name("scopeQualifier"))); +@end + +__attribute__((swift_name("KotlinIterator"))) +@protocol SharedKotlinIterator +@required +- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); +- (id _Nullable)next __attribute__((swift_name("next()"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("KotlinByteArray"))) +@interface SharedKotlinByteArray : SharedBase ++ (instancetype)arrayWithSize:(int32_t)size __attribute__((swift_name("init(size:)"))); ++ (instancetype)arrayWithSize:(int32_t)size init:(SharedByte *(^)(SharedInt *))init __attribute__((swift_name("init(size:init:)"))); ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); +- (int8_t)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); +- (SharedKotlinByteIterator *)iterator __attribute__((swift_name("iterator()"))); +- (void)setIndex:(int32_t)index value:(int8_t)value __attribute__((swift_name("set(index:value:)"))); +@property (readonly) int32_t size __attribute__((swift_name("size"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreCompositeEncoder"))) +@protocol SharedKotlinx_serialization_coreCompositeEncoder +@required +- (void)encodeBooleanElementDescriptor:(id)descriptor index:(int32_t)index value:(BOOL)value __attribute__((swift_name("encodeBooleanElement(descriptor:index:value:)"))); +- (void)encodeByteElementDescriptor:(id)descriptor index:(int32_t)index value:(int8_t)value __attribute__((swift_name("encodeByteElement(descriptor:index:value:)"))); +- (void)encodeCharElementDescriptor:(id)descriptor index:(int32_t)index value:(unichar)value __attribute__((swift_name("encodeCharElement(descriptor:index:value:)"))); +- (void)encodeDoubleElementDescriptor:(id)descriptor index:(int32_t)index value:(double)value __attribute__((swift_name("encodeDoubleElement(descriptor:index:value:)"))); +- (void)encodeFloatElementDescriptor:(id)descriptor index:(int32_t)index value:(float)value __attribute__((swift_name("encodeFloatElement(descriptor:index:value:)"))); +- (id)encodeInlineElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("encodeInlineElement(descriptor:index:)"))); +- (void)encodeIntElementDescriptor:(id)descriptor index:(int32_t)index value:(int32_t)value __attribute__((swift_name("encodeIntElement(descriptor:index:value:)"))); +- (void)encodeLongElementDescriptor:(id)descriptor index:(int32_t)index value:(int64_t)value __attribute__((swift_name("encodeLongElement(descriptor:index:value:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (void)encodeNullableSerializableElementDescriptor:(id)descriptor index:(int32_t)index serializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeNullableSerializableElement(descriptor:index:serializer:value:)"))); +- (void)encodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index serializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableElement(descriptor:index:serializer:value:)"))); +- (void)encodeShortElementDescriptor:(id)descriptor index:(int32_t)index value:(int16_t)value __attribute__((swift_name("encodeShortElement(descriptor:index:value:)"))); +- (void)encodeStringElementDescriptor:(id)descriptor index:(int32_t)index value:(NSString *)value __attribute__((swift_name("encodeStringElement(descriptor:index:value:)"))); +- (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (BOOL)shouldEncodeElementDefaultDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("shouldEncodeElementDefault(descriptor:index:)"))); +@property (readonly) SharedKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreSerializersModule"))) +@interface SharedKotlinx_serialization_coreSerializersModule : SharedBase + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (void)dumpToCollector:(id)collector __attribute__((swift_name("dumpTo(collector:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (id _Nullable)getContextualKClass:(id)kClass typeArgumentsSerializers:(NSArray> *)typeArgumentsSerializers __attribute__((swift_name("getContextual(kClass:typeArgumentsSerializers:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (id _Nullable)getPolymorphicBaseClass:(id)baseClass value:(id)value __attribute__((swift_name("getPolymorphic(baseClass:value:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (id _Nullable)getPolymorphicBaseClass:(id)baseClass serializedClassName:(NSString * _Nullable)serializedClassName __attribute__((swift_name("getPolymorphic(baseClass:serializedClassName:)"))); +@end + +__attribute__((swift_name("KotlinAnnotation"))) +@protocol SharedKotlinAnnotation +@required +@end + + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +__attribute__((swift_name("Kotlinx_serialization_coreSerialKind"))) +@interface SharedKotlinx_serialization_coreSerialKind : SharedBase +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreCompositeDecoder"))) +@protocol SharedKotlinx_serialization_coreCompositeDecoder +@required +- (BOOL)decodeBooleanElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeBooleanElement(descriptor:index:)"))); +- (int8_t)decodeByteElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeByteElement(descriptor:index:)"))); +- (unichar)decodeCharElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeCharElement(descriptor:index:)"))); +- (int32_t)decodeCollectionSizeDescriptor:(id)descriptor __attribute__((swift_name("decodeCollectionSize(descriptor:)"))); +- (double)decodeDoubleElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeDoubleElement(descriptor:index:)"))); +- (int32_t)decodeElementIndexDescriptor:(id)descriptor __attribute__((swift_name("decodeElementIndex(descriptor:)"))); +- (float)decodeFloatElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeFloatElement(descriptor:index:)"))); +- (id)decodeInlineElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeInlineElement(descriptor:index:)"))); +- (int32_t)decodeIntElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeIntElement(descriptor:index:)"))); +- (int64_t)decodeLongElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeLongElement(descriptor:index:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (id _Nullable)decodeNullableSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeNullableSerializableElement(descriptor:index:deserializer:previousValue:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (BOOL)decodeSequentially __attribute__((swift_name("decodeSequentially()"))); +- (id _Nullable)decodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeSerializableElement(descriptor:index:deserializer:previousValue:)"))); +- (int16_t)decodeShortElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeShortElement(descriptor:index:)"))); +- (NSString *)decodeStringElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeStringElement(descriptor:index:)"))); +- (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); +@property (readonly) SharedKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("KotlinNothing"))) +@interface SharedKotlinNothing : SharedBase +@end + +__attribute__((swift_name("KotlinCoroutineContextElement"))) +@protocol SharedKotlinCoroutineContextElement +@required +@property (readonly) id key __attribute__((swift_name("key"))); +@end + +__attribute__((swift_name("KotlinCoroutineContextKey"))) +@protocol SharedKotlinCoroutineContextKey +@required +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("KotlinEnumCompanion"))) +@interface SharedKotlinEnumCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedKotlinEnumCompanion *shared __attribute__((swift_name("shared"))); +@end + +__attribute__((swift_name("Koin_coreKoinComponent"))) +@protocol SharedKoin_coreKoinComponent +@required +- (SharedKoin_coreKoin *)getKoin __attribute__((swift_name("getKoin()"))); +@end + +__attribute__((swift_name("Koin_coreKoinScopeComponent"))) +@protocol SharedKoin_coreKoinScopeComponent +@required +@property (readonly) SharedKoin_coreScope *scope __attribute__((swift_name("scope"))); +@end + +__attribute__((swift_name("KotlinKDeclarationContainer"))) +@protocol SharedKotlinKDeclarationContainer +@required +@end + +__attribute__((swift_name("KotlinKAnnotatedElement"))) +@protocol SharedKotlinKAnnotatedElement +@required +@end + + +/** + * @note annotations + * kotlin.SinceKotlin(version="1.1") +*/ +__attribute__((swift_name("KotlinKClassifier"))) +@protocol SharedKotlinKClassifier +@required +@end + +__attribute__((swift_name("KotlinKClass"))) +@protocol SharedKotlinKClass +@required + +/** + * @note annotations + * kotlin.SinceKotlin(version="1.1") +*/ +- (BOOL)isInstanceValue:(id _Nullable)value __attribute__((swift_name("isInstance(value:)"))); +@property (readonly) NSString * _Nullable qualifiedName __attribute__((swift_name("qualifiedName"))); +@property (readonly) NSString * _Nullable simpleName __attribute__((swift_name("simpleName"))); +@end + +__attribute__((swift_name("KotlinLazy"))) +@protocol SharedKotlinLazy +@required +- (BOOL)isInitialized __attribute__((swift_name("isInitialized()"))); +@property (readonly) id _Nullable value __attribute__((swift_name("value"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("KotlinLazyThreadSafetyMode"))) +@interface SharedKotlinLazyThreadSafetyMode : SharedKotlinEnum ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); +- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +@property (class, readonly) SharedKotlinLazyThreadSafetyMode *synchronized __attribute__((swift_name("synchronized"))); +@property (class, readonly) SharedKotlinLazyThreadSafetyMode *publication __attribute__((swift_name("publication"))); +@property (class, readonly) SharedKotlinLazyThreadSafetyMode *none __attribute__((swift_name("none"))); ++ (SharedKotlinArray *)values __attribute__((swift_name("values()"))); +@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreExtensionManager"))) +@interface SharedKoin_coreExtensionManager : SharedBase +- (instancetype)initWith_koin:(SharedKoin_coreKoin *)_koin __attribute__((swift_name("init(_koin:)"))) __attribute__((objc_designated_initializer)); +- (void)close __attribute__((swift_name("close()"))); +- (id)getExtensionId:(NSString *)id __attribute__((swift_name("getExtension(id:)"))); +- (id _Nullable)getExtensionOrNullId:(NSString *)id __attribute__((swift_name("getExtensionOrNull(id:)"))); +- (void)registerExtensionId:(NSString *)id extension:(id)extension __attribute__((swift_name("registerExtension(id:extension:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreInstanceRegistry"))) +@interface SharedKoin_coreInstanceRegistry : SharedBase +- (instancetype)initWith_koin:(SharedKoin_coreKoin *)_koin __attribute__((swift_name("init(_koin:)"))) __attribute__((objc_designated_initializer)); +- (void)saveMappingAllowOverride:(BOOL)allowOverride mapping:(NSString *)mapping factory:(SharedKoin_coreInstanceFactory *)factory logWarning:(BOOL)logWarning __attribute__((swift_name("saveMapping(allowOverride:mapping:factory:logWarning:)"))); +- (int32_t)size __attribute__((swift_name("size()"))); +@property (readonly) SharedKoin_coreKoin *_koin __attribute__((swift_name("_koin"))); +@property (readonly) NSDictionary *> *instances __attribute__((swift_name("instances"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_corePropertyRegistry"))) +@interface SharedKoin_corePropertyRegistry : SharedBase +- (instancetype)initWith_koin:(SharedKoin_coreKoin *)_koin __attribute__((swift_name("init(_koin:)"))) __attribute__((objc_designated_initializer)); +- (void)close __attribute__((swift_name("close()"))); +- (void)deletePropertyKey:(NSString *)key __attribute__((swift_name("deleteProperty(key:)"))); +- (id _Nullable)getPropertyKey:(NSString *)key __attribute__((swift_name("getProperty(key:)"))); +- (void)savePropertiesProperties:(NSDictionary *)properties __attribute__((swift_name("saveProperties(properties:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreScopeRegistry"))) +@interface SharedKoin_coreScopeRegistry : SharedBase +- (instancetype)initWith_koin:(SharedKoin_coreKoin *)_koin __attribute__((swift_name("init(_koin:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedKoin_coreScopeRegistryCompanion *companion __attribute__((swift_name("companion"))); +- (void)loadScopesModules:(NSSet *)modules __attribute__((swift_name("loadScopes(modules:)"))); +@property (readonly) SharedKoin_coreScope *rootScope __attribute__((swift_name("rootScope"))); +@property (readonly) NSSet> *scopeDefinitions __attribute__((swift_name("scopeDefinitions"))); +@end + +__attribute__((swift_name("Koin_coreScopeCallback"))) +@protocol SharedKoin_coreScopeCallback +@required +- (void)onScopeCloseScope:(SharedKoin_coreScope *)scope __attribute__((swift_name("onScopeClose(scope:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreBeanDefinition"))) +@interface SharedKoin_coreBeanDefinition : SharedBase +- (instancetype)initWithScopeQualifier:(id)scopeQualifier primaryType:(id)primaryType qualifier:(id _Nullable)qualifier definition:(T _Nullable (^)(SharedKoin_coreScope *, SharedKoin_coreParametersHolder *))definition kind:(SharedKoin_coreKind *)kind secondaryTypes:(NSArray> *)secondaryTypes __attribute__((swift_name("init(scopeQualifier:primaryType:qualifier:definition:kind:secondaryTypes:)"))) __attribute__((objc_designated_initializer)); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (BOOL)hasTypeClazz:(id)clazz __attribute__((swift_name("hasType(clazz:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (BOOL)isClazz:(id)clazz qualifier:(id _Nullable)qualifier scopeDefinition:(id)scopeDefinition __attribute__((swift_name("is(clazz:qualifier:scopeDefinition:)"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property SharedKoin_coreCallbacks *callbacks __attribute__((swift_name("callbacks"))); +@property (readonly) T _Nullable (^definition)(SharedKoin_coreScope *, SharedKoin_coreParametersHolder *) __attribute__((swift_name("definition"))); +@property (readonly) SharedKoin_coreKind *kind __attribute__((swift_name("kind"))); +@property (readonly) id primaryType __attribute__((swift_name("primaryType"))); +@property id _Nullable qualifier __attribute__((swift_name("qualifier"))); +@property (readonly) id scopeQualifier __attribute__((swift_name("scopeQualifier"))); +@property NSArray> *secondaryTypes __attribute__((swift_name("secondaryTypes"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreInstanceFactoryCompanion"))) +@interface SharedKoin_coreInstanceFactoryCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedKoin_coreInstanceFactoryCompanion *shared __attribute__((swift_name("shared"))); +@property (readonly) NSString *ERROR_SEPARATOR __attribute__((swift_name("ERROR_SEPARATOR"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreResolutionContext"))) +@interface SharedKoin_coreResolutionContext : SharedBase +- (instancetype)initWithLogger:(SharedKoin_coreLogger *)logger scope:(SharedKoin_coreScope *)scope clazz:(id)clazz qualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder * _Nullable)parameters __attribute__((swift_name("init(logger:scope:clazz:qualifier:parameters:)"))) __attribute__((objc_designated_initializer)); +@property (readonly) id clazz __attribute__((swift_name("clazz"))); +@property (readonly) NSString *debugTag __attribute__((swift_name("debugTag"))); +@property (readonly) SharedKoin_coreLogger *logger __attribute__((swift_name("logger"))); +@property (readonly) SharedKoin_coreParametersHolder * _Nullable parameters __attribute__((swift_name("parameters"))); +@property (readonly) id _Nullable qualifier __attribute__((swift_name("qualifier"))); +@property (readonly) SharedKoin_coreScope *scope __attribute__((swift_name("scope"))); +@end + +__attribute__((swift_name("KotlinByteIterator"))) +@interface SharedKotlinByteIterator : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (SharedByte *)next __attribute__((swift_name("next()"))); +- (int8_t)nextByte __attribute__((swift_name("nextByte()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +__attribute__((swift_name("Kotlinx_serialization_coreSerializersModuleCollector"))) +@protocol SharedKotlinx_serialization_coreSerializersModuleCollector +@required +- (void)contextualKClass:(id)kClass provider:(id (^)(NSArray> *))provider __attribute__((swift_name("contextual(kClass:provider:)"))); +- (void)contextualKClass:(id)kClass serializer:(id)serializer __attribute__((swift_name("contextual(kClass:serializer:)"))); +- (void)polymorphicBaseClass:(id)baseClass actualClass:(id)actualClass actualSerializer:(id)actualSerializer __attribute__((swift_name("polymorphic(baseClass:actualClass:actualSerializer:)"))); +- (void)polymorphicDefaultBaseClass:(id)baseClass defaultDeserializerProvider:(id _Nullable (^)(NSString * _Nullable))defaultDeserializerProvider __attribute__((swift_name("polymorphicDefault(baseClass:defaultDeserializerProvider:)"))) __attribute__((deprecated("Deprecated in favor of function with more precise name: polymorphicDefaultDeserializer"))); +- (void)polymorphicDefaultDeserializerBaseClass:(id)baseClass defaultDeserializerProvider:(id _Nullable (^)(NSString * _Nullable))defaultDeserializerProvider __attribute__((swift_name("polymorphicDefaultDeserializer(baseClass:defaultDeserializerProvider:)"))); +- (void)polymorphicDefaultSerializerBaseClass:(id)baseClass defaultSerializerProvider:(id _Nullable (^)(id))defaultSerializerProvider __attribute__((swift_name("polymorphicDefaultSerializer(baseClass:defaultSerializerProvider:)"))); +@end + +__attribute__((swift_name("Koin_coreKoinExtension"))) +@protocol SharedKoin_coreKoinExtension +@required +- (void)onClose __attribute__((swift_name("onClose()"))); +- (void)onRegisterKoin:(SharedKoin_coreKoin *)koin __attribute__((swift_name("onRegister(koin:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreScopeRegistry.Companion"))) +@interface SharedKoin_coreScopeRegistryCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedKoin_coreScopeRegistryCompanion *shared __attribute__((swift_name("shared"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreKind"))) +@interface SharedKoin_coreKind : SharedKotlinEnum ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); +- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +@property (class, readonly) SharedKoin_coreKind *singleton __attribute__((swift_name("singleton"))); +@property (class, readonly) SharedKoin_coreKind *factory __attribute__((swift_name("factory"))); +@property (class, readonly) SharedKoin_coreKind *scoped __attribute__((swift_name("scoped"))); ++ (SharedKotlinArray *)values __attribute__((swift_name("values()"))); +@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreCallbacks"))) +@interface SharedKoin_coreCallbacks : SharedBase +- (instancetype)initWithOnClose:(void (^ _Nullable)(T _Nullable))onClose __attribute__((swift_name("init(onClose:)"))) __attribute__((objc_designated_initializer)); +- (SharedKoin_coreCallbacks *)doCopyOnClose:(void (^ _Nullable)(T _Nullable))onClose __attribute__((swift_name("doCopy(onClose:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) void (^ _Nullable onClose)(T _Nullable) __attribute__((swift_name("onClose"))); +@end + +#pragma pop_macro("_Nullable_result") +#pragma clang diagnostic pop +NS_ASSUME_NONNULL_END diff --git a/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64/shared.framework/Info.plist b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64/shared.framework/Info.plist new file mode 100644 index 0000000..b18e241 --- /dev/null +++ b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64/shared.framework/Info.plist @@ -0,0 +1,35 @@ + + + + + CFBundleExecutable + shared + CFBundleIdentifier + com.assignment.pokemon.shared + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + shared + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + iPhoneOS + + CFBundleVersion + 1 + MinimumOSVersion + 12.0 + UIDeviceFamily + + 1 + 2 + + UIRequiredDeviceCapabilities + + arm64 + + + \ No newline at end of file diff --git a/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64/shared.framework/Modules/module.modulemap b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64/shared.framework/Modules/module.modulemap new file mode 100644 index 0000000..2bb2a76 --- /dev/null +++ b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64/shared.framework/Modules/module.modulemap @@ -0,0 +1,8 @@ +framework module "shared" { + umbrella header "shared.h" + + export * + module * { export * } + + use Foundation +} diff --git a/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64/shared.framework/shared b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64/shared.framework/shared new file mode 100644 index 0000000..bf85af9 Binary files /dev/null and b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64/shared.framework/shared differ diff --git a/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64_x86_64-simulator/shared.framework/Headers/shared.h b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64_x86_64-simulator/shared.framework/Headers/shared.h new file mode 100644 index 0000000..278e45b --- /dev/null +++ b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64_x86_64-simulator/shared.framework/Headers/shared.h @@ -0,0 +1,1717 @@ +#import +#import +#import +#import +#import +#import +#import + +@class SharedFavoritePokemon, SharedKotlinUnit, SharedRuntimeTransacterTransaction, SharedKotlinThrowable, SharedRuntimeBaseTransacterImpl, SharedRuntimeTransacterImpl, SharedRuntimeQuery<__covariant RowType>, SharedPokemon, SharedPokemonStat, SharedPokemonDetail, SharedNamedResourceDto, SharedAbilitySlotDtoCompanion, SharedAbilitySlotDto, SharedNamedResourceDtoCompanion, SharedTypeSlotDto, SharedStatEntryDto, SharedPokemonDetailDtoCompanion, SharedPokemonDetailDto, SharedPokemonDtoCompanion, SharedPokemonDto, SharedPokemonListDtoCompanion, SharedPokemonListDto, SharedStatEntryDtoCompanion, SharedTypeSlotDtoCompanion, SharedPokemonPage, SharedFavoritePokemonQueries, SharedPokemonDatabaseCompanion, SharedBaseViewModel, SharedPokemonDetailState, SharedPokemonDetailStateError, SharedPokemonDetailStateLoading, SharedPokemonDetailStateSuccess, SharedPokemonListState, SharedPokemonListStateError, SharedPokemonListStateLoading, SharedPokemonListStateSuccess, SharedPokemonListViewModelCompanion, SharedDatabaseDriverFactory, SharedKoin_coreKoinApplication, SharedKoin_coreModule, SharedKotlinArray, SharedRuntimeExecutableQuery<__covariant RowType>, SharedKotlinException, SharedKotlinRuntimeException, SharedKotlinIllegalStateException, SharedRuntimeAfterVersion, SharedKoin_coreKoinApplicationCompanion, SharedKoin_coreLogger, SharedKoin_coreLevel, SharedKoin_coreKoin, SharedKoin_coreKoinDefinition, SharedKoin_coreScope, SharedKoin_coreParametersHolder, SharedKoin_coreInstanceFactory, SharedKoin_coreSingleInstanceFactory, SharedKoin_coreScopeDSL, SharedKotlinByteArray, SharedKotlinx_serialization_coreSerializersModule, SharedKotlinx_serialization_coreSerialKind, SharedKotlinNothing, SharedKotlinEnumCompanion, SharedKotlinEnum, SharedKotlinLazyThreadSafetyMode, SharedKoin_coreExtensionManager, SharedKoin_coreInstanceRegistry, SharedKoin_corePropertyRegistry, SharedKoin_coreScopeRegistry, SharedKoin_coreLockable, SharedKoin_coreBeanDefinition, SharedKoin_coreInstanceFactoryCompanion, SharedKoin_coreResolutionContext, SharedKotlinByteIterator, SharedKoin_coreScopeRegistryCompanion, SharedKoin_coreKind, SharedKoin_coreCallbacks; + +@protocol SharedRuntimeSqlDriver, SharedRuntimeTransactionWithoutReturn, SharedRuntimeTransactionWithReturn, SharedRuntimeTransacterBase, SharedRuntimeTransacter, SharedKotlinx_serialization_coreKSerializer, SharedKotlinx_coroutines_coreFlow, SharedPokemonDatabase, SharedRuntimeSqlSchema, SharedKotlinx_coroutines_coreCoroutineScope, SharedPokemonRepository, SharedKotlinx_coroutines_coreStateFlow, SharedRuntimeQueryListener, SharedRuntimeQueryResult, SharedRuntimeSqlPreparedStatement, SharedRuntimeSqlCursor, SharedRuntimeCloseable, SharedRuntimeTransactionCallbacks, SharedKotlinx_serialization_coreEncoder, SharedKotlinx_serialization_coreSerialDescriptor, SharedKotlinx_serialization_coreSerializationStrategy, SharedKotlinx_serialization_coreDecoder, SharedKotlinx_serialization_coreDeserializationStrategy, SharedKotlinx_coroutines_coreFlowCollector, SharedKotlinCoroutineContext, SharedKotlinx_coroutines_coreSharedFlow, SharedKoin_coreQualifier, SharedKotlinIterator, SharedKotlinx_serialization_coreCompositeEncoder, SharedKotlinAnnotation, SharedKotlinx_serialization_coreCompositeDecoder, SharedKotlinCoroutineContextElement, SharedKotlinCoroutineContextKey, SharedKotlinComparable, SharedKoin_coreKoinScopeComponent, SharedKotlinKClass, SharedKotlinLazy, SharedKoin_coreScopeCallback, SharedKotlinx_serialization_coreSerializersModuleCollector, SharedKoin_coreKoinComponent, SharedKotlinKDeclarationContainer, SharedKotlinKAnnotatedElement, SharedKotlinKClassifier, SharedKoin_coreKoinExtension; + +NS_ASSUME_NONNULL_BEGIN +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunknown-warning-option" +#pragma clang diagnostic ignored "-Wincompatible-property-type" +#pragma clang diagnostic ignored "-Wnullability" + +#pragma push_macro("_Nullable_result") +#if !__has_feature(nullability_nullable_result) +#undef _Nullable_result +#define _Nullable_result _Nullable +#endif + +__attribute__((swift_name("KotlinBase"))) +@interface SharedBase : NSObject +- (instancetype)init __attribute__((unavailable)); ++ (instancetype)new __attribute__((unavailable)); ++ (void)initialize __attribute__((objc_requires_super)); +@end + +@interface SharedBase (SharedBaseCopying) +@end + +__attribute__((swift_name("KotlinMutableSet"))) +@interface SharedMutableSet : NSMutableSet +@end + +__attribute__((swift_name("KotlinMutableDictionary"))) +@interface SharedMutableDictionary : NSMutableDictionary +@end + +@interface NSError (NSErrorSharedKotlinException) +@property (readonly) id _Nullable kotlinException; +@end + +__attribute__((swift_name("KotlinNumber"))) +@interface SharedNumber : NSNumber +- (instancetype)initWithChar:(char)value __attribute__((unavailable)); +- (instancetype)initWithUnsignedChar:(unsigned char)value __attribute__((unavailable)); +- (instancetype)initWithShort:(short)value __attribute__((unavailable)); +- (instancetype)initWithUnsignedShort:(unsigned short)value __attribute__((unavailable)); +- (instancetype)initWithInt:(int)value __attribute__((unavailable)); +- (instancetype)initWithUnsignedInt:(unsigned int)value __attribute__((unavailable)); +- (instancetype)initWithLong:(long)value __attribute__((unavailable)); +- (instancetype)initWithUnsignedLong:(unsigned long)value __attribute__((unavailable)); +- (instancetype)initWithLongLong:(long long)value __attribute__((unavailable)); +- (instancetype)initWithUnsignedLongLong:(unsigned long long)value __attribute__((unavailable)); +- (instancetype)initWithFloat:(float)value __attribute__((unavailable)); +- (instancetype)initWithDouble:(double)value __attribute__((unavailable)); +- (instancetype)initWithBool:(BOOL)value __attribute__((unavailable)); +- (instancetype)initWithInteger:(NSInteger)value __attribute__((unavailable)); +- (instancetype)initWithUnsignedInteger:(NSUInteger)value __attribute__((unavailable)); ++ (instancetype)numberWithChar:(char)value __attribute__((unavailable)); ++ (instancetype)numberWithUnsignedChar:(unsigned char)value __attribute__((unavailable)); ++ (instancetype)numberWithShort:(short)value __attribute__((unavailable)); ++ (instancetype)numberWithUnsignedShort:(unsigned short)value __attribute__((unavailable)); ++ (instancetype)numberWithInt:(int)value __attribute__((unavailable)); ++ (instancetype)numberWithUnsignedInt:(unsigned int)value __attribute__((unavailable)); ++ (instancetype)numberWithLong:(long)value __attribute__((unavailable)); ++ (instancetype)numberWithUnsignedLong:(unsigned long)value __attribute__((unavailable)); ++ (instancetype)numberWithLongLong:(long long)value __attribute__((unavailable)); ++ (instancetype)numberWithUnsignedLongLong:(unsigned long long)value __attribute__((unavailable)); ++ (instancetype)numberWithFloat:(float)value __attribute__((unavailable)); ++ (instancetype)numberWithDouble:(double)value __attribute__((unavailable)); ++ (instancetype)numberWithBool:(BOOL)value __attribute__((unavailable)); ++ (instancetype)numberWithInteger:(NSInteger)value __attribute__((unavailable)); ++ (instancetype)numberWithUnsignedInteger:(NSUInteger)value __attribute__((unavailable)); +@end + +__attribute__((swift_name("KotlinByte"))) +@interface SharedByte : SharedNumber +- (instancetype)initWithChar:(char)value; ++ (instancetype)numberWithChar:(char)value; +@end + +__attribute__((swift_name("KotlinUByte"))) +@interface SharedUByte : SharedNumber +- (instancetype)initWithUnsignedChar:(unsigned char)value; ++ (instancetype)numberWithUnsignedChar:(unsigned char)value; +@end + +__attribute__((swift_name("KotlinShort"))) +@interface SharedShort : SharedNumber +- (instancetype)initWithShort:(short)value; ++ (instancetype)numberWithShort:(short)value; +@end + +__attribute__((swift_name("KotlinUShort"))) +@interface SharedUShort : SharedNumber +- (instancetype)initWithUnsignedShort:(unsigned short)value; ++ (instancetype)numberWithUnsignedShort:(unsigned short)value; +@end + +__attribute__((swift_name("KotlinInt"))) +@interface SharedInt : SharedNumber +- (instancetype)initWithInt:(int)value; ++ (instancetype)numberWithInt:(int)value; +@end + +__attribute__((swift_name("KotlinUInt"))) +@interface SharedUInt : SharedNumber +- (instancetype)initWithUnsignedInt:(unsigned int)value; ++ (instancetype)numberWithUnsignedInt:(unsigned int)value; +@end + +__attribute__((swift_name("KotlinLong"))) +@interface SharedLong : SharedNumber +- (instancetype)initWithLongLong:(long long)value; ++ (instancetype)numberWithLongLong:(long long)value; +@end + +__attribute__((swift_name("KotlinULong"))) +@interface SharedULong : SharedNumber +- (instancetype)initWithUnsignedLongLong:(unsigned long long)value; ++ (instancetype)numberWithUnsignedLongLong:(unsigned long long)value; +@end + +__attribute__((swift_name("KotlinFloat"))) +@interface SharedFloat : SharedNumber +- (instancetype)initWithFloat:(float)value; ++ (instancetype)numberWithFloat:(float)value; +@end + +__attribute__((swift_name("KotlinDouble"))) +@interface SharedDouble : SharedNumber +- (instancetype)initWithDouble:(double)value; ++ (instancetype)numberWithDouble:(double)value; +@end + +__attribute__((swift_name("KotlinBoolean"))) +@interface SharedBoolean : SharedNumber +- (instancetype)initWithBool:(BOOL)value; ++ (instancetype)numberWithBool:(BOOL)value; +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("FavoritePokemon"))) +@interface SharedFavoritePokemon : SharedBase +- (instancetype)initWithId:(int64_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl __attribute__((swift_name("init(id:name:imageUrl:)"))) __attribute__((objc_designated_initializer)); +- (SharedFavoritePokemon *)doCopyId:(int64_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl __attribute__((swift_name("doCopy(id:name:imageUrl:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) int64_t id __attribute__((swift_name("id"))); +@property (readonly) NSString *imageUrl __attribute__((swift_name("imageUrl"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@end + +__attribute__((swift_name("RuntimeBaseTransacterImpl"))) +@interface SharedRuntimeBaseTransacterImpl : SharedBase +- (instancetype)initWithDriver:(id)driver __attribute__((swift_name("init(driver:)"))) __attribute__((objc_designated_initializer)); + +/** + * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +- (NSString *)createArgumentsCount:(int32_t)count __attribute__((swift_name("createArguments(count:)"))); + +/** + * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +- (void)notifyQueriesIdentifier:(int32_t)identifier tableProvider:(void (^)(SharedKotlinUnit *(^)(NSString *)))tableProvider __attribute__((swift_name("notifyQueries(identifier:tableProvider:)"))); + +/** + * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +- (id _Nullable)postTransactionCleanupTransaction:(SharedRuntimeTransacterTransaction *)transaction enclosing:(SharedRuntimeTransacterTransaction * _Nullable)enclosing thrownException:(SharedKotlinThrowable * _Nullable)thrownException returnValue:(id _Nullable)returnValue __attribute__((swift_name("postTransactionCleanup(transaction:enclosing:thrownException:returnValue:)"))); + +/** + * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +@property (readonly) id driver __attribute__((swift_name("driver"))); +@end + +__attribute__((swift_name("RuntimeTransacterBase"))) +@protocol SharedRuntimeTransacterBase +@required +@end + +__attribute__((swift_name("RuntimeTransacter"))) +@protocol SharedRuntimeTransacter +@required +- (void)transactionNoEnclosing:(BOOL)noEnclosing body:(void (^)(id))body __attribute__((swift_name("transaction(noEnclosing:body:)"))); +- (id _Nullable)transactionWithResultNoEnclosing:(BOOL)noEnclosing bodyWithReturn:(id _Nullable (^)(id))bodyWithReturn __attribute__((swift_name("transactionWithResult(noEnclosing:bodyWithReturn:)"))); +@end + +__attribute__((swift_name("RuntimeTransacterImpl"))) +@interface SharedRuntimeTransacterImpl : SharedRuntimeBaseTransacterImpl +- (instancetype)initWithDriver:(id)driver __attribute__((swift_name("init(driver:)"))) __attribute__((objc_designated_initializer)); +- (void)transactionNoEnclosing:(BOOL)noEnclosing body:(void (^)(id))body __attribute__((swift_name("transaction(noEnclosing:body:)"))); +- (id _Nullable)transactionWithResultNoEnclosing:(BOOL)noEnclosing bodyWithReturn:(id _Nullable (^)(id))bodyWithReturn __attribute__((swift_name("transactionWithResult(noEnclosing:bodyWithReturn:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("FavoritePokemonQueries"))) +@interface SharedFavoritePokemonQueries : SharedRuntimeTransacterImpl +- (instancetype)initWithDriver:(id)driver __attribute__((swift_name("init(driver:)"))) __attribute__((objc_designated_initializer)); +- (void)deleteFavoriteId:(int64_t)id __attribute__((swift_name("deleteFavorite(id:)"))); +- (SharedRuntimeQuery *)getAllFavorites __attribute__((swift_name("getAllFavorites()"))); +- (SharedRuntimeQuery *)getAllFavoritesMapper:(id (^)(SharedLong *, NSString *, NSString *))mapper __attribute__((swift_name("getAllFavorites(mapper:)"))); +- (void)insertFavoriteId:(SharedLong * _Nullable)id name:(NSString *)name imageUrl:(NSString *)imageUrl __attribute__((swift_name("insertFavorite(id:name:imageUrl:)"))); +- (SharedRuntimeQuery *)isFavoriteId:(int64_t)id __attribute__((swift_name("isFavorite(id:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("DatabaseDriverFactory"))) +@interface SharedDatabaseDriverFactory : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (id)createDriver __attribute__((swift_name("createDriver()"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Pokemon"))) +@interface SharedPokemon : SharedBase +- (instancetype)initWithId:(int32_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl __attribute__((swift_name("init(id:name:imageUrl:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemon *)doCopyId:(int32_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl __attribute__((swift_name("doCopy(id:name:imageUrl:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) int32_t id __attribute__((swift_name("id"))); +@property (readonly) NSString *imageUrl __attribute__((swift_name("imageUrl"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetail"))) +@interface SharedPokemonDetail : SharedBase +- (instancetype)initWithId:(int32_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl height:(int32_t)height weight:(int32_t)weight types:(NSArray *)types stats:(NSArray *)stats abilities:(NSArray *)abilities isFavorite:(BOOL)isFavorite __attribute__((swift_name("init(id:name:imageUrl:height:weight:types:stats:abilities:isFavorite:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonDetail *)doCopyId:(int32_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl height:(int32_t)height weight:(int32_t)weight types:(NSArray *)types stats:(NSArray *)stats abilities:(NSArray *)abilities isFavorite:(BOOL)isFavorite __attribute__((swift_name("doCopy(id:name:imageUrl:height:weight:types:stats:abilities:isFavorite:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSArray *abilities __attribute__((swift_name("abilities"))); +@property (readonly) int32_t height __attribute__((swift_name("height"))); +@property (readonly) int32_t id __attribute__((swift_name("id"))); +@property (readonly) NSString *imageUrl __attribute__((swift_name("imageUrl"))); +@property (readonly) BOOL isFavorite __attribute__((swift_name("isFavorite"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@property (readonly) NSArray *stats __attribute__((swift_name("stats"))); +@property (readonly) NSArray *types __attribute__((swift_name("types"))); +@property (readonly) int32_t weight __attribute__((swift_name("weight"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonStat"))) +@interface SharedPokemonStat : SharedBase +- (instancetype)initWithName:(NSString *)name value:(int32_t)value __attribute__((swift_name("init(name:value:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonStat *)doCopyName:(NSString *)name value:(int32_t)value __attribute__((swift_name("doCopy(name:value:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@property (readonly) int32_t value __attribute__((swift_name("value"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("AbilitySlotDto"))) +@interface SharedAbilitySlotDto : SharedBase +- (instancetype)initWithIsHidden:(BOOL)isHidden ability:(SharedNamedResourceDto *)ability __attribute__((swift_name("init(isHidden:ability:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedAbilitySlotDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedAbilitySlotDto *)doCopyIsHidden:(BOOL)isHidden ability:(SharedNamedResourceDto *)ability __attribute__((swift_name("doCopy(isHidden:ability:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) SharedNamedResourceDto *ability __attribute__((swift_name("ability"))); + +/** + * @note annotations + * kotlinx.serialization.SerialName(value="is_hidden") +*/ +@property (readonly) BOOL isHidden __attribute__((swift_name("isHidden"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("AbilitySlotDto.Companion"))) +@interface SharedAbilitySlotDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedAbilitySlotDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("NamedResourceDto"))) +@interface SharedNamedResourceDto : SharedBase +- (instancetype)initWithName:(NSString *)name __attribute__((swift_name("init(name:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedNamedResourceDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedNamedResourceDto *)doCopyName:(NSString *)name __attribute__((swift_name("doCopy(name:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("NamedResourceDto.Companion"))) +@interface SharedNamedResourceDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedNamedResourceDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetailDto"))) +@interface SharedPokemonDetailDto : SharedBase +- (instancetype)initWithId:(int32_t)id name:(NSString *)name height:(int32_t)height weight:(int32_t)weight types:(NSArray *)types stats:(NSArray *)stats abilities:(NSArray *)abilities __attribute__((swift_name("init(id:name:height:weight:types:stats:abilities:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedPokemonDetailDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedPokemonDetailDto *)doCopyId:(int32_t)id name:(NSString *)name height:(int32_t)height weight:(int32_t)weight types:(NSArray *)types stats:(NSArray *)stats abilities:(NSArray *)abilities __attribute__((swift_name("doCopy(id:name:height:weight:types:stats:abilities:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSArray *abilities __attribute__((swift_name("abilities"))); +@property (readonly) int32_t height __attribute__((swift_name("height"))); +@property (readonly) int32_t id __attribute__((swift_name("id"))); +@property (readonly) NSString *imageUrl __attribute__((swift_name("imageUrl"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@property (readonly) NSArray *stats __attribute__((swift_name("stats"))); +@property (readonly) NSArray *types __attribute__((swift_name("types"))); +@property (readonly) int32_t weight __attribute__((swift_name("weight"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetailDto.Companion"))) +@interface SharedPokemonDetailDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonDetailDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDto"))) +@interface SharedPokemonDto : SharedBase +- (instancetype)initWithName:(NSString *)name url:(NSString *)url __attribute__((swift_name("init(name:url:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedPokemonDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedPokemonDto *)doCopyName:(NSString *)name url:(NSString *)url __attribute__((swift_name("doCopy(name:url:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) int32_t id __attribute__((swift_name("id"))); +@property (readonly) NSString *imageUrl __attribute__((swift_name("imageUrl"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@property (readonly) NSString *url __attribute__((swift_name("url"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDto.Companion"))) +@interface SharedPokemonDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListDto"))) +@interface SharedPokemonListDto : SharedBase +- (instancetype)initWithCount:(int32_t)count next:(NSString * _Nullable)next results:(NSArray *)results __attribute__((swift_name("init(count:next:results:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedPokemonListDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedPokemonListDto *)doCopyCount:(int32_t)count next:(NSString * _Nullable)next results:(NSArray *)results __attribute__((swift_name("doCopy(count:next:results:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) int32_t count __attribute__((swift_name("count"))); +@property (readonly) NSString * _Nullable next __attribute__((swift_name("next"))); +@property (readonly) NSArray *results __attribute__((swift_name("results"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListDto.Companion"))) +@interface SharedPokemonListDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonListDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("StatEntryDto"))) +@interface SharedStatEntryDto : SharedBase +- (instancetype)initWithBaseStat:(int32_t)baseStat stat:(SharedNamedResourceDto *)stat __attribute__((swift_name("init(baseStat:stat:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedStatEntryDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedStatEntryDto *)doCopyBaseStat:(int32_t)baseStat stat:(SharedNamedResourceDto *)stat __attribute__((swift_name("doCopy(baseStat:stat:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); + +/** + * @note annotations + * kotlinx.serialization.SerialName(value="base_stat") +*/ +@property (readonly) int32_t baseStat __attribute__((swift_name("baseStat"))); +@property (readonly) SharedNamedResourceDto *stat __attribute__((swift_name("stat"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("StatEntryDto.Companion"))) +@interface SharedStatEntryDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedStatEntryDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.Serializable +*/ +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("TypeSlotDto"))) +@interface SharedTypeSlotDto : SharedBase +- (instancetype)initWithSlot:(int32_t)slot type:(SharedNamedResourceDto *)type __attribute__((swift_name("init(slot:type:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedTypeSlotDtoCompanion *companion __attribute__((swift_name("companion"))); +- (SharedTypeSlotDto *)doCopySlot:(int32_t)slot type:(SharedNamedResourceDto *)type __attribute__((swift_name("doCopy(slot:type:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) int32_t slot __attribute__((swift_name("slot"))); +@property (readonly) SharedNamedResourceDto *type __attribute__((swift_name("type"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("TypeSlotDto.Companion"))) +@interface SharedTypeSlotDtoCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedTypeSlotDtoCompanion *shared __attribute__((swift_name("shared"))); +- (id)serializer __attribute__((swift_name("serializer()"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonPage"))) +@interface SharedPokemonPage : SharedBase +- (instancetype)initWithPokemon:(NSArray *)pokemon hasMore:(BOOL)hasMore __attribute__((swift_name("init(pokemon:hasMore:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonPage *)doCopyPokemon:(NSArray *)pokemon hasMore:(BOOL)hasMore __attribute__((swift_name("doCopy(pokemon:hasMore:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) BOOL hasMore __attribute__((swift_name("hasMore"))); +@property (readonly) NSArray *pokemon __attribute__((swift_name("pokemon"))); +@end + +__attribute__((swift_name("PokemonRepository"))) +@protocol SharedPokemonRepository +@required + +/** + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. +*/ +- (void)getPokemonDetailName:(NSString *)name completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("getPokemonDetail(name:completionHandler:)"))); + +/** + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. +*/ +- (void)getPokemonPageLimit:(int32_t)limit offset:(int32_t)offset completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("getPokemonPage(limit:offset:completionHandler:)"))); +- (id)observeFavorites __attribute__((swift_name("observeFavorites()"))); + +/** + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. +*/ +- (void)setFavoriteId:(int32_t)id name:(NSString *)name imageUrl:(NSString *)imageUrl isFavorite:(BOOL)isFavorite completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("setFavorite(id:name:imageUrl:isFavorite:completionHandler:)"))); +@end + +__attribute__((swift_name("PokemonDatabase"))) +@protocol SharedPokemonDatabase +@required +@property (readonly) SharedFavoritePokemonQueries *favoritePokemonQueries __attribute__((swift_name("favoritePokemonQueries"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDatabaseCompanion"))) +@interface SharedPokemonDatabaseCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonDatabaseCompanion *shared __attribute__((swift_name("shared"))); +- (id)invokeDriver:(id)driver __attribute__((swift_name("invoke(driver:)"))); +@property (readonly) id Schema __attribute__((swift_name("Schema"))); +@end + +__attribute__((swift_name("BaseViewModel"))) +@interface SharedBaseViewModel : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (void)onCleared __attribute__((swift_name("onCleared()"))); +@property (readonly) id viewModelScope __attribute__((swift_name("viewModelScope"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("FavoritesViewModel"))) +@interface SharedFavoritesViewModel : SharedBaseViewModel +- (instancetype)initWithRepository:(id)repository __attribute__((swift_name("init(repository:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); ++ (instancetype)new __attribute__((unavailable)); +@property (readonly) id favorites __attribute__((swift_name("favorites"))); +@end + +__attribute__((swift_name("PokemonDetailState"))) +@interface SharedPokemonDetailState : SharedBase +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetailState.Error"))) +@interface SharedPokemonDetailStateError : SharedPokemonDetailState +- (instancetype)initWithMessage:(NSString *)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonDetailStateError *)doCopyMessage:(NSString *)message __attribute__((swift_name("doCopy(message:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSString *message __attribute__((swift_name("message"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetailState.Loading"))) +@interface SharedPokemonDetailStateLoading : SharedPokemonDetailState ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)loading __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonDetailStateLoading *shared __attribute__((swift_name("shared"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetailState.Success"))) +@interface SharedPokemonDetailStateSuccess : SharedPokemonDetailState +- (instancetype)initWithPokemon:(SharedPokemonDetail *)pokemon __attribute__((swift_name("init(pokemon:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonDetailStateSuccess *)doCopyPokemon:(SharedPokemonDetail *)pokemon __attribute__((swift_name("doCopy(pokemon:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) SharedPokemonDetail *pokemon __attribute__((swift_name("pokemon"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonDetailViewModel"))) +@interface SharedPokemonDetailViewModel : SharedBaseViewModel +- (instancetype)initWithPokemonName:(NSString *)pokemonName repository:(id)repository __attribute__((swift_name("init(pokemonName:repository:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); ++ (instancetype)new __attribute__((unavailable)); +- (void)retry __attribute__((swift_name("retry()"))); +- (void)toggleFavorite __attribute__((swift_name("toggleFavorite()"))); +@property (readonly) id state __attribute__((swift_name("state"))); +@end + +__attribute__((swift_name("PokemonListState"))) +@interface SharedPokemonListState : SharedBase +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListState.Error"))) +@interface SharedPokemonListStateError : SharedPokemonListState +- (instancetype)initWithMessage:(NSString *)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonListStateError *)doCopyMessage:(NSString *)message __attribute__((swift_name("doCopy(message:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSString *message __attribute__((swift_name("message"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListState.Loading"))) +@interface SharedPokemonListStateLoading : SharedPokemonListState ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)loading __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonListStateLoading *shared __attribute__((swift_name("shared"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListState.Success"))) +@interface SharedPokemonListStateSuccess : SharedPokemonListState +- (instancetype)initWithPokemon:(NSArray *)pokemon isLoadingMore:(BOOL)isLoadingMore canLoadMore:(BOOL)canLoadMore __attribute__((swift_name("init(pokemon:isLoadingMore:canLoadMore:)"))) __attribute__((objc_designated_initializer)); +- (SharedPokemonListStateSuccess *)doCopyPokemon:(NSArray *)pokemon isLoadingMore:(BOOL)isLoadingMore canLoadMore:(BOOL)canLoadMore __attribute__((swift_name("doCopy(pokemon:isLoadingMore:canLoadMore:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) BOOL canLoadMore __attribute__((swift_name("canLoadMore"))); +@property (readonly) BOOL isLoadingMore __attribute__((swift_name("isLoadingMore"))); +@property (readonly) NSArray *pokemon __attribute__((swift_name("pokemon"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListViewModel"))) +@interface SharedPokemonListViewModel : SharedBaseViewModel +- (instancetype)initWithRepository:(id)repository __attribute__((swift_name("init(repository:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); ++ (instancetype)new __attribute__((unavailable)); +@property (class, readonly, getter=companion) SharedPokemonListViewModelCompanion *companion __attribute__((swift_name("companion"))); +- (void)loadNextPage __attribute__((swift_name("loadNextPage()"))); +- (void)refresh __attribute__((swift_name("refresh()"))); +- (void)searchQuery:(NSString *)query __attribute__((swift_name("search(query:)"))); +@property (readonly) id state __attribute__((swift_name("state"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("PokemonListViewModel.Companion"))) +@interface SharedPokemonListViewModelCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedPokemonListViewModelCompanion *shared __attribute__((swift_name("shared"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("ModulesKt"))) +@interface SharedModulesKt : SharedBase ++ (void)doInitKoinDriverFactory:(SharedDatabaseDriverFactory *)driverFactory enableNetworkLogs:(BOOL)enableNetworkLogs appDeclaration:(void (^)(SharedKoin_coreKoinApplication *))appDeclaration __attribute__((swift_name("doInitKoin(driverFactory:enableNetworkLogs:appDeclaration:)"))); +@property (class, readonly) SharedKoin_coreModule *viewModelModule __attribute__((swift_name("viewModelModule"))); +@end + +__attribute__((swift_name("RuntimeCloseable"))) +@protocol SharedRuntimeCloseable +@required +- (void)close __attribute__((swift_name("close()"))); +@end + +__attribute__((swift_name("RuntimeSqlDriver"))) +@protocol SharedRuntimeSqlDriver +@required +- (void)addListenerQueryKeys:(SharedKotlinArray *)queryKeys listener:(id)listener __attribute__((swift_name("addListener(queryKeys:listener:)"))); +- (SharedRuntimeTransacterTransaction * _Nullable)currentTransaction __attribute__((swift_name("currentTransaction()"))); +- (id)executeIdentifier:(SharedInt * _Nullable)identifier sql:(NSString *)sql parameters:(int32_t)parameters binders:(void (^ _Nullable)(id))binders __attribute__((swift_name("execute(identifier:sql:parameters:binders:)"))); +- (id)executeQueryIdentifier:(SharedInt * _Nullable)identifier sql:(NSString *)sql mapper:(id (^)(id))mapper parameters:(int32_t)parameters binders:(void (^ _Nullable)(id))binders __attribute__((swift_name("executeQuery(identifier:sql:mapper:parameters:binders:)"))); +- (id)doNewTransaction __attribute__((swift_name("doNewTransaction()"))); +- (void)notifyListenersQueryKeys:(SharedKotlinArray *)queryKeys __attribute__((swift_name("notifyListeners(queryKeys:)"))); +- (void)removeListenerQueryKeys:(SharedKotlinArray *)queryKeys listener:(id)listener __attribute__((swift_name("removeListener(queryKeys:listener:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("KotlinUnit"))) +@interface SharedKotlinUnit : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)unit __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedKotlinUnit *shared __attribute__((swift_name("shared"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@end + +__attribute__((swift_name("RuntimeTransactionCallbacks"))) +@protocol SharedRuntimeTransactionCallbacks +@required +- (void)afterCommitFunction:(void (^)(void))function __attribute__((swift_name("afterCommit(function:)"))); +- (void)afterRollbackFunction:(void (^)(void))function __attribute__((swift_name("afterRollback(function:)"))); +@end + +__attribute__((swift_name("RuntimeTransacterTransaction"))) +@interface SharedRuntimeTransacterTransaction : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (void)afterCommitFunction:(void (^)(void))function __attribute__((swift_name("afterCommit(function:)"))); +- (void)afterRollbackFunction:(void (^)(void))function __attribute__((swift_name("afterRollback(function:)"))); + +/** + * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +- (id)endTransactionSuccessful:(BOOL)successful __attribute__((swift_name("endTransaction(successful:)"))); + +/** + * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. +*/ +@property (readonly) SharedRuntimeTransacterTransaction * _Nullable enclosingTransaction __attribute__((swift_name("enclosingTransaction"))); +@end + +__attribute__((swift_name("KotlinThrowable"))) +@interface SharedKotlinThrowable : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithCause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); + +/** + * @note annotations + * kotlin.experimental.ExperimentalNativeApi +*/ +- (SharedKotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); +- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) SharedKotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); +@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); +- (NSError *)asError __attribute__((swift_name("asError()"))); +@end + +__attribute__((swift_name("RuntimeTransactionWithoutReturn"))) +@protocol SharedRuntimeTransactionWithoutReturn +@required +- (void)rollback __attribute__((swift_name("rollback()"))); +- (void)transactionBody:(void (^)(id))body __attribute__((swift_name("transaction(body:)"))); +@end + +__attribute__((swift_name("RuntimeTransactionWithReturn"))) +@protocol SharedRuntimeTransactionWithReturn +@required +- (void)rollbackReturnValue:(id _Nullable)returnValue __attribute__((swift_name("rollback(returnValue:)"))); +- (id _Nullable)transactionBody_:(id _Nullable (^)(id))body __attribute__((swift_name("transaction(body_:)"))); +@end + +__attribute__((swift_name("RuntimeExecutableQuery"))) +@interface SharedRuntimeExecutableQuery<__covariant RowType> : SharedBase +- (instancetype)initWithMapper:(RowType (^)(id))mapper __attribute__((swift_name("init(mapper:)"))) __attribute__((objc_designated_initializer)); +- (id)executeMapper:(id (^)(id))mapper __attribute__((swift_name("execute(mapper:)"))); +- (NSArray *)executeAsList __attribute__((swift_name("executeAsList()"))); +- (RowType)executeAsOne __attribute__((swift_name("executeAsOne()"))); +- (RowType _Nullable)executeAsOneOrNull __attribute__((swift_name("executeAsOneOrNull()"))); +@property (readonly) RowType (^mapper)(id) __attribute__((swift_name("mapper"))); +@end + +__attribute__((swift_name("RuntimeQuery"))) +@interface SharedRuntimeQuery<__covariant RowType> : SharedRuntimeExecutableQuery +- (instancetype)initWithMapper:(RowType (^)(id))mapper __attribute__((swift_name("init(mapper:)"))) __attribute__((objc_designated_initializer)); +- (void)addListenerListener:(id)listener __attribute__((swift_name("addListener(listener:)"))); +- (void)removeListenerListener:(id)listener __attribute__((swift_name("removeListener(listener:)"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreSerializationStrategy"))) +@protocol SharedKotlinx_serialization_coreSerializationStrategy +@required +- (void)serializeEncoder:(id)encoder value:(id _Nullable)value __attribute__((swift_name("serialize(encoder:value:)"))); +@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreDeserializationStrategy"))) +@protocol SharedKotlinx_serialization_coreDeserializationStrategy +@required +- (id _Nullable)deserializeDecoder:(id)decoder __attribute__((swift_name("deserialize(decoder:)"))); +@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreKSerializer"))) +@protocol SharedKotlinx_serialization_coreKSerializer +@required +@end + +__attribute__((swift_name("KotlinException"))) +@interface SharedKotlinException : SharedKotlinThrowable +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithCause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); +@end + +__attribute__((swift_name("KotlinRuntimeException"))) +@interface SharedKotlinRuntimeException : SharedKotlinException +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithCause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); +@end + +__attribute__((swift_name("KotlinIllegalStateException"))) +@interface SharedKotlinIllegalStateException : SharedKotlinRuntimeException +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithCause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); +@end + + +/** + * @note annotations + * kotlin.SinceKotlin(version="1.4") +*/ +__attribute__((swift_name("KotlinCancellationException"))) +@interface SharedKotlinCancellationException : SharedKotlinIllegalStateException +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithCause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(SharedKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); +@end + +__attribute__((swift_name("Kotlinx_coroutines_coreFlow"))) +@protocol SharedKotlinx_coroutines_coreFlow +@required + +/** + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. +*/ +- (void)collectCollector:(id)collector completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("collect(collector:completionHandler:)"))); +@end + +__attribute__((swift_name("RuntimeSqlSchema"))) +@protocol SharedRuntimeSqlSchema +@required +- (id)createDriver:(id)driver __attribute__((swift_name("create(driver:)"))); +- (id)migrateDriver:(id)driver oldVersion:(int64_t)oldVersion newVersion:(int64_t)newVersion callbacks:(SharedKotlinArray *)callbacks __attribute__((swift_name("migrate(driver:oldVersion:newVersion:callbacks:)"))); +@property (readonly) int64_t version __attribute__((swift_name("version"))); +@end + +__attribute__((swift_name("Kotlinx_coroutines_coreCoroutineScope"))) +@protocol SharedKotlinx_coroutines_coreCoroutineScope +@required +@property (readonly) id coroutineContext __attribute__((swift_name("coroutineContext"))); +@end + +__attribute__((swift_name("Kotlinx_coroutines_coreSharedFlow"))) +@protocol SharedKotlinx_coroutines_coreSharedFlow +@required +@property (readonly) NSArray *replayCache __attribute__((swift_name("replayCache"))); +@end + +__attribute__((swift_name("Kotlinx_coroutines_coreStateFlow"))) +@protocol SharedKotlinx_coroutines_coreStateFlow +@required +@property (readonly) id _Nullable value __attribute__((swift_name("value"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreKoinApplication"))) +@interface SharedKoin_coreKoinApplication : SharedBase +@property (class, readonly, getter=companion) SharedKoin_coreKoinApplicationCompanion *companion __attribute__((swift_name("companion"))); +- (void)allowOverrideOverride:(BOOL)override __attribute__((swift_name("allowOverride(override:)"))); +- (void)close __attribute__((swift_name("close()"))); +- (void)createEagerInstances __attribute__((swift_name("createEagerInstances()"))); +- (SharedKoin_coreKoinApplication *)loggerLogger:(SharedKoin_coreLogger *)logger __attribute__((swift_name("logger(logger:)"))); +- (SharedKoin_coreKoinApplication *)modulesModules:(SharedKotlinArray *)modules __attribute__((swift_name("modules(modules:)"))); +- (SharedKoin_coreKoinApplication *)modulesModules_:(NSArray *)modules __attribute__((swift_name("modules(modules_:)"))); +- (SharedKoin_coreKoinApplication *)modulesModules__:(SharedKoin_coreModule *)modules __attribute__((swift_name("modules(modules__:)"))); +- (SharedKoin_coreKoinApplication *)printLoggerLevel:(SharedKoin_coreLevel *)level __attribute__((swift_name("printLogger(level:)"))); +- (SharedKoin_coreKoinApplication *)propertiesValues:(NSDictionary *)values __attribute__((swift_name("properties(values:)"))); +@property (readonly) SharedKoin_coreKoin *koin __attribute__((swift_name("koin"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreModule"))) +@interface SharedKoin_coreModule : SharedBase +- (instancetype)initWith_createdAtStart:(BOOL)_createdAtStart __attribute__((swift_name("init(_createdAtStart:)"))) __attribute__((objc_designated_initializer)); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (SharedKoin_coreKoinDefinition *)factoryQualifier:(id _Nullable)qualifier definition:(id _Nullable (^)(SharedKoin_coreScope *, SharedKoin_coreParametersHolder *))definition __attribute__((swift_name("factory(qualifier:definition:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (void)includesModule:(SharedKotlinArray *)module __attribute__((swift_name("includes(module:)"))); +- (void)includesModule_:(id)module __attribute__((swift_name("includes(module_:)"))); +- (void)indexPrimaryTypeInstanceFactory:(SharedKoin_coreInstanceFactory *)instanceFactory __attribute__((swift_name("indexPrimaryType(instanceFactory:)"))); +- (void)indexSecondaryTypesInstanceFactory:(SharedKoin_coreInstanceFactory *)instanceFactory __attribute__((swift_name("indexSecondaryTypes(instanceFactory:)"))); +- (NSArray *)plusModules:(NSArray *)modules __attribute__((swift_name("plus(modules:)"))); +- (NSArray *)plusModule:(SharedKoin_coreModule *)module __attribute__((swift_name("plus(module:)"))); +- (void)prepareForCreationAtStartInstanceFactory:(SharedKoin_coreSingleInstanceFactory *)instanceFactory __attribute__((swift_name("prepareForCreationAtStart(instanceFactory:)"))); +- (void)scopeScopeSet:(void (^)(SharedKoin_coreScopeDSL *))scopeSet __attribute__((swift_name("scope(scopeSet:)"))); +- (void)scopeQualifier:(id)qualifier scopeSet:(void (^)(SharedKoin_coreScopeDSL *))scopeSet __attribute__((swift_name("scope(qualifier:scopeSet:)"))); +- (SharedKoin_coreKoinDefinition *)singleQualifier:(id _Nullable)qualifier createdAtStart:(BOOL)createdAtStart definition:(id _Nullable (^)(SharedKoin_coreScope *, SharedKoin_coreParametersHolder *))definition __attribute__((swift_name("single(qualifier:createdAtStart:definition:)"))); +@property (readonly) SharedMutableSet *> *eagerInstances __attribute__((swift_name("eagerInstances"))); +@property (readonly) NSString *id __attribute__((swift_name("id"))); +@property (readonly) NSMutableArray *includedModules __attribute__((swift_name("includedModules"))); +@property (readonly) BOOL isLoaded __attribute__((swift_name("isLoaded"))); +@property (readonly) SharedMutableDictionary *> *mappings __attribute__((swift_name("mappings"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("KotlinArray"))) +@interface SharedKotlinArray : SharedBase ++ (instancetype)arrayWithSize:(int32_t)size init:(T _Nullable (^)(SharedInt *))init __attribute__((swift_name("init(size:init:)"))); ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); +- (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); +- (id)iterator __attribute__((swift_name("iterator()"))); +- (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); +@property (readonly) int32_t size __attribute__((swift_name("size"))); +@end + +__attribute__((swift_name("RuntimeQueryListener"))) +@protocol SharedRuntimeQueryListener +@required +- (void)queryResultsChanged __attribute__((swift_name("queryResultsChanged()"))); +@end + +__attribute__((swift_name("RuntimeQueryResult"))) +@protocol SharedRuntimeQueryResult +@required + +/** + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. +*/ +- (void)awaitWithCompletionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("await(completionHandler:)"))); +@property (readonly) id _Nullable value __attribute__((swift_name("value"))); +@end + +__attribute__((swift_name("RuntimeSqlPreparedStatement"))) +@protocol SharedRuntimeSqlPreparedStatement +@required +- (void)bindBooleanIndex:(int32_t)index boolean:(SharedBoolean * _Nullable)boolean __attribute__((swift_name("bindBoolean(index:boolean:)"))); +- (void)bindBytesIndex:(int32_t)index bytes:(SharedKotlinByteArray * _Nullable)bytes __attribute__((swift_name("bindBytes(index:bytes:)"))); +- (void)bindDoubleIndex:(int32_t)index double:(SharedDouble * _Nullable)double_ __attribute__((swift_name("bindDouble(index:double:)"))); +- (void)bindLongIndex:(int32_t)index long:(SharedLong * _Nullable)long_ __attribute__((swift_name("bindLong(index:long:)"))); +- (void)bindStringIndex:(int32_t)index string:(NSString * _Nullable)string __attribute__((swift_name("bindString(index:string:)"))); +@end + +__attribute__((swift_name("RuntimeSqlCursor"))) +@protocol SharedRuntimeSqlCursor +@required +- (SharedBoolean * _Nullable)getBooleanIndex:(int32_t)index __attribute__((swift_name("getBoolean(index:)"))); +- (SharedKotlinByteArray * _Nullable)getBytesIndex:(int32_t)index __attribute__((swift_name("getBytes(index:)"))); +- (SharedDouble * _Nullable)getDoubleIndex:(int32_t)index __attribute__((swift_name("getDouble(index:)"))); +- (SharedLong * _Nullable)getLongIndex:(int32_t)index __attribute__((swift_name("getLong(index:)"))); +- (NSString * _Nullable)getStringIndex:(int32_t)index __attribute__((swift_name("getString(index:)"))); +- (id)next __attribute__((swift_name("next()"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreEncoder"))) +@protocol SharedKotlinx_serialization_coreEncoder +@required +- (id)beginCollectionDescriptor:(id)descriptor collectionSize:(int32_t)collectionSize __attribute__((swift_name("beginCollection(descriptor:collectionSize:)"))); +- (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); +- (void)encodeBooleanValue:(BOOL)value __attribute__((swift_name("encodeBoolean(value:)"))); +- (void)encodeByteValue:(int8_t)value __attribute__((swift_name("encodeByte(value:)"))); +- (void)encodeCharValue:(unichar)value __attribute__((swift_name("encodeChar(value:)"))); +- (void)encodeDoubleValue:(double)value __attribute__((swift_name("encodeDouble(value:)"))); +- (void)encodeEnumEnumDescriptor:(id)enumDescriptor index:(int32_t)index __attribute__((swift_name("encodeEnum(enumDescriptor:index:)"))); +- (void)encodeFloatValue:(float)value __attribute__((swift_name("encodeFloat(value:)"))); +- (id)encodeInlineDescriptor:(id)descriptor __attribute__((swift_name("encodeInline(descriptor:)"))); +- (void)encodeIntValue:(int32_t)value __attribute__((swift_name("encodeInt(value:)"))); +- (void)encodeLongValue:(int64_t)value __attribute__((swift_name("encodeLong(value:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (void)encodeNotNullMark __attribute__((swift_name("encodeNotNullMark()"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (void)encodeNull __attribute__((swift_name("encodeNull()"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (void)encodeNullableSerializableValueSerializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeNullableSerializableValue(serializer:value:)"))); +- (void)encodeSerializableValueSerializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableValue(serializer:value:)"))); +- (void)encodeShortValue:(int16_t)value __attribute__((swift_name("encodeShort(value:)"))); +- (void)encodeStringValue:(NSString *)value __attribute__((swift_name("encodeString(value:)"))); +@property (readonly) SharedKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreSerialDescriptor"))) +@protocol SharedKotlinx_serialization_coreSerialDescriptor +@required + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (NSArray> *)getElementAnnotationsIndex:(int32_t)index __attribute__((swift_name("getElementAnnotations(index:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (id)getElementDescriptorIndex:(int32_t)index __attribute__((swift_name("getElementDescriptor(index:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (int32_t)getElementIndexName:(NSString *)name __attribute__((swift_name("getElementIndex(name:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (NSString *)getElementNameIndex:(int32_t)index __attribute__((swift_name("getElementName(index:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (BOOL)isElementOptionalIndex:(int32_t)index __attribute__((swift_name("isElementOptional(index:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +@property (readonly) NSArray> *annotations __attribute__((swift_name("annotations"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +@property (readonly) int32_t elementsCount __attribute__((swift_name("elementsCount"))); +@property (readonly) BOOL isInline __attribute__((swift_name("isInline"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +@property (readonly) BOOL isNullable __attribute__((swift_name("isNullable"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +@property (readonly) SharedKotlinx_serialization_coreSerialKind *kind __attribute__((swift_name("kind"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +@property (readonly) NSString *serialName __attribute__((swift_name("serialName"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreDecoder"))) +@protocol SharedKotlinx_serialization_coreDecoder +@required +- (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); +- (BOOL)decodeBoolean __attribute__((swift_name("decodeBoolean()"))); +- (int8_t)decodeByte __attribute__((swift_name("decodeByte()"))); +- (unichar)decodeChar __attribute__((swift_name("decodeChar()"))); +- (double)decodeDouble __attribute__((swift_name("decodeDouble()"))); +- (int32_t)decodeEnumEnumDescriptor:(id)enumDescriptor __attribute__((swift_name("decodeEnum(enumDescriptor:)"))); +- (float)decodeFloat __attribute__((swift_name("decodeFloat()"))); +- (id)decodeInlineDescriptor:(id)descriptor __attribute__((swift_name("decodeInline(descriptor:)"))); +- (int32_t)decodeInt __attribute__((swift_name("decodeInt()"))); +- (int64_t)decodeLong __attribute__((swift_name("decodeLong()"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (BOOL)decodeNotNullMark __attribute__((swift_name("decodeNotNullMark()"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (SharedKotlinNothing * _Nullable)decodeNull __attribute__((swift_name("decodeNull()"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (id _Nullable)decodeNullableSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeNullableSerializableValue(deserializer:)"))); +- (id _Nullable)decodeSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeSerializableValue(deserializer:)"))); +- (int16_t)decodeShort __attribute__((swift_name("decodeShort()"))); +- (NSString *)decodeString __attribute__((swift_name("decodeString()"))); +@property (readonly) SharedKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@end + +__attribute__((swift_name("Kotlinx_coroutines_coreFlowCollector"))) +@protocol SharedKotlinx_coroutines_coreFlowCollector +@required + +/** + * @note This method converts instances of CancellationException to errors. + * Other uncaught Kotlin exceptions are fatal. +*/ +- (void)emitValue:(id _Nullable)value completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("emit(value:completionHandler:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("RuntimeAfterVersion"))) +@interface SharedRuntimeAfterVersion : SharedBase +- (instancetype)initWithAfterVersion:(int64_t)afterVersion block:(void (^)(id))block __attribute__((swift_name("init(afterVersion:block:)"))) __attribute__((objc_designated_initializer)); +@property (readonly) int64_t afterVersion __attribute__((swift_name("afterVersion"))); +@property (readonly) void (^block)(id) __attribute__((swift_name("block"))); +@end + + +/** + * @note annotations + * kotlin.SinceKotlin(version="1.3") +*/ +__attribute__((swift_name("KotlinCoroutineContext"))) +@protocol SharedKotlinCoroutineContext +@required +- (id _Nullable)foldInitial:(id _Nullable)initial operation:(id _Nullable (^)(id _Nullable, id))operation __attribute__((swift_name("fold(initial:operation:)"))); +- (id _Nullable)getKey:(id)key __attribute__((swift_name("get(key:)"))); +- (id)minusKeyKey:(id)key __attribute__((swift_name("minusKey(key:)"))); +- (id)plusContext:(id)context __attribute__((swift_name("plus(context:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreKoinApplication.Companion"))) +@interface SharedKoin_coreKoinApplicationCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedKoin_coreKoinApplicationCompanion *shared __attribute__((swift_name("shared"))); +- (SharedKoin_coreKoinApplication *)doInit __attribute__((swift_name("doInit()"))); +@end + +__attribute__((swift_name("Koin_coreLogger"))) +@interface SharedKoin_coreLogger : SharedBase +- (instancetype)initWithLevel:(SharedKoin_coreLevel *)level __attribute__((swift_name("init(level:)"))) __attribute__((objc_designated_initializer)); +- (void)debugMsg:(NSString *)msg __attribute__((swift_name("debug(msg:)"))); +- (void)displayLevel:(SharedKoin_coreLevel *)level msg:(NSString *)msg __attribute__((swift_name("display(level:msg:)"))); +- (void)errorMsg:(NSString *)msg __attribute__((swift_name("error(msg:)"))); +- (void)infoMsg:(NSString *)msg __attribute__((swift_name("info(msg:)"))); +- (BOOL)isAtLvl:(SharedKoin_coreLevel *)lvl __attribute__((swift_name("isAt(lvl:)"))); +- (void)logLvl:(SharedKoin_coreLevel *)lvl msg:(NSString *(^)(void))msg __attribute__((swift_name("log(lvl:msg:)"))); +- (void)logLvl:(SharedKoin_coreLevel *)lvl msg_:(NSString *)msg __attribute__((swift_name("log(lvl:msg_:)"))); +- (void)warnMsg:(NSString *)msg __attribute__((swift_name("warn(msg:)"))); +@property SharedKoin_coreLevel *level __attribute__((swift_name("level"))); +@end + +__attribute__((swift_name("KotlinComparable"))) +@protocol SharedKotlinComparable +@required +- (int32_t)compareToOther:(id _Nullable)other __attribute__((swift_name("compareTo(other:)"))); +@end + +__attribute__((swift_name("KotlinEnum"))) +@interface SharedKotlinEnum : SharedBase +- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedKotlinEnumCompanion *companion __attribute__((swift_name("companion"))); +- (int32_t)compareToOther:(E)other __attribute__((swift_name("compareTo(other:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) NSString *name __attribute__((swift_name("name"))); +@property (readonly) int32_t ordinal __attribute__((swift_name("ordinal"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreLevel"))) +@interface SharedKoin_coreLevel : SharedKotlinEnum ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); +- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +@property (class, readonly) SharedKoin_coreLevel *debug __attribute__((swift_name("debug"))); +@property (class, readonly) SharedKoin_coreLevel *info __attribute__((swift_name("info"))); +@property (class, readonly) SharedKoin_coreLevel *warning __attribute__((swift_name("warning"))); +@property (class, readonly) SharedKoin_coreLevel *error __attribute__((swift_name("error"))); +@property (class, readonly) SharedKoin_coreLevel *none __attribute__((swift_name("none"))); ++ (SharedKotlinArray *)values __attribute__((swift_name("values()"))); +@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreKoin"))) +@interface SharedKoin_coreKoin : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (void)close __attribute__((swift_name("close()"))); +- (void)createEagerInstances __attribute__((swift_name("createEagerInstances()"))); +- (SharedKoin_coreScope *)createScopeT:(id)t __attribute__((swift_name("createScope(t:)"))); +- (SharedKoin_coreScope *)createScopeScopeId:(NSString *)scopeId __attribute__((swift_name("createScope(scopeId:)"))); +- (SharedKoin_coreScope *)createScopeScopeId:(NSString *)scopeId source:(id _Nullable)source __attribute__((swift_name("createScope(scopeId:source:)"))); +- (SharedKoin_coreScope *)createScopeScopeId:(NSString *)scopeId qualifier:(id)qualifier source:(id _Nullable)source __attribute__((swift_name("createScope(scopeId:qualifier:source:)"))); +- (void)declareInstance:(id _Nullable)instance qualifier:(id _Nullable)qualifier secondaryTypes:(NSArray> *)secondaryTypes allowOverride:(BOOL)allowOverride __attribute__((swift_name("declare(instance:qualifier:secondaryTypes:allowOverride:)"))); +- (void)deletePropertyKey:(NSString *)key __attribute__((swift_name("deleteProperty(key:)"))); +- (void)deleteScopeScopeId:(NSString *)scopeId __attribute__((swift_name("deleteScope(scopeId:)"))); +- (id)getQualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("get(qualifier:parameters:)"))); +- (id _Nullable)getClazz:(id)clazz qualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("get(clazz:qualifier:parameters:)"))); +- (NSArray *)getAll __attribute__((swift_name("getAll()"))); +- (SharedKoin_coreScope *)getOrCreateScopeScopeId:(NSString *)scopeId __attribute__((swift_name("getOrCreateScope(scopeId:)"))); +- (SharedKoin_coreScope *)getOrCreateScopeScopeId:(NSString *)scopeId qualifier:(id)qualifier source:(id _Nullable)source __attribute__((swift_name("getOrCreateScope(scopeId:qualifier:source:)"))); +- (id _Nullable)getOrNullQualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("getOrNull(qualifier:parameters:)"))); +- (id _Nullable)getOrNullClazz:(id)clazz qualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("getOrNull(clazz:qualifier:parameters:)"))); +- (id _Nullable)getPropertyKey:(NSString *)key __attribute__((swift_name("getProperty(key:)"))); +- (id)getPropertyKey:(NSString *)key defaultValue:(id)defaultValue __attribute__((swift_name("getProperty(key:defaultValue:)"))); +- (SharedKoin_coreScope *)getScopeScopeId:(NSString *)scopeId __attribute__((swift_name("getScope(scopeId:)"))); +- (SharedKoin_coreScope * _Nullable)getScopeOrNullScopeId:(NSString *)scopeId __attribute__((swift_name("getScopeOrNull(scopeId:)"))); +- (id)injectQualifier:(id _Nullable)qualifier mode:(SharedKotlinLazyThreadSafetyMode *)mode parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("inject(qualifier:mode:parameters:)"))); +- (id)injectOrNullQualifier:(id _Nullable)qualifier mode:(SharedKotlinLazyThreadSafetyMode *)mode parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("injectOrNull(qualifier:mode:parameters:)"))); +- (void)loadModulesModules:(NSArray *)modules allowOverride:(BOOL)allowOverride createEagerInstances:(BOOL)createEagerInstances __attribute__((swift_name("loadModules(modules:allowOverride:createEagerInstances:)"))); +- (void)setPropertyKey:(NSString *)key value:(id)value __attribute__((swift_name("setProperty(key:value:)"))); +- (void)setupLoggerLogger:(SharedKoin_coreLogger *)logger __attribute__((swift_name("setupLogger(logger:)"))); +- (void)unloadModulesModules:(NSArray *)modules __attribute__((swift_name("unloadModules(modules:)"))); +@property (readonly) SharedKoin_coreExtensionManager *extensionManager __attribute__((swift_name("extensionManager"))); +@property (readonly) SharedKoin_coreInstanceRegistry *instanceRegistry __attribute__((swift_name("instanceRegistry"))); +@property (readonly) SharedKoin_coreLogger *logger __attribute__((swift_name("logger"))); +@property (readonly) SharedKoin_corePropertyRegistry *propertyRegistry __attribute__((swift_name("propertyRegistry"))); +@property (readonly) SharedKoin_coreScopeRegistry *scopeRegistry __attribute__((swift_name("scopeRegistry"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreKoinDefinition"))) +@interface SharedKoin_coreKoinDefinition : SharedBase +- (instancetype)initWithModule:(SharedKoin_coreModule *)module factory:(SharedKoin_coreInstanceFactory *)factory __attribute__((swift_name("init(module:factory:)"))) __attribute__((objc_designated_initializer)); +- (SharedKoin_coreKoinDefinition *)doCopyModule:(SharedKoin_coreModule *)module factory:(SharedKoin_coreInstanceFactory *)factory __attribute__((swift_name("doCopy(module:factory:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) SharedKoin_coreInstanceFactory *factory __attribute__((swift_name("factory"))); +@property (readonly) SharedKoin_coreModule *module __attribute__((swift_name("module"))); +@end + +__attribute__((swift_name("Koin_coreQualifier"))) +@protocol SharedKoin_coreQualifier +@required +@property (readonly) NSString *value __attribute__((swift_name("value"))); +@end + +__attribute__((swift_name("Koin_coreLockable"))) +@interface SharedKoin_coreLockable : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreScope"))) +@interface SharedKoin_coreScope : SharedKoin_coreLockable +- (instancetype)initWithScopeQualifier:(id)scopeQualifier id:(NSString *)id isRoot:(BOOL)isRoot _koin:(SharedKoin_coreKoin *)_koin __attribute__((swift_name("init(scopeQualifier:id:isRoot:_koin:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); ++ (instancetype)new __attribute__((unavailable)); +- (void)close __attribute__((swift_name("close()"))); +- (void)declareInstance:(id _Nullable)instance qualifier:(id _Nullable)qualifier secondaryTypes:(NSArray> *)secondaryTypes allowOverride:(BOOL)allowOverride __attribute__((swift_name("declare(instance:qualifier:secondaryTypes:allowOverride:)"))); +- (id)getQualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("get(qualifier:parameters:)"))); +- (id _Nullable)getClazz:(id)clazz qualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("get(clazz:qualifier:parameters:)"))); +- (NSArray *)getAll __attribute__((swift_name("getAll()"))); +- (NSArray *)getAllClazz:(id)clazz __attribute__((swift_name("getAll(clazz:)"))); +- (SharedKoin_coreKoin *)getKoin __attribute__((swift_name("getKoin()"))); +- (id _Nullable)getOrNullQualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("getOrNull(qualifier:parameters:)"))); +- (id _Nullable)getOrNullClazz:(id)clazz qualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("getOrNull(clazz:qualifier:parameters:)"))); +- (id)getPropertyKey:(NSString *)key __attribute__((swift_name("getProperty(key:)"))); +- (id)getPropertyKey:(NSString *)key defaultValue:(id)defaultValue __attribute__((swift_name("getProperty(key:defaultValue:)"))); +- (id _Nullable)getPropertyOrNullKey:(NSString *)key __attribute__((swift_name("getPropertyOrNull(key:)"))); +- (SharedKoin_coreScope *)getScopeScopeID:(NSString *)scopeID __attribute__((swift_name("getScope(scopeID:)"))); +- (id _Nullable)getSource __attribute__((swift_name("getSource()"))); +- (id)injectQualifier:(id _Nullable)qualifier mode:(SharedKotlinLazyThreadSafetyMode *)mode parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("inject(qualifier:mode:parameters:)"))); +- (id)injectOrNullQualifier:(id _Nullable)qualifier mode:(SharedKotlinLazyThreadSafetyMode *)mode parameters:(SharedKoin_coreParametersHolder *(^ _Nullable)(void))parameters __attribute__((swift_name("injectOrNull(qualifier:mode:parameters:)"))); +- (BOOL)isNotClosed __attribute__((swift_name("isNotClosed()"))); +- (void)linkToScopes:(SharedKotlinArray *)scopes __attribute__((swift_name("linkTo(scopes:)"))); +- (void)registerCallbackCallback:(id)callback __attribute__((swift_name("registerCallback(callback:)"))); +- (NSString *)description __attribute__((swift_name("description()"))); +- (void)unlinkScopes:(SharedKotlinArray *)scopes __attribute__((swift_name("unlink(scopes:)"))); +@property (readonly) BOOL closed __attribute__((swift_name("closed"))); +@property (readonly) NSString *id __attribute__((swift_name("id"))); +@property (readonly) BOOL isRoot __attribute__((swift_name("isRoot"))); +@property (readonly) SharedKoin_coreLogger *logger __attribute__((swift_name("logger"))); +@property (readonly) id scopeQualifier __attribute__((swift_name("scopeQualifier"))); +@property id _Nullable sourceValue __attribute__((swift_name("sourceValue"))); +@end + +__attribute__((swift_name("Koin_coreParametersHolder"))) +@interface SharedKoin_coreParametersHolder : SharedBase +- (instancetype)initWith_values:(NSMutableArray *)_values useIndexedValues:(SharedBoolean * _Nullable)useIndexedValues __attribute__((swift_name("init(_values:useIndexedValues:)"))) __attribute__((objc_designated_initializer)); +- (SharedKoin_coreParametersHolder *)addValue:(id)value __attribute__((swift_name("add(value:)"))); +- (id _Nullable)component1 __attribute__((swift_name("component1()"))); +- (id _Nullable)component2 __attribute__((swift_name("component2()"))); +- (id _Nullable)component3 __attribute__((swift_name("component3()"))); +- (id _Nullable)component4 __attribute__((swift_name("component4()"))); +- (id _Nullable)component5 __attribute__((swift_name("component5()"))); +- (id _Nullable)elementAtI:(int32_t)i clazz:(id)clazz __attribute__((swift_name("elementAt(i:clazz:)"))); +- (id)get __attribute__((swift_name("get()"))); +- (id _Nullable)getI:(int32_t)i __attribute__((swift_name("get(i:)"))); +- (id _Nullable)getOrNull __attribute__((swift_name("getOrNull()"))); +- (id _Nullable)getOrNullClazz:(id)clazz __attribute__((swift_name("getOrNull(clazz:)"))); +- (SharedKoin_coreParametersHolder *)insertIndex:(int32_t)index value:(id)value __attribute__((swift_name("insert(index:value:)"))); +- (BOOL)isEmpty __attribute__((swift_name("isEmpty()"))); +- (BOOL)isNotEmpty __attribute__((swift_name("isNotEmpty()"))); +- (void)setI:(int32_t)i t:(id _Nullable)t __attribute__((swift_name("set(i:t:)"))); +- (int32_t)size __attribute__((swift_name("size()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property int32_t index __attribute__((swift_name("index"))); +@property (readonly) SharedBoolean * _Nullable useIndexedValues __attribute__((swift_name("useIndexedValues"))); +@property (readonly) NSArray *values __attribute__((swift_name("values"))); +@end + +__attribute__((swift_name("Koin_coreInstanceFactory"))) +@interface SharedKoin_coreInstanceFactory : SharedKoin_coreLockable +- (instancetype)initWithBeanDefinition:(SharedKoin_coreBeanDefinition *)beanDefinition __attribute__((swift_name("init(beanDefinition:)"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); ++ (instancetype)new __attribute__((unavailable)); +@property (class, readonly, getter=companion) SharedKoin_coreInstanceFactoryCompanion *companion __attribute__((swift_name("companion"))); +- (T _Nullable)createContext:(SharedKoin_coreResolutionContext *)context __attribute__((swift_name("create(context:)"))); +- (void)dropScope:(SharedKoin_coreScope * _Nullable)scope __attribute__((swift_name("drop(scope:)"))); +- (void)dropAll __attribute__((swift_name("dropAll()"))); +- (T _Nullable)getContext:(SharedKoin_coreResolutionContext *)context __attribute__((swift_name("get(context:)"))); +- (BOOL)isCreatedContext:(SharedKoin_coreResolutionContext * _Nullable)context __attribute__((swift_name("isCreated(context:)"))); +@property (readonly) SharedKoin_coreBeanDefinition *beanDefinition __attribute__((swift_name("beanDefinition"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreSingleInstanceFactory"))) +@interface SharedKoin_coreSingleInstanceFactory : SharedKoin_coreInstanceFactory +- (instancetype)initWithBeanDefinition:(SharedKoin_coreBeanDefinition *)beanDefinition __attribute__((swift_name("init(beanDefinition:)"))) __attribute__((objc_designated_initializer)); +- (T _Nullable)createContext:(SharedKoin_coreResolutionContext *)context __attribute__((swift_name("create(context:)"))); +- (void)dropScope:(SharedKoin_coreScope * _Nullable)scope __attribute__((swift_name("drop(scope:)"))); +- (void)dropAll __attribute__((swift_name("dropAll()"))); +- (T _Nullable)getContext:(SharedKoin_coreResolutionContext *)context __attribute__((swift_name("get(context:)"))); +- (BOOL)isCreatedContext:(SharedKoin_coreResolutionContext * _Nullable)context __attribute__((swift_name("isCreated(context:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreScopeDSL"))) +@interface SharedKoin_coreScopeDSL : SharedBase +- (instancetype)initWithScopeQualifier:(id)scopeQualifier module:(SharedKoin_coreModule *)module __attribute__((swift_name("init(scopeQualifier:module:)"))) __attribute__((objc_designated_initializer)); +- (SharedKoin_coreKoinDefinition *)factoryQualifier:(id _Nullable)qualifier definition:(id _Nullable (^)(SharedKoin_coreScope *, SharedKoin_coreParametersHolder *))definition __attribute__((swift_name("factory(qualifier:definition:)"))); +- (SharedKoin_coreKoinDefinition *)scopedQualifier:(id _Nullable)qualifier definition:(id _Nullable (^)(SharedKoin_coreScope *, SharedKoin_coreParametersHolder *))definition __attribute__((swift_name("scoped(qualifier:definition:)"))); +@property (readonly) SharedKoin_coreModule *module __attribute__((swift_name("module"))); +@property (readonly) id scopeQualifier __attribute__((swift_name("scopeQualifier"))); +@end + +__attribute__((swift_name("KotlinIterator"))) +@protocol SharedKotlinIterator +@required +- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); +- (id _Nullable)next __attribute__((swift_name("next()"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("KotlinByteArray"))) +@interface SharedKotlinByteArray : SharedBase ++ (instancetype)arrayWithSize:(int32_t)size __attribute__((swift_name("init(size:)"))); ++ (instancetype)arrayWithSize:(int32_t)size init:(SharedByte *(^)(SharedInt *))init __attribute__((swift_name("init(size:init:)"))); ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); +- (int8_t)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); +- (SharedKotlinByteIterator *)iterator __attribute__((swift_name("iterator()"))); +- (void)setIndex:(int32_t)index value:(int8_t)value __attribute__((swift_name("set(index:value:)"))); +@property (readonly) int32_t size __attribute__((swift_name("size"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreCompositeEncoder"))) +@protocol SharedKotlinx_serialization_coreCompositeEncoder +@required +- (void)encodeBooleanElementDescriptor:(id)descriptor index:(int32_t)index value:(BOOL)value __attribute__((swift_name("encodeBooleanElement(descriptor:index:value:)"))); +- (void)encodeByteElementDescriptor:(id)descriptor index:(int32_t)index value:(int8_t)value __attribute__((swift_name("encodeByteElement(descriptor:index:value:)"))); +- (void)encodeCharElementDescriptor:(id)descriptor index:(int32_t)index value:(unichar)value __attribute__((swift_name("encodeCharElement(descriptor:index:value:)"))); +- (void)encodeDoubleElementDescriptor:(id)descriptor index:(int32_t)index value:(double)value __attribute__((swift_name("encodeDoubleElement(descriptor:index:value:)"))); +- (void)encodeFloatElementDescriptor:(id)descriptor index:(int32_t)index value:(float)value __attribute__((swift_name("encodeFloatElement(descriptor:index:value:)"))); +- (id)encodeInlineElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("encodeInlineElement(descriptor:index:)"))); +- (void)encodeIntElementDescriptor:(id)descriptor index:(int32_t)index value:(int32_t)value __attribute__((swift_name("encodeIntElement(descriptor:index:value:)"))); +- (void)encodeLongElementDescriptor:(id)descriptor index:(int32_t)index value:(int64_t)value __attribute__((swift_name("encodeLongElement(descriptor:index:value:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (void)encodeNullableSerializableElementDescriptor:(id)descriptor index:(int32_t)index serializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeNullableSerializableElement(descriptor:index:serializer:value:)"))); +- (void)encodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index serializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableElement(descriptor:index:serializer:value:)"))); +- (void)encodeShortElementDescriptor:(id)descriptor index:(int32_t)index value:(int16_t)value __attribute__((swift_name("encodeShortElement(descriptor:index:value:)"))); +- (void)encodeStringElementDescriptor:(id)descriptor index:(int32_t)index value:(NSString *)value __attribute__((swift_name("encodeStringElement(descriptor:index:value:)"))); +- (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (BOOL)shouldEncodeElementDefaultDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("shouldEncodeElementDefault(descriptor:index:)"))); +@property (readonly) SharedKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreSerializersModule"))) +@interface SharedKotlinx_serialization_coreSerializersModule : SharedBase + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (void)dumpToCollector:(id)collector __attribute__((swift_name("dumpTo(collector:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (id _Nullable)getContextualKClass:(id)kClass typeArgumentsSerializers:(NSArray> *)typeArgumentsSerializers __attribute__((swift_name("getContextual(kClass:typeArgumentsSerializers:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (id _Nullable)getPolymorphicBaseClass:(id)baseClass value:(id)value __attribute__((swift_name("getPolymorphic(baseClass:value:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (id _Nullable)getPolymorphicBaseClass:(id)baseClass serializedClassName:(NSString * _Nullable)serializedClassName __attribute__((swift_name("getPolymorphic(baseClass:serializedClassName:)"))); +@end + +__attribute__((swift_name("KotlinAnnotation"))) +@protocol SharedKotlinAnnotation +@required +@end + + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +__attribute__((swift_name("Kotlinx_serialization_coreSerialKind"))) +@interface SharedKotlinx_serialization_coreSerialKind : SharedBase +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@end + +__attribute__((swift_name("Kotlinx_serialization_coreCompositeDecoder"))) +@protocol SharedKotlinx_serialization_coreCompositeDecoder +@required +- (BOOL)decodeBooleanElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeBooleanElement(descriptor:index:)"))); +- (int8_t)decodeByteElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeByteElement(descriptor:index:)"))); +- (unichar)decodeCharElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeCharElement(descriptor:index:)"))); +- (int32_t)decodeCollectionSizeDescriptor:(id)descriptor __attribute__((swift_name("decodeCollectionSize(descriptor:)"))); +- (double)decodeDoubleElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeDoubleElement(descriptor:index:)"))); +- (int32_t)decodeElementIndexDescriptor:(id)descriptor __attribute__((swift_name("decodeElementIndex(descriptor:)"))); +- (float)decodeFloatElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeFloatElement(descriptor:index:)"))); +- (id)decodeInlineElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeInlineElement(descriptor:index:)"))); +- (int32_t)decodeIntElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeIntElement(descriptor:index:)"))); +- (int64_t)decodeLongElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeLongElement(descriptor:index:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (id _Nullable)decodeNullableSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeNullableSerializableElement(descriptor:index:deserializer:previousValue:)"))); + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +- (BOOL)decodeSequentially __attribute__((swift_name("decodeSequentially()"))); +- (id _Nullable)decodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeSerializableElement(descriptor:index:deserializer:previousValue:)"))); +- (int16_t)decodeShortElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeShortElement(descriptor:index:)"))); +- (NSString *)decodeStringElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeStringElement(descriptor:index:)"))); +- (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); +@property (readonly) SharedKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("KotlinNothing"))) +@interface SharedKotlinNothing : SharedBase +@end + +__attribute__((swift_name("KotlinCoroutineContextElement"))) +@protocol SharedKotlinCoroutineContextElement +@required +@property (readonly) id key __attribute__((swift_name("key"))); +@end + +__attribute__((swift_name("KotlinCoroutineContextKey"))) +@protocol SharedKotlinCoroutineContextKey +@required +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("KotlinEnumCompanion"))) +@interface SharedKotlinEnumCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedKotlinEnumCompanion *shared __attribute__((swift_name("shared"))); +@end + +__attribute__((swift_name("Koin_coreKoinComponent"))) +@protocol SharedKoin_coreKoinComponent +@required +- (SharedKoin_coreKoin *)getKoin __attribute__((swift_name("getKoin()"))); +@end + +__attribute__((swift_name("Koin_coreKoinScopeComponent"))) +@protocol SharedKoin_coreKoinScopeComponent +@required +@property (readonly) SharedKoin_coreScope *scope __attribute__((swift_name("scope"))); +@end + +__attribute__((swift_name("KotlinKDeclarationContainer"))) +@protocol SharedKotlinKDeclarationContainer +@required +@end + +__attribute__((swift_name("KotlinKAnnotatedElement"))) +@protocol SharedKotlinKAnnotatedElement +@required +@end + + +/** + * @note annotations + * kotlin.SinceKotlin(version="1.1") +*/ +__attribute__((swift_name("KotlinKClassifier"))) +@protocol SharedKotlinKClassifier +@required +@end + +__attribute__((swift_name("KotlinKClass"))) +@protocol SharedKotlinKClass +@required + +/** + * @note annotations + * kotlin.SinceKotlin(version="1.1") +*/ +- (BOOL)isInstanceValue:(id _Nullable)value __attribute__((swift_name("isInstance(value:)"))); +@property (readonly) NSString * _Nullable qualifiedName __attribute__((swift_name("qualifiedName"))); +@property (readonly) NSString * _Nullable simpleName __attribute__((swift_name("simpleName"))); +@end + +__attribute__((swift_name("KotlinLazy"))) +@protocol SharedKotlinLazy +@required +- (BOOL)isInitialized __attribute__((swift_name("isInitialized()"))); +@property (readonly) id _Nullable value __attribute__((swift_name("value"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("KotlinLazyThreadSafetyMode"))) +@interface SharedKotlinLazyThreadSafetyMode : SharedKotlinEnum ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); +- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +@property (class, readonly) SharedKotlinLazyThreadSafetyMode *synchronized __attribute__((swift_name("synchronized"))); +@property (class, readonly) SharedKotlinLazyThreadSafetyMode *publication __attribute__((swift_name("publication"))); +@property (class, readonly) SharedKotlinLazyThreadSafetyMode *none __attribute__((swift_name("none"))); ++ (SharedKotlinArray *)values __attribute__((swift_name("values()"))); +@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreExtensionManager"))) +@interface SharedKoin_coreExtensionManager : SharedBase +- (instancetype)initWith_koin:(SharedKoin_coreKoin *)_koin __attribute__((swift_name("init(_koin:)"))) __attribute__((objc_designated_initializer)); +- (void)close __attribute__((swift_name("close()"))); +- (id)getExtensionId:(NSString *)id __attribute__((swift_name("getExtension(id:)"))); +- (id _Nullable)getExtensionOrNullId:(NSString *)id __attribute__((swift_name("getExtensionOrNull(id:)"))); +- (void)registerExtensionId:(NSString *)id extension:(id)extension __attribute__((swift_name("registerExtension(id:extension:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreInstanceRegistry"))) +@interface SharedKoin_coreInstanceRegistry : SharedBase +- (instancetype)initWith_koin:(SharedKoin_coreKoin *)_koin __attribute__((swift_name("init(_koin:)"))) __attribute__((objc_designated_initializer)); +- (void)saveMappingAllowOverride:(BOOL)allowOverride mapping:(NSString *)mapping factory:(SharedKoin_coreInstanceFactory *)factory logWarning:(BOOL)logWarning __attribute__((swift_name("saveMapping(allowOverride:mapping:factory:logWarning:)"))); +- (int32_t)size __attribute__((swift_name("size()"))); +@property (readonly) SharedKoin_coreKoin *_koin __attribute__((swift_name("_koin"))); +@property (readonly) NSDictionary *> *instances __attribute__((swift_name("instances"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_corePropertyRegistry"))) +@interface SharedKoin_corePropertyRegistry : SharedBase +- (instancetype)initWith_koin:(SharedKoin_coreKoin *)_koin __attribute__((swift_name("init(_koin:)"))) __attribute__((objc_designated_initializer)); +- (void)close __attribute__((swift_name("close()"))); +- (void)deletePropertyKey:(NSString *)key __attribute__((swift_name("deleteProperty(key:)"))); +- (id _Nullable)getPropertyKey:(NSString *)key __attribute__((swift_name("getProperty(key:)"))); +- (void)savePropertiesProperties:(NSDictionary *)properties __attribute__((swift_name("saveProperties(properties:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreScopeRegistry"))) +@interface SharedKoin_coreScopeRegistry : SharedBase +- (instancetype)initWith_koin:(SharedKoin_coreKoin *)_koin __attribute__((swift_name("init(_koin:)"))) __attribute__((objc_designated_initializer)); +@property (class, readonly, getter=companion) SharedKoin_coreScopeRegistryCompanion *companion __attribute__((swift_name("companion"))); +- (void)loadScopesModules:(NSSet *)modules __attribute__((swift_name("loadScopes(modules:)"))); +@property (readonly) SharedKoin_coreScope *rootScope __attribute__((swift_name("rootScope"))); +@property (readonly) NSSet> *scopeDefinitions __attribute__((swift_name("scopeDefinitions"))); +@end + +__attribute__((swift_name("Koin_coreScopeCallback"))) +@protocol SharedKoin_coreScopeCallback +@required +- (void)onScopeCloseScope:(SharedKoin_coreScope *)scope __attribute__((swift_name("onScopeClose(scope:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreBeanDefinition"))) +@interface SharedKoin_coreBeanDefinition : SharedBase +- (instancetype)initWithScopeQualifier:(id)scopeQualifier primaryType:(id)primaryType qualifier:(id _Nullable)qualifier definition:(T _Nullable (^)(SharedKoin_coreScope *, SharedKoin_coreParametersHolder *))definition kind:(SharedKoin_coreKind *)kind secondaryTypes:(NSArray> *)secondaryTypes __attribute__((swift_name("init(scopeQualifier:primaryType:qualifier:definition:kind:secondaryTypes:)"))) __attribute__((objc_designated_initializer)); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (BOOL)hasTypeClazz:(id)clazz __attribute__((swift_name("hasType(clazz:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (BOOL)isClazz:(id)clazz qualifier:(id _Nullable)qualifier scopeDefinition:(id)scopeDefinition __attribute__((swift_name("is(clazz:qualifier:scopeDefinition:)"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property SharedKoin_coreCallbacks *callbacks __attribute__((swift_name("callbacks"))); +@property (readonly) T _Nullable (^definition)(SharedKoin_coreScope *, SharedKoin_coreParametersHolder *) __attribute__((swift_name("definition"))); +@property (readonly) SharedKoin_coreKind *kind __attribute__((swift_name("kind"))); +@property (readonly) id primaryType __attribute__((swift_name("primaryType"))); +@property id _Nullable qualifier __attribute__((swift_name("qualifier"))); +@property (readonly) id scopeQualifier __attribute__((swift_name("scopeQualifier"))); +@property NSArray> *secondaryTypes __attribute__((swift_name("secondaryTypes"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreInstanceFactoryCompanion"))) +@interface SharedKoin_coreInstanceFactoryCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedKoin_coreInstanceFactoryCompanion *shared __attribute__((swift_name("shared"))); +@property (readonly) NSString *ERROR_SEPARATOR __attribute__((swift_name("ERROR_SEPARATOR"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreResolutionContext"))) +@interface SharedKoin_coreResolutionContext : SharedBase +- (instancetype)initWithLogger:(SharedKoin_coreLogger *)logger scope:(SharedKoin_coreScope *)scope clazz:(id)clazz qualifier:(id _Nullable)qualifier parameters:(SharedKoin_coreParametersHolder * _Nullable)parameters __attribute__((swift_name("init(logger:scope:clazz:qualifier:parameters:)"))) __attribute__((objc_designated_initializer)); +@property (readonly) id clazz __attribute__((swift_name("clazz"))); +@property (readonly) NSString *debugTag __attribute__((swift_name("debugTag"))); +@property (readonly) SharedKoin_coreLogger *logger __attribute__((swift_name("logger"))); +@property (readonly) SharedKoin_coreParametersHolder * _Nullable parameters __attribute__((swift_name("parameters"))); +@property (readonly) id _Nullable qualifier __attribute__((swift_name("qualifier"))); +@property (readonly) SharedKoin_coreScope *scope __attribute__((swift_name("scope"))); +@end + +__attribute__((swift_name("KotlinByteIterator"))) +@interface SharedKotlinByteIterator : SharedBase +- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); ++ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); +- (SharedByte *)next __attribute__((swift_name("next()"))); +- (int8_t)nextByte __attribute__((swift_name("nextByte()"))); +@end + + +/** + * @note annotations + * kotlinx.serialization.ExperimentalSerializationApi +*/ +__attribute__((swift_name("Kotlinx_serialization_coreSerializersModuleCollector"))) +@protocol SharedKotlinx_serialization_coreSerializersModuleCollector +@required +- (void)contextualKClass:(id)kClass provider:(id (^)(NSArray> *))provider __attribute__((swift_name("contextual(kClass:provider:)"))); +- (void)contextualKClass:(id)kClass serializer:(id)serializer __attribute__((swift_name("contextual(kClass:serializer:)"))); +- (void)polymorphicBaseClass:(id)baseClass actualClass:(id)actualClass actualSerializer:(id)actualSerializer __attribute__((swift_name("polymorphic(baseClass:actualClass:actualSerializer:)"))); +- (void)polymorphicDefaultBaseClass:(id)baseClass defaultDeserializerProvider:(id _Nullable (^)(NSString * _Nullable))defaultDeserializerProvider __attribute__((swift_name("polymorphicDefault(baseClass:defaultDeserializerProvider:)"))) __attribute__((deprecated("Deprecated in favor of function with more precise name: polymorphicDefaultDeserializer"))); +- (void)polymorphicDefaultDeserializerBaseClass:(id)baseClass defaultDeserializerProvider:(id _Nullable (^)(NSString * _Nullable))defaultDeserializerProvider __attribute__((swift_name("polymorphicDefaultDeserializer(baseClass:defaultDeserializerProvider:)"))); +- (void)polymorphicDefaultSerializerBaseClass:(id)baseClass defaultSerializerProvider:(id _Nullable (^)(id))defaultSerializerProvider __attribute__((swift_name("polymorphicDefaultSerializer(baseClass:defaultSerializerProvider:)"))); +@end + +__attribute__((swift_name("Koin_coreKoinExtension"))) +@protocol SharedKoin_coreKoinExtension +@required +- (void)onClose __attribute__((swift_name("onClose()"))); +- (void)onRegisterKoin:(SharedKoin_coreKoin *)koin __attribute__((swift_name("onRegister(koin:)"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreScopeRegistry.Companion"))) +@interface SharedKoin_coreScopeRegistryCompanion : SharedBase ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); ++ (instancetype)companion __attribute__((swift_name("init()"))); +@property (class, readonly, getter=shared) SharedKoin_coreScopeRegistryCompanion *shared __attribute__((swift_name("shared"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreKind"))) +@interface SharedKoin_coreKind : SharedKotlinEnum ++ (instancetype)alloc __attribute__((unavailable)); ++ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); +- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +@property (class, readonly) SharedKoin_coreKind *singleton __attribute__((swift_name("singleton"))); +@property (class, readonly) SharedKoin_coreKind *factory __attribute__((swift_name("factory"))); +@property (class, readonly) SharedKoin_coreKind *scoped __attribute__((swift_name("scoped"))); ++ (SharedKotlinArray *)values __attribute__((swift_name("values()"))); +@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@end + +__attribute__((objc_subclassing_restricted)) +__attribute__((swift_name("Koin_coreCallbacks"))) +@interface SharedKoin_coreCallbacks : SharedBase +- (instancetype)initWithOnClose:(void (^ _Nullable)(T _Nullable))onClose __attribute__((swift_name("init(onClose:)"))) __attribute__((objc_designated_initializer)); +- (SharedKoin_coreCallbacks *)doCopyOnClose:(void (^ _Nullable)(T _Nullable))onClose __attribute__((swift_name("doCopy(onClose:)"))); +- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); +- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSString *)description __attribute__((swift_name("description()"))); +@property (readonly) void (^ _Nullable onClose)(T _Nullable) __attribute__((swift_name("onClose"))); +@end + +#pragma pop_macro("_Nullable_result") +#pragma clang diagnostic pop +NS_ASSUME_NONNULL_END diff --git a/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64_x86_64-simulator/shared.framework/Info.plist b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64_x86_64-simulator/shared.framework/Info.plist new file mode 100644 index 0000000..25c51d7 --- /dev/null +++ b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64_x86_64-simulator/shared.framework/Info.plist @@ -0,0 +1,31 @@ + + + + + CFBundleExecutable + shared + CFBundleIdentifier + com.assignment.pokemon.shared + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + shared + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + iPhoneOS + + CFBundleVersion + 1 + MinimumOSVersion + 12.0 + UIDeviceFamily + + 1 + 2 + + + diff --git a/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64_x86_64-simulator/shared.framework/Modules/module.modulemap b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64_x86_64-simulator/shared.framework/Modules/module.modulemap new file mode 100644 index 0000000..ccbb838 --- /dev/null +++ b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64_x86_64-simulator/shared.framework/Modules/module.modulemap @@ -0,0 +1,5 @@ +framework module "shared" { + umbrella header "shared.h" + export * + module * { export * } +} \ No newline at end of file diff --git a/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64_x86_64-simulator/shared.framework/shared b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64_x86_64-simulator/shared.framework/shared new file mode 100644 index 0000000..46ab7f2 Binary files /dev/null and b/iosApp/iosApp/iosApp/shared.xcframework/ios-arm64_x86_64-simulator/shared.framework/shared differ diff --git a/iosApp/iosApp/iosAppTests/DetailsViewModelTests.swift b/iosApp/iosApp/iosAppTests/DetailsViewModelTests.swift new file mode 100644 index 0000000..bc8abf0 --- /dev/null +++ b/iosApp/iosApp/iosAppTests/DetailsViewModelTests.swift @@ -0,0 +1,51 @@ +// +// DetailsViewModelTests.swift +// iosApp +// +// Created by Akash K on 14/04/26. +// + +import XCTest +import shared +@testable import iosApp +import Combine + +@MainActor +final class DetailsViewModelTests: XCTestCase { + + private var repository: MockPokemonRepository! + private var cancellables: Set = [] + + override func setUp() { + super.setUp() + repository = MockPokemonRepository() + } + + func test_initialState_isNotNil() { + let sut = DetailsViewModel(name: "pikachu", repository: repository) + XCTAssertNotNil(sut.detailState) + } + + func test_toggleFavourite_callsSetFavorite() async { + let sut = DetailsViewModel(name: "pikachu", repository: repository) + sut.toggleFavourite() + sut.$detailState + .compactMap { $0 as? PokemonDetailState.Success } + .sink { _ in + XCTAssert(self.repository.setFavoriteCallCount > 0) + } + .store(in: &cancellables) + } + + func test_retry_callsRepositoryAgain() { + let sut = DetailsViewModel(name: "pikachu", repository: repository) + let callsBefore = repository.getPokemonDetailCallCount + sut.retry() + sut.$detailState + .compactMap { $0 as? PokemonDetailState.Success } + .sink { _ in + XCTAssertGreaterThan(self.repository.getPokemonDetailCallCount, callsBefore) + } + .store(in: &cancellables) + } +} diff --git a/iosApp/iosApp/iosAppTests/FavouritesViewModelTests.swift b/iosApp/iosApp/iosAppTests/FavouritesViewModelTests.swift new file mode 100644 index 0000000..8ad5ee7 --- /dev/null +++ b/iosApp/iosApp/iosAppTests/FavouritesViewModelTests.swift @@ -0,0 +1,36 @@ +// +// FavouritesViewModelTests.swift +// iosApp +// +// Created by Akash K on 14/04/26. +// + +import XCTest +import shared +@testable import iosApp + + +@MainActor +final class FavouritesViewModelTests: XCTestCase { + + private var repository: MockPokemonRepository! + + override func setUp() { + super.setUp() + repository = MockPokemonRepository() + } + + func test_initialFavorites_isEmpty() async throws { + let sut = FavouritesViewModel(repository: repository) + XCTAssertTrue(sut.favorites.isEmpty) + } + + func test_unfavourite_callsSetFavoriteWithFalse() async throws { + let pokemon = Pokemon(id: 25, name: "pikachu", imageUrl: "") + let sut = FavouritesViewModel(repository: repository) + sut.unfavourite(pokemon) + XCTAssertEqual(repository.setFavoriteCallCount, 1) + XCTAssertEqual(repository.lastSetFavoriteArgs?.id, 25) + XCTAssertEqual(repository.lastSetFavoriteArgs?.isFavorite, false) + } +} diff --git a/iosApp/iosApp/iosAppTests/ListViewModelTests.swift b/iosApp/iosApp/iosAppTests/ListViewModelTests.swift new file mode 100644 index 0000000..61248b6 --- /dev/null +++ b/iosApp/iosApp/iosAppTests/ListViewModelTests.swift @@ -0,0 +1,71 @@ +// +// ListViewModelTests.swift +// iosApp +// +// Created by Akash K on 14/04/26. +// + +import XCTest +import shared +import Combine +@testable import iosApp + + +@MainActor +final class ListViewModelTests: XCTestCase { + + private var repository: MockPokemonRepository! + private var cancellables: Set = [] + + override func setUp() { + super.setUp() + repository = MockPokemonRepository() + } + + func test_initialState_isNotNil() { + let sut = ListViewModel(repository: repository) + XCTAssertNotNil(sut.listState) + } + + func test_successState_afterPageLoads_containsPokemon() async { + let pikachu = Pokemon(id: 25, name: "pikachu", imageUrl: "") + repository.stubbedPage = PokemonPage(pokemon: [pikachu], hasMore: false) + + let sut = ListViewModel(repository: repository) + + sut.$listState + .compactMap { $0 as? PokemonListState.Success } + .sink { success in + XCTAssertEqual(success.pokemon.count, 1) + XCTAssertEqual(success.pokemon.first?.name, "pikachu") + } + .store(in: &cancellables) + } + + func test_loadNextPage_callsRepositoryAgain() async { + repository.stubbedPage = PokemonPage(pokemon: [], hasMore: true) + let sut = ListViewModel(repository: repository) + + let callsBefore = repository.getPokemonPageCallCount + sut.loadNextPage() + sut.$listState + .compactMap { $0 as? PokemonListState.Success } + .sink { success in + XCTAssertGreaterThan(self.repository.getPokemonPageCallCount, callsBefore) + } + .store(in: &cancellables) + } + + func test_refresh_callsRepository() async throws { + repository.stubbedPage = PokemonPage(pokemon: [], hasMore: false) + let sut = ListViewModel(repository: repository) + let callsBefore = repository.getPokemonPageCallCount + sut.refresh() + sut.$listState + .compactMap { $0 as? PokemonListState.Success } + .sink { success in + XCTAssertGreaterThan(self.repository.getPokemonPageCallCount, callsBefore) + } + .store(in: &cancellables) + } +} diff --git a/iosApp/iosApp/iosAppTests/Mock/MockPokemonRepository.swift b/iosApp/iosApp/iosAppTests/Mock/MockPokemonRepository.swift new file mode 100644 index 0000000..8a63692 --- /dev/null +++ b/iosApp/iosApp/iosAppTests/Mock/MockPokemonRepository.swift @@ -0,0 +1,91 @@ +// +// MockPokemonRepository.swift +// iosAppTests +// +// Created by Akash K on 14/04/26. +// + +import Foundation +import shared + +final class MockPokemonRepository: NSObject, PokemonRepository { + + // MARK: - Configurable stubs + + var stubbedPage: PokemonPage = PokemonPage(pokemon: [], hasMore: false) + var stubbedDetail: PokemonDetail = PokemonDetail( + id: 25, + name: "pikachu", + imageUrl: "https://example.com/pikachu.png", + height: 4, + weight: 60, + types: ["electric"], + stats: [PokemonStat(name: "hp", value: 35)], + abilities: ["static"], + isFavorite: false + ) + var stubbedPageError: Error? + var stubbedDetailError: Error? + + // helper counters + private(set) var getPokemonPageCallCount = 0 + private(set) var getPokemonDetailCallCount = 0 + private(set) var setFavoriteCallCount = 0 + private(set) var lastSetFavoriteArgs: (id: Int32, isFavorite: Bool)? + + // MARK: - PokemonRepository conformance + + func getPokemonPage( + limit: Int32, + offset: Int32, + completionHandler: @escaping (Any?, Error?) -> Void + ) { + getPokemonPageCallCount += 1 + if let error = stubbedPageError { + completionHandler(nil, error) + } else { + completionHandler(stubbedPage, nil) + } + } + + func getPokemonDetail( + name: String, + completionHandler: @escaping (Any?, Error?) -> Void + ) { + getPokemonDetailCallCount += 1 + if let error = stubbedDetailError { + completionHandler(nil, error) + } else { + completionHandler(stubbedDetail, nil) + } + } + + func observeFavorites() -> Kotlinx_coroutines_coreFlow { + MockEmptyFavoritesFlow() + } + + func setFavorite( + id: Int32, + name: String, + imageUrl: String, + isFavorite: Bool, + completionHandler: @escaping (Error?) -> Void + ) { + setFavoriteCallCount += 1 + lastSetFavoriteArgs = (id: id, isFavorite: isFavorite) + completionHandler(nil) + } +} + +// MARK: - Minimal Flow that emits one empty array and completes + +private final class MockEmptyFavoritesFlow: NSObject, Kotlinx_coroutines_coreFlow { + func collect( + collector: Kotlinx_coroutines_coreFlowCollector, + completionHandler: @escaping (Error?) -> Void + ) { + collector.emit(value: [] as NSArray) { error in + completionHandler(error) + } + } +} diff --git a/iosApp/iosApp/iosAppTests/PokemonDisplayFormatterTests.swift b/iosApp/iosApp/iosAppTests/PokemonDisplayFormatterTests.swift new file mode 100644 index 0000000..4f78c21 --- /dev/null +++ b/iosApp/iosApp/iosAppTests/PokemonDisplayFormatterTests.swift @@ -0,0 +1,66 @@ +// +// iosAppTests.swift +// iosAppTests +// +// Created by Akash K on 14/04/26. +// + +import XCTest +import shared +@testable import iosApp + +// MARK: - PokemonDisplayFormatter Tests + +final class PokemonDisplayFormatterTests: XCTestCase { + + // MARK: formattedID (Int32) + + func test_formattedID_singleDigit_hasTwoLeadingZeros() { + XCTAssertEqual(PokemonDisplayFormatter.formattedID(Int32(1)), "#001") + } + + func test_formattedID_doubleDigit_hasOneLeadingZero() { + XCTAssertEqual(PokemonDisplayFormatter.formattedID(Int32(25)), "#025") + } + + func test_formattedID_tripleDigit_hasNoLeadingZero() { + XCTAssertEqual(PokemonDisplayFormatter.formattedID(Int32(150)), "#150") + } + + func test_formattedID_quadrupleDigit_exceedsThreeDigits() { + XCTAssertEqual(PokemonDisplayFormatter.formattedID(Int32(1000)), "#1000") + } + + func test_formattedID_zero_formatsCorrectly() { + XCTAssertEqual(PokemonDisplayFormatter.formattedID(Int32(0)), "#000") + } + + // MARK: formattedID (Int64) + + func test_formattedID_int64_singleDigit() { + XCTAssertEqual(PokemonDisplayFormatter.formattedID(Int64(7)), "#007") + } + + func test_formattedID_int64_tripleDigit() { + XCTAssertEqual(PokemonDisplayFormatter.formattedID(Int64(251)), "#251") + } + + // MARK: formattedName + + func test_formattedName_lowercase_isCapitalized() { + XCTAssertEqual(PokemonDisplayFormatter.formattedName("pikachu"), "Pikachu") + } + + func test_formattedName_alreadyCapitalized_remainsCorrect() { + XCTAssertEqual(PokemonDisplayFormatter.formattedName("Bulbasaur"), "Bulbasaur") + } + + func test_formattedName_allCaps_capitalizesThenLowercases() { + // Swift's .capitalized lowercases all chars except the first of each word + XCTAssertEqual(PokemonDisplayFormatter.formattedName("MEWTWO"), "Mewtwo") + } + + func test_formattedName_emptyString_remainsEmpty() { + XCTAssertEqual(PokemonDisplayFormatter.formattedName(""), "") + } +}