Closed jorlow closed 9 years ago
I think you'll need to set the Pod project to build for arm64, for some reason the pod project that gets created isn't set by default to build for all architectures. If that's not the issue feel free to re-open :)
I tried a bunch of things and had a couple co-workers give it a shot too (who are wiser in the ways of cocoapods and xcode). We weren't able to get it working though. Any advice, guidance would be really nice.
I can't figure out how to re-open though.
will try to look into this week!
Thanks a lot! For what it's worth, I had two others try this on their computer and fail but then a third (with a similar set up to the rest of us) tried and had no problem. So I'm not sure what's going on. But let me know if there's any info I can provide to help!
haha oh fun :D ok i'll commandeer someone's computer this week and try it out, did you compare versions or anything? that would be super helpful, thanks man!
What things should we look at besides xcode version and cococapods version?
that's probably good!
I'm getting this too. I thought I was okay because the "Analytics" scheme built fine, but the "Analytics.framework" scheme is failing with the same error.
The same issue here
This is what helped to me https://gist.github.com/realf/9972233
Thanks a lot @realf !
That got me closer, but now I'm seeing this: "lipo: can't open input file: /Users/jorlow/src/segment-io/DerivedData/Analytics/Build/Products/Release/libAnalytics-x86_64-clean.a (No such file or directory)"
@jorlow Try to remove it in a framework build phase:
## Create a fat lib from the now cleaned up thin libs and place inside framework
lipo -output "${PRODUCT_PATH}/Versions/A/Analytics" -create \
"${SYMROOT}/Release/libAnalytics-i386-clean.a" \
"${SYMROOT}/Release/libAnalytics-armv7-clean.a" \
"${SYMROOT}/Release/libAnalytics-armv7s-clean.a" \
"${SYMROOT}/Release/libAnalytics-arm64-clean.a" \
"${SYMROOT}/Release/libAnalytics-x86_64-clean.a"
Sorry @realf I don't quite understand what you mean.
@jorlow https://gist.github.com/realf/10011777 Here is a gist. Copy and paste it to the build phase "Build Framework" of Analytics.framework
It finally built after I did that and deleted "${SRCROOT}/Pods/Mixpanel/Mixpanel/*.xib". Thanks a lot!
this is pretty odd, x86_64
is the architecture required to run the simulator on a 64-bit Mac. Do you have a 32-bit Mac that you're developing on?
Mavericks with latest gen mac book pro + Xcode 5.0. Definitely 64bit.
$ xcodebuild -version Xcode 5.0.2 Build version 5A3005
$ pod --version 0.29.0
$ ruby --version ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
have you tried testing the built framework in a simulator demo app? i tried making the suggested changes here locally, and while it also builds successfully for me, a simulator demo app now fails to build with the following error:
ld: warning: missing required architecture x86_64 in file /analytics-ios/Examples/DirectIncludeExample/Analytics.framework/Analytics (4 slices)
when I add back the x86_64
slice then the demo app builds happily for the simulator.
this makes sense since the simulator needs an x86_64
slice. i'm not sure how to debug the framework build issue that all you guys are seeing :/ but for the main repo and framework build script we definitely need to keep that slice in.
i'd love to resolve this since it seems to be a blocker on contributions to the SDK, but not sure how to replicate, sorry!
Well, another blocking thing was Localytics. We had to remove its provider to be able to build the framework.
i was recently chatting with someone who had this problem and this was the solution for them
Closing, feel free to reopen if you're still encountering issues.
I have a fresh checkout of the source, an up to date cocoapods, ran "pod install", and then tried to build the "Analytics.framework" scheme and got the following error.
fatal error: lipo: fat input file (/Users/jorlow/src/segment-io/DerivedData/Analytics/Build/Products/Release/libAnalytics.a) does not contain the specified architecture (x86_64) to thin it to
Any idea what's going on or how I can fix it? I saw this with both Xcode 5 and 5.1