alongubkin / phonertc

WebRTC for Cordova apps - No longer active
http://phonertc.io
Apache License 2.0
866 stars 305 forks source link

64-Bit version #122

Open cremfert opened 9 years ago

cremfert commented 9 years ago

Dear all,

thanks for this great piece of software. My question is: as Apple requires apps submitted after 1st of February 2015 to be 64-bit compatible, I would like to know, if 64 bit support is planned or if you could give some information on how to build the libraries for 64 bit?

Thanks and best regards, Chris

cremfert commented 9 years ago

UPDATE: I tried to compile the libraries with this script here: https://github.com/pristineio/webrtc-build-scripts

If I include the library instead of the provided ones, my app compiles and can be installed to the devices, but freezes as soon as I call a method from PhoneRTC related to video (in my case setVideoView).

Any ideas?

Best regards, Chris

Zensin commented 9 years ago

This is very important. Consider changing the title to: Apple Banning PhoneRTC in February/64bit? And also opening a thread on StackOverflow.

rnur2 commented 9 years ago

Hi I have an urgency need for PhoneRTC to support 64bit. We will not be able to update our application after February 1st and this will block development.

shaundon commented 9 years ago

I'm also in need of a 64 bit version!

shaundon commented 9 years ago

@Synthetisoft I've added a question on StackOverflow about this issue.

MartinSchmidt commented 9 years ago

Hi

I have made a fork of the github where i have added support for arm64. Just remember to download the binary file for ios seperatly from google drive. Link is in the description of the project.

https://github.com/MartySchmidt/phonertc

I have also changed the process after one adds it to a cordova project, but the console will write the new steps, when you add it.

tbh1 commented 9 years ago

@MartySchmidt It looks like your libWebRTC.a comes in at over 600 MB. The current version is 2.1MB. Running strip -S -x -o stripped/libWebRTC.a -r libWebRTCa reduced the size to 45MB but stripping still needs to be done before the libraries are combined into a fat lib.

MartinSchmidt commented 9 years ago

Okey, i will try that, when I am back at work on Monday.

MartinSchmidt commented 9 years ago

I have tried stripping the library file, and it came down to 47MB, even when i stripped all files before combining them. But i think you are confusing the current libWebRTC.a with the new one, because the libWebRTC that are 2.1MB is only a small part of the new file, which includes all the iOS binary files, so i renamed it libPhoneRTC.a in my fork, to avoid confusion. And it is now included in the fork itself.

ballbrk commented 9 years ago

Hi @MartySchmidt
I follow those steps to build phonertc for amd64 cordova plugin add https://github.com/MartySchmidt/phonertc.git

And make the changes that your plugin said

and I got the following errors

if I try to compile or emulate the app from cordova

ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

\ BUILD FAILED ** The following build commands failed: Ld build/emulator/chat_client.app/chat_client normal i386

cordova platform Installed platforms: android 3.6.4, browser 3.5.2, ios 3.7.0

When I use Xcode to emulate my project I got the following errors

Ld /Users/ballbrk/Library/Developer/Xcode/DerivedData/chat_client-awddpynatinblobzpyyubcgwqlhl/Build/Products/Debug-iphonesimulator/chat_client.app/chat_client normal x86_64 cd /Users/ballbrk/Projects/chat_client/platforms/ios export IPHONEOS_DEPLOYMENT_TARGET=8.1 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/ballbrk/Library/Developer/Xcode/DerivedData/chat_client-awddpynatinblobzpyyubcgwqlhl/Build/Products/Debug-iphonesimulator -L/Users/ballbrk/Projects/chat_client/platforms/ios/chat_client/Plugins/com.dooble.phonertc -F/Users/ballbrk/Library/Developer/Xcode/DerivedData/chat_client-awddpynatinblobzpyyubcgwqlhl/Build/Products/Debug-iphonesimulator -filelist /Users/ballbrk/Library/Developer/Xcode/DerivedData/chat_client-awddpynatinblobzpyyubcgwqlhl/Build/Intermediates/chat_client.build/Debug-iphonesimulator/chat_client.build/Objects-normal/x86_64/chat_client.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -ObjC -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/ballbrk/Library/Developer/Xcode/DerivedData/chat_client-awddpynatinblobzpyyubcgwqlhl/Build/Intermediates/chat_client.build/Debug-iphonesimulator/chat_client.build/Objects-normal/x86_64/chat_client.swiftmodule -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.1 -licucore -framework AssetsLibrary /Users/ballbrk/Library/Developer/Xcode/DerivedData/chat_client-awddpynatinblobzpyyubcgwqlhl/Build/Products/Debug-iphonesimulator/libCordova.a -framework CoreGraphics -framework MobileCoreServices -lPhoneRTC -lc++ -lstdc++ -lsqlite3.0 -framework OpenGLES -framework CoreVideo -framework CoreMedia -framework CoreAudio -framework AVFoundation -framework QuartzCore -framework CoreLocation -framework AudioToolbox -framework GLKit -Xlinker -dependency_info -Xlinker /Users/ballbrk/Library/Developer/Xcode/DerivedData/chat_client-awddpynatinblobzpyyubcgwqlhl/Build/Intermediates/chat_client.build/Debug-iphonesimulator/chat_client.build/Objects-normal/x86_64/chat_client_dependency_info.dat -o /Users/ballbrk/Library/Developer/Xcode/DerivedData/chat_client-awddpynatinblobzpyyubcgwqlhl/Build/Products/Debug-iphonesimulator/chat_client.app/chat_client

ld: warning: ignoring file /Users/ballbrk/Projects/chat_client/platforms/ios/chat_client/Plugins/com.dooble.phonertc/libPhoneRTC.a, missing required architecture x86_64 in file /Users/ballbrk/Projects/chat_client/platforms/ios/chat_client/Plugins/com.dooble.phonertc/libPhoneRTC.a (2 slices) Undefined symbols for architecture x86_64: "_OBJCCLASS$_RTCAudioTrack", referenced from: _get_field_types_PhoneRTCPlugin in PhoneRTCPlugin.o "_OBJCCLASS$_RTCEAGLVideoView", referenced from: TFC11chat_client14PhoneRTCPlugin15createVideoViewfS0_FT6paramsGSqCS_17VideoLayoutParamsCSo16RTCEAGLVideoView in PhoneRTCPlugin.o TFC11chat_client14PhoneRTCPlugin19addRemoteVideoTrackfS0FCSo13RTCVideoTrackT in PhoneRTCPlugin.o **TToFC11chat_client14PhoneRTCPlugin19addRemoteVideoTrackfS0FCSo13RTCVideoTrackT in PhoneRTCPlugin.o _get_field_types_PhoneRTCPlugin in PhoneRTCPlugin.o _get_field_types_VideoTrackViewPair in PhoneRTCPlugin.o TFFC11chat_client14PhoneRTCPlugin12setVideoViewFS0_FCSo20CDVInvokedUrlCommandT_U_FTT in PhoneRTCPlugin.o "_OBJCCLASS$_RTCICECandidate", referenced from: TFC11chat_client7Session14receiveMessagefS0FSST in Session.o _get_field_types_Session in Session.o TTSCSo15RTCICECandidate_TFSa6appendUfRGSaQFQT in Session.o _TTSCSo15RTCICECandidateTFVSs12_ArrayBuffer18_uninitializedCopyUfGS_QFTGVSs5RangeSi6targetGVSs20UnsafeMutablePointerQGS1_Q in Session.o TTSCSo15RTCICECandidate_TFVSs12ArrayBufferg9subscriptFSiQ in SessionDescriptionDelegate.o "_OBJCCLASS$_RTCICEServer", referenced from: TFC11chat_client7Session4callfS0_FTT in Session.o _TTSCSo12RTCICEServerTFSa6appendUfRGSaQFQT in Session.o TTSCSo12RTCICEServer_PSs9AnyObject__TFSs15arrayForceCastUFGSaQ_GSaQ0 in Session.o TTSCSo12RTCICEServerTFVSs12_ArrayBuffer18_uninitializedCopyUfGS_QFTGVSs5RangeSi6targetGVSs20UnsafeMutablePointerQGS1_Q** in Session.o "_OBJCCLASS$_RTCMediaConstraints", referenced from: TFC11chat_client14PhoneRTCPlugin19initLocalVideoTrackfS0_FTT in PhoneRTCPlugin.o TFC11chat_client7SessioncfMS0_FT6pluginCS_14PhoneRTCPlugin21peerConnectionFactoryCSo24RTCPeerConnectionFactory6configCS_13SessionConfig10callbackIdSS10sessionKeySSS0 in Session.o TFC11chat_client7SessionCfMS0_FT6pluginCS_14PhoneRTCPlugin21peerConnectionFactoryCSo24RTCPeerConnectionFactory6configCS_13SessionConfig10callbackIdSS10sessionKeySSS0 in Session.o _get_field_types_Session in Session.o "_OBJCCLASS$_RTCMediaStream", referenced from: _get_field_types_Session in Session.o "_OBJCCLASS$_RTCPair", referenced from: TFC11chat_client7SessioncfMS0_FT6pluginCS_14PhoneRTCPlugin21peerConnectionFactoryCSo24RTCPeerConnectionFactory6configCS_13SessionConfig10callbackIdSS10sessionKeySSS0 in Session.o TFC11chat_client7SessionCfMS0_FT6pluginCS_14PhoneRTCPlugin21peerConnectionFactoryCSo24RTCPeerConnectionFactory6configCS_13SessionConfig10callbackIdSS10sessionKeySSS0 in Session.o "_OBJCCLASS$_RTCPeerConnection", referenced from: _get_field_types_Session in Session.o "_OBJCCLASS$_RTCPeerConnectionFactory", referenced from: TFC11chat_client14PhoneRTCPlugincfMS0_FT7webViewCSo9UIWebViewS0 in PhoneRTCPlugin.o TFC11chat_client14PhoneRTCPluginCfMS0_FT7webViewCSo9UIWebViewS0 in PhoneRTCPlugin.o TToFC11chat_client14PhoneRTCPlugincfMS0_FT7webViewCSo9UIWebViewS0 in PhoneRTCPlugin.o _get_field_types_PhoneRTCPlugin in PhoneRTCPlugin.o _get_field_types_Session in Session.o "_OBJCCLASS$_RTCSessionDescription", referenced from: TFC11chat_client7Session14receiveMessagefS0FSST in Session.o TFC11chat_client26SessionDescriptionDelegate14peerConnectionfS0_FTGSQCSo17RTCPeerConnection_27didCreateSessionDescriptionGSQCSo21RTCSessionDescription_5errorGSQCSo7NSErrorT_ in SessionDescriptionDelegate.o "_OBJCCLASS$_RTCVideoCapturer", referenced from: TFC11chat_client14PhoneRTCPlugin19initLocalVideoTrackfS0_FTT in PhoneRTCPlugin.o _get_field_types_PhoneRTCPlugin in PhoneRTCPlugin.o "_OBJCCLASS$_RTCVideoSource", referenced from: _get_field_types_PhoneRTCPlugin in PhoneRTCPlugin.o "_OBJCCLASS$_RTCVideoTrack", referenced from: _get_field_types_PhoneRTCPlugin in PhoneRTCPlugin.o _get_field_types_VideoTrackViewPair in PhoneRTCPlugin.o TFFC11chat_client10PCObserver14peerConnectionFS0_FTGSQCSo17RTCPeerConnection_11addedStreamGSQCSo14RTCMediaStream__T_U_FTT in PCObserver.o _get_field_types_Session in Session.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

ballbrk commented 9 years ago

The problem was that the library don't have version for x86_64. I've compiled the source and stripped. Now I've a Lib with 218MB that is universal

qdequele commented 9 years ago

@ballbrk, I have the same problem. Could you send a pull request with your correction please?