diff --git a/build.gradle.kts b/build.gradle.kts index b0a170e5..6ff3e7ca 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,15 +1,15 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - repositories { google() + mavenCentral() jcenter() } dependencies { classpath(Deps.android_gradle_plugin) classpath(Deps.SqlDelight.gradle) - classpath(Deps.xcodesync) + classpath(Deps.cocoapodsext) classpath("org.jetbrains.kotlin:kotlin-serialization:${Versions.kotlin}") classpath(kotlin("gradle-plugin", Versions.kotlin)) @@ -21,6 +21,7 @@ buildscript { allprojects { repositories { google() + mavenCentral() jcenter() maven(url = "https://kotlin.bintray.com/kotlinx") maven(url = "https://dl.bintray.com/touchlabpublic/kotlin") diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 8e9767c3..1b2bfda3 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -18,7 +18,7 @@ object Versions { val coroutines = "1.3.3-native-mt" val koin = "3.0.0-alpha-8" val serialization = "0.14.0" - val xcodesync = "0.2" + val cocoapodsext = "0.6" } @@ -33,8 +33,7 @@ object Deps { val multiplatformSettings = "com.russhwolf:multiplatform-settings:${Versions.multiplatformSettings}" val multiplatformSettingsTest = "com.russhwolf:multiplatform-settings-test:${Versions.multiplatformSettings}" val koinCore = "org.koin:koin-core:${Versions.koin}" - val xcodesync = "co.touchlab:kotlinxcodesync:${Versions.xcodesync}" - + val cocoapodsext = "co.touchlab:kotlinnativecocoapods:${Versions.cocoapodsext}" object AndroidXTest { val core = "androidx.test:core:${Versions.android_x}" diff --git a/ios/KaMPStarteriOS.xcodeproj/project.pbxproj b/ios/KaMPStarteriOS.xcodeproj/project.pbxproj index 57a70c4e..1d977711 100644 --- a/ios/KaMPStarteriOS.xcodeproj/project.pbxproj +++ b/ios/KaMPStarteriOS.xcodeproj/project.pbxproj @@ -35,20 +35,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 093A2237AC6CBF45A1D16BEE /* ExampleUnitTest.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ExampleUnitTest.kt; path = ../shared/src/androidTest/java/co/touchlab/kampstarter/ExampleUnitTest.kt; sourceTree = ""; }; 1C53F211127B87EFD39C9D65 /* Pods_KaMPStarteriOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_KaMPStarteriOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1D8B833EBF721694C8D055A0 /* ServiceRegistry.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file; name = ServiceRegistry.kt; path = ../shared/src/commonMain/kotlin/co/touchlab/kampstarter/ServiceRegistry.kt; sourceTree = ""; }; 1DFCC00C8DAA719770A18D1A /* Pods-KaMPStarteriOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KaMPStarteriOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS.release.xcconfig"; sourceTree = ""; }; - 3FDE597836BBF5D75310C250 /* DatabaseHelper.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = DatabaseHelper.kt; path = ../shared/src/commonMain/kotlin/co/touchlab/kampstarter/DatabaseHelper.kt; sourceTree = ""; }; - 568BD68B9CE4333E971CC240 /* PlatformAndroid.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = PlatformAndroid.kt; path = ../shared/src/androidMain/kotlin/co/touchlab/kampstarter/PlatformAndroid.kt; sourceTree = ""; }; - 607A72A70F34B88818A0B62D /* PlatformiOS.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = PlatformiOS.kt; path = ../shared/src/iosMain/kotlin/co/touchlab/kampstarter/PlatformiOS.kt; sourceTree = ""; }; - 89FA98AD31B7AA33C88550E3 /* Breed.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file; name = Breed.kt; path = ../shared/src/commonMain/kotlin/co/touchlab/kampstarter/jsondata/Breed.kt; sourceTree = ""; }; - 99BF5A54AE1C1458F919DF18 /* KtorDogApiImpl.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file; name = KtorDogApiImpl.kt; path = ../shared/src/commonMain/kotlin/co/touchlab/kampstarter/ktor/KtorDogApiImpl.kt; sourceTree = ""; }; - 9E4B5A064DC30D7639C44AEC /* SampleModel.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file; name = SampleModel.kt; path = ../shared/src/commonMain/kotlin/co/touchlab/kampstarter/models/SampleModel.kt; sourceTree = ""; }; - A36EB1CAAB8ECE66A86EEB3F /* BreedModel.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = BreedModel.kt; path = ../shared/src/commonMain/kotlin/co/touchlab/kampstarter/models/BreedModel.kt; sourceTree = ""; }; - C4BAA0CCB0363B847EFB4458 /* KtorApi.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = KtorApi.kt; path = ../shared/src/commonMain/kotlin/co/touchlab/kampstarter/ktor/KtorApi.kt; sourceTree = ""; }; - CC9CEBFA7A1AEC2B4358EF80 /* Platform.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Platform.kt; path = ../shared/src/commonMain/kotlin/co/touchlab/kampstarter/Platform.kt; sourceTree = ""; }; - D52432F6ECA5F2D60BC5FEDB /* BaseModel.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = BaseModel.kt; path = ../shared/src/commonMain/kotlin/co/touchlab/kampstarter/models/BaseModel.kt; sourceTree = ""; }; F1465EFD23AA94BF0055F7C3 /* KaMPStarteriOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KaMPStarteriOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; F1465F0023AA94BF0055F7C3 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; F1465F0423AA94BF0055F7C3 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -62,7 +50,6 @@ F1465F1E23AA94C00055F7C3 /* KaMPStarteriOSUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KaMPStarteriOSUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; F1465F2223AA94C00055F7C3 /* KaMPStarteriOSUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KaMPStarteriOSUITests.swift; sourceTree = ""; }; F1465F2423AA94C00055F7C3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - F8BFA3B3C4E68F2F696B04FD /* CoroutinesExtensions.kt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CoroutinesExtensions.kt; path = ../shared/src/commonMain/kotlin/co/touchlab/kampstarter/sqldelight/CoroutinesExtensions.kt; sourceTree = ""; }; F9C259C83C689DF8F4602F38 /* Pods-KaMPStarteriOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KaMPStarteriOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -92,121 +79,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 108D8E61929368D1BC0CBFBD /* touchlab */ = { - isa = PBXGroup; - children = ( - 758D44919228B414863B1B7C /* kampstarter */, - ); - name = touchlab; - sourceTree = ""; - }; - 2096E30982ABD71B891B2263 /* sqldelight */ = { - isa = PBXGroup; - children = ( - F8BFA3B3C4E68F2F696B04FD /* CoroutinesExtensions.kt */, - ); - name = sqldelight; - sourceTree = ""; - }; - 20AEDEF18E3805AF152D8640 /* kampstarter */ = { - isa = PBXGroup; - children = ( - 093A2237AC6CBF45A1D16BEE /* ExampleUnitTest.kt */, - ); - name = kampstarter; - sourceTree = ""; - }; - 20FFF9FBAB396AAA0F9003C8 /* androidTest */ = { - isa = PBXGroup; - children = ( - D9120817CBEB8094C42AA4BB /* java */, - ); - name = androidTest; - sourceTree = ""; - }; - 23F30D59279D9F7B93F979F6 /* iosMain */ = { - isa = PBXGroup; - children = ( - 96240CA0EBA41FAD0134F114 /* kotlin */, - ); - name = iosMain; - sourceTree = ""; - }; - 2BAB1677E0B1E6DA753A790F /* touchlab */ = { - isa = PBXGroup; - children = ( - 413B447BDC42B90EEB8C6742 /* kampstarter */, - ); - name = touchlab; - sourceTree = ""; - }; - 3546F4E939E401ED7F118A50 /* co */ = { - isa = PBXGroup; - children = ( - D763F91A44DD7A8E72DE2A6E /* touchlab */, - ); - name = co; - sourceTree = ""; - }; - 3BAAD3372EAD1D443123C2D3 /* kotlin */ = { - isa = PBXGroup; - children = ( - 6CF74E1A2FCFD8DF3E2DE33F /* co */, - ); - name = kotlin; - sourceTree = ""; - }; - 3D8869BDFDFC70FFCF7D3B50 /* jsondata */ = { - isa = PBXGroup; - children = ( - 89FA98AD31B7AA33C88550E3 /* Breed.kt */, - ); - name = jsondata; - sourceTree = ""; - }; - 413B447BDC42B90EEB8C6742 /* kampstarter */ = { - isa = PBXGroup; - children = ( - 607A72A70F34B88818A0B62D /* PlatformiOS.kt */, - ); - name = kampstarter; - sourceTree = ""; - }; - 420F193A5391ACAEB60F62E5 /* kampstarter */ = { - isa = PBXGroup; - children = ( - 3FDE597836BBF5D75310C250 /* DatabaseHelper.kt */, - CC9CEBFA7A1AEC2B4358EF80 /* Platform.kt */, - 1D8B833EBF721694C8D055A0 /* ServiceRegistry.kt */, - 3D8869BDFDFC70FFCF7D3B50 /* jsondata */, - A9625A9E5FBFEE71CDADA5A0 /* ktor */, - D27D56D8F84D612FD74C24EA /* models */, - 2096E30982ABD71B891B2263 /* sqldelight */, - ); - name = kampstarter; - sourceTree = ""; - }; - 43E422B1B85386CC04E4783B /* commonMain */ = { - isa = PBXGroup; - children = ( - FF73E76D844E09F1E914FB6A /* kotlin */, - F8B62FDF6D205E2E9352024B /* sqldelight */, - ); - name = commonMain; - sourceTree = ""; - }; - 5058DFE2CD0266B349009DD1 /* Kotlin */ = { - isa = PBXGroup; - children = ( - CCC0FA0ED9CC5FC844680829 /* androidMain */, - 20FFF9FBAB396AAA0F9003C8 /* androidTest */, - 43E422B1B85386CC04E4783B /* commonMain */, - 23F30D59279D9F7B93F979F6 /* iosMain */, - 7FF25DC05EF3A7FFA8B6BC50 /* main */, - ); - name = Kotlin; - sourceTree = ""; - }; 6278498AD96A4D949D39BF44 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -215,104 +87,6 @@ name = Frameworks; sourceTree = ""; }; - 6CF74E1A2FCFD8DF3E2DE33F /* co */ = { - isa = PBXGroup; - children = ( - 108D8E61929368D1BC0CBFBD /* touchlab */, - ); - name = co; - sourceTree = ""; - }; - 758D44919228B414863B1B7C /* kampstarter */ = { - isa = PBXGroup; - children = ( - 568BD68B9CE4333E971CC240 /* PlatformAndroid.kt */, - ); - name = kampstarter; - sourceTree = ""; - }; - 7780087464B7F19AA99D5B87 /* co */ = { - isa = PBXGroup; - children = ( - 2BAB1677E0B1E6DA753A790F /* touchlab */, - ); - name = co; - sourceTree = ""; - }; - 7D43D9E432C23A0D4054C4AA /* touchlab */ = { - isa = PBXGroup; - children = ( - 420F193A5391ACAEB60F62E5 /* kampstarter */, - ); - name = touchlab; - sourceTree = ""; - }; - 7FF25DC05EF3A7FFA8B6BC50 /* main */ = { - isa = PBXGroup; - children = ( - ); - name = main; - sourceTree = ""; - }; - 96240CA0EBA41FAD0134F114 /* kotlin */ = { - isa = PBXGroup; - children = ( - 7780087464B7F19AA99D5B87 /* co */, - ); - name = kotlin; - sourceTree = ""; - }; - A9625A9E5FBFEE71CDADA5A0 /* ktor */ = { - isa = PBXGroup; - children = ( - C4BAA0CCB0363B847EFB4458 /* KtorApi.kt */, - 99BF5A54AE1C1458F919DF18 /* KtorDogApiImpl.kt */, - ); - name = ktor; - sourceTree = ""; - }; - CCC0FA0ED9CC5FC844680829 /* androidMain */ = { - isa = PBXGroup; - children = ( - 3BAAD3372EAD1D443123C2D3 /* kotlin */, - ); - name = androidMain; - sourceTree = ""; - }; - D27D56D8F84D612FD74C24EA /* models */ = { - isa = PBXGroup; - children = ( - D52432F6ECA5F2D60BC5FEDB /* BaseModel.kt */, - A36EB1CAAB8ECE66A86EEB3F /* BreedModel.kt */, - 9E4B5A064DC30D7639C44AEC /* SampleModel.kt */, - ); - name = models; - sourceTree = ""; - }; - D3672975291E68B182E618DF /* kampstarter */ = { - isa = PBXGroup; - children = ( - E41C963FFD7E7FD7E2DFF275 /* db */, - ); - name = kampstarter; - sourceTree = ""; - }; - D763F91A44DD7A8E72DE2A6E /* touchlab */ = { - isa = PBXGroup; - children = ( - 20AEDEF18E3805AF152D8640 /* kampstarter */, - ); - name = touchlab; - sourceTree = ""; - }; - D9120817CBEB8094C42AA4BB /* java */ = { - isa = PBXGroup; - children = ( - 3546F4E939E401ED7F118A50 /* co */, - ); - name = java; - sourceTree = ""; - }; DF9BBECBCD175B90105DA8D9 /* Pods */ = { isa = PBXGroup; children = ( @@ -322,13 +96,6 @@ name = Pods; sourceTree = ""; }; - E41C963FFD7E7FD7E2DFF275 /* db */ = { - isa = PBXGroup; - children = ( - ); - name = db; - sourceTree = ""; - }; F1465EF423AA94BF0055F7C3 = { isa = PBXGroup; children = ( @@ -338,7 +105,6 @@ F1465EFE23AA94BF0055F7C3 /* Products */, DF9BBECBCD175B90105DA8D9 /* Pods */, 6278498AD96A4D949D39BF44 /* Frameworks */, - 5058DFE2CD0266B349009DD1 /* Kotlin */, ); sourceTree = ""; }; @@ -383,46 +149,6 @@ path = KaMPStarteriOSUITests; sourceTree = ""; }; - F481F18CCE4C3B2457296D5B /* touchlab */ = { - isa = PBXGroup; - children = ( - D3672975291E68B182E618DF /* kampstarter */, - ); - name = touchlab; - sourceTree = ""; - }; - F5E5EC2A18114779262C4D4A /* co */ = { - isa = PBXGroup; - children = ( - F481F18CCE4C3B2457296D5B /* touchlab */, - ); - name = co; - sourceTree = ""; - }; - F8B62FDF6D205E2E9352024B /* sqldelight */ = { - isa = PBXGroup; - children = ( - F5E5EC2A18114779262C4D4A /* co */, - ); - name = sqldelight; - sourceTree = ""; - }; - FD5303CA2E0B965DC7508B5E /* co */ = { - isa = PBXGroup; - children = ( - 7D43D9E432C23A0D4054C4AA /* touchlab */, - ); - name = co; - sourceTree = ""; - }; - FF73E76D844E09F1E914FB6A /* kotlin */ = { - isa = PBXGroup; - children = ( - FD5303CA2E0B965DC7508B5E /* co */, - ); - name = kotlin; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -434,6 +160,7 @@ F1465EF923AA94BF0055F7C3 /* Sources */, F1465EFA23AA94BF0055F7C3 /* Frameworks */, F1465EFB23AA94BF0055F7C3 /* Resources */, + 165578294E44D972A6868907 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -551,6 +278,23 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 165578294E44D972A6868907 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; DE3B37D33D11C1968D62DBBA /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/ios/KaMPStarteriOS.xcworkspace/contents.xcworkspacedata b/ios/KaMPStarteriOS.xcworkspace/contents.xcworkspacedata index ae9f3bb6..542afb8b 100644 --- a/ios/KaMPStarteriOS.xcworkspace/contents.xcworkspacedata +++ b/ios/KaMPStarteriOS.xcworkspace/contents.xcworkspacedata @@ -1,6 +1,16 @@ + + + + + + diff --git a/ios/KaMPStarteriOS/ViewController.swift b/ios/KaMPStarteriOS/ViewController.swift index dd5fa3dc..543921cf 100644 --- a/ios/KaMPStarteriOS/ViewController.swift +++ b/ios/KaMPStarteriOS/ViewController.swift @@ -22,7 +22,6 @@ class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSour breedTableView.dataSource = self model = BreedModel(viewUpdate: {summary in - print("Summary: \(summary)") self.data = summary.allItems self.breedTableView.reloadData() },errorUpdate: { errorMessage in diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 233bbcc7..e23a6934 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - shared (1.0) + - shared (1.1) DEPENDENCIES: - shared (from `../shared/`) @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: "../shared/" SPEC CHECKSUMS: - shared: c68fc3cc4479c792e49f0e8f0eb6216f7826e632 + shared: 771eb98a53925ecb27cf05ee1474350cbce85589 PODFILE CHECKSUM: 5b001878f092098375538b5341b8408fa0b6aabc diff --git a/ios/Pods/Local Podspecs/shared.podspec.json b/ios/Pods/Local Podspecs/shared.podspec.json index 2e63cca5..86f05e57 100644 --- a/ios/Pods/Local Podspecs/shared.podspec.json +++ b/ios/Pods/Local Podspecs/shared.podspec.json @@ -1,15 +1,14 @@ { "name": "shared", - "version": "1.0", + "version": "1.1", "homepage": "https://github.com/touchlab/KaMPStarter", "source": { "git": "Not Published", - "tag": "Cocoapods/shared/1.0" + "tag": "Cocoapods/shared/1.1" }, "authors": "", "license": "", "summary": "Common library for the KaMP starter kit", - "static_framework": true, "vendored_frameworks": "build/cocoapods/framework/shared.framework", "libraries": "c++", "module_name": "shared_umbrella", diff --git a/ios/Pods/Manifest.lock b/ios/Pods/Manifest.lock index 233bbcc7..e23a6934 100644 --- a/ios/Pods/Manifest.lock +++ b/ios/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - shared (1.0) + - shared (1.1) DEPENDENCIES: - shared (from `../shared/`) @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: "../shared/" SPEC CHECKSUMS: - shared: c68fc3cc4479c792e49f0e8f0eb6216f7826e632 + shared: 771eb98a53925ecb27cf05ee1474350cbce85589 PODFILE CHECKSUM: 5b001878f092098375538b5341b8408fa0b6aabc diff --git a/ios/Pods/Pods.xcodeproj/project.pbxproj b/ios/Pods/Pods.xcodeproj/project.pbxproj index 3e280cee..87a9a7eb 100644 --- a/ios/Pods/Pods.xcodeproj/project.pbxproj +++ b/ios/Pods/Pods.xcodeproj/project.pbxproj @@ -11,7 +11,7 @@ isa = PBXAggregateTarget; buildConfigurationList = 46EB2E00000120 /* Build configuration list for PBXAggregateTarget "shared" */; buildPhases = ( - 46EB2E000002E0 /* [CP-User] Build shared */, + 46EB2E000002F0 /* [CP-User] Build shared */, ); dependencies = ( ); @@ -22,11 +22,11 @@ /* Begin PBXBuildFile section */ 46EB2E00000220 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46EB2E00000210 /* Foundation.framework */; }; 46EB2E00000290 /* Pods-KaMPStarteriOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 46EB2E00000280 /* Pods-KaMPStarteriOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 46EB2E000002D0 /* Pods-KaMPStarteriOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 46EB2E000002C0 /* Pods-KaMPStarteriOS-dummy.m */; }; + 46EB2E000002E0 /* Pods-KaMPStarteriOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 46EB2E000002D0 /* Pods-KaMPStarteriOS-dummy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 46EB2E000002F0 /* PBXContainerItemProxy */ = { + 46EB2E00000300 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 46EB2E00000000 /* Project object */; proxyType = 1; @@ -46,9 +46,10 @@ 46EB2E00000260 /* Pods-KaMPStarteriOS-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-KaMPStarteriOS-Info.plist"; sourceTree = ""; }; 46EB2E00000270 /* Pods-KaMPStarteriOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-KaMPStarteriOS.modulemap"; sourceTree = ""; }; 46EB2E00000280 /* Pods-KaMPStarteriOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-KaMPStarteriOS-umbrella.h"; sourceTree = ""; }; - 46EB2E000002A0 /* Pods-KaMPStarteriOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-KaMPStarteriOS-acknowledgements.plist"; sourceTree = ""; }; - 46EB2E000002B0 /* Pods-KaMPStarteriOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-KaMPStarteriOS-acknowledgements.markdown"; sourceTree = ""; }; - 46EB2E000002C0 /* Pods-KaMPStarteriOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-KaMPStarteriOS-dummy.m"; sourceTree = ""; }; + 46EB2E000002A0 /* Pods-KaMPStarteriOS-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-KaMPStarteriOS-frameworks.sh"; sourceTree = ""; }; + 46EB2E000002B0 /* Pods-KaMPStarteriOS-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-KaMPStarteriOS-acknowledgements.plist"; sourceTree = ""; }; + 46EB2E000002C0 /* Pods-KaMPStarteriOS-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-KaMPStarteriOS-acknowledgements.markdown"; sourceTree = ""; }; + 46EB2E000002D0 /* Pods-KaMPStarteriOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-KaMPStarteriOS-dummy.m"; sourceTree = ""; }; 9E69954F2D16890872EDAAAC0850A413 /* Pods_KaMPStarteriOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_KaMPStarteriOS.framework; path = "Pods-KaMPStarteriOS.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -155,9 +156,10 @@ isa = PBXGroup; children = ( 46EB2E00000270 /* Pods-KaMPStarteriOS.modulemap */, - 46EB2E000002B0 /* Pods-KaMPStarteriOS-acknowledgements.markdown */, - 46EB2E000002A0 /* Pods-KaMPStarteriOS-acknowledgements.plist */, - 46EB2E000002C0 /* Pods-KaMPStarteriOS-dummy.m */, + 46EB2E000002C0 /* Pods-KaMPStarteriOS-acknowledgements.markdown */, + 46EB2E000002B0 /* Pods-KaMPStarteriOS-acknowledgements.plist */, + 46EB2E000002D0 /* Pods-KaMPStarteriOS-dummy.m */, + 46EB2E000002A0 /* Pods-KaMPStarteriOS-frameworks.sh */, 46EB2E00000260 /* Pods-KaMPStarteriOS-Info.plist */, 46EB2E00000280 /* Pods-KaMPStarteriOS-umbrella.h */, 46EB2E00000250 /* Pods-KaMPStarteriOS.debug.xcconfig */, @@ -193,7 +195,7 @@ buildRules = ( ); dependencies = ( - 46EB2E00000300 /* PBXTargetDependency */, + 46EB2E00000310 /* PBXTargetDependency */, ); name = "Pods-KaMPStarteriOS"; productName = "Pods-KaMPStarteriOS"; @@ -238,7 +240,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 46EB2E000002E0 /* [CP-User] Build shared */ = { + 46EB2E000002F0 /* [CP-User] Build shared */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -255,18 +257,18 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 46EB2E000002D0 /* Pods-KaMPStarteriOS-dummy.m in Sources */, + 46EB2E000002E0 /* Pods-KaMPStarteriOS-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 46EB2E00000300 /* PBXTargetDependency */ = { + 46EB2E00000310 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = shared; target = 8777C9F6889E59EFFD631D80AEE9048B /* shared */; - targetProxy = 46EB2E000002F0 /* PBXContainerItemProxy */; + targetProxy = 46EB2E00000300 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ diff --git a/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-Debug-input-files.xcfilelist b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-Debug-input-files.xcfilelist new file mode 100644 index 00000000..e925dba2 --- /dev/null +++ b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-Debug-input-files.xcfilelist @@ -0,0 +1,3 @@ +${PODS_ROOT}/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks.sh +${PODS_ROOT}/../../shared/build/cocoapods/framework/shared.framework +${PODS_ROOT}/../../shared/build/cocoapods/framework/shared.framework.dSYM \ No newline at end of file diff --git a/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-Debug-output-files.xcfilelist b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-Debug-output-files.xcfilelist new file mode 100644 index 00000000..5765781e --- /dev/null +++ b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-Debug-output-files.xcfilelist @@ -0,0 +1,2 @@ +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared.framework +${DWARF_DSYM_FOLDER_PATH}/shared.framework.dSYM \ No newline at end of file diff --git a/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-Release-input-files.xcfilelist b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-Release-input-files.xcfilelist new file mode 100644 index 00000000..e925dba2 --- /dev/null +++ b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-Release-input-files.xcfilelist @@ -0,0 +1,3 @@ +${PODS_ROOT}/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks.sh +${PODS_ROOT}/../../shared/build/cocoapods/framework/shared.framework +${PODS_ROOT}/../../shared/build/cocoapods/framework/shared.framework.dSYM \ No newline at end of file diff --git a/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-Release-output-files.xcfilelist b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-Release-output-files.xcfilelist new file mode 100644 index 00000000..5765781e --- /dev/null +++ b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks-Release-output-files.xcfilelist @@ -0,0 +1,2 @@ +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared.framework +${DWARF_DSYM_FOLDER_PATH}/shared.framework.dSYM \ No newline at end of file diff --git a/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks.sh b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks.sh new file mode 100755 index 00000000..48c760bc --- /dev/null +++ b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS-frameworks.sh @@ -0,0 +1,173 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +function on_error { + echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" +} +trap 'on_error $LINENO' ERR + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + elif [ -L "${binary}" ]; then + echo "Destination binary is symlinked..." + dirname="$(dirname "${binary}")" + binary="${dirname}/$(readlink "${binary}")" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + +# Copies the bcsymbolmap files of a vendored framework +install_bcsymbolmap() { + local bcsymbolmap_path="$1" + local destination="${BUILT_PRODUCTS_DIR}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identity + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=1 +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${PODS_ROOT}/../../shared/build/cocoapods/framework/shared.framework" + install_dsym "${PODS_ROOT}/../../shared/build/cocoapods/framework/shared.framework.dSYM" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${PODS_ROOT}/../../shared/build/cocoapods/framework/shared.framework" + install_dsym "${PODS_ROOT}/../../shared/build/cocoapods/framework/shared.framework.dSYM" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS.debug.xcconfig b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS.debug.xcconfig index c22a2986..ac71c4fa 100644 --- a/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS.debug.xcconfig +++ b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS.debug.xcconfig @@ -1,6 +1,7 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../shared/build/cocoapods/framework" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -framework "shared" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -l"c++" -framework "shared" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS.release.xcconfig b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS.release.xcconfig index c22a2986..ac71c4fa 100644 --- a/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS.release.xcconfig +++ b/ios/Pods/Target Support Files/Pods-KaMPStarteriOS/Pods-KaMPStarteriOS.release.xcconfig @@ -1,6 +1,7 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../shared/build/cocoapods/framework" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -framework "shared" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -l"c++" -framework "shared" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/ios/Pods/Target Support Files/shared/shared.xcconfig b/ios/Pods/Target Support Files/shared/shared.xcconfig index 309e8f8a..3483a8e4 100644 --- a/ios/Pods/Target Support Files/shared/shared.xcconfig +++ b/ios/Pods/Target Support Files/shared/shared.xcconfig @@ -8,6 +8,7 @@ KOTLIN_TARGET[sdk=iphonesimulator*] = ios_x64 KOTLIN_TARGET[sdk=macosx*] = macos_x64 KOTLIN_TARGET[sdk=watchos*] = watchos_arm KOTLIN_TARGET[sdk=watchsimulator*] = watchos_x86 +OTHER_LDFLAGS = $(inherited) -l"c++" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index f594be0f..160fa677 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -2,11 +2,10 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { kotlin("multiplatform") - kotlin("native.cocoapods") + id("co.touchlab.native.cocoapods") id("kotlinx-serialization") id("com.android.library") id("com.squareup.sqldelight") - id("co.touchlab.kotlinxcodesync") } android { @@ -29,9 +28,10 @@ kotlin { }else{ iosX64("ios") } - targets.getByName("ios").compilations["main"].kotlinOptions.freeCompilerArgs += "-Xobjc-generics" + targets.getByName("ios").compilations["main"].kotlinOptions.freeCompilerArgs += + listOf("-Xobjc-generics", "-Xg0") - version = "1.0" + version = "1.1" sourceSets["commonMain"].dependencies { implementation(kotlin("stdlib-common", Versions.kotlin)) @@ -86,14 +86,10 @@ kotlin { implementation(Deps.ktor.iosSerialization) } - cocoapods { + cocoapodsext { summary = "Common library for the KaMP starter kit" homepage = "https://github.com/touchlab/KaMPStarter" - } - - xcodeSync { - projectPath = "../ios/KaMPStarteriOS.xcodeproj" - target = "KaMPStarteriOS" + isStatic = false } } diff --git a/shared/shared.podspec b/shared/shared.podspec index c85929ec..4ff630cf 100644 --- a/shared/shared.podspec +++ b/shared/shared.podspec @@ -1,14 +1,14 @@ Pod::Spec.new do |spec| spec.name = 'shared' - spec.version = '1.0' + spec.version = '1.1' spec.homepage = 'https://github.com/touchlab/KaMPStarter' spec.source = { :git => "Not Published", :tag => "Cocoapods/#{spec.name}/#{spec.version}" } spec.authors = '' spec.license = '' spec.summary = 'Common library for the KaMP starter kit' - spec.static_framework = true - spec.vendored_frameworks = "build/cocoapods/framework/#{spec.name}.framework" + + spec.vendored_frameworks = "build/cocoapods/framework/shared.framework" spec.libraries = "c++" spec.module_name = "#{spec.name}_umbrella" diff --git a/shared/src/iosMain/kotlin/co/touchlab/kampstarter/KoiniOS.kt b/shared/src/iosMain/kotlin/co/touchlab/kampstarter/KoiniOS.kt index a9dedbd8..80b1071e 100644 --- a/shared/src/iosMain/kotlin/co/touchlab/kampstarter/KoiniOS.kt +++ b/shared/src/iosMain/kotlin/co/touchlab/kampstarter/KoiniOS.kt @@ -8,6 +8,6 @@ import org.koin.dsl.module fun initKoin() = initKoin{} actual val platformModule = module { - single { NativeSqliteDriver(KampstarterDb.Schema, "kampstarterdb") } single { AppleSettings.Factory().create("KAMPSTARTER_SETTINGS") } + single { NativeSqliteDriver(KampstarterDb.Schema, "kampstarterdb") } } \ No newline at end of file