New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pod lint fails when containing dynamic-frameworks without simulator architectures #5854
Comments
I am also affected by this problem, that I aim to distribute a dynamic framework pod without the simulator architectures as they are not allowed when submitting an app to the AppStore. |
Thank you benasher44, it indeed is the same problem for me : #5877 We haven't submit to Apple yet, so I can't confirm eldewy's problem, but if it's the same here, it's a huge issue for my team. Cocoapods team, could you please do something or advise us a working solution ? Thanks |
I'm not really sure of the answer here, 1.0 now has more strict linting rules because successfully working with other people's projects is becoming more complicated due to things like code-signing, frameworks and code-signing. Perhaps a PR improving the linter specifically towards binary/dynamic framework pods that can take into account it's constraints better could be a way to move forwards? |
@orta |
I think the next step is to look at validator.rb and make improvements specific to dynamic frameworks 👍 |
how can I start a initiative that this improvement is made? |
This project is open source and ran by volunteers in their spare time, you could start contributing by going through the getting started guide An alternative is to commission an individual to add that feature for you instead. |
@eldewy I managed to go around this issue by replacing the code inside the xcodebuild function of validator.rb by that one :
I basically replicated the behaviour of 0.39 to allow our team to push pods. Please note that this is a quick and dirty fix, will only work for ios targets, is only working with xcode8, and might not work for you, but I thought it might help you while waiting for an official fix ;) |
@orta The famous third-party framework maybe is a static library. So could you provider a way to solve 'pod lint' from both static and dynamic, both library and framework, both objective-c and swift, even c++? Not only solve this issue, but also we can ignore i386 or x86_64 to reduce time when 'pod lint' or 'pod repo push'. |
What version are you going to release it? |
If cocoapods 0.39.0 have already been installed, the command |
A temporary solution:use rvm. rvm install ruby 2.3.1. Use ruby 2.3.1 and install cocoapods 1.1.1 You can flexibly switch pod's version by using 'rvm use' |
I have the same question yet,Can you tell me how you solved it? |
I'm having this issue as well. Is there any update on this? |
@ernya do I have to compile my own version of CocoaPods for that? Or where can I find the |
@zeusent |
Thanks @LeT0C ! I've manually added the Podspec to my own private repo, thus skipping the |
@zeusent A word of warning though : I didn't check that this fix is still working, I have switched to Carthage like @LeT0C , and have not used my fix recently, you might have to change stuff ;) |
1.2.0 supports an option to |
Actually I take it back, this is merged here #6420 but it has not been released yet. |
Hi, |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Still, exist. Fabric also includes simulator architectures:
|
They probably didn't use |
@zhihuitang Fabric is built with static library frameworks. With static frameworks, the linker chooses the correct architectures at build time. This issue is about dynamic frameworks. |
Thanks @paulb777 . I am using Xcode9+Swift4. I created a static Swift framework. The framework with 2 architectures(x86_64/i386+armv7/arm64) works well with Swift host App. Is it because Xcode doesn't support Objective-C host App + Swift static framework ? Sigh......
|
Finally, I found another workaround. Steps: That is it. Then just archive as usual. BTW: remember to use your own framework name in the scripts. You also can find the detailed tutorial blog here |
This is related to #7196 and I might make a change to make lipo a bit more lenient for both dSYM stripping and framework stripping. |
@paulb777 and others just to clarify the issue, this only happens on pre-build dynamic vendored frameworks in which they do not offer every single architecture. The script then tries to strip invalid architectures and by doing so results in an empty fat file causing a failure in the script. Am I understanding this correctly? |
@dnkoutso You got it! |
So in order to solve this I decided to mimic Xcode's behavior (and specifically Xcode 9). Xcode will emit a warning if you try to link a library that does not contain the supported architecture. This should happen today because CocoaPods always adds There is a more strict mode for I am going to be updating the shell script phases to be more lenient when it comes to stripping architectures for both the |
PR #7197 |
Merged. Closing this! |
@dnkoutso |
@dnkoutso The exact same thing still happening here, 3rd party framework with only armv7 and arm64 archs. Cant get past the linting stage... |
@dnkoutso The same thing happening to @lumialxk is happening to me too. I'm trying to push to a private repo a podspec for a project written in objective c, linking against a swift project and linking against an objective c project that is missing i386 architecture, and i cannot get past through the linting stage. |
@MarcoBrescianini can you please upload a sample repo demonstrating the issue? |
Hi,
(instead of the default In case it helps... @MarcoBrescianini @dvdblk @lumialxk |
I almost have the same case with @hberenger . But the third-party in my private pod does not include both i386 and x86_64 libraries.
after that, I just hope "the lint" can ignore architecture i386 and x86_64. I'm not sure whether it is the right way, though it works. |
worked for me, thank you so much |
This show how to fix
https://github.com/caixindong/Cocoapods_fix_i386/blob/master/validator.rb |
only the |
Issue still exists. |
For me it works after adding --use-libraries along with --skip-import-validation , without add s.pod_target_xcconfig = { 'VALID_ARCHS[sdk=iphonesimulator*]' => '' } pod lipo lint --skip-import-validation --allow-warnings --use-libraries mavspec XXXX.podspec |
Currently
pod trunk
is not usable for us aspod lint
fails because simulator architectures (i386 and x86_64) are missing. BUT Apple rejects apps containing dynamic-frameworks with simulator architectures.We deploy two variants of dynamic-framworks
pod lint
fails with the following errors:We were forced to provide device-only architectures as Apple rejects app-submissions containing any simulator-architectures with
Similar issues:
#5275
http://stackoverflow.com/questions/36618252/cocoapods-podspec-push-without-build-simulator-architecture
The text was updated successfully, but these errors were encountered: