How to open a .swiftmodule file
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
add a comment |
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
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
add a comment |
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
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
ios swift xcode
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 21 '18 at 20:33


Anton MalmyginAnton Malmygin
1,84811621
1,84811621
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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