Seg fault creating archive for swift app - ios

At my wits end trying to archive a Swift iOS app for upload to the app store. The archive is failing with this error:
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
The app builds fine for development, and this is for an app that I've successfully archived/uploaded before. One thing that's changed is that my Apple developer account was migrated to a company account from an individual. I read somewhere that this issue can be solved by regenerating certificates/provisioning profiles, which I've done and are associated with the new team account. My question is whether anyone has run into this issue before in the context of migrating a individual to team account, and if people have any ideas for how to address this given that I've already tried new certificates/profiles.

Ok so after 24 hours of playing with certificates/profiles/cocoapods that I'll never get back, the solution was simply to go into "Build Settings" for the project and set "Enable Bitcode" to false.
Hopefully this helps anyone else who runs into this issue.

Related

Error after App Store Connect submision. ITMS-90562: Invalid Bundle

I have an App that integrates Framework A that I have developed.
Framework A has two (optional) weak-linked third-party dependencies, Framework X and Framework Y.
If I add both optional frameworks, everything works fine.
I don't need Framework Y in my App, so I'm adding to MyApp only Framework A and X.
Run on device works fine, upload to TestFlight works fine, but then I'm getting this email from App Store Connect, and build is marked as an Invalid Binary on App Store Connect.
App Store Connect Dear Developer,
We identified one or more issues with a recent delivery for your app,
Please correct the following issues, then upload again.
ITMS-90562: Invalid Bundle - One or more dynamic libraries that are
referenced by your app are not present in the dylib search path.
ITMS-90562: Invalid Bundle - The app submission can not be
successfully recompiled from bitcode due to missing symbols during
linking. You can try to reproduce and diagnose such issues locally by
following the instructions from:
https://developer.apple.com/library/archive/technotes/tn2432/_index.html
Best regards,
The App Store Team
I have tried editing Build Settings, but nothing happened, the error stays.
How I removed that error was by disabling Bitcode. Build Settings - Enable Bitcode - NO.
But that is not a solution for me.
I saw the same question on the Apple Developer forum. https://developer.apple.com/forums/thread/88814
After that, I tried to Validate App in the organizer, which went well. After that, I tried to export IPA for AdHoc distribution. But then I got an error:
ipatool failed with an exception: #<CmdSpec::NonZeroExitException: $ /Applications/Xcode.app/Contents/Developer/usr/bin/python3 /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -L /var/folders/cy/n0fltmsx671_s97kbtqvhcw80000gn/T/ipatool20220308-33623-uqn6vl/thinned-out/arm64/Payload/MyApp.app/Frameworks/FrameworkY.framework -L /var/folders/cy/n0fltmsx671_s97kbtqvhcw80000gn/T/ipatool20220308-33623-uqn6vl/thinned-out/arm64/Payload/MyApp.app/Frameworks/FrameworkX.framework --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk -o /var/folders/cy/n0fltmsx671_s97kbtqvhcw80000gn/T/ipatool20220308-33623-uqn6vl/thinned-out/arm64/Payload/MyApp.app/Frameworks/FrameworkA.framework/FrameworkA --generate-dsym /var/folders/cy/n0fltmsx671_s97kbtqvhcw80000gn/T/ipatool20220308-33623-uqn6vl/thinned-out/arm64/Payload/MyApp.app/Frameworks/FrameworkA.framework/FrameworkA.dSYM --strip-swift-symbols /var/folders/cy/n0fltmsx671_s97kbtqvhcw80000gn/T/ipatool20220308-33623-uqn6vl/thinned-in/arm64/Payload/MyApp.app/Frameworks/FrameworkA.framework/FrameworkA
I saw a similar error in this post: https://developer.apple.com/forums/thread/663112
If at export I disable Bitcode, I'm able to export the IPA file.
I'm not sure if I'm doing something wrong or is there a bug on Apple's side with Bitcode, but I hope that maybe someone had the same problem.
Removing Bitcode is not a good approach since it will not slim the ipas for installation.
What I'm doing at the moment is to use Xcode 13.2.1 for the upload of my project.

universal framework for distribution

Hello to all my dear friends, I look for your help once again. I created a personal framework and, following Internet guides, managed to run it simultaneously on both iosSimuletor and device. The problem occurs when, try to create the archive and then send to itunes connect. I pushed this error: clang: error: linker command failed with exit code 1 (use -v to see invocation). I started out from everything, changed from debug to release, other things found online. But nothing. Do you know what I have to change to the framwork project before I create the square? thank you

Unity4XC plug-in error

I'm using Unity 4.6 and Xcode. After updating Xcode to 7.1 version I'm getting this error while trying to run build for iphone:
Unexpected code bundle “Unity4XC.xcplugin”
The “Unity4XC.xcplugin” code bundle is not provided by Apple. Loading code not provided by Apple can have a negative effect on the safety and stability of Xcode or related tools.
I clicked on "Load Bundle".
Since then I'm getting this error:
Xcode quit unexpectedly while using the Unity4XC plug-in.
Click Reopen to open the application again. Click Report to see more detailed information and send a report to Apple.
I tried to open the project from within the Xcode program and it still not working.
If I try to open the project manually I get this error in xcode:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is there a connection to the problem?
What should try to do now?
Thanks.
Unfortunately, it's currently a known issue:
http://issuetracker.unity3d.com/issues/ios-build-and-run-doesnt-work-with-xcode-7-and-7-dot-1

Error when building to device - error: linker command failed with exit code 1 (use -v to see invocation)

I'm using Parse.com as my database, and I started with a template provided by the instructor of an online Udemy course (file is attached in this link):
http://www.robpercival.co.uk/parse-working-on-xcode-7swift-2/
When I build on iOS simulator, it works fine. However, I'd like to run a build on my device, but I've had some problems.
Initially, when trying to run the build on my device, an X-Code pop-up came up with the following message and an option to 'Fix Issue' -
"No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “com.parse.appdem” were found.
Xcode attempt to fix this issue. This will reset your code signing and provisioning settings to recommended values and resolve issues with signing identities and provisioning profiles."
When I click on "Fix Issue", I got the following -
"An App ID with Identifier 'com.parse.appdem' is not available. Please enter a different string."
At that point, my bundle identifier was 'com.parse.appdem', which was originally in the template. Someone told me that deleting '.parse' worked for him. I tried that, but now, in the ReadList.xcodeproj file, I'm getting the following error:
error: linker command failed with exit code 1 (use -v to see invocation)
Any idea on how to resolve this provisioning issue? Thanks!
This might not be an answer but, are you registered as an Apple developer? Because you can only test your apps on a device if you are registered as an Apple developer.
In other words, you gotta pay the $100 to test on devices.

swift-stdlib-tool failed with exit code 1

I have a problem with XCode since 2 days.
I upgraded my iOS Developer Account, and now I can't build on my iphone.
I have this when I try to build.
/Users/RpX/Library/Developer/Xcode/DerivedData/Moukat-amxiyucfcmxblndkiauwhwnscwhx/Build/Products/Debug-iphoneos/Moukat.app/Frameworks/libswiftCore.dylib: the codesign_allocate helper tool cannot be found or used
*** error: Couldn't codesign /Users/RpX/Library/Developer/Xcode/DerivedData/Moukat-amxiyucfcmxblndkiauwhwnscwhx/Build/Products/Debug-iphoneos/Moukat.app/Frameworks/libswiftCore.dylib: codesign failed with exit code 1
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-stdlib-tool failed with exit code 1
I tried all solutions on Stackoverflow about certificats, build settings, etc ..., it doesn't work.
If someone know something about it =).
Thank you.
My advice would be to delete everything related to development and distribution certification - all relevant certificates in the keychain, all mobile provisions on disk, and everything at the Member Center - and start the entire process of generating new identities and profiles from scratch.
I upgraded also my iOS Developer Account, and I got the same error in all my Apps when I tried to run them on my Ipad (IOS 11)
This works for me ( I did the samme in all the programs)
choose TARGET
General/Signing : Automatically manage signing
General/Deployment info/Deployment target: change to a lower IOS (I chose 10.0)
General/Deployment info/Deployment info/Devices : Universal
Build cmd B and Run cmd R with destination (your device)
After the error is disappeared: change the Deployment target to IOS 11 and the Device to iPhone/iPad

Resources