How to open a .swiftmodule file












0















I want to check a public content of a .swiftmodule file from an iOS framework.



Here (https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20160111/000827.html) I've found a suggestion to use swift-ide-test:




You can use the swift-ide-test tool to dump the public interface for a
module, but the command-line interface is less pretty than it should
be:



swift-ide-test -print-module -source-filename=dummy.swift
-module-to-print=MyApp



…plus any -I or -F paths necessary to find your module and all its
dependencies. If you're on a Mac, you'll need to insert "xcrun -sdk
macosx" or "xcrun -sdk iphoneos" at the start to find the system
headers.




Unfortunately, when I try to run xcrun -sdk iphoneos swift-ide-test with Xcode 10.1, I get following error:



$ xcrun -sdk iphoneos swift-ide-test
xcrun: error: unable to find utility "swift-ide-test", not a developer tool or in PATH


Seems that this tool was removed from Xcode.



Any other ideas on how to open a .swiftmodule file?










share|improve this question























  • Your not supposed to be able to see the source code for iOS.

    – Scriptable
    Nov 21 '18 at 17:09











  • I want to check if my custom iOS framework is compiled correctly

    – Anton Malmygin
    Nov 21 '18 at 17:13
















0















I want to check a public content of a .swiftmodule file from an iOS framework.



Here (https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20160111/000827.html) I've found a suggestion to use swift-ide-test:




You can use the swift-ide-test tool to dump the public interface for a
module, but the command-line interface is less pretty than it should
be:



swift-ide-test -print-module -source-filename=dummy.swift
-module-to-print=MyApp



…plus any -I or -F paths necessary to find your module and all its
dependencies. If you're on a Mac, you'll need to insert "xcrun -sdk
macosx" or "xcrun -sdk iphoneos" at the start to find the system
headers.




Unfortunately, when I try to run xcrun -sdk iphoneos swift-ide-test with Xcode 10.1, I get following error:



$ xcrun -sdk iphoneos swift-ide-test
xcrun: error: unable to find utility "swift-ide-test", not a developer tool or in PATH


Seems that this tool was removed from Xcode.



Any other ideas on how to open a .swiftmodule file?










share|improve this question























  • Your not supposed to be able to see the source code for iOS.

    – Scriptable
    Nov 21 '18 at 17:09











  • I want to check if my custom iOS framework is compiled correctly

    – Anton Malmygin
    Nov 21 '18 at 17:13














0












0








0








I want to check a public content of a .swiftmodule file from an iOS framework.



Here (https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20160111/000827.html) I've found a suggestion to use swift-ide-test:




You can use the swift-ide-test tool to dump the public interface for a
module, but the command-line interface is less pretty than it should
be:



swift-ide-test -print-module -source-filename=dummy.swift
-module-to-print=MyApp



…plus any -I or -F paths necessary to find your module and all its
dependencies. If you're on a Mac, you'll need to insert "xcrun -sdk
macosx" or "xcrun -sdk iphoneos" at the start to find the system
headers.




Unfortunately, when I try to run xcrun -sdk iphoneos swift-ide-test with Xcode 10.1, I get following error:



$ xcrun -sdk iphoneos swift-ide-test
xcrun: error: unable to find utility "swift-ide-test", not a developer tool or in PATH


Seems that this tool was removed from Xcode.



Any other ideas on how to open a .swiftmodule file?










share|improve this question














I want to check a public content of a .swiftmodule file from an iOS framework.



Here (https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20160111/000827.html) I've found a suggestion to use swift-ide-test:




You can use the swift-ide-test tool to dump the public interface for a
module, but the command-line interface is less pretty than it should
be:



swift-ide-test -print-module -source-filename=dummy.swift
-module-to-print=MyApp



…plus any -I or -F paths necessary to find your module and all its
dependencies. If you're on a Mac, you'll need to insert "xcrun -sdk
macosx" or "xcrun -sdk iphoneos" at the start to find the system
headers.




Unfortunately, when I try to run xcrun -sdk iphoneos swift-ide-test with Xcode 10.1, I get following error:



$ xcrun -sdk iphoneos swift-ide-test
xcrun: error: unable to find utility "swift-ide-test", not a developer tool or in PATH


Seems that this tool was removed from Xcode.



Any other ideas on how to open a .swiftmodule file?







ios swift xcode






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 21 '18 at 16:39









Anton MalmyginAnton Malmygin

1,84811621




1,84811621













  • Your not supposed to be able to see the source code for iOS.

    – Scriptable
    Nov 21 '18 at 17:09











  • I want to check if my custom iOS framework is compiled correctly

    – Anton Malmygin
    Nov 21 '18 at 17:13



















  • Your not supposed to be able to see the source code for iOS.

    – Scriptable
    Nov 21 '18 at 17:09











  • I want to check if my custom iOS framework is compiled correctly

    – Anton Malmygin
    Nov 21 '18 at 17:13

















Your not supposed to be able to see the source code for iOS.

– Scriptable
Nov 21 '18 at 17:09





Your not supposed to be able to see the source code for iOS.

– Scriptable
Nov 21 '18 at 17:09













I want to check if my custom iOS framework is compiled correctly

– Anton Malmygin
Nov 21 '18 at 17:13





I want to check if my custom iOS framework is compiled correctly

– Anton Malmygin
Nov 21 '18 at 17:13












1 Answer
1






active

oldest

votes


















0














After few hours of struggling, I've found an IMPLICIT way of checking a public content of modules from an iOS framework.



The trick is done by using :print_module command inside the Swift REPL.



More precisely, you need to launch Swift REPL with a path to your framework:



swift -F <path to a folder with LibName.framework> -deprecated-integrated-repl


Now you can use :print_module command with a name of your framework:



(swift) :print_module LibName


Sources:



https://stackoverflow.com/a/27882120/2241008



https://stackoverflow.com/a/25005445/2241008



https://stackoverflow.com/a/36235186/2241008



P.S. swift sources still have a source code for swift-ide-test tool (https://github.com/apple/swift/tree/master/tools/swift-ide-test), so another way to see contents of swiftmodules will be in compiling this tool, but I did not investigated this solution any further.






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%2f53416742%2fhow-to-open-a-swiftmodule-file%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    After few hours of struggling, I've found an IMPLICIT way of checking a public content of modules from an iOS framework.



    The trick is done by using :print_module command inside the Swift REPL.



    More precisely, you need to launch Swift REPL with a path to your framework:



    swift -F <path to a folder with LibName.framework> -deprecated-integrated-repl


    Now you can use :print_module command with a name of your framework:



    (swift) :print_module LibName


    Sources:



    https://stackoverflow.com/a/27882120/2241008



    https://stackoverflow.com/a/25005445/2241008



    https://stackoverflow.com/a/36235186/2241008



    P.S. swift sources still have a source code for swift-ide-test tool (https://github.com/apple/swift/tree/master/tools/swift-ide-test), so another way to see contents of swiftmodules will be in compiling this tool, but I did not investigated this solution any further.






    share|improve this answer




























      0














      After few hours of struggling, I've found an IMPLICIT way of checking a public content of modules from an iOS framework.



      The trick is done by using :print_module command inside the Swift REPL.



      More precisely, you need to launch Swift REPL with a path to your framework:



      swift -F <path to a folder with LibName.framework> -deprecated-integrated-repl


      Now you can use :print_module command with a name of your framework:



      (swift) :print_module LibName


      Sources:



      https://stackoverflow.com/a/27882120/2241008



      https://stackoverflow.com/a/25005445/2241008



      https://stackoverflow.com/a/36235186/2241008



      P.S. swift sources still have a source code for swift-ide-test tool (https://github.com/apple/swift/tree/master/tools/swift-ide-test), so another way to see contents of swiftmodules will be in compiling this tool, but I did not investigated this solution any further.






      share|improve this answer


























        0












        0








        0







        After few hours of struggling, I've found an IMPLICIT way of checking a public content of modules from an iOS framework.



        The trick is done by using :print_module command inside the Swift REPL.



        More precisely, you need to launch Swift REPL with a path to your framework:



        swift -F <path to a folder with LibName.framework> -deprecated-integrated-repl


        Now you can use :print_module command with a name of your framework:



        (swift) :print_module LibName


        Sources:



        https://stackoverflow.com/a/27882120/2241008



        https://stackoverflow.com/a/25005445/2241008



        https://stackoverflow.com/a/36235186/2241008



        P.S. swift sources still have a source code for swift-ide-test tool (https://github.com/apple/swift/tree/master/tools/swift-ide-test), so another way to see contents of swiftmodules will be in compiling this tool, but I did not investigated this solution any further.






        share|improve this answer













        After few hours of struggling, I've found an IMPLICIT way of checking a public content of modules from an iOS framework.



        The trick is done by using :print_module command inside the Swift REPL.



        More precisely, you need to launch Swift REPL with a path to your framework:



        swift -F <path to a folder with LibName.framework> -deprecated-integrated-repl


        Now you can use :print_module command with a name of your framework:



        (swift) :print_module LibName


        Sources:



        https://stackoverflow.com/a/27882120/2241008



        https://stackoverflow.com/a/25005445/2241008



        https://stackoverflow.com/a/36235186/2241008



        P.S. swift sources still have a source code for swift-ide-test tool (https://github.com/apple/swift/tree/master/tools/swift-ide-test), so another way to see contents of swiftmodules will be in compiling this tool, but I did not investigated this solution any further.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 21 '18 at 20:33









        Anton MalmyginAnton Malmygin

        1,84811621




        1,84811621
































            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%2f53416742%2fhow-to-open-a-swiftmodule-file%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







            Popular posts from this blog

            MongoDB - Not Authorized To Execute Command

            Npm cannot find a required file even through it is in the searched directory

            in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith