Twilio Phonegap plugin pjsip error - ios

I am stuck at this from few days. I installed the phonegap plugin for twilio client (by Jeff Linwood) to a fresh phonegap app. Copied the headers, library file to xcode project from twilio ios sdk as mentioned in instructions.
But when i run the test app, it gives me following error:
2014-12-14 12:30:42.940 TestApp[1802:14622] THREAD WARNING:
['TCPlugin'] took '221.611084' ms. Plugin should use a background
thread. 2014-12-14 12:30:42.941 TestApp[1802:14622] PJSIP(1):
pjsua_acc.c .Unable to create/send REGISTER: Object is busy
(PJSIP_EBUSY) [status=171001] 2014-12-14 12:30:43.947
TestApp[1802:14622] State: Offline 2014-12-14 12:30:45.727
TestApp[1802:14777] PJSIP(2): pjsua_acc.c ....SIP registration
failed, status=302 (Moved Temporarily) 2014-12-14 12:30:45.734
TestApp[1802:14777] PJSIP(1): pjsua_acc.c .....Unable to
create/send REGISTER: Object is busy (PJSIP_EBUSY) [status=171001]
Tested with following :
Xcode v 6.1.1/iOS 8.1 and XCode 5.1.1/iOS 7.1 (both alternatively)
Phonegap version : 4.1.2-0.22.9 and 3.6.3-0.22.3 (both alternatively)
Cordova iOS 4.1.2 and 3.7.0 (both alternatively)
Twilio iOS Client SDK 1.2
If you need any more info please feel free to ask.
Please suggest me if i am doing anything wrong.
It would be great if someone can help me to go through this.
Regards.

Without some code sample it's hard to say for certain, but as mentioned it looks like there are multiple connect calls being made.
Looking at the source it appears that the "deviceSetup" command will start a connection, so if you are manually calling the "connect" command after setting up the device it will likely cause that warning. Feel free to post some more sample code if that doesn't work.
Hope that helps!

Related

Flutter beacons_plugin - Unhandled Exception: MissingPluginException(No implementation found for method startMonitoring on channel beacons_plugin)

I've run into this situation: the plugin and my code ran perfectly in Android, but in iOS these errors happened:
(Screenshot - my reputation is too low to post images. For easy reading I took the screenshot of VSCode debug console; the errors were the same while run it from Xcode)
https://user-images.githubusercontent.com/10349431/94634472-b2d42e80-0302-11eb-9dc7-fa2956511b82.png
It shows in the debug screenshot above exceptions took place while invoking method startMonitoring, but after I commented related codes it turned into other methods (e.g. stopMonitoring, addRegion, etc).
(BTW, the error messages may be as many as hundreds of lines - in the screenshot above, there were actually 381 lines of total error messages.)
My environment:
MacOS 10.15.7
iOS 12.4.8 (iPad) 13.3 (iPhone)
Android 8.0.0
Xcode 12.0.1 (12A7300)
VSCode 1.49.2
Android Studio 4.0.1 with all SDK after Android 5.1 Lollipop
Thanks for any help!
I got it... In this case, BeaconsPlugin.listenToBeacons should not be placed below addRegion or startMonitoring/stopMonitoring. It should be in the first line of all actions of this plugin in the initPlatformState scope, just like it has been in the example.
Sorry for dumb question.
This error mostly occurs when you try to Hot Reload or Hot Restart after just adding new package to your pubspec.yaml.
Just stop the running project(app) and then freshly run it again. So that the added package(which contains the implementations) also pushed to the device
please check : https://stackoverflow.com/a/60088062/11989529
and this : MissingPluginException while using plugin for flutter
the same problem

ADAL for Cordova - Assistance Getting Started

Hello: I'm trying to get started with the ADAL plug-in for Cordova. Having used the native libraries a few times, I thought this would be pretty straightforward but I ran into a bit of an issue.
First of all my environment is VS2017, and the plugin is ADAL for Cordova 0.10.1.
I've created what I believe is the most simplistic example of a connection, using my own client application specifics and the ones provided in their sample online (which is) included below. My authentication looks like:
function authenticate(authCompletedCallback, errorCallback) {
var authority = "https://login.microsoftonline.com/common",
redirectUri = "http://localhost:4400",
resourceUri = "https://graph.windows.net",
clientId = "a5d92493-ae5a-4a9f-bcbf-9f1d354067d3";
var authContext = new Microsoft.ADAL.AuthenticationContext(authority);
authContext.acquireTokenAsync(resourceUri, clientId, redirectUri).then(authCompletedCallback, errorCallback);
This is then called in onDeviceReady();
acquireTokenAsync is called but doesn't appear to return either success or failure and a quick Fiddler trace doesn't appear to show the call which makes me wonder if it is not a configuration issue with Cordova to begin with.
I have commented out the Content-Security-Policy metatag with similar results.
Thank you in advance for any guidance!
Edit
Okay, perhaps this is helpful. I noticed that on the Cordova Plugin Simulation tab (I am trying to run this in the simulator in Chrome). I am seeing a dialog box with error:
There is no handler for the following exec call:
ADALProxy.acquireTokenAsync(...
Also, seems to work on a connected Android Device, just not in the local Simulator
The plug-in for Cordova doesn't support to run on the browser platform. When we developer an Cordova app and want to test on the browser platform, we have to ensure that the app depends on support the browser platform.
For the ADAL plug-in for Cordova support the platform:
Android (OS 4.0.3 and higher)
iOS Windows (Windows 8.0, Windows 8.1,
Windows 10 and Windows Phone 8.1)
And for other kinds of plug-in you can check it via you the Cordova plug-in.

ADAL Cordova Plugin unable to retain token on ios

I'm still a newbie in the mobile app development arena, please forgive me if I did not provide adequate information, probably because my lack of knowledge on its relevance. I'll edit with more info upon request.
Here's what I'm using to build my app on a Windows 7 64bit environment:
AngularJS 1.0
Phonegap Build 6.3.0 (cloud version)
cordova-android 5.2.1 (as shown on Phonegap build)
cordova-ios 4.2.0 (as shown on Phonegap build)
azure-activedirectory-library-for-cordova version 0.7.1
I'm testing on:
Android phone Samsung Galaxy SCH-I545 os version 5.0.1
iPhone 6S Plus os version 9.3.5
Everything went well with Android using ADAL plugin 0.7.1. However on iPhone, it kept going back to the login screen for authentication to our AD FS even though I already got authenticated the first time. I'm suspecting the token did not get stored in cache, that's why acquireTokenAsync kept getting called? I'm still trying to get my hands on a MAC to troubleshoot further.
Then, I updated to ADAL plugin 0.8.0 to see if that might solve my problem, but now Android stopped working and I got this error:
DEVELOPER_AUTHORITY_IS_NOT_VALID_INSTANCE
I debugged through using developer tool on both 0.7.1 and 0.8.0 and I saw no token coming back in acquireTokenAsync method in version 0.8.0. Switching back to 0.7.1 and Android works again.
Could anyone guide me on what might be causing this problem on my iPhone and Android? Maybe I'm missing additional settings or files? The way I updated the ADAL plugin was replacing the cordova-plugin-ms-adal folder under plugins and modify my config.xml file to spec="~0.8.0", that should be sufficient right?
* Update on cordova-android *
I finally got 0.8.0 working on my android device by turning off validateAuthority
var context = new Microsoft.ADAL.AuthenticationContext(authority,false);
I think it's because I'm using AD FS (found this comment in ADErrorCodes.h under adal-for-objc):
/*! The passed in authority URL does not pass validation, if you're trying to use ADFS directly you must disable authority validation. */
/*! An error was raised during the process of validating the authorization authority. */
AD_ERROR_DEVELOPER_AUTHORITY_VALIDATION = 101
* Update on cordova-ios *
Debugging in Safari developer tool, I don't have tokenCacheItems after the native method got called.
bridge.executeNativeMethod('tokenCacheReadItems',[this.authContext.authority, this.authContext.validateAuthority])
.then(function (tokenCacheItems) {
tokenCacheItems.forEach(function (item) {
result.push(new TokenCacheItem(item));
});
d.resolve(result);
}, function(err) {
d.reject(err);
});
I spent almost a week on this already and I really appreciate any help on this issue.

Parse.com iOS [pod Parse] error

I'm building a simple app, as it is described on this tutorial: Instagram like app
However, I've made all the steps correctly, to the "Run the app" part, but when I ran it, the Xcode 7 (swift2) outputs this error every time I launch the app or pull to refresh:
2015-09-20 00:46:41.224 Paws2[1196:393571] [Error]: unauthorized (Code: 0, Version: 1.8.5)
I'm using the latest pod available and I don't know how to bypass this issue.
Note that I've made an exactly app as described in the tutorial with the version 1.7.5 and the error was the same, so I updated the pos version to the latest.
I've names the app Paws2 on purpose, it wasn't a error, as it says in the Tutorial to name it 'Paws'.
Thanks in advance
- Regards, Ivan.
EDIT 1: I've updated cocoapods and everything else related and the error continues.
I had a same error too.
My case was silly. I put wrong Application ID / Client Key in didFinishLaunchingWithOptions method on AppDelegate.
[Parse setApplicationId:#“Your Application ID"
clientKey:#“Your Client Key"];
Make sure you put right keys.

MPMediaLibrary.DidChangeNotification not working

This question is related to Xamarin.iOS.
I have been trying since many days to get MPMediaLibrary.Notifications.ObserveDidChange to work without success. I tried almost everything. Suspecting something bad with Objective-C binding, I tried direct objc calls too using Messaging API. Finally, I built a Native Library and made sure that it works by testing it with pure objective-c app. Native one with Objective-C works without problem. However, the same Library when used with Xamarin.iOS doesn't get MPMediaLibraryDidChangeNotification. I have created in-built selector etc within Native library so that I just call a 'C' function without argument and it works with objective-c app. However, when used with Xamarin, the same doesn't work. I have taken care of calling beginGeneratingLibraryChangeNotifications().
Some people may suspect that My selector/delgate is not being called because of wrong use. However, every other notification is able to call my selector except this one. So syntax is not an issue, I suppose.
After all the efforts, I presume that there is something wrong in Xamarin settings, which is stopping me from getting MPMediaLibraryDidChangeNotification . I really dont know what exactly is it. So my question is - Can you guys get this notification ?
My test phone - iPhone6-8.0.2, Xamarin Studio Version 5.5.3 (build 6) Installation UUID: d84b8c6d-f992-4f19-8a35-c14bcd08420e Runtime: Mono 3.10.0 ((detached/e204655) GTK+ 2.24.23 (Raleigh theme) Package version: 310000023 Apple Developer Tools Xcode 6.1 (6604) Build 6A1052d Xamarin.iOS Version: 8.4.0.16 (Indie Edition) Hash: 80e9ff7 Branch: Build date: 2014-10-22 15:09:12-0400
Thanks, Vinay
For the Record, I am posting the answer.
Since 64 bit transition, The MediaLibrary change notification is stopped for 32 bit apps. If you build your app for 64 bit iOS, everything is fine. However, 64 bit devices with 32 bit applications won't receive these notification. I have tested it thoroughly on iPhone6. So I think this is iOS bug, which Apple needs to rectify. All the Music Player applications on App Store are unable to update library anymore since they are 32 bit.
For Xamarin Users, use Unified API for proper notification support.

Resources