Closed ForGuru closed 7 years ago
@atsakiridis Facing the same issue
Managed to reproduce this too :(. I'm afraid the way to properly fix that is to address the issue in CocoaPods, so that headers are picked up correctly. So I would suggest that you post in CocoaPods issue to try to push them to fix it.
A possible workaround could be to make the header files of Sofia SIP flat, and update the code in the Restcomm SDK to reference them correctly. The problem with that is that, is that it's difficult to automate, since when building Sofia using autotools the dirs are expected to be non flat. Will try to work on that when I find some free cycles.
Until either fix is ready you could use one of the workarounds found at CocoaPods/CocoaPods#4605 so that you can build successfully and not be blocked.
@atsakiridis thanks
How can I integrate previous version of sdk which was without pods in swift project, can guide me through it ??
You could try following the previous Quick Start Guide, that is before cocoapods were introduced, which references the respective SDK release. But keep in mind that it is obsolete.
@atsakiridis and @TheEngineerz
I did a trick
1- Created a Swift project and added the POD of Rest-comm 2- removed the use_frameworks! keyword 3- Built and it was success full
4- performed same action on my old project with use_frameworks! keyword 5- and there was an error as expected 6- I copied "${PODS_ROOT}/Headers/" from new project and manually placed in my old project "${PODS_ROOT}/Headers/" 7- Compiled and it did now testing other things 8- Can we develop a script so it can copy all required files as I did manually ??
Yeah, this seems like on of the things the submitter of CocoaPods/CocoaPods#4605 did as a workaround. But I think it's going to be messy, having to build first without the offending cocoapod option and then building anew, but having kept the previous build somewhere so that we can copy the headers over... Its going to become unmanageable in no time :(
Any chance there are other workarounds in that issue that we could use?
But @atsakiridis I think there is some other issues with Restcomm pods itself.
I simply created a new project Init the Podfile like below
target 'TestRestComm' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
pod "restcomm-ios-sdk"
# Pods for TestRestComm
end
Every thing go successfully but i am not able to
import RestCommClient
in my ViewController.swift. It gives me error that no such module exist
Using Xcode 8.1 and Swift 3.0. Please advice
@atsakiridis @ForGuru I resolved my issue by creating Bridge header file and add this line
#import <restcomm-ios-sdk/RestCommClient.h>
Now everything is working fine.
Sounds great @TheEngineerz. So you 're able to integrate the Restcomm iOS SDK from Swift without using use_frameworks!
in your Podfile?
@atsakiridis @TheEngineerz i am abele to integrate in swift and have made few test calls
Currently its not refreshing registrations following is the log error.
Nov 27 13:17:03 MyTest[4631] <Error>: (sofsip_cli.mm:633) sofsip_handle_input_cb(), marking for restart, stackIsShuttingDown: 0
@atsakiridis @TheEngineerz Sorry that was not it was due to running the event loop again.
But ree-registration has some issues.
@ForGuru let's keep the registration issue separate and discuss in the context of #513
Closing this as the issue isn't SDK related. The gist of this issue is the following for future reference:
use_frameworks!
needs to be used, but in that case you would stumble on CocoaPod issue: CocoaPods/CocoaPods#4605. A possible workaround can be found at https://github.com/CocoaPods/CocoaPods/issues/4605#issuecomment-262853183
I have tried to integrate POD in a project where I am using
use_frameworks! keyword in pod file
it doesn't find some header files. We know that this is the known issue with PODS for a project with mixed languages (Swift and Objective C).
https://github.com/CocoaPods/CocoaPods/issues/4605
Have you been able to find a workaround for this situation ??