aleksey.tomin
09/15/2020, 9:08 AMcocoapods
into build.gradle.kts
2. I’ve called build
3. I’ve called podspec
and library.podspec
was created
4. I’ve called podBuildDependenciesMacos
podSetupBuildMacos
- was created cocoapods dir with framework
5. I’ve called podInstall
- but was not pod into list: $ pod list
returns 0 pods were found
. What do I wrong?
How can I create library for use in Xcode?Kurt Renzo Acosta
09/15/2020, 9:10 AMpodspec
into the Podfile
?aleksey.tomin
09/15/2020, 10:51 AMPodfile
created by gradle plugin 😞
What I have to create?Liliia
09/15/2020, 1:39 PMaleksey.tomin
09/15/2020, 3:12 PMromtsn
09/15/2020, 3:38 PMaleksey.tomin
09/16/2020, 10:08 AMgradle build
and gradle podInstall
in kotlin-library
4. xcodebuild -scheme MacosCLI
in severalTargetsXcodeProject
-
#import "Headers/dummy.h"
^
/Users/atomin/Documents/external/multitarget-xcode-with-kotlin-cocoapods-sample/kotlin-library/build/cocoapods/framework/kotlin_library.framework/Headers/dummy.h:2:1: error: unknown type name 'FOUNDATION_EXPORT'
FOUNDATION_EXPORT double dummyVersionNumber;
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/dummy.h"
^
/Users/atomin/Documents/external/multitarget-xcode-with-kotlin-cocoapods-sample/kotlin-library/build/cocoapods/framework/kotlin_library.framework/Headers/dummy.h:5:1: error: unknown type name 'FOUNDATION_EXPORT'
FOUNDATION_EXPORT const unsigned char dummyVersionString[];
^
/Users/atomin/Documents/external/multitarget-xcode-with-kotlin-cocoapods-sample/severalTargetsXcodeProject/MacosCLI/main.swift:2:8: error: could not build Objective-C module 'kotlin_library'
import kotlin_library
^
What do I wrong?
PS:
$ gradle -version
Picked up JAVA_TOOL_OPTIONS: -Djava.awt.headless=true
------------------------------------------------------------
Gradle 6.6
------------------------------------------------------------
Build time: 2020-08-10 22:06:19 UTC
Revision: d119144684a0c301aea027b79857815659e431b9
Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 14 (Oracle Corporation 14+36-1461)
OS: Mac OS X 10.15.6 x86_64
$ xcodebuild -version
Xcode 11.7
Build version 11E801a
romtsn
09/16/2020, 10:11 AMpod install
in the root folder (where the Podfile is located) and then try to build or clean/build (sometimes this works from the 2nd time building for me)aleksey.tomin
09/16/2020, 10:17 AMpod install
works only in severalTargetsXcodeProject
$ pod install
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
[!] The Podfile contains command line tool target(s) (MacosCLI) which are attempting to integrate dynamic frameworks or libraries.
This may not behave as expected, because command line tools are usually distributed as a single binary and cannot contain their own dynamic dependencies.
But it doesn’t helpromtsn
09/16/2020, 10:29 AMaleksey.tomin
09/16/2020, 10:33 AMPods/
, run pod install
and xcodebuild -scheme MacosCLI
The same problemLiliia
09/16/2020, 4:51 PMgradle wrapper
command before executing step 4 in your description. Hope it helps.aleksey.tomin
09/17/2020, 5:48 AM$ pwd
.../multitarget-xcode-with-kotlin-cocoapods-sample
$ gradle clean build podInstall wrapper
... BUILD SUCCESSFUL
$ cd severalTargetsXcodeProject/
$ xcodebuild -scheme MacosCLI
...
#import "Headers/dummy.h"
^
/Users/atomin/Documents/external/multitarget-xcode-with-kotlin-cocoapods-sample/kotlin-library/build/cocoapods/framework/kotlin_library.framework/Headers/dummy.h:2:1: error: unknown type name 'FOUNDATION_EXPORT'
FOUNDATION_EXPORT double dummyVersionNumber;
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/dummy.h"
^
/Users/atomin/Documents/external/multitarget-xcode-with-kotlin-cocoapods-sample/kotlin-library/build/cocoapods/framework/kotlin_library.framework/Headers/dummy.h:5:1: error: unknown type name 'FOUNDATION_EXPORT'
FOUNDATION_EXPORT const unsigned char dummyVersionString[];
^
/Users/atomin/Documents/external/multitarget-xcode-with-kotlin-cocoapods-sample/severalTargetsXcodeProject/MacosCLI/main.swift:2:8: error: could not build Objective-C module 'kotlin_library'
import kotlin_library
^
** BUILD FAILED **