twilio / video-quickstart-ios

Twilio Video Quickstart for iOS
https://www.twilio.com/docs/api/video
MIT License
460 stars 178 forks source link

App Crashes on real device as soon it opens #460

Closed piyush9290 closed 4 years ago

piyush9290 commented 4 years ago

Before filing an issue please check that the issue is not already addressed by the following:

If this is an issue with the QuickStart itself, file it here. If this is an issue with the SDK or how to do something with the SDK please use twilio-video-ios instead.

Please ensure that you are not sharing any Personally Identifiable Information(PII) or sensitive account information (API keys, credentials, etc.) when reporting an issue.

Description

On installing the app on real device, the app crashes right away.

Steps to Reproduce

  1. Connect the device with Mac
  2. Run the project on Device

Expected Behavior

Should display the viewController

Actual Behavior

App crashes

Reproduces How Often

100% Reproducible

Logs

dyld: Library not loaded: @rpath/TwilioVideo.framework/TwilioVideo Referenced from: /private/var/containers/Bundle/Application/778DD107-8671-42CA-810A-7F336DBC1876/VideoQuickStart.app/VideoQuickStart Reason: no suitable image found. Did find:

/private/var/containers/Bundle/Application/778DD107-8671-42CA-810A-7F336DBC1876/VideoQuickStart.app/Frameworks/TwilioVideo.framework/TwilioVideo: code signature invalid for '/private/var/containers/Bundle/Application/778DD107-8671-42CA-810A-7F336DBC1876/VideoQuickStart.app/Frameworks/TwilioVideo.framework/TwilioVideo'
/private/var/containers/Bundle/Application/778DD107-8671-42CA-810A-7F336DBC1876/VideoQuickStart.app/Frameworks/TwilioVideo.framework/TwilioVideo: code signature invalid for '/private/var/containers/Bundle/Application/778DD107-8671-42CA-810A-7F336DBC1876/VideoQuickStart.app/Frameworks/TwilioVideo.framework/TwilioVideo'
/private/var/containers/Bundle/Application/778DD107-8671-42CA-810A-7F336DBC1876/VideoQuickStart.app/Frameworks/TwilioVideo.framework/TwilioVideo: stat() failed with errno=1
/private/var/containers/Bundle/Application/778DD107-8671-42CA-810A-7F336DBC1876/VideoQuickStart.app/Frameworks/TwilioVideo.framework/TwilioVideo: code signature invalid for '/private/var/containers/Bundle/Application/778DD107-8671-42CA-810A-7F336DBC1876/VideoQuickStart.app/Frameworks/TwilioVideo.framework/TwilioVideo'
/private/var/containers/Bundle/Application/778DD107-8671-42CA-810A-7F336DBC1876/VideoQuickStart.app/Frameworks/TwilioVideo.framework/TwilioVideo: stat() failed with errno=1

Versions

Video iOS SDK

TwilioVideo (3.2.2)

Xcode

XCode 11.3.1

iOS Version

iOS 13.3.1

iOS Device

iPhone 11

ceaglest commented 4 years ago

Hey @piyush9290,

dyld: Library not loaded: @rpath/TwilioVideo.framework/TwilioVideo Referenced from: /private/var/containers/Bundle/Application/778DD107-8671-42CA-810A-7F336DBC1876/VideoQuickStart.app/VideoQuickStart Reason: no suitable image found.

Are you manually integrating TwilioVideo.framework into your app? If that is the case it looks like you didn't add TwilioVideo.framework as an embedded binary. We have instructions on manual integration here that explain the process.

Please let me know if it resolves the crash on launch.

Thanks, Chris

azianmike commented 4 years ago

@ceaglest I run into the same error. I installed via cocoapods. Works on simulator, does not work on real device.

No manual integration

paynerc commented 4 years ago

Are you attempting to deploy to an iOS device using a free ADC account? There is a known issue with iOS 13.3.1 signing applications with an embedded framework as reported here.

Work arounds at this time are either:

  1. Upgrade to iOS 13.4 beta
  2. Upgrade to a paid ADC account.
  3. Use the static library version of Twilio Video until  resolves this issue.

I know that the first two are less than ideal, but will allow you to consume the dynamic framework. We do offer Twilio Video as a static library as well. See the Manual static library integration section of the Add the SDK iOS docs for instructions on how to do so.

Let me know if you have any further issues getting your application deployed on your device.

Ryan

theHilikus commented 4 years ago

@paynerc thank you for the info

Does having your ADC account added to a paid enterprise account also solve the issue?

Either having the account added like I just mentioned, or upgrading to a paid ADC account, what's the next step after that to actually solve the problem? rebuild? redeploy? just retry to open the app? add some apple certificate to the project?

thank you again

paynerc commented 4 years ago

@theHilikus,

Yes, being part of a paid enterprise account works as well. I am a member of both types of paid accounts and am successfully able to build and sign an app with the Twilio Video framework embedded and deploy to a device.

The next step is to ensure that you are using the paid "team", not the "Personal Team" in the "Signing & Capabilities" project settings screen.

image

Once you have the proper team selected, rebuild the application so it is signed with the proper certificate and redeploy to the device.

Let me know if you have any further questions.

Ryan

paynerc commented 4 years ago

Apple released iOS 13.4 yesterday. @timrozum has tested this in the Video App project (https://github.com/twilio/twilio-video-app-ios/issues/59) and confirmed that the issue no longer exists with iOS 13.4.

Ryan