Skip to content
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

Can't install with cocoapods using frameworks #24

Closed
2 tasks done
seanadkinson opened this issue Feb 24, 2017 · 13 comments
Closed
2 tasks done

Can't install with cocoapods using frameworks #24

seanadkinson opened this issue Feb 24, 2017 · 13 comments
Labels

Comments

@seanadkinson
Copy link

New issue checklist

General information

  • Library version(s): 1.0.4
  • iOS/Android/Browser version(s): IOS 10
  • Devices/Simulators/Machine affected: N/A
  • Reproducible in the demo project? (Yes/No): N/A
  • Related issues:

Bug report

My Podfile uses use_frameworks! since I'm using Swift. When trying to install OTAcceleratorCore, I get an error that there are static binaries:

[!] The 'Pods-Project' target has transitive dependencies that include static binaries: (/Users/me/code/project/Pods/OTKAnalytics/OTKAnalytics.framework and /Users/me/code/project/Pods/OpenTok/OpenTok.framework)

Expected behavior

Should I be able to install using frameworks? Not 100% sure honestly.

Actual behavior

pod install errors out

Steps to reproduce

Example Podfile:

target 'TestProj' do
  use_frameworks!

  pod 'OpenTok', '~> 2.10.0'
  pod 'OTAcceleratorCore', '~> 1.0.4'

end

Crash log? Screenshots? Videos? Sample project?

$ pod install
Analyzing dependencies
Downloading dependencies
Installing OTAcceleratorCore (1.0.4)
Installing OTKAnalytics (2.0.0)
Installing OpenTok (2.10.1)
[!] The 'Pods-TestProj' target has transitive dependencies that include static binaries: (/Users/me/code/test-proj/Pods/OTKAnalytics/OTKAnalytics.framework and /Users/me/code/test-proj/Pods/OpenTok/OpenTok.framework)

Question or Feature Request

Should I be able to install with frameworks? If I comment one use_frameworks! then I can't install other pods that I'm using.

@Lucashuang0802
Copy link
Contributor

Hi, @seanadkinson. Due to the fact that OpenTok iOS SDK is a static library and the rule of CocoaPods, you can not use use_frameworks! in the Podfile. One thing that you can't do is to build a Swift framework on top of OpenTok library via CocoaPods. However, if you only intend to build a project mixing with Objective-C and Swift code. You can remove use_frameworks! and use the Objective-C bridging so it's available to your Swift codes. For more info: https://blog.cocoapods.org/CocoaPods-0.36/. 😃

@seanadkinson
Copy link
Author

Thanks for the response @Lucashuang0802. So there is no way for me to use OTAcceleratorCore in my project? Many of my cocoapods dependencies are swift projects, so I can't take out use_frameworks! easily it appears. Perhaps I could install OTAcceleratorCore outside of cocoapods? Is there a way to download it as a bundle or something? Thanks

@Lucashuang0802
Copy link
Contributor

Lucashuang0802 commented Feb 27, 2017

Seems like that's currently no way to resolve it by using CocoaPods because you need use_framework! to build your Swift third party dependencies. What you can do is to download all source files and manually import the file. Or you can take advantage of Carthage to manage your Swift third party dependencies and install OTAcceleratorCore by using CocoaPods.

@seanadkinson
Copy link
Author

Thanks @Lucashuang0802, will try some things out. Would be nice for OT to publish a swift version of the code, but that's just a feature request. I appreciate your time.

@Lucashuang0802
Copy link
Contributor

@seanadkinson
Copy link
Author

Thanks @Lucashuang0802, I'll dig more into that.

@chitvan832
Copy link

chitvan832 commented Jul 21, 2017

hi @Lucashuang0802 , I ran into the same issue, have you guys done some modifications regarding this, or it is yet to be done,
also @seanadkinson can you suggest me something that helped you.

@Lucashuang0802
Copy link
Contributor

Lucashuang0802 commented Jul 21, 2017

Hi, @chitvan832. If you don't have to use use_frameworks!, you can remove it. If you have to, I suggest mixing Carthage with CocoaPods.

@basiralam
Copy link

@Lucashuang0802 I've almost completed a project with video chat feature and In my project, I need a chat functionality now. At this stage, I can not comment use_frameworks!. I am a paid user of tokbox please suggest what I can do. I've not used Carthage before. Please release a swift compatible version.

@Lucashuang0802
Copy link
Contributor

Hi @basiralam, it doesn't seem that's a plan for now. In order to launch your project as quickly as you can, Carthage is the only option now. It's super easy to use. I also put up a template mixing with CocoaPods with Carthage here: https://github.com/Lucashuang0802/CocoaPodsWithCarthage. Hope it helps.

@Evolgence
Copy link

Hi @Lucashuang0802 ,My pod file

platform :ios, '9.0'
use_frameworks!
def pods

pod 'Alamofire'
pod 'PRTween'
pod 'OTTextChatAccelerator'
pod 'OTAnnotationAccelerator', '= 1.0.0-beta2'
pod 'SVProgressHUD', '=2.2.1'
pod 'OTAcceleratorCore', '= 1.1.5'
end

target 'XXX' do
pods

end

I was used both swift (Alamofire)&Objective c (PRTween) Its working fine.But
After i was added like that above ....
But, Is coming as

The 'Pods-xxx' target has transitive dependencies that include static binaries: (/Users/gsreddy/Desktop/Final/SpearC/Pods/OTKAnalytics/OTKAnalytics.framework and /Users/gsreddy/Desktop/Final/SpearC/Pods/OpenTok/OpenTok.framework)

@Lucashuang0802
Copy link
Contributor

@Evolgence Basically, you can't get it to work by using CocoaPods only. Like I mentioned #24 (comment), you need to work with Carthage. Hope this helps.

@Evolgence
Copy link

Evolgence commented Nov 28, 2017

Thanks @Lucashuang0802 ,I was import the all source files by manually.Its working fine in my devices .But when i was trying to create a build its telling

(bitcode bundle could not be generated because '/xxx/OpenTalkFiles/OTKAnalytics.framework/OTKAnalytics(OTKLogger.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build file '/xxx/OpenTalkFiles/OTKAnalytics.framework/OTKAnalytics' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation))

screen shot 2017-11-28 at 10 05 43 am

screen shot 2017-11-28 at 10 08 48 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants