I have an 'Independent watchOS' project created in Xcode. To this project, I have linked few static libraries (as xcframework). The architecture is set to 'x86_64'. I am able to successfully build this project and deploy it on the watch simulator. The code inside the static libraries also get called and things work fine. However, when I try to build the same project from command-line, it doesnt work and fails with multiple errors.
Command used :
xcodebuild -target "TWWatchOSTemplateProj WatchKit App" -configuration Debug -destination 'platform=watchOS Simulator,arch=x86_64' build
Error :
/Users/abhishek.mohata/TW_Test_Projects/TWKshetrapalNative/TWLibs/TWBrahmaClient.xcframework:1:1: error: While building for watchOS, no library for this platform was found in '/Users/abhishek.mohata/TW_Test_Projects/TWKshetrapalNative/TWLibs/TWBrahmaClient.xcframework'. (in target 'TWWatchOSTemplateProj WatchKit Extension' from project 'TWWatchOSTemplateProj') warning: None of the architectures in ARCHS (x86_64) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64_32, armv7k). (in target 'TWWatchOSTemplateProj WatchKit Extension' from project 'TWWatchOSTemplateProj') error: No profiles for 'com.tally.TWWatchOSTemplateProj.watchkitapp' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.tally.TWWatchOSTemplateProj.watchkitapp'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'TWWatchOSTemplateProj WatchKit App' from project 'TWWatchOSTemplateProj') warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures (in target 'TWWatchOSTemplateProj WatchKit App' from project 'TWWatchOSTemplateProj') ** BUILD FAILED **
When built from command-line, why is the error related to architecture comes while the same works from xcode ? Also, is there anything to be added to the command for signing as the details are already present in the xcodeproj.