Xcode10 - dyld: Library not loaded for pod installed in framework
I have a project with target frameworks.
- MainAppTarget
- FrameworkA
FrameworkA is the only one to use a certain pod, hence in my pod file I have something like
target 'MainAppTarget' do
...
end
target 'FrameworkA' do
pod 'PodA'
end
the build succeeds with no problem, but when I run the app on a simulator the app crashes immediately with the following error message:
dyld: Library not loaded: @rpath/PodA.framework/PodA
Referenced from: .../Build/Products/Development-iphonesimulator/FrameworkA.framework/FrameworkA
Reason: image not found
I tried all the usual suspects (delete derived data, clean, pod deintegrate...) nothing worked so far.
Any idea why this would happen, and how I can make it work without having to install all the pods necessarily on both targets?
The app is in Swift 4.2.
swift frameworks cocoapods dyld xcode10.1
add a comment |
I have a project with target frameworks.
- MainAppTarget
- FrameworkA
FrameworkA is the only one to use a certain pod, hence in my pod file I have something like
target 'MainAppTarget' do
...
end
target 'FrameworkA' do
pod 'PodA'
end
the build succeeds with no problem, but when I run the app on a simulator the app crashes immediately with the following error message:
dyld: Library not loaded: @rpath/PodA.framework/PodA
Referenced from: .../Build/Products/Development-iphonesimulator/FrameworkA.framework/FrameworkA
Reason: image not found
I tried all the usual suspects (delete derived data, clean, pod deintegrate...) nothing worked so far.
Any idea why this would happen, and how I can make it work without having to install all the pods necessarily on both targets?
The app is in Swift 4.2.
swift frameworks cocoapods dyld xcode10.1
add a comment |
I have a project with target frameworks.
- MainAppTarget
- FrameworkA
FrameworkA is the only one to use a certain pod, hence in my pod file I have something like
target 'MainAppTarget' do
...
end
target 'FrameworkA' do
pod 'PodA'
end
the build succeeds with no problem, but when I run the app on a simulator the app crashes immediately with the following error message:
dyld: Library not loaded: @rpath/PodA.framework/PodA
Referenced from: .../Build/Products/Development-iphonesimulator/FrameworkA.framework/FrameworkA
Reason: image not found
I tried all the usual suspects (delete derived data, clean, pod deintegrate...) nothing worked so far.
Any idea why this would happen, and how I can make it work without having to install all the pods necessarily on both targets?
The app is in Swift 4.2.
swift frameworks cocoapods dyld xcode10.1
I have a project with target frameworks.
- MainAppTarget
- FrameworkA
FrameworkA is the only one to use a certain pod, hence in my pod file I have something like
target 'MainAppTarget' do
...
end
target 'FrameworkA' do
pod 'PodA'
end
the build succeeds with no problem, but when I run the app on a simulator the app crashes immediately with the following error message:
dyld: Library not loaded: @rpath/PodA.framework/PodA
Referenced from: .../Build/Products/Development-iphonesimulator/FrameworkA.framework/FrameworkA
Reason: image not found
I tried all the usual suspects (delete derived data, clean, pod deintegrate...) nothing worked so far.
Any idea why this would happen, and how I can make it work without having to install all the pods necessarily on both targets?
The app is in Swift 4.2.
swift frameworks cocoapods dyld xcode10.1
swift frameworks cocoapods dyld xcode10.1
edited yesterday
Cœur
17.7k9106145
17.7k9106145
asked Nov 22 '18 at 20:50
Giuseppe LanzaGiuseppe Lanza
1,929926
1,929926
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I too was facing the same problem. All you need to do is set the third party frameworks you are using for e.g:- PodA as Optional instead of Required under Link binary with Libraries in build Phases section. That's all. try it again and it will run as expected.
Note:- You need to add the PodA in the app in which you are using your framework.
There is no other way except create a static framework consisting your PodA and use this newly created static framework inside your dynamic framework.
If I add the PodA to the main target there is no need to set the pod as optional. To get PodA in the main target is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 9:13
Then you need to follow the steps mentioned in "Note"
– sanyam jain
Nov 26 '18 at 11:08
Again. This is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 11:49
Then it is not possible. There is no other way. If you found something do let me know.
– sanyam jain
Nov 27 '18 at 6:37
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%2f53437837%2fxcode10-dyld-library-not-loaded-for-pod-installed-in-framework%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
I too was facing the same problem. All you need to do is set the third party frameworks you are using for e.g:- PodA as Optional instead of Required under Link binary with Libraries in build Phases section. That's all. try it again and it will run as expected.
Note:- You need to add the PodA in the app in which you are using your framework.
There is no other way except create a static framework consisting your PodA and use this newly created static framework inside your dynamic framework.
If I add the PodA to the main target there is no need to set the pod as optional. To get PodA in the main target is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 9:13
Then you need to follow the steps mentioned in "Note"
– sanyam jain
Nov 26 '18 at 11:08
Again. This is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 11:49
Then it is not possible. There is no other way. If you found something do let me know.
– sanyam jain
Nov 27 '18 at 6:37
add a comment |
I too was facing the same problem. All you need to do is set the third party frameworks you are using for e.g:- PodA as Optional instead of Required under Link binary with Libraries in build Phases section. That's all. try it again and it will run as expected.
Note:- You need to add the PodA in the app in which you are using your framework.
There is no other way except create a static framework consisting your PodA and use this newly created static framework inside your dynamic framework.
If I add the PodA to the main target there is no need to set the pod as optional. To get PodA in the main target is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 9:13
Then you need to follow the steps mentioned in "Note"
– sanyam jain
Nov 26 '18 at 11:08
Again. This is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 11:49
Then it is not possible. There is no other way. If you found something do let me know.
– sanyam jain
Nov 27 '18 at 6:37
add a comment |
I too was facing the same problem. All you need to do is set the third party frameworks you are using for e.g:- PodA as Optional instead of Required under Link binary with Libraries in build Phases section. That's all. try it again and it will run as expected.
Note:- You need to add the PodA in the app in which you are using your framework.
There is no other way except create a static framework consisting your PodA and use this newly created static framework inside your dynamic framework.
I too was facing the same problem. All you need to do is set the third party frameworks you are using for e.g:- PodA as Optional instead of Required under Link binary with Libraries in build Phases section. That's all. try it again and it will run as expected.
Note:- You need to add the PodA in the app in which you are using your framework.
There is no other way except create a static framework consisting your PodA and use this newly created static framework inside your dynamic framework.
answered Nov 26 '18 at 6:16
sanyam jainsanyam jain
216
216
If I add the PodA to the main target there is no need to set the pod as optional. To get PodA in the main target is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 9:13
Then you need to follow the steps mentioned in "Note"
– sanyam jain
Nov 26 '18 at 11:08
Again. This is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 11:49
Then it is not possible. There is no other way. If you found something do let me know.
– sanyam jain
Nov 27 '18 at 6:37
add a comment |
If I add the PodA to the main target there is no need to set the pod as optional. To get PodA in the main target is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 9:13
Then you need to follow the steps mentioned in "Note"
– sanyam jain
Nov 26 '18 at 11:08
Again. This is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 11:49
Then it is not possible. There is no other way. If you found something do let me know.
– sanyam jain
Nov 27 '18 at 6:37
If I add the PodA to the main target there is no need to set the pod as optional. To get PodA in the main target is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 9:13
If I add the PodA to the main target there is no need to set the pod as optional. To get PodA in the main target is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 9:13
Then you need to follow the steps mentioned in "Note"
– sanyam jain
Nov 26 '18 at 11:08
Then you need to follow the steps mentioned in "Note"
– sanyam jain
Nov 26 '18 at 11:08
Again. This is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 11:49
Again. This is exactly what I want to avoid.
– Giuseppe Lanza
Nov 26 '18 at 11:49
Then it is not possible. There is no other way. If you found something do let me know.
– sanyam jain
Nov 27 '18 at 6:37
Then it is not possible. There is no other way. If you found something do let me know.
– sanyam jain
Nov 27 '18 at 6:37
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%2f53437837%2fxcode10-dyld-library-not-loaded-for-pod-installed-in-framework%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