Ok for the life of me I cannot figure this problem out. I am utilizing a SMTPsender to send a email without going through the user mail UI. What I cannot understand is when I run my application in the simulator, it shoots out a email without any issues when the function "sendemail" gets called at runtime. Now when I run the test on the physical iPhone, it gets held up and stops the connection. Here is the log I am getting:
2014-06-09 05:59:11.601 MCDemo[916:60b] in send
2014-06-09 05:59:11.606 MCDemo[916:60b] C: Attempting to connect to server at: smtp.gmail.com:25
2014-06-09 05:59:11.920 MCDemo[916:60b] in applicationDidBecomeActive:
2014-06-09 05:59:13.723 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.725 MCDemo[916:60b] S: 220 mx.google.com ESMTP r132sm217421oib.11 - gsmtp
2014-06-09 05:59:13.726 MCDemo[916:60b] C: EHLO localhost
2014-06-09 05:59:13.728 MCDemo[916:60b] *** starting short watchdog ***
2014-06-09 05:59:13.801 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.806 MCDemo[916:60b] S: 250-mx.google.com at your service, [2602:252:d3a:ca70:cd5d:c927:578f:cc91]
2014-06-09 05:59:13.809 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.811 MCDemo[916:60b] S: 250-SIZE 35882577
2014-06-09 05:59:13.812 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.814 MCDemo[916:60b] S: 250-8BITMIME
2014-06-09 05:59:13.815 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.817 MCDemo[916:60b] S: 250-STARTTLS
2014-06-09 05:59:13.818 MCDemo[916:60b] C: STARTTLS
2014-06-09 05:59:13.820 MCDemo[916:60b] *** starting short watchdog ***
2014-06-09 05:59:13.822 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.824 MCDemo[916:60b] S: 250-ENHANCEDSTATUSCODES
2014-06-09 05:59:13.825 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.827 MCDemo[916:60b] S: 250-PIPELINING
2014-06-09 05:59:13.828 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.829 MCDemo[916:60b] S: 250-CHUNKING
2014-06-09 05:59:13.831 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.832 MCDemo[916:60b] S: 250 SMTPUTF8
2014-06-09 05:59:13.920 MCDemo[916:60b] *** stopping watchdog ***
2014-06-09 05:59:13.922 MCDemo[916:60b] S: 220 2.0.0 Ready to start TLS
2014-06-09 05:59:13.931 MCDemo[916:60b] Beginning TLSv1...
2014-06-09 05:59:13.933 MCDemo[916:60b] C: EHLO localhost
2014-06-09 05:59:14.164 MCDemo[916:60b] CFNetwork SSLHandshake failed (-9807)
2014-06-09 05:59:14.264 MCDemo[916:60b] delegate - error(-9807): The operation couldn’t be completed. (OSStatus error -9807.)
2014-06-09 05:59:19.611 MCDemo[916:60b] *** stopping watchdog ***
This is the code regarding the log:
-(void)sendEmail
{
SKPSMTPMessage *testMsg = [[SKPSMTPMessage alloc] init];
testMsg.fromEmail = #"test#test.com";
testMsg.toEmail = #"*********"; //left blank for this example
testMsg.relayHost = #"smtp.gmail.com";//smtp.mac.com";
testMsg.requiresAuth = YES;
testMsg.login = #"*******"; //left blank
testMsg.pass = #"*****";
testMsg.subject = #"test message";
testMsg.bccEmail = #"test#test.com";
testMsg.wantsSecure = YES; // smtp.gmail.com doesn't work without TLS!
// Only do this for self-signed certs!
//testMsg.validateSSLChain = YES;
testMsg.delegate = self;
NSDictionary *plainPart = [NSDictionary dictionaryWithObjectsAndKeys:#"text/plain",kSKPSMTPPartContentTypeKey,
#"This is a tést messåge.",kSKPSMTPPartMessageKey,#"8bit",kSKPSMTPPartContentTransferEncodingKey,nil];
testMsg.parts = [NSArray arrayWithObjects:plainPart,nil];
[testMsg send];
}
Is there a reason why it will not work on my iPhone but works for the simulator?
The status -9807 means that the certificate chain couldn't be validated. This can be caused by an incorrect time/date on the device.
Import CFNetwork framework in your project
Related
I am developing an Ionic 3 application that requires themeablebrowser. Everything was working fine and the themeablebrowser was working. Now a bug happens but i don't know how. I am getting the error after adding and building the ios platform.
The themeablebrowser plugin is not working anymore and in Xcode I am getting this error:
#autoreleasepool {
int retVal = UIApplicationMain(argc, argv, nil, #"AppDelegate");
return retVal;
}
the error here
2017-09-21 03:22:53.022 toufoulakids[553:107535] -[CDVFileTransferDelegate connectionDidFinishLoading:] [Line 637] File Transfer Download success
2017-09-21 03:22:53.216 toufoulakids[553:107195] -[__NSCFString charValue]: unrecognized selector sent to instance 0x15537d60
2017-09-21 03:22:53.222 toufoulakids[553:107195] *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> -[__NSCFString charValue]: unrecognized selector sent to instance 0x15537d60
I can't connect to my MobileFirst server from my iOS native app.
I change the host, wlServerContext and port in my worklight.plist.
I upload the .wlapp and .adapter in the console of the server.
This is the log in my app:
2015-03-30 14:34:31.119 El_Universal_Demo[696:146217] Connecting to server and initializing push notification ...
2015-03-30 14:34:31.125 El_Universal_Demo[696:146217] [DEBUG] [WL_CONFIG] -[WLConfig init] in WLConfig.m:69 :: {
"application id" = "El_Universal_Demo";
"application version" = "1.0";
environment = iOSnative;
host = "198.11.212.197";
platformVersion = "7.0.0.0";
port = 8080;
protocol = http;
wlServerContext = "/wladmin";
wlUid = "wY/mbnwKTDDYQUvuQCdSgg==";
}
2015-03-30 14:34:31.160 El_Universal_Demo[696:146217] [WARN] [USER_CERT_AUTH] + [WLUserAuthManager getCertificateIdentifier] in WLUserAuthManager.m:68 :: Certificate Identifier Key: com.worklight.userenrollment.certificate:com.eluniversal.El-Universal-Demo
2015-03-30 14:34:31.173 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] +[WLAFHTTPClientWrapper requestWithURL:] in WLAFHTTPClientWrapper.m:46 :: Request url is http://198.11.212.197:8080/wladmin/apps/services/api/El_Universal_Demo/iOSnative/init
2015-03-30 14:34:31.202 El_Universal_Demo[696:146217] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:141 :: Request timeout is 60.000000
2015-03-30 14:34:31.206 El_Universal_Demo[696:146217] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:220 :: Sending request (http://198.11.212.197:8080/wladmin/apps/services/api/El_Universal_Demo/iOSnative/init) with headers:
{
"Accept-Language" = es;
"User-Agent" = "El_Universal_Demo/1 (iPhone; iOS 8.1.2; Scale/2.00)/WLNativeAPI/7.0.0.0";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "1.0";
"x-wl-clientlog-appname" = "El_Universal_Demo";
"x-wl-clientlog-appversion" = "1.0";
"x-wl-clientlog-deviceId" = "A6042553-8580-4365-A69C-6731388D6A56";
"x-wl-clientlog-env" = iOSnative;
"x-wl-clientlog-model" = "iPhone6,1";
"x-wl-clientlog-osversion" = "8.1.2";
"x-wl-device-id" = "A6042553-8580-4365-A69C-6731388D6A56";
"x-wl-platform-version" = "7.0.0.0";
}
You can see the request body in the Analytics platform logs.
2015-03-30 14:34:31.219 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper start] in WLAFHTTPClientWrapper.m:297 :: Starting the request with URL http://198.11.212.197:8080/wladmin/apps/services/api/El_Universal_Demo/iOSnative/i nit
2015-03-30 14:34:31.225 El_Universal_Demo[696:146217] [DEBUG] [WL_REQUEST] __42-[WLRequest sendRequest:path:withOptions:]_block_invoke in WLRequest.m:230 :: waiting for response... (Thread=<NSThread: 0x17007f3c0>{number = 1, name = main})
2015-03-30 14:34:31.231 El_Universal_Demo[696:146217] url a cargar (null)
2015-03-30 14:34:31.288 El_Universal_Demo[696:146217] APNS Token : <9f662f33 5de5971b 5371851e 7d91fc17 f6f83d55 a9c913f6 973eec67 2e10c365>
2015-03-30 14:34:31.289 El_Universal_Demo[696:146217] APNS Token : <9f662f33 5de5971b 5371851e 7d91fc17 f6f83d55 a9c913f6 973eec67 2e10c365>
2015-03-30 14:34:31.476 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:324 :: Request Failed
2015-03-30 14:34:31.480 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:325 :: Response Status Code : 404
2015-03-30 14:34:31.484 El_Universal_Demo[696:146217] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:326 :: Response Error : Expected status code in (200-299), got 404
2015-03-30 14:34:31.501 El_Universal_Demo[696:146217] [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:466 :: Status code='404' error='Expected status code in (200-299), got 404' response=''
2015-03-30 14:34:31.508 El_Universal_Demo[696:146217] [DEBUG] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:469 :: Response Header: {
Connection = "Keep-Alive";
"Content-Language" = "en-US";
"Content-Length" = 0;
Date = "Mon, 30 Mar 2015 20:34:44 GMT";
"Keep-Alive" = "timeout=10, max=100";
"X-Powered-By" = "Servlet/3.0";
}
Response Data:
2015-03-30 14:34:31.514 El_Universal_Demo[696:146217] [ERROR] [WL_CLIENT] - [WLClient onInitRequestFailure:userInfo:] in WLClient.m:1060 :: onInitRequestFailure
I need to test an example with notifications based on tags. My example works locally but I want to test it with the development server in the cloud and I cannot do that if my app doesn't connect.
I'm using MobileFirst 7.0
Regards.
You say it's working locally. Can you expend on that?
Are you sure in the settings you've placed in worklight.plist?
http://198.11.212.197:8080/wladmin/apps/services/api/El_Universal_Demo/iOSnative/init
That IP address looks local to me rather than remote ("in the cloud"). Verify your settings.
Thanks, this problem was resolved.
I had to reinstall all the configuration of installation in my server and again upload the run time (.war), wlapp and adapter.
Also in the moment when I did the deploy of my native app in eclipse some times appeared an error in the console about a problem in the file .war.
So I had to make other workspace and verify settings of my native app. (worklight.plist)
My problem now is that I don´t receive any notification in my iPhone when I run a notification of my adapter but is other topic.
[1] How to invoke the url or link of an adapter
Regards
I am developing an application for video call, but when try to make call application crash with following error
2014-12-30 00:00:50.866 closeChat[28683:3791106] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString xmlChar]: unrecognized selector sent to instance 0x19b4a8'
*** First throw call stack:
(0x29e5949f 0x3764fc8b 0x29e5e8b9 0x29e5c7d7 0x29d8e058 0xf2bc5 0xee3a9 0x89923 0x89d89 0x29e1627b 0x88c05 0x889af 0x371b3 0x2d34c9fb 0x2d34c9a1 0x2d337613 0x2d34c40d 0x2d3111ad 0x29e1fd95 0x29e1d453 0x29e1d85b 0x29d6b3c1 0x29d6b1d3 0x311690a9 0x2d37afa1 0x67189 0x37bcfaaf)
libc++abi.dylib: terminating with uncaught exception of type NSException
I used the following code:
self.videoChat = [[QBChat instance] createAndRegisterVideoChatInstance];
self.videoChat.viewToRenderOpponentVideoStream = self.imgOppenentViewView;
self.videoChat.viewToRenderOwnVideoStream = self.imgOwnVideoView;
self.videoChat.useHeadphone = 1;
self.videoChat.useBackCamera = 1;
NSMutableDictionary *videoChatConfiguration = [[QBSettings videoChatConfiguration] mutableCopy];
//
[videoChatConfiguration setObject:AVCaptureSessionPresetLow forKey:kQBVideoChatFrameQualityPreset];
[videoChatConfiguration setObject:#10 forKey:kQBVideoChatVideoFramesPerSecond];
//
[QBSettings setVideoChatConfiguration:videoChatConfiguration];
[QBChat instance].delegate = self;
[self.videoChat callUser:[self.opponentID intValue] conferenceType:QBVideoChatConferenceTypeAudioAndVideo];
I've tested video sample Quickblox with your settings and video call works as expected.
Please try to setup Quickblox with CocoaPods and see if error happens again
http://quickblox.com/developers/IOS-how-to-connect-Quickblox-framework#CocoaPods
And there is a new WebRTC sample you can test. It has more features and preferred to use.
I downloaded skpsmtpmessage code from Github and ran it on my iphone, it is unable to send any e-mails through my yahoo account. I set
testMsg.relayHost=#"smtp.mail.yahoo.com"
but it always fail with "Unsupported login mechanism." or something like that even though I have the right login and password on there. see console log below.
Has anybody tried sending mail thru yahoo with this program?
SKPSMTPMessage *testMsg = [[SKPSMTPMessage alloc] init];
testMsg.fromEmail = #"mylogin#yahoo.com";
testMsg.toEmail = #"mylogin#yahoo.com";
testMsg.relayHost = #"smtp.mail.yahoo.com";
testMsg.requiresAuth = YES;
testMsg.login = #"mylogin";
testMsg.pass = #"mypassword";
testMsg.subject = #"test message";
testMsg.wantsSecure = NO; // I tried both YES and NO, neither works
Log as follows
2014-04-25 17:10:08.748 SMTPSender[14408:60b] C: Attempting to connect to server at: smtp.mail.yahoo.com:25
2014-04-25 17:10:08.774 SMTPSender[14408:60b] Application windows are expected to have a root view controller at the end of application launch
2014-04-25 17:10:09.010 SMTPSender[14408:60b] *** stopping watchdog ***
2014-04-25 17:10:09.011 SMTPSender[14408:60b] S: 220 smtp.mail.yahoo.com ESMTP ready
2014-04-25 17:10:09.011 SMTPSender[14408:60b] C: EHLO localhost
2014-04-25 17:10:09.012 SMTPSender[14408:60b] *** starting short watchdog ***
2014-04-25 17:10:09.070 SMTPSender[14408:60b] *** stopping watchdog ***
2014-04-25 17:10:09.071 SMTPSender[14408:60b] S: 250-smtp.mail.yahoo.com
2014-04-25 17:10:09.071 SMTPSender[14408:60b] *** stopping watchdog ***
2014-04-25 17:10:09.071 SMTPSender[14408:60b] S: 250-PIPELINING
2014-04-25 17:10:09.072 SMTPSender[14408:60b] *** stopping watchdog ***
2014-04-25 17:10:09.072 SMTPSender[14408:60b] S: 250-SIZE 41697280
2014-04-25 17:10:09.072 SMTPSender[14408:60b] *** stopping watchdog ***
2014-04-25 17:10:09.072 SMTPSender[14408:60b] S: 250-8 BITMIME
2014-04-25 17:10:09.073 SMTPSender[14408:60b] *** stopping watchdog ***
2014-04-25 17:10:09.073 SMTPSender[14408:60b] S: 250 STARTTLS
2014-04-25 17:10:09.074 SMTPSender[14408:60b] delegate - error(-2): Unsupported login mechanism.
Any ideas?
I'm trying to use forge.event.connectionStateChange.addListener from the docs. I've create and entirely empty application, added "event":true to the config.json configuration and added the following bit to the main.js:
forge.logging.info("Add JavaScript to js/main.js!");
forge.event.connectionStateChange.addListener(
function() {
alert('Device ' + (forge.is.connection.connect() ? "is" : "is not") + 'connected.');
},
function(){
alert('Erorr');
}
);
When I run the application and turn off my machine's wifi, the application crashes. I can provide more log if needed.
[DEBUG] Native call: {
[DEBUG] callid = "9B3DBB44-870E-438B-8128-07E88474DDAB";
[DEBUG] method = "launchimage.hide";
[DEBUG] params = {
[DEBUG] };
[DEBUG] }
[DEBUG] Returning to javascript: {
[DEBUG] callid = "9B3DBB44-870E-438B-8128-07E88474DDAB";
[DEBUG] content = "<null>";
[DEBUG] status = success;
[DEBUG] }
[INFO] No reload update available.
[INFO] 2013-03-04 16:59:54.725 Forge[68603:c07] +[BorderControl returnResult:]: unrecognized selector sent to class 0x2fb4a4
[INFO] 2013-03-04 16:59:54.725 Forge[68603:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[BorderControl returnResult:]: unrecognized selector sent to class 0x2fb4a4'
[INFO] *** First throw call stack:
[INFO] (0x33b6012 0x2e55e7e 0x34412ad 0x33a5bbc 0x33a594e 0x2e695c8 0x2895765 0x3339f3f 0x333996f 0x335c734 0x335bf44 0x335be1b 0x33107e3 0x3310668 0x1d99ffc 0x26e6 0x2625)
[INFO] libc++abi.dylib: terminate called throwing an exception
Sorry - our bad: this is a symptom of the same problem which was causing problems with Reload in v1.4.32.
There's a fix in v1.4.33 - please do give it a try and let me know if that works for you.