dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib












92















I have just updated to Xcode 7 and swift 2 and finished fixing the errors that come with the transition. I finally got the project to build, but after the launch screen I get an error saying:



dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
Referenced from: /var/mobile/Containers/Bundle/Application/...
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftAVFoundation.dylib: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftAVFoundation.dylib'



I have seen this error before but with other frameworks, and can't solve my issue. Is there a way to bypass this by adding my framework somewhere?



Thanks.










share|improve this question

























  • Ok so after having this issue multiple times, this is the only thing that has worked for me. Not sure why the other solutions didn't, but I followed the instructions here: stackoverflow.com/a/32730393/3474814

    – coracora
    Sep 24 '15 at 22:48








  • 5





    I had this problem after moving to a new mac. The cause was a missing apple WWDR intermediate certificate.

    – Morten Holmgaard
    Oct 14 '15 at 9:58











  • Possible duplicate of Reason: no suitable image found.

    – trojanfoe
    Nov 3 '15 at 15:38











  • desmond's solution helped.

    – Bharathi
    Feb 17 '16 at 7:18











  • Just clean the project and run again

    – onmyway133
    Nov 6 '18 at 9:37
















92















I have just updated to Xcode 7 and swift 2 and finished fixing the errors that come with the transition. I finally got the project to build, but after the launch screen I get an error saying:



dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
Referenced from: /var/mobile/Containers/Bundle/Application/...
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftAVFoundation.dylib: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftAVFoundation.dylib'



I have seen this error before but with other frameworks, and can't solve my issue. Is there a way to bypass this by adding my framework somewhere?



Thanks.










share|improve this question

























  • Ok so after having this issue multiple times, this is the only thing that has worked for me. Not sure why the other solutions didn't, but I followed the instructions here: stackoverflow.com/a/32730393/3474814

    – coracora
    Sep 24 '15 at 22:48








  • 5





    I had this problem after moving to a new mac. The cause was a missing apple WWDR intermediate certificate.

    – Morten Holmgaard
    Oct 14 '15 at 9:58











  • Possible duplicate of Reason: no suitable image found.

    – trojanfoe
    Nov 3 '15 at 15:38











  • desmond's solution helped.

    – Bharathi
    Feb 17 '16 at 7:18











  • Just clean the project and run again

    – onmyway133
    Nov 6 '18 at 9:37














92












92








92


7






I have just updated to Xcode 7 and swift 2 and finished fixing the errors that come with the transition. I finally got the project to build, but after the launch screen I get an error saying:



dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
Referenced from: /var/mobile/Containers/Bundle/Application/...
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftAVFoundation.dylib: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftAVFoundation.dylib'



I have seen this error before but with other frameworks, and can't solve my issue. Is there a way to bypass this by adding my framework somewhere?



Thanks.










share|improve this question
















I have just updated to Xcode 7 and swift 2 and finished fixing the errors that come with the transition. I finally got the project to build, but after the launch screen I get an error saying:



dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
Referenced from: /var/mobile/Containers/Bundle/Application/...
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftAVFoundation.dylib: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftAVFoundation.dylib'



I have seen this error before but with other frameworks, and can't solve my issue. Is there a way to bypass this by adding my framework somewhere?



Thanks.







macos avfoundation xcode7 dyld






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 2 '16 at 18:03









Mick MacCallum

113k35257265




113k35257265










asked Sep 24 '15 at 22:12









coracoracoracora

6981511




6981511













  • Ok so after having this issue multiple times, this is the only thing that has worked for me. Not sure why the other solutions didn't, but I followed the instructions here: stackoverflow.com/a/32730393/3474814

    – coracora
    Sep 24 '15 at 22:48








  • 5





    I had this problem after moving to a new mac. The cause was a missing apple WWDR intermediate certificate.

    – Morten Holmgaard
    Oct 14 '15 at 9:58











  • Possible duplicate of Reason: no suitable image found.

    – trojanfoe
    Nov 3 '15 at 15:38











  • desmond's solution helped.

    – Bharathi
    Feb 17 '16 at 7:18











  • Just clean the project and run again

    – onmyway133
    Nov 6 '18 at 9:37



















  • Ok so after having this issue multiple times, this is the only thing that has worked for me. Not sure why the other solutions didn't, but I followed the instructions here: stackoverflow.com/a/32730393/3474814

    – coracora
    Sep 24 '15 at 22:48








  • 5





    I had this problem after moving to a new mac. The cause was a missing apple WWDR intermediate certificate.

    – Morten Holmgaard
    Oct 14 '15 at 9:58











  • Possible duplicate of Reason: no suitable image found.

    – trojanfoe
    Nov 3 '15 at 15:38











  • desmond's solution helped.

    – Bharathi
    Feb 17 '16 at 7:18











  • Just clean the project and run again

    – onmyway133
    Nov 6 '18 at 9:37

















Ok so after having this issue multiple times, this is the only thing that has worked for me. Not sure why the other solutions didn't, but I followed the instructions here: stackoverflow.com/a/32730393/3474814

– coracora
Sep 24 '15 at 22:48







Ok so after having this issue multiple times, this is the only thing that has worked for me. Not sure why the other solutions didn't, but I followed the instructions here: stackoverflow.com/a/32730393/3474814

– coracora
Sep 24 '15 at 22:48






5




5





I had this problem after moving to a new mac. The cause was a missing apple WWDR intermediate certificate.

– Morten Holmgaard
Oct 14 '15 at 9:58





I had this problem after moving to a new mac. The cause was a missing apple WWDR intermediate certificate.

– Morten Holmgaard
Oct 14 '15 at 9:58













Possible duplicate of Reason: no suitable image found.

– trojanfoe
Nov 3 '15 at 15:38





Possible duplicate of Reason: no suitable image found.

– trojanfoe
Nov 3 '15 at 15:38













desmond's solution helped.

– Bharathi
Feb 17 '16 at 7:18





desmond's solution helped.

– Bharathi
Feb 17 '16 at 7:18













Just clean the project and run again

– onmyway133
Nov 6 '18 at 9:37





Just clean the project and run again

– onmyway133
Nov 6 '18 at 9:37












11 Answers
11






active

oldest

votes


















161














Try to do clean, build and then run the project. Worked for me.






share|improve this answer
























  • Didn't work for me, for a similar problem with Swifty.json :(

    – Hatchmaster J
    Mar 9 '16 at 9:36






  • 4





    Worked for me. I had this problem since my certificate has been revoked. Now its OK.

    – Adam Studenic
    Apr 27 '16 at 10:33






  • 1





    Thank you so much for the help! I have just renewed my iOS development certificate and I was facing this frustrating error. It's incredible how xcode's errors are NOT intuitive to inspect...

    – Gabriel Checchia Vitali
    Apr 17 '18 at 7:57






  • 1





    Working Thanks!

    – GovindhaRaj
    Jun 7 '18 at 13:10



















49














In Xcode 8 updating the Build Setting



Always Embed Swift Standard Libraries to Yes



worked for me.






share|improve this answer
























  • I think this is a possible correct answer. From Apple docs. "If you are building an app that does not use Swift but embeds content such as a framework that does, Xcode will not include these libraries in your app. " Reference: developer.apple.com/library/content/qa/qa1881/_index.html

    – David Pettigrew
    Feb 16 '17 at 20:00






  • 1





    I'm trying to convert an old objective-C project (partly) to swift. Setting "always embed swift standard libraries" to yes fixed it for me.

    – Darrell R
    yesterday



















29














None of the above solutions worked for me. In the end the problem was my signing certificate's trust settings. They were set to "Always Trust" which seemed to cause this issue. Switching it back "Use System Defaults" fixed it for me.



In my case I originally changed the certs trust settings because I had issues building remotely. I was able to fix both issues by switching the trust settings to "Use System Defaults" globally and "Always Allow" for SSL.



Hope this helps someone.






share|improve this answer































    23














    When the answer marked as correct didn't work for me I added the following to "Build Settings > Linking > Runpath Search Paths":



    @executable_path/Frameworks





    share|improve this answer

































      6














      I got this problem when trying to remove my provisioning profile and app certificate. Then all my swift projects have this problem. After almost an hour i found that just simply clean the project by:



      Click on Product -> Clean (or CMD-Shift-K)



      And the projects will run normally.






      share|improve this answer

































        6














        Similar question below, the answers there may offer some help.
        dyld: Library not loaded: @rpath/libswiftCore.dylib



        For me the only solution that worked was as @morten-holmgaard suggested in his comment.



        I have also tried to change the "Embedded Content Contains Swift Code" flag to true in build settings, but it had no effect.






        share|improve this answer





















        • 3





          This solution isn't working for me..

          – coracora
          Oct 15 '15 at 21:31



















        2














        Changing the Build Settings -> "Embedded Content Contains Swift Code" flag to true/yes worked for me.






        share|improve this answer































          2














          For the framework I am using on OSX (MailCore2) I had to set my target's



          "Build Settings > Linking > Runpath Search Paths" to @loader_path



          a solution I found here:



          http://www.dribin.org/dave/blog/archives/2009/11/15/rpath/






          share|improve this answer
























          • The article was helpful, thanks! None of the other solutions here did it for me, but I was able to finally get it working by adding @rpath to the Runpath Search Paths linker setting.

            – caughtinflux
            Aug 11 '17 at 4:19



















          1














          I ran into this issue with Xcode 9. This did the trick for me:



          Project > Build Settings > Swift Compiler - Search Path: Setting "Import Paths" to $(PROJECT_DIR) (recursive)






          share|improve this answer

































            1














            There are two solutions for this:



            Solution 1:





            1. Quit Xcode (cmd + Q)

            2. Open and Clean Project (cmd + shift + k)

            3. Now, run the project which should work correctly


            Solution 2:



            The console log itself states that dynamic link editor (dyld) is not able to load library. In order to fix this use below steps :




            1. Select Project -> Build settings ->

            2. Go to Build options tab -> Select ‘Always Embed Swift Standard Libraries’ to ‘Yes

            3. Now, run the project which should work correctly


            Screenshot with steps






            share|improve this answer

































              0














              This can be a problem with certificates. Go to the Apple developer member center and make sure you have "Organizational Unit" set in your distribution profile.



              Also take a look in the logs for the text deny-mmap, this will probably help you further.



              I ran into this problem with a Xamarin application for the Apple Watch. The main application and the Mono framework were signed and working, but the Watchkit Extension did not load due to the dyld error.






              share|improve this answer























                Your Answer






                StackExchange.ifUsing("editor", function () {
                StackExchange.using("externalEditor", function () {
                StackExchange.using("snippets", function () {
                StackExchange.snippets.init();
                });
                });
                }, "code-snippets");

                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "1"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f32771796%2fdyld-library-not-loaded-rpath-libswiftavfoundation-dylib%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                11 Answers
                11






                active

                oldest

                votes








                11 Answers
                11






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                161














                Try to do clean, build and then run the project. Worked for me.






                share|improve this answer
























                • Didn't work for me, for a similar problem with Swifty.json :(

                  – Hatchmaster J
                  Mar 9 '16 at 9:36






                • 4





                  Worked for me. I had this problem since my certificate has been revoked. Now its OK.

                  – Adam Studenic
                  Apr 27 '16 at 10:33






                • 1





                  Thank you so much for the help! I have just renewed my iOS development certificate and I was facing this frustrating error. It's incredible how xcode's errors are NOT intuitive to inspect...

                  – Gabriel Checchia Vitali
                  Apr 17 '18 at 7:57






                • 1





                  Working Thanks!

                  – GovindhaRaj
                  Jun 7 '18 at 13:10
















                161














                Try to do clean, build and then run the project. Worked for me.






                share|improve this answer
























                • Didn't work for me, for a similar problem with Swifty.json :(

                  – Hatchmaster J
                  Mar 9 '16 at 9:36






                • 4





                  Worked for me. I had this problem since my certificate has been revoked. Now its OK.

                  – Adam Studenic
                  Apr 27 '16 at 10:33






                • 1





                  Thank you so much for the help! I have just renewed my iOS development certificate and I was facing this frustrating error. It's incredible how xcode's errors are NOT intuitive to inspect...

                  – Gabriel Checchia Vitali
                  Apr 17 '18 at 7:57






                • 1





                  Working Thanks!

                  – GovindhaRaj
                  Jun 7 '18 at 13:10














                161












                161








                161







                Try to do clean, build and then run the project. Worked for me.






                share|improve this answer













                Try to do clean, build and then run the project. Worked for me.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 3 '15 at 15:27









                mikebertieanmikebertiean

                2,65831227




                2,65831227













                • Didn't work for me, for a similar problem with Swifty.json :(

                  – Hatchmaster J
                  Mar 9 '16 at 9:36






                • 4





                  Worked for me. I had this problem since my certificate has been revoked. Now its OK.

                  – Adam Studenic
                  Apr 27 '16 at 10:33






                • 1





                  Thank you so much for the help! I have just renewed my iOS development certificate and I was facing this frustrating error. It's incredible how xcode's errors are NOT intuitive to inspect...

                  – Gabriel Checchia Vitali
                  Apr 17 '18 at 7:57






                • 1





                  Working Thanks!

                  – GovindhaRaj
                  Jun 7 '18 at 13:10



















                • Didn't work for me, for a similar problem with Swifty.json :(

                  – Hatchmaster J
                  Mar 9 '16 at 9:36






                • 4





                  Worked for me. I had this problem since my certificate has been revoked. Now its OK.

                  – Adam Studenic
                  Apr 27 '16 at 10:33






                • 1





                  Thank you so much for the help! I have just renewed my iOS development certificate and I was facing this frustrating error. It's incredible how xcode's errors are NOT intuitive to inspect...

                  – Gabriel Checchia Vitali
                  Apr 17 '18 at 7:57






                • 1





                  Working Thanks!

                  – GovindhaRaj
                  Jun 7 '18 at 13:10

















                Didn't work for me, for a similar problem with Swifty.json :(

                – Hatchmaster J
                Mar 9 '16 at 9:36





                Didn't work for me, for a similar problem with Swifty.json :(

                – Hatchmaster J
                Mar 9 '16 at 9:36




                4




                4





                Worked for me. I had this problem since my certificate has been revoked. Now its OK.

                – Adam Studenic
                Apr 27 '16 at 10:33





                Worked for me. I had this problem since my certificate has been revoked. Now its OK.

                – Adam Studenic
                Apr 27 '16 at 10:33




                1




                1





                Thank you so much for the help! I have just renewed my iOS development certificate and I was facing this frustrating error. It's incredible how xcode's errors are NOT intuitive to inspect...

                – Gabriel Checchia Vitali
                Apr 17 '18 at 7:57





                Thank you so much for the help! I have just renewed my iOS development certificate and I was facing this frustrating error. It's incredible how xcode's errors are NOT intuitive to inspect...

                – Gabriel Checchia Vitali
                Apr 17 '18 at 7:57




                1




                1





                Working Thanks!

                – GovindhaRaj
                Jun 7 '18 at 13:10





                Working Thanks!

                – GovindhaRaj
                Jun 7 '18 at 13:10













                49














                In Xcode 8 updating the Build Setting



                Always Embed Swift Standard Libraries to Yes



                worked for me.






                share|improve this answer
























                • I think this is a possible correct answer. From Apple docs. "If you are building an app that does not use Swift but embeds content such as a framework that does, Xcode will not include these libraries in your app. " Reference: developer.apple.com/library/content/qa/qa1881/_index.html

                  – David Pettigrew
                  Feb 16 '17 at 20:00






                • 1





                  I'm trying to convert an old objective-C project (partly) to swift. Setting "always embed swift standard libraries" to yes fixed it for me.

                  – Darrell R
                  yesterday
















                49














                In Xcode 8 updating the Build Setting



                Always Embed Swift Standard Libraries to Yes



                worked for me.






                share|improve this answer
























                • I think this is a possible correct answer. From Apple docs. "If you are building an app that does not use Swift but embeds content such as a framework that does, Xcode will not include these libraries in your app. " Reference: developer.apple.com/library/content/qa/qa1881/_index.html

                  – David Pettigrew
                  Feb 16 '17 at 20:00






                • 1





                  I'm trying to convert an old objective-C project (partly) to swift. Setting "always embed swift standard libraries" to yes fixed it for me.

                  – Darrell R
                  yesterday














                49












                49








                49







                In Xcode 8 updating the Build Setting



                Always Embed Swift Standard Libraries to Yes



                worked for me.






                share|improve this answer













                In Xcode 8 updating the Build Setting



                Always Embed Swift Standard Libraries to Yes



                worked for me.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 18 '16 at 14:35









                JulianMJulianM

                2,1971313




                2,1971313













                • I think this is a possible correct answer. From Apple docs. "If you are building an app that does not use Swift but embeds content such as a framework that does, Xcode will not include these libraries in your app. " Reference: developer.apple.com/library/content/qa/qa1881/_index.html

                  – David Pettigrew
                  Feb 16 '17 at 20:00






                • 1





                  I'm trying to convert an old objective-C project (partly) to swift. Setting "always embed swift standard libraries" to yes fixed it for me.

                  – Darrell R
                  yesterday



















                • I think this is a possible correct answer. From Apple docs. "If you are building an app that does not use Swift but embeds content such as a framework that does, Xcode will not include these libraries in your app. " Reference: developer.apple.com/library/content/qa/qa1881/_index.html

                  – David Pettigrew
                  Feb 16 '17 at 20:00






                • 1





                  I'm trying to convert an old objective-C project (partly) to swift. Setting "always embed swift standard libraries" to yes fixed it for me.

                  – Darrell R
                  yesterday

















                I think this is a possible correct answer. From Apple docs. "If you are building an app that does not use Swift but embeds content such as a framework that does, Xcode will not include these libraries in your app. " Reference: developer.apple.com/library/content/qa/qa1881/_index.html

                – David Pettigrew
                Feb 16 '17 at 20:00





                I think this is a possible correct answer. From Apple docs. "If you are building an app that does not use Swift but embeds content such as a framework that does, Xcode will not include these libraries in your app. " Reference: developer.apple.com/library/content/qa/qa1881/_index.html

                – David Pettigrew
                Feb 16 '17 at 20:00




                1




                1





                I'm trying to convert an old objective-C project (partly) to swift. Setting "always embed swift standard libraries" to yes fixed it for me.

                – Darrell R
                yesterday





                I'm trying to convert an old objective-C project (partly) to swift. Setting "always embed swift standard libraries" to yes fixed it for me.

                – Darrell R
                yesterday











                29














                None of the above solutions worked for me. In the end the problem was my signing certificate's trust settings. They were set to "Always Trust" which seemed to cause this issue. Switching it back "Use System Defaults" fixed it for me.



                In my case I originally changed the certs trust settings because I had issues building remotely. I was able to fix both issues by switching the trust settings to "Use System Defaults" globally and "Always Allow" for SSL.



                Hope this helps someone.






                share|improve this answer




























                  29














                  None of the above solutions worked for me. In the end the problem was my signing certificate's trust settings. They were set to "Always Trust" which seemed to cause this issue. Switching it back "Use System Defaults" fixed it for me.



                  In my case I originally changed the certs trust settings because I had issues building remotely. I was able to fix both issues by switching the trust settings to "Use System Defaults" globally and "Always Allow" for SSL.



                  Hope this helps someone.






                  share|improve this answer


























                    29












                    29








                    29







                    None of the above solutions worked for me. In the end the problem was my signing certificate's trust settings. They were set to "Always Trust" which seemed to cause this issue. Switching it back "Use System Defaults" fixed it for me.



                    In my case I originally changed the certs trust settings because I had issues building remotely. I was able to fix both issues by switching the trust settings to "Use System Defaults" globally and "Always Allow" for SSL.



                    Hope this helps someone.






                    share|improve this answer













                    None of the above solutions worked for me. In the end the problem was my signing certificate's trust settings. They were set to "Always Trust" which seemed to cause this issue. Switching it back "Use System Defaults" fixed it for me.



                    In my case I originally changed the certs trust settings because I had issues building remotely. I was able to fix both issues by switching the trust settings to "Use System Defaults" globally and "Always Allow" for SSL.



                    Hope this helps someone.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Feb 5 '16 at 15:02









                    desmonddesmond

                    35546




                    35546























                        23














                        When the answer marked as correct didn't work for me I added the following to "Build Settings > Linking > Runpath Search Paths":



                        @executable_path/Frameworks





                        share|improve this answer






























                          23














                          When the answer marked as correct didn't work for me I added the following to "Build Settings > Linking > Runpath Search Paths":



                          @executable_path/Frameworks





                          share|improve this answer




























                            23












                            23








                            23







                            When the answer marked as correct didn't work for me I added the following to "Build Settings > Linking > Runpath Search Paths":



                            @executable_path/Frameworks





                            share|improve this answer















                            When the answer marked as correct didn't work for me I added the following to "Build Settings > Linking > Runpath Search Paths":



                            @executable_path/Frameworks






                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Feb 18 '16 at 16:31

























                            answered Dec 19 '15 at 6:29









                            ArtisanCArtisanC

                            368139




                            368139























                                6














                                I got this problem when trying to remove my provisioning profile and app certificate. Then all my swift projects have this problem. After almost an hour i found that just simply clean the project by:



                                Click on Product -> Clean (or CMD-Shift-K)



                                And the projects will run normally.






                                share|improve this answer






























                                  6














                                  I got this problem when trying to remove my provisioning profile and app certificate. Then all my swift projects have this problem. After almost an hour i found that just simply clean the project by:



                                  Click on Product -> Clean (or CMD-Shift-K)



                                  And the projects will run normally.






                                  share|improve this answer




























                                    6












                                    6








                                    6







                                    I got this problem when trying to remove my provisioning profile and app certificate. Then all my swift projects have this problem. After almost an hour i found that just simply clean the project by:



                                    Click on Product -> Clean (or CMD-Shift-K)



                                    And the projects will run normally.






                                    share|improve this answer















                                    I got this problem when trying to remove my provisioning profile and app certificate. Then all my swift projects have this problem. After almost an hour i found that just simply clean the project by:



                                    Click on Product -> Clean (or CMD-Shift-K)



                                    And the projects will run normally.







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Jul 24 '18 at 6:46

























                                    answered Jul 2 '17 at 17:42









                                    nhoxbypassnhoxbypass

                                    3,45351843




                                    3,45351843























                                        6














                                        Similar question below, the answers there may offer some help.
                                        dyld: Library not loaded: @rpath/libswiftCore.dylib



                                        For me the only solution that worked was as @morten-holmgaard suggested in his comment.



                                        I have also tried to change the "Embedded Content Contains Swift Code" flag to true in build settings, but it had no effect.






                                        share|improve this answer





















                                        • 3





                                          This solution isn't working for me..

                                          – coracora
                                          Oct 15 '15 at 21:31
















                                        6














                                        Similar question below, the answers there may offer some help.
                                        dyld: Library not loaded: @rpath/libswiftCore.dylib



                                        For me the only solution that worked was as @morten-holmgaard suggested in his comment.



                                        I have also tried to change the "Embedded Content Contains Swift Code" flag to true in build settings, but it had no effect.






                                        share|improve this answer





















                                        • 3





                                          This solution isn't working for me..

                                          – coracora
                                          Oct 15 '15 at 21:31














                                        6












                                        6








                                        6







                                        Similar question below, the answers there may offer some help.
                                        dyld: Library not loaded: @rpath/libswiftCore.dylib



                                        For me the only solution that worked was as @morten-holmgaard suggested in his comment.



                                        I have also tried to change the "Embedded Content Contains Swift Code" flag to true in build settings, but it had no effect.






                                        share|improve this answer















                                        Similar question below, the answers there may offer some help.
                                        dyld: Library not loaded: @rpath/libswiftCore.dylib



                                        For me the only solution that worked was as @morten-holmgaard suggested in his comment.



                                        I have also tried to change the "Embedded Content Contains Swift Code" flag to true in build settings, but it had no effect.







                                        share|improve this answer














                                        share|improve this answer



                                        share|improve this answer








                                        edited Sep 13 '18 at 7:15









                                        Cœur

                                        18.4k9109148




                                        18.4k9109148










                                        answered Oct 15 '15 at 16:34









                                        Bruno CoelhoBruno Coelho

                                        598820




                                        598820








                                        • 3





                                          This solution isn't working for me..

                                          – coracora
                                          Oct 15 '15 at 21:31














                                        • 3





                                          This solution isn't working for me..

                                          – coracora
                                          Oct 15 '15 at 21:31








                                        3




                                        3





                                        This solution isn't working for me..

                                        – coracora
                                        Oct 15 '15 at 21:31





                                        This solution isn't working for me..

                                        – coracora
                                        Oct 15 '15 at 21:31











                                        2














                                        Changing the Build Settings -> "Embedded Content Contains Swift Code" flag to true/yes worked for me.






                                        share|improve this answer




























                                          2














                                          Changing the Build Settings -> "Embedded Content Contains Swift Code" flag to true/yes worked for me.






                                          share|improve this answer


























                                            2












                                            2








                                            2







                                            Changing the Build Settings -> "Embedded Content Contains Swift Code" flag to true/yes worked for me.






                                            share|improve this answer













                                            Changing the Build Settings -> "Embedded Content Contains Swift Code" flag to true/yes worked for me.







                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Jun 12 '16 at 20:29









                                            Brian OgdenBrian Ogden

                                            10.8k459112




                                            10.8k459112























                                                2














                                                For the framework I am using on OSX (MailCore2) I had to set my target's



                                                "Build Settings > Linking > Runpath Search Paths" to @loader_path



                                                a solution I found here:



                                                http://www.dribin.org/dave/blog/archives/2009/11/15/rpath/






                                                share|improve this answer
























                                                • The article was helpful, thanks! None of the other solutions here did it for me, but I was able to finally get it working by adding @rpath to the Runpath Search Paths linker setting.

                                                  – caughtinflux
                                                  Aug 11 '17 at 4:19
















                                                2














                                                For the framework I am using on OSX (MailCore2) I had to set my target's



                                                "Build Settings > Linking > Runpath Search Paths" to @loader_path



                                                a solution I found here:



                                                http://www.dribin.org/dave/blog/archives/2009/11/15/rpath/






                                                share|improve this answer
























                                                • The article was helpful, thanks! None of the other solutions here did it for me, but I was able to finally get it working by adding @rpath to the Runpath Search Paths linker setting.

                                                  – caughtinflux
                                                  Aug 11 '17 at 4:19














                                                2












                                                2








                                                2







                                                For the framework I am using on OSX (MailCore2) I had to set my target's



                                                "Build Settings > Linking > Runpath Search Paths" to @loader_path



                                                a solution I found here:



                                                http://www.dribin.org/dave/blog/archives/2009/11/15/rpath/






                                                share|improve this answer













                                                For the framework I am using on OSX (MailCore2) I had to set my target's



                                                "Build Settings > Linking > Runpath Search Paths" to @loader_path



                                                a solution I found here:



                                                http://www.dribin.org/dave/blog/archives/2009/11/15/rpath/







                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered Aug 10 '16 at 3:53









                                                ghrghr

                                                34538




                                                34538













                                                • The article was helpful, thanks! None of the other solutions here did it for me, but I was able to finally get it working by adding @rpath to the Runpath Search Paths linker setting.

                                                  – caughtinflux
                                                  Aug 11 '17 at 4:19



















                                                • The article was helpful, thanks! None of the other solutions here did it for me, but I was able to finally get it working by adding @rpath to the Runpath Search Paths linker setting.

                                                  – caughtinflux
                                                  Aug 11 '17 at 4:19

















                                                The article was helpful, thanks! None of the other solutions here did it for me, but I was able to finally get it working by adding @rpath to the Runpath Search Paths linker setting.

                                                – caughtinflux
                                                Aug 11 '17 at 4:19





                                                The article was helpful, thanks! None of the other solutions here did it for me, but I was able to finally get it working by adding @rpath to the Runpath Search Paths linker setting.

                                                – caughtinflux
                                                Aug 11 '17 at 4:19











                                                1














                                                I ran into this issue with Xcode 9. This did the trick for me:



                                                Project > Build Settings > Swift Compiler - Search Path: Setting "Import Paths" to $(PROJECT_DIR) (recursive)






                                                share|improve this answer






























                                                  1














                                                  I ran into this issue with Xcode 9. This did the trick for me:



                                                  Project > Build Settings > Swift Compiler - Search Path: Setting "Import Paths" to $(PROJECT_DIR) (recursive)






                                                  share|improve this answer




























                                                    1












                                                    1








                                                    1







                                                    I ran into this issue with Xcode 9. This did the trick for me:



                                                    Project > Build Settings > Swift Compiler - Search Path: Setting "Import Paths" to $(PROJECT_DIR) (recursive)






                                                    share|improve this answer















                                                    I ran into this issue with Xcode 9. This did the trick for me:



                                                    Project > Build Settings > Swift Compiler - Search Path: Setting "Import Paths" to $(PROJECT_DIR) (recursive)







                                                    share|improve this answer














                                                    share|improve this answer



                                                    share|improve this answer








                                                    edited Sep 13 '18 at 7:16









                                                    Cœur

                                                    18.4k9109148




                                                    18.4k9109148










                                                    answered Oct 27 '17 at 8:02









                                                    ggsggs

                                                    2119




                                                    2119























                                                        1














                                                        There are two solutions for this:



                                                        Solution 1:





                                                        1. Quit Xcode (cmd + Q)

                                                        2. Open and Clean Project (cmd + shift + k)

                                                        3. Now, run the project which should work correctly


                                                        Solution 2:



                                                        The console log itself states that dynamic link editor (dyld) is not able to load library. In order to fix this use below steps :




                                                        1. Select Project -> Build settings ->

                                                        2. Go to Build options tab -> Select ‘Always Embed Swift Standard Libraries’ to ‘Yes

                                                        3. Now, run the project which should work correctly


                                                        Screenshot with steps






                                                        share|improve this answer






























                                                          1














                                                          There are two solutions for this:



                                                          Solution 1:





                                                          1. Quit Xcode (cmd + Q)

                                                          2. Open and Clean Project (cmd + shift + k)

                                                          3. Now, run the project which should work correctly


                                                          Solution 2:



                                                          The console log itself states that dynamic link editor (dyld) is not able to load library. In order to fix this use below steps :




                                                          1. Select Project -> Build settings ->

                                                          2. Go to Build options tab -> Select ‘Always Embed Swift Standard Libraries’ to ‘Yes

                                                          3. Now, run the project which should work correctly


                                                          Screenshot with steps






                                                          share|improve this answer




























                                                            1












                                                            1








                                                            1







                                                            There are two solutions for this:



                                                            Solution 1:





                                                            1. Quit Xcode (cmd + Q)

                                                            2. Open and Clean Project (cmd + shift + k)

                                                            3. Now, run the project which should work correctly


                                                            Solution 2:



                                                            The console log itself states that dynamic link editor (dyld) is not able to load library. In order to fix this use below steps :




                                                            1. Select Project -> Build settings ->

                                                            2. Go to Build options tab -> Select ‘Always Embed Swift Standard Libraries’ to ‘Yes

                                                            3. Now, run the project which should work correctly


                                                            Screenshot with steps






                                                            share|improve this answer















                                                            There are two solutions for this:



                                                            Solution 1:





                                                            1. Quit Xcode (cmd + Q)

                                                            2. Open and Clean Project (cmd + shift + k)

                                                            3. Now, run the project which should work correctly


                                                            Solution 2:



                                                            The console log itself states that dynamic link editor (dyld) is not able to load library. In order to fix this use below steps :




                                                            1. Select Project -> Build settings ->

                                                            2. Go to Build options tab -> Select ‘Always Embed Swift Standard Libraries’ to ‘Yes

                                                            3. Now, run the project which should work correctly


                                                            Screenshot with steps







                                                            share|improve this answer














                                                            share|improve this answer



                                                            share|improve this answer








                                                            edited Sep 13 '18 at 7:30









                                                            Cœur

                                                            18.4k9109148




                                                            18.4k9109148










                                                            answered Jun 7 '18 at 6:35









                                                            Jayprakash DubeyJayprakash Dubey

                                                            24.5k9123133




                                                            24.5k9123133























                                                                0














                                                                This can be a problem with certificates. Go to the Apple developer member center and make sure you have "Organizational Unit" set in your distribution profile.



                                                                Also take a look in the logs for the text deny-mmap, this will probably help you further.



                                                                I ran into this problem with a Xamarin application for the Apple Watch. The main application and the Mono framework were signed and working, but the Watchkit Extension did not load due to the dyld error.






                                                                share|improve this answer




























                                                                  0














                                                                  This can be a problem with certificates. Go to the Apple developer member center and make sure you have "Organizational Unit" set in your distribution profile.



                                                                  Also take a look in the logs for the text deny-mmap, this will probably help you further.



                                                                  I ran into this problem with a Xamarin application for the Apple Watch. The main application and the Mono framework were signed and working, but the Watchkit Extension did not load due to the dyld error.






                                                                  share|improve this answer


























                                                                    0












                                                                    0








                                                                    0







                                                                    This can be a problem with certificates. Go to the Apple developer member center and make sure you have "Organizational Unit" set in your distribution profile.



                                                                    Also take a look in the logs for the text deny-mmap, this will probably help you further.



                                                                    I ran into this problem with a Xamarin application for the Apple Watch. The main application and the Mono framework were signed and working, but the Watchkit Extension did not load due to the dyld error.






                                                                    share|improve this answer













                                                                    This can be a problem with certificates. Go to the Apple developer member center and make sure you have "Organizational Unit" set in your distribution profile.



                                                                    Also take a look in the logs for the text deny-mmap, this will probably help you further.



                                                                    I ran into this problem with a Xamarin application for the Apple Watch. The main application and the Mono framework were signed and working, but the Watchkit Extension did not load due to the dyld error.







                                                                    share|improve this answer












                                                                    share|improve this answer



                                                                    share|improve this answer










                                                                    answered Nov 10 '15 at 7:37









                                                                    WindelWindel

                                                                    825




                                                                    825






























                                                                        draft saved

                                                                        draft discarded




















































                                                                        Thanks for contributing an answer to Stack Overflow!


                                                                        • Please be sure to answer the question. Provide details and share your research!

                                                                        But avoid



                                                                        • Asking for help, clarification, or responding to other answers.

                                                                        • Making statements based on opinion; back them up with references or personal experience.


                                                                        To learn more, see our tips on writing great answers.




                                                                        draft saved


                                                                        draft discarded














                                                                        StackExchange.ready(
                                                                        function () {
                                                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f32771796%2fdyld-library-not-loaded-rpath-libswiftavfoundation-dylib%23new-answer', 'question_page');
                                                                        }
                                                                        );

                                                                        Post as a guest















                                                                        Required, but never shown





















































                                                                        Required, but never shown














                                                                        Required, but never shown












                                                                        Required, but never shown







                                                                        Required, but never shown

































                                                                        Required, but never shown














                                                                        Required, but never shown












                                                                        Required, but never shown







                                                                        Required, but never shown







                                                                        這個網誌中的熱門文章

                                                                        Xamarin.form Move up view when keyboard appear

                                                                        Post-Redirect-Get with Spring WebFlux and Thymeleaf

                                                                        Anylogic : not able to use stopDelay()