Xcode build error when building onto device - Library not found for -lDoubleConversion - ios

So my app has run and built successfully on the Xcode simulators. The app is a react native app
However when trying to put it onto a device I get the error.
What steps do I need to take to get this to work?
Library not found for -lDoubleConversion
Notes:
-I am running the Xcode workspace file
-I did try use_framework! in the Podfile but I don't think that was right and caused more issues
also tried adding it to the podfile

The reason I had this error is that my iOS version required in my podfile was not the same as that as the min version in xcode.
The error generated by xcode wasn't helpful in this case and pretty ambiguous given the range of answers on the internet

Related

Why does xCode cannot build my flutter app with 'sqflite' not found error

I'm trying to build my Flutter app for iOS using xCode and got error:
.../ios/Runner/GeneratedPluginRegistrant.m:10:9: Module 'sqflite' not found
When I'm trying to build application with flutter with command
flutter build ios
I don't have any problem. Application build successfully.
I tried to delete Pod directory in ios folder and then install pods from scratch
flutter pub get
pod install
How to fix this problem with xCode?
XCode gives this type of Error like Module 'something' not found, when sometimes the problem is somewhere else.
So, what I did is after running flutter build ios command, I didn't try to run it in XCode. Because it was giving these errors.
So, I archived the app and tried to publish in App Store Connect. Then I found the real issue/bug on my code.
App store doesn't support transparent logo or app icon. This was the bug in my case.
So you can try to archive and publish to app store connect. It may show you the real reason.
Change your target Destination to > Any iOS Device
This work for me
"I found the solution,
In the existing project, once you guys add sqflite dependencies
Profile file in IOS folder will not generate code
we need to remove Podfile in ios
rm ios/Podfile
and run the project again, it works for me."
Credit:thanks to viroth-geek

Carthage, Xcode 9. "xcodebuild timed out while trying to read *.xcodeproj" error

Today I downloaded xCode 9 and started converting everything to Swift 3.2/4, so I can build and run my project.
As it was expected carthage complaint about some project that they could not be build, as they were not compatible with Swift 3.2/4. I had to find the versions that were compatible and build them.
I also had to use --no-use-binaries, as some frameworks are precompiled with previous versions of Swift.
I then got the following error:
xcodebuild timeout while trying to read AWSiOSSDKv2.xcodeproj
So far I was probably not getting this error, as i was downloading AWS framework precompiled. Now that carthage had to compile it locally, something was missing and was creating the timeout.
To sort it out I did the following steps:
Open the timed out project in Xcode
Do not do anything
Run "Carthage build --platform iOS"
Everything compiled without any errors. It seams that once the project is opened in Xcode, Xcode is automatically adding something that is missing and the project compiles then.
This process has to be followed after every "carthage update", as the update will download a fresh xcode project.

error: Invalid bitcode version (Producer: '800.0.35.0_0' Reader: '703.0.31_0')

When I try to Archive my application on Xcode 7.3.1, I am getting following error:
error: Invalid bitcode version (Producer: '800.0.35.0_0' Reader:
'703.0.31_0') clang: error: linker command failed with exit code 1
(use -v to see invocation)
I was able to successfully Archive my app yesterday, can any one please help me?
i had this error before ...
you may try the following solution it worked for me
search for bitcode keyword in app --> Build Settings and change it to NO
then archive again -->
it should work fine now
Install Xcode 8:
https://developer.apple.com/download/
Xcode 8 GM seed may be used to submit apps to the App Store.
More info:
In my case I updated to the latest Facebook iOS SDK 4.15.1. Since that library was updated with Xcode 8 and I was still using Xcode 7.3.1 it caused the error.
https://developers.facebook.com/docs/ios/change-log-4.x
Updated for Xcode 8 GM and iOS 10.
So, double check 3rd party libraries.
Or if you don't mind disabling bitcode:
Go to build settings search bitcode and change "Enable Bitcode" to "No".
I also faced the same problem, and as suggested by #Nate,
the issue was because of a third party SDK integrated in our project using Cocoapods.
To help me figure out which one of the 15 pods i had in the project was responsible, i did the following:
Create a new xcode project
Copy the Podfile from your original project to the newly created project's directory
Do pod install
Remove one or more of the pods⋆
Archive the new project, and see if it succeeds, if not repeat step 4 till you are able to archive
⋆(you can also try something like binary search, wherein you delete the first half pods in your Podfile and see if the new project archives)
Once you've figured out the library causing the issue, keep downgrading the library by explicitly specifying the version in Podfile, until the project archives successfully.
And then you can use that version of the library to archive and upload to the app store.
If you are using lib or pod that mean that one of them built by a higher version of your current Xcode, you can either update your code or return back to the previous version where the pods were built by your current version.
If you ran pod update check the pods updated if you ran pod install check the dates of the pods comparing to the release date of your Xcode that will will lead you to the responsible pod.
I got it while I was building using Xcode 8.2.1 and the pod built by Xcode 8.3.1
I also faced this error: Invalid bitcode version (Producer: '800.0.24.1_0' Reader: '703.0.31_0') I have googling so many but unable to find the proper solution. I tried Myself and solved this probable
In my case this error occurs after adding FBSDK by drag and drop that we all usually do.
You can resolve this problem by following these steps:
Delete all pod script in build Phases.
Delete the dragged FBSdks file from the project.
Exit xcode and delete 3 things "Pod folder","Podfile.lock" and "Projectworkspace"
Search and add FBSDK pod link in podfile
Install the pod again by using terminal.... now open Xcode archive your project build.
good solutions, but disabling bitcode worked for some people.
edit :- it worked for me too.
but in future your app might be in problem or (build not optimised by Appstore) if your project is **Bitcode Disable **.
Bitcode is an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the App Store. Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new version of your app to the store.
Note: For iOS apps, bitcode is the default, but optional. If you
provide bitcode, all apps and frameworks in the app bundle need to
include bitcode. For watchOS apps, bitcode is required
So thats why try to figure out error solutions right way.
The error basically says:
The static linker could not correctly link a certain bitcode bundle, which was
produced using Producer: '902.0.39.2', and is being read using Reader:
'900.0.37'.
You can look up at https://gist.github.com/yamaya/2924292 to identify the Xcode versions for the corresponding compiler versions. In the current case, the reader (our Xcode version) is Xcode 9.0, whereas the producer (Xcode version of typically a third party SDK) is Xcode 9.4. The incompatibility between the two is the root cause of this issue.
You may either:
turn off the bitcode as discussed in other answers, or
roll-back the SDK to a previous version that worked well, or
update your codebase to use the newer Xcode version.

Xcode 7 error: linker command failed with exit code 1 (use -v to see invocation)

I'm getting an error when i open my app in xcode 7:
I've tried everything from re adding all of my linked libraries to editing the build settings, but this error will not go away? I've tried google searching this, but all the answers i came accross wont work. What do i do?
The error does not show up in xcode 6, why is it in only xcode 7?
Change deployment target to a lower version and see if it is a version problem. Try deployment target to iOS 6.0 :)
However, this could be dangerous if you are using APIs that only support iOS 8 and above. Use this fix cautiously to make sure not to cause any problems in other areas of your project. Therefore, be sure to test on an iOS 6.0 device or iOS 6.0 simulator.
Looks like your Bolts pod dependency is somehow added to the Build Phases pane under Link Binary With Libraries of your Targets settings. Try by removing the library ".a" file from the Build Phase.

Xcode - clang failed with exit code 1. Plugin cause?

I'm getting an odd error in Xcode when I try to Archive my app.
I'm using Ionic and the Ionic CLI tools. The app has been built for Android and is in beta on the Google Play store.
In Xcode I get this error:
clang: error: no such file or directory: '/Users/SubjectiveEffect/myApp/platforms/ios/CardsApp/Plugins/de.appplant.cordova.plugin.email-composer/APPEmailComposer.m'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
So it looks like there is some error with the de.appplant email plugin. The email plugin works in Android but it doesn't work in Ionic View on iOS. I wasn't sure if this was that the plugin isn't Ionic View compatible or not.
Anyone have any ideas?
Upate:
I uninstalled this plugin and I now get the same error, but from a different plugin!
clang: error: no such file or directory: '/Users/SubjectiveEffect/myApp/platforms/ios/CardsApp/Plugins/com.danielcwilson.plugins.googleanalytics/UniversalAnalyticsPlugin.m'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
So I'm pretty sure this is a plugin problem.
Anyone have any idea why or how I can fix it? I'm installing from the command line on a Mac with the standard cordova commands as seen on ngCordova.
edit: To be clear - those folders do not, indeed, exist. The plugins work fine in Android though...
Your error is quite strange, probably something happened to the structure folders..
I would try doing something like this:
Before doing this test make a backup copy of platforms/ios.
cd my-folder-app/
ionic platform remove ios
ionic platform add ios
Now should need to copy from backup and paste for example the icons, splash screens to the fresh platforms/ios folder and re-apply some eventual changes that you did.
ionic build ios
And then open xcode:
Run the app on emulator or device to test if works
Disconnect the device
Select the schema and iOS Device
If you need configure the schema, first you need to edit it:
Select Archive from the left panel, and from the right there is Build Configuration: select Release if you want publish the app or Debug if you want install the app on a test device. And click Close.
From the top menu: Product > Archive
Good luck!
UPDATE:
To be sure that your errors not depends to the ionic project make this test please:
cd projects-folder/
ionic start myTestApp tabs
cd myTestApp/
ionic platform add ios
ionic build ios
And now follow the same steps on xcode to archive the app.
I never really found out what was happening.
What I did was remove the iOS platform and re-add it. This just created more errors although for some reason the correct folders were there. I also then found my Android build wouldn't work.
I removed everything and re-added it all, updating Ionic too.
Then XCode would open but freeze. Hard freeze. The only way to quit it was to force close the Mac. I even uninstalled XCode and re-installed it. Same thing.
Finally I used the command line to erase all presets in XCode so it would open fresh without any projects loaded. Now it works, and the Android version seems to be working too.
I've no idea where the error started and so I can't rightly tag anyone as correct as that would be misleading. The solution: cleans and burn, start again. :)

Resources