Lipo Error!! can't open input file
Asked Answered
C

21

50

My application was working perfectly fine, then I started integrating SDK for push notification and stop the integration in between. I even deleted the SDK from my project and trying to archive or run the app, it gives me the error:

lipo Error!! can't open input file.

Any help would be appreciated a lot, I have given enough time to solve this but failed.

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't open input file: /Users/XYZ/Library/Developer/Xcode/DerivedData/MyAPP-hjbmqpnmsoruqxbwlayqkjsojccv/Build/Intermediates/MyAPP.build/Debug-iphoneos/MyAPP.build/Objects-normal/armv7s/MyAPP (No such file or directory)

Chungchungking answered 27/6, 2013 at 16:51 Comment(0)
C
67

I got it to work, I just made a simple change in my Project target-> Build setting-> Build Active Architecture only and set this Build Active Architecture only to YES. And it's working fine now..

update After 6 months:

Again i face this issue after updating to Xcode5. This time i have to update Project target-> Build setting->Valid Architecture to armv7. I removed armv7s and arm64.

Chungchungking answered 28/6, 2013 at 12:2 Comment(5)
Anybody know why this is? Build for active architecture set to YES is simply supposed to speed up the build process while debugging since it will do just what it says. When it's set to NO it should build all architectures and create a fat binary - why wouldn't this fat binary just work?Bharat
Doesn't this also prevent the resulting executable from running on some devices?Proletariat
Strangely, I got it to work by removing and then re-adding all the architectures. Once I did that, the original settings worked. Not sure why.Meier
Changing that Build Active Architecture Only setting is not going to work well for the App Store build. See my answer below.Romanticize
Any subprojects (e.g. the Pods project) need to build, at a minimum, all of the architectures that the parent project builds. So if the parent is building all architectures, the subproject must do the same. If the parent is only building active architectures, the subproject setting shouldn't matter. Likewise the list of architectures for the subproject must be the same as (or a superset of) the architectures for the parent project. Finally, for the Release configuration, Build Active Architecture Only should always be No.Cochise
J
11

By Setting "Enable Bitcode" to "No" works for me.

Now i able to Run on Device and submit to App store as well.

enter image description here

Jonniejonny answered 17/11, 2015 at 2:36 Comment(2)
Nope...this didn't worked for me. I'm using Xcode 7.1.2Leucopenia
Before suggesting changing the bitcode options, check what impact that would have on your appJagir
C
10

Note that I got this when switching from Carthage to CocoaPods. Solution was to delete the "Remove Unneeded Architectures" in the Build Phases section.

Countenance answered 2/9, 2016 at 15:12 Comment(3)
Mine was called "Strip Unwanted Archs"Bidding
I also replaced Carthage with Cocoapods, and had to delete this run script from my build phases to avoid the derived-data errorExplicate
I just ran into this issue while using cordova-sentry which had a script running like this. I had to remove the script under Build Phases for it to install on my device.Drandell
S
6

This happened to me because I'm using cocoapods and the Pods project in the workspace had a different setting for "Build Active Architecture Only" than my main project (YES and NO respectively). When I set both to "NO" I was able to build and run on my device.

Sarilda answered 27/2, 2014 at 1:36 Comment(2)
That's so strange. It's the opposite of what I have had to do. How could that possibly work? My mind is sufficiently boggled.Tog
IMO this should be the accepted answer. Subprojects need to build at least as many architectures as the parent project. So if the parent project only builds the active architecture, the subproject can be set to whatever, but if the parent project builds all architectures, the subprojects must do the same.Cochise
F
4

Try removing file(s) that you've deleted from Project target -> Build Phases -> Compile Sources.

Hope that helps.

Forespeak answered 27/6, 2013 at 17:10 Comment(0)
O
4

Try to remove connected iPad/iPhone if there. This worked for my case.

Ottinger answered 18/11, 2014 at 8:58 Comment(0)
I
1

In my case, I executed my application after some updates, then tried to commit it on git, and conflicts ruined my code. That was sad story.

But luckily I had one backup on my system and I replaced ruined code with my local code.

Now while executing I felt same problem. Then cleaning the project was the magical stick for me. I cleaned the project and I was good to go.

Isley answered 22/1, 2014 at 15:57 Comment(1)
The terrible issue here is that we never know WHY this works. I want to know what changed that allowed the build to work. We've all run in to this, we just don't know why it happens, or why what we did to fix it worked.Tog
L
1

For me, this occurred because my main executable and a library I was statically linking with had different settings in Build Settings > Architectures. The library was set to only "Standard architectures" but the main exe was set to "Standard architectures (including 64-bit)."

I think what was happening was that when the build process went to link everything, it found it was missing the 64-bit versions of the libraries, causing this error.

Setting them all to the same value (either with or without 64-bit) resolved the issue for me.

Leonoreleonsis answered 24/2, 2014 at 1:29 Comment(0)
O
1

This was a cocoapods issue for me. I'm running 0.35.0, Xcode 6.1.1, and apparently I need to mention my targets in my podfile in order for all my cocoapods to work correctly with my targets.

At the bottom of my podfile, I added:

link_with 'Target A', 'Target B' ...

Add all your target names, close Xcode, run pod install, open Xcode, and it should build for you.

Here's the github issue: https://github.com/CocoaPods/CocoaPods/issues/2627

Outvote answered 18/2, 2015 at 20:49 Comment(1)
How this issue has anything to do with lipo issue?Seductive
U
1

That error occurred, when I've decided to clean up my Derived data folder. I had to call carthage update --platform iOS then call Clean in Xcode and build again. Hope that can help someone

Unitarian answered 22/6, 2017 at 8:44 Comment(0)
P
1

I'm using both Carthage and Cocoa Pods and this is how I fixed the issue without deleting "Remove Unneeded Architectures" in the Build Phases section:

• Go to "Build Phases" tab within your target

• Drag the "Remove Unneeded Architectures" (or whatever you called your script) to a higher row (e.g. above "Compile Sources").

• Clean and Build

Hope that helps!

Philipines answered 2/5, 2019 at 0:46 Comment(1)
Can you please share a screenshot of the order you've used in Build PhaseIntercession
C
0

I get this error when disconnect device from my Mac, press my project on my project name (near play/stop build button in upper left corner), select device -> [iOS Device] and press product -> build Also I want to mention that project has a lot of 3rd party libs and some libraries installed with pods.

Cleave answered 25/3, 2014 at 8:59 Comment(0)
P
0

I had this error after a rebase put a bunch of inaccessible directories (over and over) in my framework search paths. Someone did not import the frameworks they were working on until the very end, and left references to their own directory in the code. Solved by comparing branches and removing offending code from the pbxproj

Pipe answered 7/8, 2014 at 7:41 Comment(0)
P
0

None of that worked for me.

After a bit of digging (git reset, etc.) I found that my workspace was corrupted. I deleted the content of the project.xcworkspace and all went back to normal.

Reason why even reset didn't work is because the .xcworskpace is in my .gitignore (like many I guess).

Provocation answered 5/12, 2014 at 13:7 Comment(0)
P
0

In my case, the problem occurred because I had an object (AVAudioPlayer) instance variable declared with the same name in two controllers - the app delegate and one other controller. Strange, but the problem disappeared when I renamed one of them.

Pitre answered 28/1, 2015 at 19:37 Comment(0)
B
0

New potential answer for Swift: we isolated this error down to a single usage of the nil coalescing operator (??) in a category file. The operator is used elsewhere in our project without a problem, but in this specific file, removing it fixed the lipo error.

Bryonbryony answered 5/6, 2015 at 16:38 Comment(0)
W
0

I updated one framework in my project but somehow missed committing/pushing its one file 'info.plist'(because of some problem in my gitignore file). Since then everybody else started getting this error. So just committing the missed info.plist file fixed the problem. Hope this helps someone.

Welty answered 14/10, 2016 at 11:26 Comment(0)
P
0

i tried to re-select provisioning profile signing for both debug and release. this did fix the issue.

Pyrogallate answered 7/6, 2017 at 8:0 Comment(0)
F
0

This generally happens after changing the Deployment Targets in XCode and is easily solved by "Product > Clean" before attempting a Build.

Federalese answered 22/3, 2019 at 0:52 Comment(0)
M
0

Go to your project directory, find build folder and delete it. Then do a build clean and then build project.

I hope this helps

Mimetic answered 27/8, 2019 at 6:4 Comment(0)
I
-1

Bundle Compile Source Files

you must have to add .m files in Compile Sources of Bundle Target.

Immunoreaction answered 16/7, 2015 at 11:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.