Xcode 11 - Adding New Target For Apple Watch - apple-watch

I have created a new Target for Apple Watch in new Xcode 11. But After creating it I am getting the following error.
No architectures to compile for (ARCHS=i386, VALID_ARCHS=armv7s arm64 armv7).

Solved :
I got mine to compile by resetting Valid Architectures in the watchkit extension to $(ARCHS_STANDARD) which converts to armv7k. Seemed to work for me so far.

Related

Unable to load standard library for target arm64 error in XCode on Macbook Air M1

On new Mac with M1 chip get the error after the build of React Native app in XCode 12.4:
unable to load standard library for target 'arm64-apple-ios8.0'
failed to build module 'SciChart' from its module interface; the compiler that produced it, 'Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)'
What I already tried:
Reinstall XCode;
Changed Swift Language Version;
Deleted VALID_ARCHS reference according Xcode 12 Beta 2 - unable to load standard library for target 'arm64-apple-ios14.0-simulator'
On Macbook with intel chip there are no errors with the same app. And both of my Macbook have the same swift version:
Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
Target: x86_64-apple-darwin20.3.0
Can you help me please!
Guys if you have old React Native projects just build it on Xcode with rosetta and you will save your nerves and time. I was looking the decision all week, but in the total it was so easy, just run Xcode with rosetta on M1: please try to open Xcode through Rosetta - Right click on Xcode in applications folder -> Get Info -> set Open with Rosetta to true

Could not find module 'SJSegmentedScrollView' for architecture 'armv7'; found: arm64

The problem shows when I try to build to real device as simulator. But, there's no problem when I build in simulator.
XCode : 10.2.1
Swift : 4.0
iOS : 10.3.3
Can you check if you are using Debug or Release to build? I've had a similar issue before with other modules, for example you can run the Onfido SDK on simulators on Debug but not on Release. By the looks of this error you are using the Release SDK.

update Xcode to 10.2.1 run project crash with problem dyld: Library not loaded: #rpath/libswiftCore.dylib

I have a project that was created with Xcode 10, Objective-C, and Swift 4.0 and now upgraded to Xcode 10.2.1.
Error reporting for each run.
I have set Always Embed Swift Standard Libraries to YES
Add #executable_path/Frameworks to "Runpath Search Paths"
These methods don't resolve the issue.
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /private/var/containers/Bundle/Application/48371FB5-6A90-4D14-9D65-C7AB5DCAC1A1/one mini.app/Frameworks/Framework152x.framework/Framework152x
Reason: image not found
Actually, the problem is the Framework152x.framework is developed in Swift with Xcode version below 10.2. If your project is built with Xcode 10 with Framework152x.framework means Framework152x.framework runtime is swift 4.2. But if you build your project in Xcode 10.2.1 this issue will occur. Because the XCode 10.2.1 has swift 5 Runtime but Framework152x.framework is expecting swift 4.2. You can resolve this problem only by using Framework152x.framework which needs to be built either in Xcode 10.2 or 10.2.1
I had the same or very similar issue with UI tests failing due to their deployment target being set to iOS 12 and the app under test being set to iOS 10. When I set them both to iOS 10 the UI tests would successfully launch (the app always launched fine). Not sure if that's the problem you're having as you've not mentioned UI tests but perhaps you neglected to mention that :)

Cannot create the archive file in ios 6

i have created iphone application. and i took the file and published the it in app store. But i have upgraded my xcode and changed the os to 4.3 - 6.0 . Now when im trying to archive the project , gives me this error.
Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1
I checked by my architecture & compiler . they are,
Architecture - Standard(armv7,armv7s)
Compiler - LLVM GCC 4.2
What would be the problem ???
Remove armv7s from there and check
Check what value is in "Build Active Architectures Only" . If No, set that to Yes and try to build.

xcode invalid archive in organizer

i get message during archive validation. i've tried most of solutions from other questions. but still failed. (It was ok when i submit it last time in xcode 4.02, then i get rejected. i edited some image and .m file(not project settings).
my project Build settings:
Architectures->standard (armv7) - $(ARCH_STANDARD_32_BIT)
Base sdk->Latest ios(ios 5.0)
valid Architectures armv6 armv7 arvm7f armv7k
Build active architecture only->no
ios deployment target: ios3.0
i've tried reinstalling xcode and make sure unix is checked, 5 times.
i've tried install back to xcode 4.02, but the same message as xcode 4.2
i've tried reinstall cocos2d
i've tried to set the llvm/gcc to gcc only
warning message 1:
Project Clean-Up Outdated settings should be updated.
when i click it. one is to set gcc to llve-gcc, another is to 'Enable compiler warning for missing Function Prototypes. ' I clicked cancel
warning message 2:
Check dependencies
[BWARN]warning: iPhone apps with a deployment target lower than 4.3 should include an armv6 architecture (current IPHONEOS_DEPLOYMENT_TARGET = "4.1", ARCHS = "armv7").
warning 3:
Validate /Users/lifesucks/Library/Developer/Xcode/DerivedData/FishvsBirdsLite-frctqlpldaogcjebgvxkvvmsehie/ArchiveIntermediates/FishvsBirdsLite/InstallationBuildProductsLocation/Applications/FishvsBirdsLite.app
cd "/Users/lifesucks/my app/Fish vs Birds/FishvsBirdsLite"
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv PRODUCT_TYPE com.apple.product-type.application
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation /Users/lifesucks/Library/Developer/Xcode/DerivedData/FishvsBirdsLite-frctqlpldaogcjebgvxkvvmsehie/ArchiveIntermediates/FishvsBirdsLite/InstallationBuildProductsLocation/Applications/FishvsBirdsLite.app
2011-06-14 01:30:10.948 Validation[8609:607] *** Warning: Defaulting to the standard codesign tool
warning: iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6 (-19033)
Unable to validate your application. - (null)
warning: There is no codesign_wrapper executable. Please reinstall the Xcode developer tools. (-19058)
Unable to validate your application. - (null)
the error message in organizer is:
the archive is invalid. /var/folders/H5/.../app.ipa does not exist.
I actually don't know why, but it works now. I reinstall back to xcode 4.0.2. then recreated a project, copied over all my classes. i assume that the problem is 'Architectures->standard (armv7)', in xcode 4.0.2 the Architectures is standard armv6/armv7, maybe it's because of cocos2d compatibility to the new version i don't know. anyway if you encounter the same problem, just install back to non-beta and create a new project (since the original setting of 'Architecture' will be modified to 'armv7 standard'. ) hope it helps.
This happened to me when I updated to Xcode 4.2. I went back to the latest non-Beta Xcode version to fix it. The key is, when uninstalling Xcode, you must do it via the following command in Terminal:
sudo /Developer/Library/uninstall-devtools –mode=all
This takes a few minutes. But when it's done, install the non-Beta Xcode (4.0.2 at this time), and then RESTART before using it. Worked for me.
Remove iphoneossimulator from supported platforms for the distribution/release build configuration. That is if you have it.
You cannot have that for distribution, it is only for your debug configurations.
Check the image below for distribution configuration (ignore release config).