Comments (8)
Hello, @mathemandy! First of all, I have to remind you about Kotlin/Native issue tracker migration(see details here #4079). About this particular issue - can you clarify, what does the project gradle script look like? Usually, the Xcode project contains a custom script phase, calling ./gradlew
. It should utilize the same Kotlin version as the build from the CLI of Android Studio.
from kotlin-native.
Thanks for the assistance. I'll use the issue tracker next time.
`
/bin/sh -c /Users/androiddeveloper/Library/Developer/Xcode/DerivedData/uduxIOS-agxepfzgqhwritfjkwoqrmjbqemc/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/SharedCode.build/Script-1766B4386E9A9ECAB9A5E5DC74379E50.sh
REPO_ROOT="$PODS_TARGET_SRCROOT"
"$REPO_ROOT/../live/gradlew" -p "$REPO_ROOT" :SharedCode:syncFramework -Pkotlin.native.cocoapods.target=$KOTLIN_TARGET -Pkotlin.native.cocoapods.configuration=$CONFIGURATION -Pkotlin.native.cocoapods.cflags="$OTHER_CFLAGS" -Pkotlin.native.cocoapods.paths.headers="$HEADER_SEARCH_PATHS" -Pkotlin.native.cocoapods.paths.frameworks="$FRAMEWORK_SEARCH_PATHS"
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Task :buildSrc:compileKotlin UP-TO-DATE
Task :buildSrc:compileJava NO-SOURCE
Task :buildSrc:compileGroovy NO-SOURCE
Task :buildSrc:pluginDescriptors UP-TO-DATE
Task :buildSrc:processResources NO-SOURCE
Task :buildSrc:classes UP-TO-DATE
Task :buildSrc:inspectClassesForKotlinIC UP-TO-DATE
Task :buildSrc:jar UP-TO-DATE
Task :buildSrc:assemble UP-TO-DATE
Task :buildSrc:compileTestKotlin NO-SOURCE
Task :buildSrc:pluginUnderTestMetadata UP-TO-DATE
Task :buildSrc:compileTestJava NO-SOURCE
Task :buildSrc:compileTestGroovy NO-SOURCE
Task :buildSrc:processTestResources NO-SOURCE
Task :buildSrc:testClasses UP-TO-DATE
Task :buildSrc:test NO-SOURCE
Task :buildSrc:validatePlugins UP-TO-DATE
Task :buildSrc:check UP-TO-DATE
Task :buildSrc:build UP-TO-DATE
Configure project :SharedCode
Kotlin Multiplatform Projects are an Alpha feature.
Task :SharedCode:generateDefFirebaseAuth UP-TO-DATE
Task :SharedCode:cinteropFirebaseAuthIos FAILED
Exception in thread "main" java.lang.Error: /var/folders/c0/n7gzryts5yj_rp9jw65w22pw0000gq/T/tmp1667905949200127761.m:1:9: fatal error: module 'FirebaseAuth' not found
at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:152)
at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesASTFiles(ModuleSupport.kt:67)
at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesInfo(ModuleSupport.kt:13)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.buildNativeLibrary(main.kt:499)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:264)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:72)
at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:19)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:37)
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':SharedCode:cinteropFirebaseAuthIos'.
Process 'command '/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 19s
`
This task fails in task :SharedCode:cinteropFirebaseAuthIos from Xcode
`12:18:04: Executing task ':SharedCode:cinteropFirebaseAuthIos'...
Executing tasks: [:SharedCode:cinteropFirebaseAuthIos] in project /Users/androiddeveloper/Documents/udux_android/live
Task :buildSrc:extractPrecompiledScriptPluginPlugins UP-TO-DATE
Task :buildSrc:generateExternalPluginSpecBuilders UP-TO-DATE
Task :buildSrc:compilePluginsBlocks UP-TO-DATE
Task :buildSrc:generatePrecompiledScriptPluginAccessors UP-TO-DATE
Task :buildSrc:configurePrecompiledScriptDependenciesResolver
Task :buildSrc:generateScriptPluginAdapters UP-TO-DATE
Task :buildSrc:compileKotlin UP-TO-DATE
Task :buildSrc:compileJava NO-SOURCE
Task :buildSrc:compileGroovy NO-SOURCE
Task :buildSrc:pluginDescriptors UP-TO-DATE
Task :buildSrc:processResources UP-TO-DATE
Task :buildSrc:classes UP-TO-DATE
Task :buildSrc:inspectClassesForKotlinIC UP-TO-DATE
Task :buildSrc:jar UP-TO-DATE
Task :buildSrc:assemble UP-TO-DATE
Task :buildSrc:compileTestKotlin NO-SOURCE
Task :buildSrc:pluginUnderTestMetadata UP-TO-DATE
Task :buildSrc:compileTestJava NO-SOURCE
Task :buildSrc:compileTestGroovy NO-SOURCE
Task :buildSrc:processTestResources NO-SOURCE
Task :buildSrc:testClasses UP-TO-DATE
Task :buildSrc:test NO-SOURCE
Task :buildSrc:validatePlugins UP-TO-DATE
Task :buildSrc:check UP-TO-DATE
Task :buildSrc:build UP-TO-DATE
Configuration on demand is an incubating feature.
Configure project :SharedCode
Kotlin Multiplatform Projects are an Alpha feature.
Task :SharedCode:generateDefFirebaseAuth UP-TO-DATE
Task :SharedCode:generateDummyFramework
Task :SharedCode:podspec
Generated a podspec file at: /Users/androiddeveloper/Documents/udux_android/SharedCode/SharedCode.podspec.
To include it in your Xcode project, check that the following dependency snippet exists in your Podfile:
pod 'SharedCode', :path => '/Users/androiddeveloper/Documents/udux_android/SharedCode'
Task :SharedCode:podGenIos
Task :SharedCode:podSetupBuildIos
Task :SharedCode:podBuildDependenciesIos
Task :SharedCode:cinteropFirebaseAuthIos
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.6/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 29s
7 actionable tasks: 6 executed, 1 up-to-date
12:18:34: Task execution finished ':SharedCode:cinteropFirebaseAuthIos'.`
The task runs successfully when built from Android Studio or Intellij
from kotlin-native.
@artdfel
I have attached two logs showing failure on build on xcode and success on.
The build script is autogenerated from the podspec in android Studio.
Any help would be appreciated.
from kotlin-native.
As far as I can see, the problem is not directly connected to the Kotlin version, it's rather about Xcode custom script working incorrectly for a cinterop task. I cannot say anything specific at the moment, but this seems similar to #3588.
Just for the record, in my case cinterop worked correctly for /samples/cocoapods
with AFNetworking pod changed to FirebaseAuth one.
from kotlin-native.
Showing All Messages The Kotlin/Native distribution used in this build does not provide the standard library. Make sure that the 'kotlin.native.home' property points to a valid Kotlin/Native distribution.
i get this error when i try to build /samples/cocoapods
and yes, i followed everything on the readMe.
from kotlin-native.
Showing All Messages The Kotlin/Native distribution used in this build does not provide the standard library. Make sure that the 'kotlin.native.home' property points to a valid Kotlin/Native distribution.
i get this error when i try to build
/samples/cocoapods
and yes, i followed everything on the readMe.
i just changed this in the gradle.properties
org.jetbrains.kotlin.native.home=../../../dist
to my location of kotlin-native.
Ill update if i get around this
from kotlin-native.
@artdfel i was able to build my library in the sample code, so whats left is my own Ios Project. Still cant find FirebaseAuth on xcode in my project.
ill probably have to create a new ios project and start anew
from kotlin-native.
@artdfel i was able to build my library in the sample code, so whats left is my own Ios Project. Still cant find FirebaseAuth on xcode in my project.
ill probably have to create a new ios project and start anew
I found the issue.
In my PodFile, i commented out the line use_frameworks!
, i must have done that for another dependency.
Thanks for the assistance. its all sorted now. I can access the dependency correctly on IOS(Xcode) and Android Studio/Intellij
from kotlin-native.
Related Issues (20)
- Important: please use YouTrack for bugs and feature requests HOT 7
- pods framework not work in xcode HOT 10
- How to access a method - Kotlin Shared DLL using CPointer HOT 3
- How to interact with kotlin collections from C/C++ code? HOT 4
- Code of cmake project, compile error error: invalid use of incomplete type 'std::filesystem::__cxx11::filesystem_error' HOT 1
- How can I invoke win32 function pointer with _stdcall type HOT 3
- Not Working SiwftyUI rendering when library implemented to project
- Are there any way for modify Other Link Flag on Xcode by Gradle? HOT 1
- How I can pass String to variable type URL? HOT 2
- Platform iOS package is missing HOT 2
- Can not build ios app into device because "embedded framework 'SharedCode.framework' was built for iOS Simulator." HOT 3
- Please read the text below
- Please read the text below HOT 1
- Why publishLibraryVariants don't work ? HOT 1
- Compilation failed: llvm.llvm (initialization failure) NoClassDefFoundError: llvm.llvm HOT 5
- package of cinterop dependency (Swift framework) not found in the iOSMain sources set HOT 1
- Retrieving package behind authenticated proxy fails 407 HOT 7
- Objective-C interoperability architecture issue Undefined symbols for architecture x86_64 HOT 3
- ld: framework not found AFNetworking HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kotlin-native.