-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Swift Pod causes runtime failure in Obj-C host app on device (codesign issue) #3008
Comments
The workaround I posted works fine, but it gets overwritten each time I do a "pod update". |
…C host app on device (codesign issue)
…C host app on device (codesign issue)
I'm seeing this issue too, except with a project that is written in Swift, but needs to include both Swift and Objective-C libraries. Without the Swift libraries in my Podfile, everything compiles and runs fine. When I include them, .dylibs suddenly become unavailable. |
Yep, looks like there are some issues with how X-code handles this and the CocoaPods solution fixes some cases, but perhaps breaks yours. I think my patch will resolve this problem for you as well. My pull request: #3009. @fluidsonic posted this great article about what is actually going on: http://samdmarshall.com/blog/swift_and_objc.html |
@jrosssavant That error (both in your comment above and the linked article) looks exactly like mine. I can't reach How's it looking for the merge of #3009? Because I would love to keep cruisin' with Cocoapods, rather than needing to manually manage Swift libraries. |
@nicholaswyoung Seems like there is some traction with the pull request - see the discussion. It's relatively straightforward to drop the fix into your current project, but it will be overwritten each time you run
So the whole for loop will look like this:
|
@nicholaswyoung Hmm, but I don't see how this could fix an issue with libxml2.dylib. Maybe you will have to add a codesigning step elsewhere. |
@nicholaswyoung do you have a sample project for your problem? Would be interesting to see if there maybe is an additional issue. |
@jrosssavant That's not my article. It's from @samdmarshall :) |
@neonichu I'll be working in an hour or so, and I'll throw together a demo then and share it. |
@fluidsonic Sorry, didn't mean to imply you were the author of the article, just giving you credit for first posting the link in the PR. |
@neonichu Okay, the problematic project is up on Github: http://github.com/machinefm/ios It's in progress, but if you download and try to build the master branch, it will compile and run fine. However, if you add: pod 'Alamofire', git: 'https://github.com/Alamofire/Alamofire' You'll see that the project throws errors when you try to build it. |
@nicholaswyoung Thanks! It's actually a different issue, related to the use of frameworks when using Swift - could you please file it separately, then we can discuss and fix it there. |
…C host app on device (codesign issue)
Fix for issue #3008 Swift Pod causes runtime failure in Obj-C host app o...
🌈
I'm using the new 0.36.0.beta.1 prerelease version to see if I can create a pure-Swift Pod that will be included by a pure-Objective-C app project. I was able to build the pod and example app, but the app crashes on launch with this error:
I was able to resolve this issue by adding a few codesign executions to the Pods--frameworks.sh script at the end of the section "# Embed linked Swift runtime libraries"
The text was updated successfully, but these errors were encountered: