Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Run the app on iOS Device #21

Open
IyiKuyoro opened this issue Mar 23, 2021 · 9 comments
Open

Unable to Run the app on iOS Device #21

IyiKuyoro opened this issue Mar 23, 2021 · 9 comments
Assignees

Comments

@IyiKuyoro
Copy link

IyiKuyoro commented Mar 23, 2021

Hi, I am unable to run the app on an iOS device after following the steps provided. There are two scenarios with different errors.

Scenario One

The build step does not succeed when I follow the steps outlined here, specifically when I set the frameworks to Embed & Sign. I get the following error.

error: Multiple commands produce '<my_project_path>/build/ios/Debug-iphoneos/Runner.app/Frameworks/AmazonChimeSDK.framework':
    1) Target 'Runner' has copy command from '<my_download_path>/AmazonChimeSDK-0.11.1/AmazonChimeSDK.framework' to '<my_project_path>/build/ios/Debug-iphoneos/Runner.app/Frameworks/AmazonChimeSDK.framework'
    2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”

    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    ...
    warning: duplicate output file '<my_project_path>/build/ios/Debug-iphoneos/Runner.app/Frameworks/AmazonChimeSDK.framework' on task: PhaseScriptExecution [CP] Embed Pods Frameworks /Users/opeoluwa/Library/Developer/Xcode/DerivedData/Runner-cwvpeyycunxuyadhtqpvlniosdlz/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/Runner.build/Script-E7663339339A35325D295A3A.sh (in target 'Runner' from project 'Runner')
    error: Building for iOS, but the linked and embedded framework 'AmazonChimeSDK.framework' was built for iOS + iOS Simulator. (in target 'Runner' from project 'Runner')
    error: Building for iOS, but the linked and embedded framework 'AmazonChimeSDKMedia.framework' was built for iOS + iOS Simulator. (in target 'Runner' from project 'Runner')

Based on what I see in this StackOverflow question and the warning below, I understand that it is preferable to use the xcframework which I can't use as far as I know in this case because the README here specified versions 0.11.1 for core and 0.7.1 for media. I tried finding the binary for these versions in xcframework here unsuccessfully. I was able to replicate this with the example project when I changed the framework embedded settings to Embed and Sign.
Screen Shot 2021-03-23 at 10 46 13 AM

Scenario Two

Without Embed and Sign, the build succeeds, but the app crashes right after it launches with the following error

(lldb) dyld: dependent dylib '@rpath/AmazonChimeSDKMedia.framework/AmazonChimeSDKMedia' not found for '/private/var/containers/Bundle/Application/DB1443CB-4E62-4D57-817F-49D4709C273C/Runner.app/Frameworks/AmazonChimeSDK.framework/AmazonChimeSDK', tried but didn't find: '/usr/lib/swift/AmazonChimeSDKMedia.framework/AmazonChimeSDKMedia' '/private/var/containers/Bundle/Application/DB1443CB-4E62-4D57-817F-49D4709C273C/Runner.app/Frameworks/AmazonChimeSDKMedia.framework/AmazonChimeSDKMedia' '/private/var/containers/Bundle/Application/DB1443CB-4E62-4D57-817F-49D4709C273C/Runner.app/Frameworks/AmazonChimeSDK.framework/Frameworks/AmazonChimeSDKMedia.framework/AmazonChimeSDKMedia' '@rpath/AmazonChimeSDKMedia.framework/AmazonChimeSDKMedia' '/System/Library/Frameworks/AmazonChimeSDKMedia.framework/AmazonChimeSDKMedia' 
* thread #1, stop reason = signal SIGABRT                               
    frame #0: 0x000000010511f440 dyld`__abort_with_payload + 8          
dyld`__abort_with_payload:                                              
->  0x10511f440 <+8>:  b.lo   0x10511f460               ; <+40>         
    0x10511f444 <+12>: pacibsp                                          
    0x10511f448 <+16>: stp    x29, x30, [sp, #-0x10]!                   
    0x10511f44c <+20>: mov    x29, sp                                   
Target 0: (Runner) stopped.

In this case, I felt the issue was with the other configurations, but again I was able to reproduce this in the example project without modification to the setup.

Versions

Flutter: 2.0.3
XCode: 12.4

I would really appreciate any help I can get. Thanks.

@gianlucainnocente
Copy link

Same problem here..

@gianlucainnocente
Copy link

@eggnstone can you check the ios problem? thank you

@eggnstone
Copy link
Owner

Hi @gianlucainnocente

I'm not an IOS guy, but fortunately @henlamk took over that part. I think he's working on it. Could you comment please?

@gianlucainnocente
Copy link

Thanks @eggnstone .
@henlamk if you need, i can show you the problem on my laptop

@IyiKuyoro
Copy link
Author

Hey @gianlucainnocente, in case you need to move ahead with your work, I was able to solve this in a copy of this repo by replacing the iOS Amazon Chime SDK binaries with the latest version at the time. This meant I also had to handle some new events that were not included in this plugin's version.

@gianlucainnocente
Copy link

Hello @henlamk and @IyiKuyoro ,
i tried to use the official example but on ios is crashing with this error.
If i add the two .framework files to the xcode runner Frameworks, it tells that classes are duplicate..

Who can help me?

dyld: Library not loaded: @rpath/AmazonChimeSDKMedia.framework/AmazonChimeSDKMedia Referenced from: /private/var/containers/Bundle/Application/F6BCF3AB-1E68-4A05-9AC6-19C28932DC88/Runner.app/Frameworks/AmazonChimeSDK.framework/AmazonChimeSDK Reason: image not found dyld: launch, loading dependent libraries DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib

@gianlucainnocente
Copy link

@IyiKuyoro @henlamk Can anyone help me to unlock it?

@IyiKuyoro
Copy link
Author

@gianlucainnocente Did you add the .framework files to your project or a copy of this eggnstone_amazon_chime project which you then use in your project as I suggested (basically updating the iOS Amazon Chime SDK for this plugin)?

@gianlucainnocente
Copy link

@IyiKuyoro i tried yes. But i get the attached error. Any ideas?

Schermata 2021-05-04 alle 13 08 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants