Application won't start on simulators in Xcode 12 - xcode

Please tell me, after upgrading to Xcode 12, simulators stopped running
There was an error 'in /Users/.../Pods/MobileVLCKit.framework/MobileVLCKit(VLCEmbeddedDialogProvider.o), building for iOS Simulator, but linking in object file built for iOS, file' /Users/.../Pods/MobileVLCKit /MobileVLCKit.framework/MobileVLCKit 'for architecture arm64'
I found on the Internet a solution to add arm64 to Excluded Architectures using the Any iOS Simulator SDK option, which I did.
Then the same error was only with the i386 architecture, I added it to the exceptions as well (for project purposes and Pods purposes)
Then the same thing with x86_64, added it too
After that the error 'Build input file cannot be found' came out /Users/...Library/Developer/Xcode/DerivedData/SWSTB-asdgdfgbgfbg.../Build/Products/Release-iphonesimulator/MYNAME.app/MYNAME'
I tried to clean DerivedData, but after that either the error was repeated
I don't know how to solve it
It runs fine on a real device, the problem is only with simulators
Updated Xcode to 12.01, updated cocoapods, updated mobilevlckit, error persists

Remove /Library/Developer (the one from root), or rename it and relaunch your Xcode.
or
cmd + shift + opt + k
or
pod update

The problem was with the pod MobileVLCKit.
The pod devs have added the necessary changes to work well with Xcode 12.x
It was necessary to update MobileVLCKit to version 3.3.15
I have not updated above 3.3.13, then I registered the command pod install --repo-update. After that, the repository with the pod was updated and it was possible to install the latest working version

I've an old project migrated to Xcode 12.4, cocoapods. Same situation. I've solved updating the Build Settings -> VALID_ARCH value with (both project and target section) :
$(ARCHS_STANDARD) i386
Build architecture only: YES
For your tries remember to removing Derived Data:
rm -rf ~/Library/Developer/Xcode/DerivedData

Related

Linking issue for Firebase Pod (in libFirebaseStatic.a)

Was trying to add a pod (FirebasePerformance) to my Podfile
I can technically run the build on my local devices, but when I try to run on a Simulator I get the following error:
In Pods/Firebase/libFirebaseStatic.a(FPendingPut.o), building for iOS
Simulator, but linking in object file built for iOS, file
'Pods/Firebase/libFirebaseStatic.a' for architecture arm64
Even when I removed the new pod (FirebasePerformance), it still is giving me the same error. I believe part of the reason for my issue was that I attempted to fix other issues by changing the cpu architecture that my cocoapods were installed in. But even after re-installing in both x86_64 (for simulators on Macbooks with M1 chips), and then deintegrating and trying to reinstall with arm64 (older Macbooks / iOS devices), it still is giving the same error. What do I do?
This answer might be unsatisfactory for those who need to use the Firebase Pod (for whatever reason). But I found in this case, I could actually just delete the Firebase pod from my Podfile and re-install and the issue would be fixed. (It turns out all of the actual logic is presented in other pods like FirebaseCore, FirebaseFirestore, etc., and the "Firebase" pod is just a dummy one).

Cocoapods Pod Packages Version Checking - Flutter

I just recently updated my MacOS BigSur to 11.6 to accommodate the new iOS 15 release. I also updated my XCode to 13. To make sure my Flutter packages are using the most up to date version, I checked and confirmed that the package/s versions in pubsec.yaml is indeed the newest via pub.dev. I then updated Flutter, reinstalled Cocoapods and ran 'pod repo remove trunk', 'pod repo update' and 'pod update'. I then tried checking whether the pod packages are the most up to date. However, when I try visiting cocoapods.org via browser, I am getting an internal server error. How do I verify that I do have the most recent versions which are in sync with the version showing in pub.dev of Flutter? Is it correct to assume that the pub.dev build version showing for a specific package should be the same when I check the package in Pods of XCode?
FYI. The reason I am asking this is because I am getting a lot of build errors due to pods with deprecation errors. So I wish to rule out any version discrepancies before tshooting further.
Thanks in advance.
I'm not sure about the first problem, but for the problem "a lot of build errors due to pods with deprecation errors" I always use this steps to solve it.... try it might work for you too:
delete: podfile, pods folder, and podfile.lock
cd ios
pod install --repo-update (this will take time)
cd ..
flutter clean
flutter pub get
Thanks Remoo. Unfortunately your recommendation didn't work. What worked is: 1. Deleted my project. 2. Copied original saved copy fresh to MacOS. 3. Ran flutter clean and then flutter packages get and then in ios dir, did pod install. 4. Flutter run and flutter build ios --release were successful. 5. I just ran archive via XCode but still saw a lot of deprecation errors but it went through. Also performed Validate and Distribute. I will see if the app works on my iphone.

Nativescript: Error Building for iOS Simulator

I have followed the complete install guide for nativescript on a Mac (Big Sur). Also when running tns doctor everything seems fine. However, when i'am running tns build ios or tns run ios i get the following error:
error: Building for iOS Simulator, but the linked and embedded framework 'TNSWidgets.framework' was built for iOS + iOS Simulator. (in target 'projectapp' from project 'projectapp').
Could someone please tell me how to fix this. I installed nativescript 7.0.11 and
x-code 12.3
Yesterday with the Xcode update (12.3) I've got the same error, after seeing a lot of posts about this error the solution from Niko Dovidija IS THE CORRECT ONE.
My environment:
Xcode 12.3
iOS platform 6.5.3
Nativescript 6.7.8
In order to build the application in CLI update build.xconfig in iOS platform and add this line:
VALIDATE_WORKSPACE = YES
Posts about "similar" errors and didn't work for me.
Building for iOS simulator
Building for iOS simulator 'AFNetworking.framework'
So I just updated Xcode to 12.3 today, using nativescript 7.0.11 in my project and I got a simular issue. What worked for me was:
Open the platforms/ios folder using Xcode
Select "yourprojectname.xcodeproj" from the list
Select yourprojectname from the Targets
Expand Build Options and find Validate Workspace
Change to Yes
Rebuild the project
After that, I got a successful build.
Please note that I also needed to run ns platform clean ios command in order to make the build work after updating my Xcode to 12.3

MobileDevice.pkg untrusted, cannot open Xcode after OS X update

After an automatic update of macOS v10.15 (Catalina), I am unable to open Xcode. Xcode prompts me to install additional components but the installation fails because of MobileDevice.pkg (Applications/Xcode.app/Contents/Resources/Packages)
I have found multiple answers on how to locate MobileDevice.pkg and that I should try to install it directly, but when I try to do this the installation fails too. I have also tried updating Xcode from App Store, but the update failed when it was nearly finished.
Has anyone experienced the same behaviour? Should I reset the Mac to default and install macOS v10.13 (High Sierra) or Catalina from scratch or it is a problem of Xcode and re-install would do the job?
I have found a discussion here that was posted today and is probably regarding the same issue and it seems like many people are dealing with it, too.
The log:
*2019-10-25 01:03:34+02 Vendula-MacBook-Pro Xcode[1567]: Package: PKLeopardPackage
<id=com.apple.pkg.MobileDevice, version=4.0.0.0.1.1567124787, url=file:///Applications/Xcode.app/Contents/Resources/Packages/MobileDevice.pkg>
Failed to verify with error: Error Domain=PKInstallErrorDomain Code=102
"The package “MobileDevice.pkg” is untrusted."
UserInfo={
NSLocalizedDescription=The package “MobileDevice.pkg” is untrusted.,
NSURL=MobileDevice.pkg -- file:///Applications/Xcode.app/Contents/Resources/Packages/,
PKInstallPackageIdentifier=com.apple.pkg.MobileDevice,
NSUnderlyingError=0x7fabf6626d00
{
Error Domain=NSOSStatusErrorDomain
Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED"
UserInfo={
SecTrustResult=5,
PKTrustLevel=PKTrustLevelExpiredCertificate,
NSLocalizedFailureReason=CSSMERR_TP_CERT_EXPIRED
}
}
}*
Edit and set the date of your Mac as October 1st, 2019.
I didn't have Xcode 11.1 installed and even though I could open and run the 11.0 after the below workaround I could not update to 11.1 as the update always failed. So I have just re-installed the whole app from the App-Store - you could probably also do this instead of the below method.
I have tried setting my system time to 1st October 2019 when the certificate should had been still valid. After that I tried to open Xcode and followed the component install which went well and now I am able to work with Xcode again.
I had a similar problem, where I installed Xcode 11.1, and installed the components and everything within the same folder where I had Xcode 10.2.1. Then, I tried to go back to Xcode 10.2.1 and couldn't opened as it was asking me to install components again, and when I tried I was getting this error.
The package “MobileDeviceDevelopment.pkg” is untrusted.
So, the workaround that fixed it for me was navigating to...
/Users/YourUser/Applications/Xcode\ 10.2.1.app/Contents/Resources/
Then, deleting MobileDeviceDevelopment.pkg and everything went back to normal :)
I hope this helps anyone else with this issue. Cheers!
At macOS Catalina
cd /Applications/Xcode.app/Contents/Resources/Packages
sudo rm -rf MobileDevice.pkg
sudo rm -rf MobileDeviceDevelopment.pkg
Try again.
It means you entered on the Xcode downloaded packages and remove it. I really don't understand how Apple do but if you remove Xcode will download it again and revalidates.
Some remarks, I'm on XCODE Version 11.0 (11A420a) if you are not this is not guaranteed to work.
You may solve this issue by setting the date of your Mac as October 1st, 2019. But this is just a hack! The real solution (suggested by apple) is this:
All you have to is to upgrade Xcode
But there is a known Issues on apple developers site
Xcode may fail to update from the Mac App Store after updating to macOS Catalina. (56061273)
Apple suggests this:
To trigger a new download you can delete the existing Xcode.app or temporarily change the file extension so it is no longer visible to the App Store.
Always working solution for all Xcode issues:
Go here and log in.
Then download the xib from here.
More information here on this answer.
##Answer to this specific issue##
Get rid of those packages.
cd /Applications/Xcode.app/Contents/Resources/Packages
sudo rm -rf MobileDevice.pkg
sudo rm -rf MobileDeviceDevelopment.pkg
Xcode will install all of them again for you.
rm -rf /Applications/Xcode.app/Contents/Resources/Packages/*.pkg
It will work and re-open the x-code
Try to run Xcode-beta instead of Xcode to install additional components. After that you'll be able to use Xcode release.
For me, I just uninstalled (deleted the app from the Applications folder) and then went back to app store and clicked the cloud icon and it downloaded fresh and installed. Now all is good and back to normal.
Here's what I did to resolve:
Right click the xcode.app > show package contents > Contents > Developer > Platforms > iPhoneOS.platform > Device Support
I am on XCode 10.2.1. I had downloaded a 13.7 folder and contents from an external GitHub site and imported that folder into here for running my app on a physical iPhone Xr. I am prevented from upgrading to Catalina on my dev machine. Deleting the 13.7 folder and then re-launching XCode resolved the issue for me.
Reinstall Xcode 11.1 from https://developer.apple.com/download/more/ . Afterwards the update works.
This requires Xcode 11.1 to be installed.
I was not able to update to Xcode 11.1 until I updated macOS Catalina to 10.15.1. After updating my macOS, I was able to install Xcode 11.1, which also allowed the installation of the additional components package.

Phonegap/Cordova Build error - Apple Mach-O Linker Error: no such file or directory: libCordova.a

I am getting an error after creating a new Cordova 2.1.0 project and updating the www folder with some code from a previous PhoneGap application.
clang: error: no such file or directory: '/Users/peterbanjo/Library/Developer/Xcode/DerivedData/OpuzMobile-bhwawiqfaptmxvfosawfabudgbkj/Build/Products/Debug-iphoneos/libCordova.a'
The error only occurs when I try and run the application on a device - in the simulator it works fine.
I am running Xcode 4.5 and iOS6 on the target iPad. I have tried a clean build and libCordova.a appears in the Build Phases > Link Library With Libraries tab but it is in red.
What I found confusing with PhoneGap/Cordova 2.1.0 by upgrading from 1.4 is that there are TWO projects in my application. There is MyApplication.xcodeproj and CordovaLib.xcodeproj. The changes to resolve this issue need to be applied to the CordovaLib project.
Change "Build Active Architecture Only" to "YES"
Update the text file project.pbxproj to these values
Toggle between the build schema for the simulator and the device (Use the select menu next to the stop button. Somehow this seems to cause the changes to be detected).
Did this work for you? Did I miss something?
PS: For a better understanding of the problem take a look at this Google Forum thread
I'm using Cordova/Phonegap 2.9 and this solved my issue. Didn't touch any of the arch stuff. Everything is set to armv7 armv7s on mine.
Follow these steps to fix this problem:
Go to project settings and Build Tab.
Search for "Other Linker Flags"
Double click on the linker flags for Release and Change ${TARGET_BUILD_DIR}/libCordova.a to ${BUILT_PRODUCTS_DIR}/libCordova.a
Do the same for Debug Clean and build archive again
I had the same error and fixed it by reverting to an older version of cordova ios.
Steps to fix the issue:
Uninstall cordova-ios first, with npm uninstall cordova-ios
Install old version of cordova-ios with npm install cordova-ios#4.4.0
Remove existing ios platform with ionic cordova platform rm ios or ionic platform rm ios
After that we should add platform with ionic cordova platform add ios#4.4.0 or ionic platform add ios#4.4.0
Run ionic cordova build ios.
Instructions came from here.
Only need to remove armv6 from both YourProject and CordovaLib:
The consequences of doing this? Apparently, it's still working on iPhone 3GS, but not the previous versions..
To make it work I downloaded from http://connect.apple.com stand alone Xcode 4.4.1. With this version I can build my phonegap Application with armv6 :)
Yes, in this case you need to have two Xcode on your computer.
Look at this https://groups.google.com/forum/?fromgroups=#!topic/phonegap/ywoc9wNydZ8
works for me
--
OS X 10.8.2
XCode 4.5
iOS 6.0
PhoneGap 2.1.0
DO NOT assume that having Standard (armv7,armv7s) - $(ARCHS_STANDARD_32_BIT)
is the same as the fix above.
Manually change this value to only armv7 and that fixed it for me.
I was very frustrated.
If you did everything here and it is still not working and you have separate configuration aside from Release and Debug - for this example is Production. Make sure that 'Production' Build Configuration exists in Cordova project. Build the Cordova Project and Build + Archive your main project again.

Resources