jefflinwood / twilio_client_phonegap

Phonegap plugins for the Twilio Client iOS and Android SDKs
MIT License
59 stars 53 forks source link

-all_load giving Apple Mach-O Linker Error #15

Open jijunair opened 9 years ago

jijunair commented 9 years ago

Hello friends, I am stuck at this from 2 days. I installed the plugin to a fresh phonegap app. Copied the headers, library file to xcode project from twilio ios sdk and added "-ObjC" and "-all_load" in linker as mentioned after plugin installation. When i run i get the 5 deprecations warning in TCPlugin.m file. And get 1 Apple Mach-O Linker Error : ld: 38 duplicate symbols for architecture x86_64 in libTwilioClient.a file.

Build fails and so could the load the app in ios simulator. If i skip adding -all_load, build gets successful but then Twilio doesnt works. Twilio.Device.ready doesnt runs. Instead Twilio.Device.offline is called.

Using: Xcode v 6.1.1 Base SDK : iOS 8.1 Deployment Target: 6.0 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, Jiju

jefflinwood commented 9 years ago

Hi,

Are you using the Twilio iOS Client SDK 1.2 (the most recent)? The plugin's plugman documentation needs to be updated to reflect those changes. You don't need to add either of those flags.

jijunair commented 9 years ago

Thank you so much for the quick reply, Yes Jeff i am using SDK v 1.2. If i dont add "-all_load" flag, still it does not call Device.ready as mentioned above. Instead Twilio.Device.offline is called. Also i forgot to mention that i am using latest phonegap. I guess i need to downgrade it for this plugin. If so would you mention the exact version?

My current phonegap version : 4.1.2-0.22.9

Once again thanks Jeff, Regards, Jiju

jefflinwood commented 9 years ago

Hi,

I've done some more testing with the latest version of PhoneGap - 4.1.2-0.22.9

With Cordova iOS 3.7.0, and the Twilio Client SDK for iOS 1.2, my test app works correctly with the XCode 5.1/iOS 7 SDK, and not with the XCode 6.1/iOS 8 SDK.

2014-12-11 11:47:50.581 Hello World[80559:1158011] THREAD WARNING: ['TCPlugin'] took '22.936035' ms. Plugin should use a background thread. 2014-12-11 11:47:50.849 Hello World[80559:1158276] PJSIP(2): pjsua_acc.c ....SIP registration failed, status=302 (Moved Temporarily) 2014-12-11 11:47:50.850 Hello World[80559:1158276] PJSIP(1): pjsua_acc.c .....Unable to create/send REGISTER: Object is busy (PJSIP_EBUSY) [status=171001] 2014-12-11 11:47:51.582 Hello World[80559:1158011] State: Offline

jefflinwood commented 9 years ago

Now after running the app in XCode 6.1, I have seen it successfully show the device as ready.

jijunair commented 9 years ago

Hi Jeff, Installed xCode 5.1/iOS 7.1 SDK and tested. Getting the same error you mentioned :

2014-12-12 22:29:25.751 xCode5[3116:60b] THREAD WARNING: ['TCPlugin'] took '201.197998' ms. Plugin should use a background thread. 2014-12-12 22:29:25.753 xCode5[3116:60b] PJSIP(1): pjsua_acc.c .Unable to create/send REGISTER: Object is busy (PJSIP_EBUSY) [status=171001] 2014-12-12 22:29:26.753 xCode5[3116:60b] State: Offline 2014-12-12 22:29:27.191 xCode5[3116:6603] PJSIP(2): pjsua_acc.c ....SIP registration failed, status=302 (Moved Temporarily) 2014-12-12 22:29:27.194 xCode5[3116:6603] PJSIP(1): pjsua_acc.c .....Unable to create/send REGISTER: Object is busy (PJSIP_EBUSY) [status=171001]

How you passed through it then Jeff? Thank you for your support, Regards, Jiju

jefflinwood commented 9 years ago

It appears to be more of an intermittent type of error for me - in some cases, it appears, in some cases it doesn't. I do see it recovering from the pjsip errors, however.

jijunair commented 9 years ago

Hi Jeff, Thanks for your reply,

I tried to figure out about pjsip but as i am new to iOS development, i am nowhere ahead with it. Its 5th day and still stuck to twilio connection. It would be great if you could show me any direction.

Waiting for your reply, Regards, Jiju

jefflinwood commented 9 years ago

Hi,

There's nothing you can do about PJSIP- that's built into the Twilio iOS Client SDK.

Have you been able to get the device to appear ready at all?

ayajshaikh commented 9 years ago

Hi Jiju,

I have Xcode 6.1 running on Mac OS X Yosemite, with Phonegap 3.6 and it works great with iOS >6 with that setup.

You can try my fork from Jeff's repo http://GitHub.com/alignace/ twilio_client_phonegap it have few fix more for Phobegap > 3.0

Thanks Ayaj On 14-Dec-2014 12:13 pm, "jiju0nair" notifications@github.com wrote:

Hi Jeff, Thanks for your reply,

I tried to figure out about pjsip but as i am new to iOS development, i am nowhere ahead with it. Its 5th day and still stuck to twilio connection. It would be great if you could show me any direction.

Waiting for your reply, Regards, Jiju

Reply to this email directly or view it on GitHub https://github.com/jefflinwood/twilio_client_phonegap/issues/15#issuecomment-66904652 .

jijunair commented 9 years ago

Hi Jeff, No i was not able to get the device ready. Every time i run it, i get the SIP registration failed/ Object is busy error. I tried to run it with SetTimeout and many other trials but all same. May be i am missing something silly. If possible could you send me the Helloworld project that is running fine at your side.

Thanks for your help Jeff, Regards, Jiju

jijunair commented 9 years ago

HI Ayaj, Thank you for your reply,

I even tried your fork a day or two ago. Anyway let me give it one more try and reply you back here the exact status.

Regards, Jiju

jijunair commented 9 years ago

Hi Ayaj, Here is the error :

2014-12-14 20:22:22.890 Test2[2061:14386] THREAD WARNING: ['TCPlugin'] took '327.480957' ms. Plugin should use a background thread. 2014-12-14 20:22:22.892 Test2[2061:14386] PJSIP(1): pjsua_acc.c .Unable to create/send REGISTER: Object is busy (PJSIP_EBUSY) [status=171001] 2014-12-14 20:22:23.893 Test2[2061:14386] State: Offline 2014-12-14 20:22:24.201 Test2[2061:14557] PJSIP(2): pjsua_acc.c ....SIP registration failed, status=302 (Moved Temporarily)

Used following: Using: Xcode v 6.1.1 Base SDK : iOS 8.1 Phonegap : 3.6.3-0.22.3 Cordova iOS platform : 3.6.3

Waiting for your reply Ayaj, Regards, Jiju

ayajshaikh commented 9 years ago

Hey Jiju,

Where are you trying this on simulator or on Actual Hardware?

This works only on Hardware I have tested it on iPhone 4S, 5c and iPad 2.

Twilio recommends to test on Hardware only.

Thanks On 14-Dec-2014 8:29 pm, "jiju0nair" notifications@github.com wrote:

Hi Ayaj, Here is the error :

2014-12-14 20:22:22.890 Test2[2061:14386] THREAD WARNING: ['TCPlugin'] took '327.480957' ms. Plugin should use a background thread. 2014-12-14 20:22:22.892 Test2[2061:14386] PJSIP(1): pjsua_acc.c .Unable to create/send REGISTER: Object is busy (PJSIP_EBUSY) [status=171001] 2014-12-14 20:22:23.893 Test2[2061:14386] State: Offline 2014-12-14 20:22:24.201 Test2[2061:14557] PJSIP(2): pjsua_acc.c ....SIP registration failed, status=302 (Moved Temporarily)

Used following: Using: Xcode v 6.1.1 Base SDK : iOS 8.1 Phonegap : 3.6.3-0.22.3 Cordova iOS platform : 3.6.3

Waiting for your reply Ayaj, Regards, Jiju

Reply to this email directly or view it on GitHub https://github.com/jefflinwood/twilio_client_phonegap/issues/15#issuecomment-66915696 .

jijunair commented 9 years ago

Hi Ayaj,

Yes i am testing it on simulator as i dont have a hardware for right now. Let me test it on a hardware and report back.

Thanks for the reply Ayaj, Regards, Jiju