How To Build and Compile PJSIP for Xcode, Using sample code IPJSUA to test? - iphone

How to build and compile PJSIP using xCode and run the sample code IPJSUA?

First, you need to open the terminal. Terminal can be found at Applications->Utilities->terminal.
After you open the terminal, make sure you point to the desktop to make it easier to get the data folder. just type :
cd Desktop
Congrats, you already at your desktop. Now continue to type this.
svn co http://svn.pjsip.org/repos/pjproject/trunk pjproject
That code means you download the pjproject from the website to your desktop. After you finish download the PJSIP, you need to add a config_site.h. Honestly, I don't what should we do that, but just follow it. :D
How do you create a config_site.h? Just copy the config_site_sample.h, paste, and change the content become like this.
After this, we need to change the configure-iphone. I figured it out. If you just want to run at simulator you need to change the DevPath. If you want to test on device, just leave it be.
Now, I will give example to run on the Simulator. Open pjproject and you will find the configure-iphone. Open the file using a text editor and change the DEVPATH and hardcode the IPHONESDK.
The devpath will looks like this.
DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
Remember, this refers to the path to your Xcode app. If you want to make sure, go to finder->applications->xcode->show package contents. I also hardcoded the IPHONESDK.
IPHONESDK=iPhoneSimulator5.1.sdk
After you're done with that, we will going back to the terminal. Make sure you already at the pjproject folder. Type this.
export CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc
export CFLAGS="-O2 -m32 -miphoneos-version-min=5.0 -g -ggdb -g3 -DNDEBUG"
export LDFLAGS="-O2 -m32"
After that, you can configure it. Just click this on terminal. If you want to test on your device, you don't need to change the configure-iphone, export CC, etc., just directly configure-iphone.
./configure-iphone
After you're done, continue by entering the commands below to build the library and all dependencies. This line below is where the magic happens and it needs to complete successfully for you to continue.
make dep && make clean && make
You will find that all the libraries will compile. The resulting library can help us if we want to create a new project. -> this is what I'm thinking right now.
Now you almost finished, just go to the pjsip-apps->src->ipjsua. You will find the Xcode project, just click it to open at your xcode. Click build and run. You will find the interface like this.
If you want to test on your device, you must have the certificate and private key chain. I can't explain that because I got that certificate from my company. They provide it.
If you want to try, you must create a SIP account first. You can use sip2sip or ekiga. At here I tried ekiga. for example my SIP is 12345678#ekiga.net and 87654321#ekiga.net.
After the simulator we key in +a to add new account.
Next you will have to type your SIP name. remember to type "sip:". dont ever forget. here is the example:sip:12345678#ekiga.net.
After that you will have to type the URL address, just type ekiga.net since that is our URL. This URL means our server. Tor example, sip:ekiga.net.
Next is the auth realm. Type the same as the URL address, sip:ekiga.net.
Next is your username. In here my username is 12345678. You don't need to add sip or type with #ekiga.net.
Last is your password. After you register, it will automatically add it to the account. Just go to the textfield, and hit enter. It will refresh for you.
Next, we need to add buddy. Type +b, and you must input the URI address. Type sip:87654321#ekiga.net and you are done. Back to the textfield, it will add automatically to your buddy list.
You will see that your account still in offline mode. You need to change into online mode before you make a call. Just change the status by type t, and hit enter.
After that you can make a call by type M. and type 1. because our buddy is no 1. 1 is their ID. and you can make a call.

Please check below link. You can get source code from there and biuld for both device and simulator.
https://github.com/radif/SIPHON-SIP-Client-that-actually-compiles

For XCode 4.5
->
export DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/
export IPHONESDK=iPhoneSimulator5.1.sdk
export CC=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc

Related

Create different MSIX installers using a flag parameter on a .NET MAUI app

I want to automatically create different MSIX packages/installers for the same MAUI app, so that each one runs a specific code snippet according to a flag parameter.
The user does not have to interact with the app. An installer per flag value has to be created, an once the app is installed and the user double clicks the app icon, the specific piece of code has to be run.
So far, I've tried without success the following approach, trying to create a script that passes the possible values of the flag as installation parameters using the app installer and a protocol, and then trying to publish the different packages in a local path.
I would like to know whether that's feasible or there may be any other approach to get it done.
You can check this comment about .NET MAUI Windows target publishing/archiving.
In the article, the right way to set the MSIX is that you had to create a self-signed certificate and then You could add a couple of extra parameters to also add the sign the MSIX and then trust that cert manually.

Could not locate login item in the caller's bundle error when using SMLoginItemSetEnabled

I'm trying to get my swift Mac app to launch at login using the method described in this page: https://theswiftdev.com/how-to-launch-a-macos-app-at-login/
However, I keep getting the following errors as soon as I call SMLoginItemSetEnabled:
Could not locate login item com.domain.LauncherApplication in the caller's bundle
Could not enable login item: com.domain.LauncherApplication: 3: No such process
I checked that the launcher app ID is correct multiple times, I tried changing it and changing its version number. I even tried cleaning the project and moving the base app to /Applications but I always get these error messages.
Any idea what the problem might be? (Notice the solution must not require me to disable App Sandboxing)
OK, I found the problem but it took a long time since it was so sneaky: In the Copy File Build Phase section I entered "Contents/Library/LoginItem" as the subpath instead of "Contents/Library/LoginItems" (notice the 's' in the end - can't believe I missed it). So thank you #vadian! You were absolutely right.

Can someone help me out with changing my invocation phrase?

For a project that I'm working on that is in Alpha right now, I used to use an invocation ''talk to XXX''. Now that I want to deploy the Action to Beta, I want to change the invocation name/phrase as well. So I changed it to ''talk to YYY'', which is the suggested input field in the simulator as well. But when I want to test this in the simulator, I get the following error message:
Invocation Error:
You cannot use standard Google Assistant features in the Simulator. If you want to try them, use Google Assistant on your phone or other compatible devices.
For some reason, if I ignore the suggested input chip (which says ''talk to YYY'') and type in ''talk to XXX'' (the old invocation phrase) everything still works though. Seems that I'm missing something and Google support can't answer me, does someone know what I can do to successfully deploy to Beta?
When I get that message, it's usually a problem with the Console. A refresh of the page—and sometimes a simple retry—usually does the trick.
You could also try "Change Version" to make sure you're pointed to "Draft".

Correct way to submit a phonegap/jQM form.

very new at this. Could someone tell me what is the best method of submitting a form when using phonegap and JMQ? What I want to be able to do is passing the form data to a php file and then having the results passed back into app so that the user isnt directly accessing the php file at any point.
I found the following page link which basically does what I want but I keep getting "Origin null is not allowed by Access-Control-Allow-Origin" when testing out the code. So I'm guessing this will only work if the app is located on a server also?
Any happy would be great. thank <3
To test your solution on the computer you need to launch chrome from the terminal with the argument --disable-web-security. See this answer: Disable same origin policy in Chrome
In your Phonegap application you add a line of code to your config.xml in the www-folder: <access origin="*.yourdomain.com" />. Build, and you are now allowed to request all domains and subdomains from yourdomain.com. For more details on whitelisting see http://docs.phonegap.com/en/3.0.0/guide_appdev_whitelist_index.md.html#Domain%20Whitelist%20Guide
You are not able to make post through the local files, so Yes, you need to have it running in a Web Server.
But if you deploy your application, it should work either in a emulator or in your device.

Using Turbolinks with Selenium IDE

When I run my selenium test without the turbolinks gem installed in my Ruby on Rails app, the tests pass. When I include turbolinks, the tests fail. For example if the test starts off
Open /
clickAndWait link=Sign in
type id=session_email any#example.com
Then I will get an error
"[error]Element id=session_email not found.
When I look at the page source, the session_email id is still there with turbolinks installed. I found this page, http://www.digitalkingdom.org/rlp/tiki-index.php?page=Selenium+And+Javascript, which seems to indicate there could be a problem with detecting the page has fully loaded.
Is there away to fix this without changing hundreds of lines in my test suites? If not, is there a reliable selenium method that can test that a turbolinked page has fully loaded?
After some help with the github turbolinks-compatability project, I am able to provide a partial answer to this question.
If the turbolinks gem is being used, then you will need to modify your selenium test cases in order to make sure the page is really loaded. For example, if your test has the following code in it
Open /
clickAndWait link=Sign in
type id=session_email any#example.com
then it needs to be modified to
Open /
click link=Sign in
waitForElementPresent id=session_email
type id=session_email any#example.com
There are a number of "waitFor" modifiers you can used, depending on what is the feature on the page you want to test next.
However, if the test involves a javascript pop up, then you should not add a waitFor command. So for example if you have at test like
clickAndWait link=Delete
assertConfirmation Are you Sure?
you should not modify the code. Indeed adding a waitFor test hangs execution in the case of javascript popups.
This solution involves line-by-line manual modification of the code. I have opened up an issue on the Selenium Users group to see if there is some better way to handle this problem.