I'm trying to build an iOS project in command line via xcodebuild.
OS: Mac OS 15.1 beta
Xcode: Xcode 16
Creating a new iOS project and trying to run xcodebuild results in this error. No other dependencies, no frameworks added.
ld: building for 'iOS', but linking in dylib (/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/lib/libobjc.A.tbd) built for 'macOS macCatalyst zippered(macOS/Catalyst)'
My initial plan was to do this with a VisionOS project, but for some reason, I'm getting errors like this for both platforms and brand new projects.
Any pointers as to what is referencing the MacOS SDK and how I can fix this would be helpful.
Complete log:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk iphoneos -configuration Release -scheme iphonedummy build CODE_SIGNING_ALLOWED=NO -verbose
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
Build settings from command line:
CODE_SIGNING_ALLOWED = NO
SDKROOT = iphoneos18.0
Prepare packages
ComputeTargetDependencyGraph
note: Building targets in dependency order
note: Target dependency graph (1 target)
Target 'iphonedummy' in project 'iphonedummy' (no dependencies)
GatherProvisioningInputs
CreateBuildDescription
// Removed a block for length.
ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk -x c -c /dev/null
// Removed another block for length.
Build description signature: dc5e0c08dfce007b98c7bce87acea5fe
Build description path: /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/XCBuildData/dc5e0c08dfce007b98c7bce87acea5fe.xcbuilddata
ClangStatCache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos18.0-22A3362-8ec3fe4dca91fa9a941eaa2d5faad0e4.sdkstatcache
cd /Users/sravankaruturi/dev/iphonedummy/iphonedummy.xcodeproj
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk -o /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos18.0-22A3362-8ec3fe4dca91fa9a941eaa2d5faad0e4.sdkstatcache
ProcessInfoPlistFile /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos/iphonedummy.app/Info.plist /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/empty-iphonedummy.plist (in target 'iphonedummy' from project 'iphonedummy')
cd /Users/sravankaruturi/dev/iphonedummy
builtin-infoPlistUtility /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/empty-iphonedummy.plist -producttype com.apple.product-type.application -genpkginfo /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos/iphonedummy.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -additionalcontentfile /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/assetcatalog_generated_info.plist -requiredArchitecture arm64 -o /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos/iphonedummy.app/Info.plist
Ld /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos/iphonedummy.app/iphonedummy normal (in target 'iphonedummy' from project 'iphonedummy')
cd /Users/sravankaruturi/dev/iphonedummy
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Xlinker -reproducible -target arm64-apple-ios18.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk -Os -L/Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/EagerLinkingTBDs/Release-iphoneos -L/Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos -F/Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/EagerLinkingTBDs/Release-iphoneos -F/Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos -filelist /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/Objects-normal/arm64/iphonedummy.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/Objects-normal/arm64/iphonedummy_lto.o -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/Objects-normal/arm64/iphonedummy.swiftmodule -Xlinker -dependency_info -Xlinker /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Intermediates.noindex/iphonedummy.build/Release-iphoneos/iphonedummy.build/Objects-normal/arm64/iphonedummy_dependency_info.dat -o /Users/sravankaruturi/Library/Developer/Xcode/DerivedData/iphonedummy-bwpzemojmpkzehhhkxqtjearnxkl/Build/Products/Release-iphoneos/iphonedummy.app/iphonedummy
ld: building for 'iOS', but linking in dylib (/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/lib/libobjc.A.tbd) built for 'macOS macCatalyst zippered(macOS/Catalyst)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Post
Replies
Boosts
Views
Activity
With WWDC 24, I was excited to see that apple is bringing their APIs from Vision OS to iOS.
I tried using the Object Anchoring component in Reality Composer Pro. Which this works with a Vision Pro, it looks like the entity will spawn at origin if we run the same on iOS and the object anchoring doesn't seem to work.
Is this intended? Below is how I'm doing this.
I added an Anchoring component and added the .referenceObject file I trained using CreateML.
This is the code I'm using to load this scene in.
// GrootView.swift
// ARTest-New
//
// Created by Sravan Karuturi on 6/10/24.
//
import SwiftUI
import RealityKit
import Box
struct GrootView: View {
@StateObject private var grootVM = GrootViewModel()
@State private var ent: Entity? = nil
@State var anchor: Entity? = nil
@State var wallAnchor: Entity? = nil
@State var floorAnchor: Entity? = nil
var body: some View {
RealityView{ content in
#if os(iOS)
await content.setupWorldTracking()
content.camera = .worldTracking
#endif
ent = try? await Entity(named: "Box", in: boxBundle)
print(ent?.children)
anchor = ent?.findEntity(named: "ObjectAnchor")
wallAnchor = ent?.findEntity(named: "WallAnchor")
floorAnchor = ent?.findEntity(named: "FloorAnchor")
let updateSum = content.subscribe(to: SceneEvents.Update.self){ event in
if let anc = anchor, anc.isAnchored {
print("Found Item")
}
if let anc = floorAnchor, anc.isAnchored {
print("Found Floor")
}
if let anc = wallAnchor, anc.isAnchored {
print("Wall Anchor")
}
}
content.add(ent!)
}
}
}
#Preview {
GrootView()
}
While, something similar seems to work on visionOS, the same doesn't seem to work with iOS.
When I run this app, we see all the children and the Found Item is printed constantly even when we don't have the item in the scene.
Not really sure if this is just not supported yet on iOS ( I really hope that's not the case ) or if I messed up something somehow