diff --git a/.DS_Store b/.DS_Store index 6d2eb02..fd94679 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/build.gradle.kts b/build.gradle.kts index 8ce9b1a..c901dd6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,4 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -import org.gradle.api.publish.maven.MavenPublication -import org.gradle.configurationcache.extensions.capitalized -import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.archivesName + apply(from = "publish-root.gradle") @@ -10,6 +7,8 @@ plugins { id("maven-publish") id("io.github.gradle-nexus.publish-plugin") version "1.3.0" id("signing") + id("org.jetbrains.gradle.apple.applePlugin") version "212.4638.14-0.13.1" + kotlin("native.cocoapods") version "1.9.0" } group = "dev.snipme" @@ -41,6 +40,40 @@ kotlin { browser() nodejs() } +// TODO Generate cocoapods framework + cocoapods { + // Required properties + // Specify the required Pod version here. Otherwise, the Gradle project version is used. + version = "0.7.1" + summary = "Kotlin Multiplatform syntax highlighting engine." + homepage = "Link to a Kotlin/Native module homepage" +// podfile = project.file("../kodeview_tester/ios/Podfile") + + // Optional properties + // Configure the Pod name here instead of changing the Gradle project name +// name = "Highlights" + + framework { + // Required properties + // Framework name configuration. Use this property instead of deprecated 'frameworkName' + baseName = "Highlights" + } +// +// // Optional properties +// // Specify the framework linking type. It's dynamic by default. +// isStatic = false +// // Dependency export +//// export(project(":")) +// transitiveExport = false // This is default. +// // Bitcode embedding +// embedBitcode(BITCODE) +// } + +// // Maps custom Xcode configuration to NativeBuildType +// xcodeConfigurationToNativeBuildType["CUSTOM_DEBUG"] = DEBUG +// xcodeConfigurationToNativeBuildType["CUSTOM_RELEASE"] = RELEASE + } + // Dependencies sourceSets { val commonTest by getting { diff --git a/gradle.properties b/gradle.properties index a7d8617..aeec2b7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,2 @@ -kotlin.js.compiler=ir \ No newline at end of file +kotlin.js.compiler=ir +kotlin.native.cacheKind.iosArm64=none \ No newline at end of file diff --git a/highlights.podspec b/highlights.podspec new file mode 100644 index 0000000..a0c2b55 --- /dev/null +++ b/highlights.podspec @@ -0,0 +1,39 @@ +Pod::Spec.new do |spec| + spec.name = 'highlights' + spec.version = '0.7.1' + spec.homepage = 'Link to a Kotlin/Native module homepage' + spec.source = { :http=> ''} + spec.authors = '' + spec.license = '' + spec.summary = 'Kotlin Multiplatform syntax highlighting engine.' + spec.vendored_frameworks = 'build/cocoapods/framework/Highlights.framework' + spec.libraries = 'c++' + + + + spec.pod_target_xcconfig = { + 'KOTLIN_PROJECT_PATH' => '', + 'PRODUCT_MODULE_NAME' => 'Highlights', + } + + spec.script_phases = [ + { + :name => 'Build highlights', + :execution_position => :before_compile, + :shell_path => '/bin/sh', + :script => <<-SCRIPT + if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then + echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" + exit 0 + fi + set -ev + REPO_ROOT="$PODS_TARGET_SRCROOT" + "$REPO_ROOT/gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ + -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ + -Pkotlin.native.cocoapods.archs="$ARCHS" \ + -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" + SCRIPT + } + ] + +end \ No newline at end of file diff --git a/ios/Podfile b/ios/Podfile new file mode 100644 index 0000000..3e51afd --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,20 @@ +# Uncomment the next line to define a global platform for your project +platform :ios, '9.0' + +target 'ios' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + # Pods for ios + pod 'Highlights', :path => '../Highlights' + + target 'iosTests' do + inherit! :search_paths + # Pods for testing + end + + target 'iosUITests' do + # Pods for testing + end + +end diff --git a/ios/ios.xcodeproj/project.pbxproj b/ios/ios.xcodeproj/project.pbxproj new file mode 100644 index 0000000..433db7c --- /dev/null +++ b/ios/ios.xcodeproj/project.pbxproj @@ -0,0 +1,622 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 83855DE22AFFD533006DAC5A /* iosApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83855DE12AFFD533006DAC5A /* iosApp.swift */; }; + 83855DE42AFFD533006DAC5A /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83855DE32AFFD533006DAC5A /* ContentView.swift */; }; + 83855DE62AFFD535006DAC5A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 83855DE52AFFD535006DAC5A /* Assets.xcassets */; }; + 83855DEA2AFFD535006DAC5A /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 83855DE92AFFD535006DAC5A /* Preview Assets.xcassets */; }; + 83855DF42AFFD536006DAC5A /* iosTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83855DF32AFFD536006DAC5A /* iosTests.swift */; }; + 83855DFE2AFFD536006DAC5A /* iosUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83855DFD2AFFD536006DAC5A /* iosUITests.swift */; }; + 83855E002AFFD536006DAC5A /* iosUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83855DFF2AFFD536006DAC5A /* iosUITestsLaunchTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 83855DF02AFFD536006DAC5A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83855DD62AFFD533006DAC5A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 83855DDD2AFFD533006DAC5A; + remoteInfo = ios; + }; + 83855DFA2AFFD536006DAC5A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83855DD62AFFD533006DAC5A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 83855DDD2AFFD533006DAC5A; + remoteInfo = ios; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 83855DDE2AFFD533006DAC5A /* ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ios.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 83855DE12AFFD533006DAC5A /* iosApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosApp.swift; sourceTree = ""; }; + 83855DE32AFFD533006DAC5A /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 83855DE52AFFD535006DAC5A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 83855DE72AFFD535006DAC5A /* ios.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ios.entitlements; sourceTree = ""; }; + 83855DE92AFFD535006DAC5A /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 83855DEF2AFFD536006DAC5A /* iosTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iosTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 83855DF32AFFD536006DAC5A /* iosTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosTests.swift; sourceTree = ""; }; + 83855DF92AFFD536006DAC5A /* iosUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iosUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 83855DFD2AFFD536006DAC5A /* iosUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosUITests.swift; sourceTree = ""; }; + 83855DFF2AFFD536006DAC5A /* iosUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosUITestsLaunchTests.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 83855DDB2AFFD533006DAC5A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 83855DEC2AFFD536006DAC5A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 83855DF62AFFD536006DAC5A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 83855DD52AFFD533006DAC5A = { + isa = PBXGroup; + children = ( + 83855DE02AFFD533006DAC5A /* ios */, + 83855DF22AFFD536006DAC5A /* iosTests */, + 83855DFC2AFFD536006DAC5A /* iosUITests */, + 83855DDF2AFFD533006DAC5A /* Products */, + ); + sourceTree = ""; + }; + 83855DDF2AFFD533006DAC5A /* Products */ = { + isa = PBXGroup; + children = ( + 83855DDE2AFFD533006DAC5A /* ios.app */, + 83855DEF2AFFD536006DAC5A /* iosTests.xctest */, + 83855DF92AFFD536006DAC5A /* iosUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 83855DE02AFFD533006DAC5A /* ios */ = { + isa = PBXGroup; + children = ( + 83855DE12AFFD533006DAC5A /* iosApp.swift */, + 83855DE32AFFD533006DAC5A /* ContentView.swift */, + 83855DE52AFFD535006DAC5A /* Assets.xcassets */, + 83855DE72AFFD535006DAC5A /* ios.entitlements */, + 83855DE82AFFD535006DAC5A /* Preview Content */, + ); + path = ios; + sourceTree = ""; + }; + 83855DE82AFFD535006DAC5A /* Preview Content */ = { + isa = PBXGroup; + children = ( + 83855DE92AFFD535006DAC5A /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 83855DF22AFFD536006DAC5A /* iosTests */ = { + isa = PBXGroup; + children = ( + 83855DF32AFFD536006DAC5A /* iosTests.swift */, + ); + path = iosTests; + sourceTree = ""; + }; + 83855DFC2AFFD536006DAC5A /* iosUITests */ = { + isa = PBXGroup; + children = ( + 83855DFD2AFFD536006DAC5A /* iosUITests.swift */, + 83855DFF2AFFD536006DAC5A /* iosUITestsLaunchTests.swift */, + ); + path = iosUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 83855DDD2AFFD533006DAC5A /* ios */ = { + isa = PBXNativeTarget; + buildConfigurationList = 83855E032AFFD536006DAC5A /* Build configuration list for PBXNativeTarget "ios" */; + buildPhases = ( + 83855DDA2AFFD533006DAC5A /* Sources */, + 83855DDB2AFFD533006DAC5A /* Frameworks */, + 83855DDC2AFFD533006DAC5A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ios; + productName = ios; + productReference = 83855DDE2AFFD533006DAC5A /* ios.app */; + productType = "com.apple.product-type.application"; + }; + 83855DEE2AFFD536006DAC5A /* iosTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 83855E062AFFD536006DAC5A /* Build configuration list for PBXNativeTarget "iosTests" */; + buildPhases = ( + 83855DEB2AFFD536006DAC5A /* Sources */, + 83855DEC2AFFD536006DAC5A /* Frameworks */, + 83855DED2AFFD536006DAC5A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 83855DF12AFFD536006DAC5A /* PBXTargetDependency */, + ); + name = iosTests; + productName = iosTests; + productReference = 83855DEF2AFFD536006DAC5A /* iosTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 83855DF82AFFD536006DAC5A /* iosUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 83855E092AFFD536006DAC5A /* Build configuration list for PBXNativeTarget "iosUITests" */; + buildPhases = ( + 83855DF52AFFD536006DAC5A /* Sources */, + 83855DF62AFFD536006DAC5A /* Frameworks */, + 83855DF72AFFD536006DAC5A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 83855DFB2AFFD536006DAC5A /* PBXTargetDependency */, + ); + name = iosUITests; + productName = iosUITests; + productReference = 83855DF92AFFD536006DAC5A /* iosUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83855DD62AFFD533006DAC5A /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1500; + LastUpgradeCheck = 1500; + TargetAttributes = { + 83855DDD2AFFD533006DAC5A = { + CreatedOnToolsVersion = 15.0; + }; + 83855DEE2AFFD536006DAC5A = { + CreatedOnToolsVersion = 15.0; + TestTargetID = 83855DDD2AFFD533006DAC5A; + }; + 83855DF82AFFD536006DAC5A = { + CreatedOnToolsVersion = 15.0; + TestTargetID = 83855DDD2AFFD533006DAC5A; + }; + }; + }; + buildConfigurationList = 83855DD92AFFD533006DAC5A /* Build configuration list for PBXProject "ios" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83855DD52AFFD533006DAC5A; + productRefGroup = 83855DDF2AFFD533006DAC5A /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 83855DDD2AFFD533006DAC5A /* ios */, + 83855DEE2AFFD536006DAC5A /* iosTests */, + 83855DF82AFFD536006DAC5A /* iosUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 83855DDC2AFFD533006DAC5A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 83855DEA2AFFD535006DAC5A /* Preview Assets.xcassets in Resources */, + 83855DE62AFFD535006DAC5A /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 83855DED2AFFD536006DAC5A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 83855DF72AFFD536006DAC5A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 83855DDA2AFFD533006DAC5A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 83855DE42AFFD533006DAC5A /* ContentView.swift in Sources */, + 83855DE22AFFD533006DAC5A /* iosApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 83855DEB2AFFD536006DAC5A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 83855DF42AFFD536006DAC5A /* iosTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 83855DF52AFFD536006DAC5A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 83855E002AFFD536006DAC5A /* iosUITestsLaunchTests.swift in Sources */, + 83855DFE2AFFD536006DAC5A /* iosUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 83855DF12AFFD536006DAC5A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 83855DDD2AFFD533006DAC5A /* ios */; + targetProxy = 83855DF02AFFD536006DAC5A /* PBXContainerItemProxy */; + }; + 83855DFB2AFFD536006DAC5A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 83855DDD2AFFD533006DAC5A /* ios */; + targetProxy = 83855DFA2AFFD536006DAC5A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 83855E012AFFD536006DAC5A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 83855E022AFFD536006DAC5A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + }; + name = Release; + }; + 83855E042AFFD536006DAC5A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = ios/ios.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"ios/Preview Content\""; + DEVELOPMENT_TEAM = 6AY68V2B3P; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = pl.tkadziolka.ios; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 83855E052AFFD536006DAC5A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = ios/ios.entitlements; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"ios/Preview Content\""; + DEVELOPMENT_TEAM = 6AY68V2B3P; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = pl.tkadziolka.ios; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 83855E072AFFD536006DAC5A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 6AY68V2B3P; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = pl.tkadziolka.iosTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ios.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/ios"; + }; + name = Debug; + }; + 83855E082AFFD536006DAC5A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 6AY68V2B3P; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = pl.tkadziolka.iosTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ios.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/ios"; + }; + name = Release; + }; + 83855E0A2AFFD536006DAC5A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 6AY68V2B3P; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = pl.tkadziolka.iosUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = ios; + }; + name = Debug; + }; + 83855E0B2AFFD536006DAC5A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 6AY68V2B3P; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = pl.tkadziolka.iosUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = ios; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 83855DD92AFFD533006DAC5A /* Build configuration list for PBXProject "ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83855E012AFFD536006DAC5A /* Debug */, + 83855E022AFFD536006DAC5A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83855E032AFFD536006DAC5A /* Build configuration list for PBXNativeTarget "ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83855E042AFFD536006DAC5A /* Debug */, + 83855E052AFFD536006DAC5A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83855E062AFFD536006DAC5A /* Build configuration list for PBXNativeTarget "iosTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83855E072AFFD536006DAC5A /* Debug */, + 83855E082AFFD536006DAC5A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83855E092AFFD536006DAC5A /* Build configuration list for PBXNativeTarget "iosUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83855E0A2AFFD536006DAC5A /* Debug */, + 83855E0B2AFFD536006DAC5A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 83855DD62AFFD533006DAC5A /* Project object */; +} diff --git a/ios/ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios/ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/ios.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/ios.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/ios.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/tkadziolka.xcuserdatad/UserInterfaceState.xcuserstate b/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/tkadziolka.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..732e208 Binary files /dev/null and b/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/tkadziolka.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ios/ios.xcodeproj/xcuserdata/tkadziolka.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/ios.xcodeproj/xcuserdata/tkadziolka.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..4bacaa0 --- /dev/null +++ b/ios/ios.xcodeproj/xcuserdata/tkadziolka.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + ios.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/ios/ios/Assets.xcassets/AccentColor.colorset/Contents.json b/ios/ios/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/ios/ios/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/ios/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/ios/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..532cd72 --- /dev/null +++ b/ios/ios/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,63 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/ios/Assets.xcassets/Contents.json b/ios/ios/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/ios/ios/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/ios/ContentView.swift b/ios/ios/ContentView.swift new file mode 100644 index 0000000..160e40f --- /dev/null +++ b/ios/ios/ContentView.swift @@ -0,0 +1,24 @@ +// +// ContentView.swift +// ios +// +// Created by Tomasz Kądziołka on 11/11/2023. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundStyle(.tint) + Text("Hello, world!") + } + .padding() + } +} + +#Preview { + ContentView() +} diff --git a/ios/ios/Preview Content/Preview Assets.xcassets/Contents.json b/ios/ios/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/ios/ios/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/ios/ios.entitlements b/ios/ios/ios.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/ios/ios/ios.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/ios/ios/iosApp.swift b/ios/ios/iosApp.swift new file mode 100644 index 0000000..adbe369 --- /dev/null +++ b/ios/ios/iosApp.swift @@ -0,0 +1,17 @@ +// +// iosApp.swift +// ios +// +// Created by Tomasz Kądziołka on 11/11/2023. +// + +import SwiftUI + +@main +struct iosApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/ios/iosTests/iosTests.swift b/ios/iosTests/iosTests.swift new file mode 100644 index 0000000..fd4f469 --- /dev/null +++ b/ios/iosTests/iosTests.swift @@ -0,0 +1,35 @@ +// +// iosTests.swift +// iosTests +// +// Created by Tomasz Kądziołka on 11/11/2023. +// + +import XCTest + +final class iosTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + // Any test you write for XCTest can be annotated as throws and async. + // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. + // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/ios/iosUITests/iosUITests.swift b/ios/iosUITests/iosUITests.swift new file mode 100644 index 0000000..80ee5b4 --- /dev/null +++ b/ios/iosUITests/iosUITests.swift @@ -0,0 +1,41 @@ +// +// iosUITests.swift +// iosUITests +// +// Created by Tomasz Kądziołka on 11/11/2023. +// + +import XCTest + +final class iosUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testLaunchPerformance() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/ios/iosUITests/iosUITestsLaunchTests.swift b/ios/iosUITests/iosUITestsLaunchTests.swift new file mode 100644 index 0000000..8052270 --- /dev/null +++ b/ios/iosUITests/iosUITestsLaunchTests.swift @@ -0,0 +1,32 @@ +// +// iosUITestsLaunchTests.swift +// iosUITests +// +// Created by Tomasz Kądziołka on 11/11/2023. +// + +import XCTest + +final class iosUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts index 7a1a0b5..531cad8 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -4,6 +4,10 @@ pluginManagement { gradlePluginPortal() mavenCentral() } + + plugins { +// id("org.jetbrains.kotlin.native.cocoapods") apply false + } } dependencyResolutionManagement {