-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Description
I am using Xcode 26 with Swift 6.2, i have this code
import UIKit
import SwiftGodot
import FirebaseCore
import FirebaseAI
#initSwiftExtension(
cdecl: "swift_entry_point",
types: [MyLibrary.self]
)
@Godot
class MyLibrary: RefCounted {
@Signal var valueChanged: SignalWithArguments<String>
var ai: FirebaseAI!
@Callable
func initFirebase(){
FirebaseApp.configure()
}
@Callable
func ask(prompt: String) {
if ai == nil {
ai = FirebaseAI.firebaseAI(backend: .googleAI())
}
let model = ai.generativeModel(modelName: "gemini-2.5-flash")
Task {
do {
let response = try await model.generateContent(prompt)
self.valueChanged.emit(response.text ?? "No text in response.")
} catch {
self.valueChanged.emit("Error: \(error.localizedDescription)")
}
}
}
}
but i get error saying
2025-10-01 20:53:38.205 xcodebuild[12304:208315] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
/Users/transformhub/Downloads/Godot/MyLibrary/Sources/MyLibrary/MyLibrary.swift:30:9: error: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure
Task {
^
/Users/transformhub/Downloads/Godot/MyLibrary/Sources/MyLibrary/MyLibrary.swift:33:22: note: closure captures 'self' which is accessible to code in the current task
self.valueChanged.emit(response.text ?? "No text in response.")
^
Failed frontend command:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/transformhub/Downloads/Godot/MyLibrary/Sources/MyLibrary/MyLibrary.swift -emit-dependencies-path /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/MyLibrary.build/debug-iphoneos/MyLibrary.build/Objects-normal/arm64/MyLibrary.d -emit-const-values-path /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/MyLibrary.build/debug-iphoneos/MyLibrary.build/Objects-normal/arm64/MyLibrary.swiftconstvalues -emit-reference-dependencies-path /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/MyLibrary.build/debug-iphoneos/MyLibrary.build/Objects-normal/arm64/MyLibrary.swiftdeps -serialize-diagnostics-path /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/MyLibrary.build/debug-iphoneos/MyLibrary.build/Objects-normal/arm64/MyLibrary.dia -target arm64-apple-ios17.0 -load-resolved-plugin /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/swift/host/plugins/libFoundationMacros.dylib\#/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/swift-plugin-server\#FoundationMacros -load-resolved-plugin /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/swift/host/plugins/libObservationMacros.dylib\#/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/swift-plugin-server\#ObservationMacros -load-resolved-plugin /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/swift/host/plugins/libPreviewsMacros.dylib\#/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/swift-plugin-server\#PreviewsMacros -load-resolved-plugin \#/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug/SwiftGodotMacroLibrary\#SwiftGodotMacroLibrary -load-resolved-plugin /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/swift/host/plugins/libSwiftMacros.dylib\#/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/swift-plugin-server\#SwiftMacros -load-resolved-plugin /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/swift/host/plugins/libSwiftUIMacros.dylib\#/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/swift-plugin-server\#SwiftUIMacros -disable-implicit-swift-modules -Xcc -fno-implicit-modules -Xcc -fno-implicit-module-maps -explicit-swift-module-map-file /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/MyLibrary.build/debug-iphoneos/MyLibrary.build/Objects-normal/arm64/MyLibrary-dependencies-1.json -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.0.sdk -I /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos -Isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/PackageFrameworks -F /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.0.sdk/Developer/Library/Frameworks -no-color-diagnostics -Xcc -fno-color-diagnostics -enable-testing -g -debug-info-format\=dwarf -dwarf-version\=4 -module-cache-path /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules -suppress-warnings -swift-version 6 -enforce-exclusivity\=checked -Onone -D SWIFT_PACKAGE -D DEBUG -D SWIFT_MODULE_RESOURCE_BUNDLE_UNAVAILABLE -D Xcode -serialize-debugging-options -load-plugin-executable /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug/SwiftGodotMacroLibrary\#SwiftGodotMacroLibrary -const-gather-protocols-file /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/MyLibrary.build/debug-iphoneos/MyLibrary.build/Objects-normal/arm64/MyLibrary_const_extract_protocols.json -enable-experimental-feature DebugDescriptionMacro -empty-abi-descriptor -validate-clang-modules-once -clang-build-session-file /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/ModuleCache.noindex/Session.modulevalidation -Xcc -working-directory -Xcc /Users/transformhub/Downloads/Godot/MyLibrary/.swiftpm/xcode -enable-anonymous-context-mangled-names -file-compilation-dir /Users/transformhub/Downloads/Godot/MyLibrary/.swiftpm/xcode -Xcc -fmodule-map-file\=/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos/GDExtension.modulemap -Xcc -fmodule-map-file\=/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos/GoogleUtilities-NSData.modulemap -Xcc -fmodule-map-file\=/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos/GoogleUtilities-Environment.modulemap -Xcc -fmodule-map-file\=/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos/third-party-IsAppEncrypted.modulemap -Xcc -fmodule-map-file\=/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos/GoogleUtilities-Logger.modulemap -Xcc -fmodule-map-file\=/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos/FirebaseCoreExtension.modulemap -Xcc -fmodule-map-file\=/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos/FirebaseCore.modulemap -Xcc -fmodule-map-file\=/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos/FirebaseAuthInterop.modulemap -Xcc -fmodule-map-file\=/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/GeneratedModuleMaps-iphoneos/FirebaseAppCheckInterop.modulemap -Xcc -D_LIBCPP_HARDENING_MODE\=_LIBCPP_HARDENING_MODE_DEBUG -Xcc -ivfsstatcache -Xcc /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/SDKStatCaches.noindex/iphoneos26.0-23A339-81ce72e5b06c9602b9d30b56f2eed08a.sdkstatcache -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/MyLibrary.build/debug-iphoneos/MyLibrary.build/swift-overrides.hmap -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/checkouts/swift-syntax/Sources/_SwiftSyntaxCShims/include -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/checkouts/SwiftGodot/Sources/GDExtension/include -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/checkouts/GoogleUtilities/GoogleUtilities/NSData+zlib/Public -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/checkouts/GoogleUtilities/GoogleUtilities/Environment/Public -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/checkouts/GoogleUtilities/third_party/IsAppEncrypted/Public -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/checkouts/GoogleUtilities/GoogleUtilities/Logger/Public -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/checkouts/firebase-ios-sdk/FirebaseCore/Extension -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/checkouts/firebase-ios-sdk/FirebaseCore/Sources/Public -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/checkouts/firebase-ios-sdk/CoreOnly/Sources -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/checkouts/firebase-ios-sdk/FirebaseAuth/Interop/Public -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/checkouts/firebase-ios-sdk/FirebaseAppCheck/Interop/Public -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Products/debug-iphoneos/include -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/MyLibrary.build/debug-iphoneos/MyLibrary.build/DerivedSources-normal/arm64 -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/MyLibrary.build/debug-iphoneos/MyLibrary.build/DerivedSources/arm64 -Xcc -I/Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/MyLibrary.build/debug-iphoneos/MyLibrary.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG\=1 -no-auto-bridging-header-chaining -module-name MyLibrary -package-name mylibrary -frontend-parseable-output -disable-clang-spi -target-sdk-version 26.0 -target-sdk-name iphoneos26.0 -clang-target arm64-apple-ios26.0 -in-process-plugin-server-path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/libSwiftInProcPluginServer.dylib -parse-as-library -o /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Build/Intermediates.noindex/MyLibrary.build/debug-iphoneos/MyLibrary.build/Objects-normal/arm64/MyLibrary.o -index-unit-output-path /MyLibrary.build/debug-iphoneos/MyLibrary.build/Objects-normal/arm64/MyLibrary.o -index-store-path /Users/transformhub/Downloads/Godot/MyLibrary/.build/arm64-apple-ios/Index.noindex/DataStore -index-system-modules
** BUILD FAILED **
Failed to build iOS library
Metadata
Metadata
Assignees
Labels
No labels