Bundling Native iOS .framework SDK is not working as expected

66 views
Skip to first unread message

Hasni Faiçal

unread,
Oct 23, 2019, 11:35:16 AM10/23/19
to CodenameOne Discussions
I am trying to bundle .framework iOS library in codename one project, I followed steps mentioned in this link, the project can be build successfully but, unfortunately the app crash while opening it. I extracted the generated source code & run it on Xcode this is the error log trace I got:

dyld: dyld cache load error: shared cache file open() failed

dyld: Library not loaded: @rpath/MYSDKNAME.framework/
MYSDKNAME 

Referenced from: /Users/macbookuser/Library/Developer/CoreSimulator/Devices/3BFB5084-F82A-4EAA-A68A-2BEC43F0B981/data/Containers/Bundle/Application/8B105928-1F5C-4412-A2D5-98D2279C81D0/DemoApp.app/DemoApp 

Reason: image not found


I make the SDK name hidden for confidentiality reason.

Please advice!

If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Desktop OS: MacOS catalina
Simulator
Device

Steve Hannah

unread,
Oct 23, 2019, 3:28:47 PM10/23/19
to codenameone...@googlegroups.com
Looks like you need to include the whole framework for this one.  See this answer here:

There is an update coming on Friday that will allow you to simply zip up the framework and add it to your native/ios directory. However, right now you can still do it using a custom podspec as described in that SO answer.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/744b67c0-f4e7-4fb7-8b3c-2dd39579f001%40googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

Hasni Faiçal

unread,
Oct 24, 2019, 9:45:27 AM10/24/19
to CodenameOne Discussions
The build failed after following the solution you provided but, unfortunately this is not working, see attached last part of error logs file.
FYI: this is working on native xcode project.


On Wednesday, October 23, 2019 at 8:28:47 PM UTC+1, Steve Hannah wrote:
Looks like you need to include the whole framework for this one.  See this answer here:

There is an update coming on Friday that will allow you to simply zip up the framework and add it to your native/ios directory. However, right now you can still do it using a custom podspec as described in that SO answer.

On Wed, Oct 23, 2019 at 8:35 AM Hasni Faiçal <hasni....@gmail.com> wrote:
I am trying to bundle .framework iOS library in codename one project, I followed steps mentioned in this link, the project can be build successfully but, unfortunately the app crash while opening it. I extracted the generated source code & run it on Xcode this is the error log trace I got:

dyld: dyld cache load error: shared cache file open() failed

dyld: Library not loaded: @rpath/MYSDKNAME.framework/
MYSDKNAME 

Referenced from: /Users/macbookuser/Library/Developer/CoreSimulator/Devices/3BFB5084-F82A-4EAA-A68A-2BEC43F0B981/data/Containers/Bundle/Application/8B105928-1F5C-4412-A2D5-98D2279C81D0/DemoApp.app/DemoApp 

Reason: image not found


I make the SDK name hidden for confidentiality reason.

Please advice!

If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Desktop OS: MacOS catalina
Simulator
Device

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
errors CN1 Bundle Framework.txt

Hasni Faiçal

unread,
Oct 24, 2019, 11:02:55 AM10/24/19
to CodenameOne Discussions
I simulated the same process with an other library from github and it works fine. Please advice


On Wednesday, October 23, 2019 at 8:28:47 PM UTC+1, Steve Hannah wrote:
Looks like you need to include the whole framework for this one.  See this answer here:

There is an update coming on Friday that will allow you to simply zip up the framework and add it to your native/ios directory. However, right now you can still do it using a custom podspec as described in that SO answer.

On Wed, Oct 23, 2019 at 8:35 AM Hasni Faiçal <hasni....@gmail.com> wrote:
I am trying to bundle .framework iOS library in codename one project, I followed steps mentioned in this link, the project can be build successfully but, unfortunately the app crash while opening it. I extracted the generated source code & run it on Xcode this is the error log trace I got:

dyld: dyld cache load error: shared cache file open() failed

dyld: Library not loaded: @rpath/MYSDKNAME.framework/
MYSDKNAME 

Referenced from: /Users/macbookuser/Library/Developer/CoreSimulator/Devices/3BFB5084-F82A-4EAA-A68A-2BEC43F0B981/data/Containers/Bundle/Application/8B105928-1F5C-4412-A2D5-98D2279C81D0/DemoApp.app/DemoApp 

Reason: image not found


I make the SDK name hidden for confidentiality reason.

Please advice!

If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Desktop OS: MacOS catalina
Simulator
Device

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

Steve Hannah

unread,
Oct 24, 2019, 1:42:23 PM10/24/19
to codenameone...@googlegroups.com
It's having trouble with the code signing.  What do you mean by "simulated the process with an other library"?  How did you simulate the process?  What variables did you change to make it work?  Different library using the same process, same library, using a different process, etc...

On Thu, Oct 24, 2019 at 8:02 AM Hasni Faiçal <hasni....@gmail.com> wrote:
I simulated the same process with an other library from github and it works fine. Please advice


On Wednesday, October 23, 2019 at 8:28:47 PM UTC+1, Steve Hannah wrote:
Looks like you need to include the whole framework for this one.  See this answer here:

There is an update coming on Friday that will allow you to simply zip up the framework and add it to your native/ios directory. However, right now you can still do it using a custom podspec as described in that SO answer.

On Wed, Oct 23, 2019 at 8:35 AM Hasni Faiçal <hasni....@gmail.com> wrote:
I am trying to bundle .framework iOS library in codename one project, I followed steps mentioned in this link, the project can be build successfully but, unfortunately the app crash while opening it. I extracted the generated source code & run it on Xcode this is the error log trace I got:

dyld: dyld cache load error: shared cache file open() failed

dyld: Library not loaded: @rpath/MYSDKNAME.framework/
MYSDKNAME 

Referenced from: /Users/macbookuser/Library/Developer/CoreSimulator/Devices/3BFB5084-F82A-4EAA-A68A-2BEC43F0B981/data/Containers/Bundle/Application/8B105928-1F5C-4412-A2D5-98D2279C81D0/DemoApp.app/DemoApp 

Reason: image not found


I make the SDK name hidden for confidentiality reason.

Please advice!

If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Desktop OS: MacOS catalina
Simulator
Device

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/5787a78e-502c-42dd-b093-baf505c54593%40googlegroups.com.

Hasni Faiçal

unread,
Oct 25, 2019, 4:54:50 AM10/25/19
to CodenameOne Discussions
I used an other library SVProgressHUD.framework and it works fine, But for the library that I am interested to use, it's not.
I can share it with you in a private secure channel if needed (it's a commercial library and should not be shared over the net).
Please advice!

On Thursday, October 24, 2019 at 6:42:23 PM UTC+1, Steve Hannah wrote:
It's having trouble with the code signing.  What do you mean by "simulated the process with an other library"?  How did you simulate the process?  What variables did you change to make it work?  Different library using the same process, same library, using a different process, etc...

On Thu, Oct 24, 2019 at 8:02 AM Hasni Faiçal <hasni....@gmail.com> wrote:
I simulated the same process with an other library from github and it works fine. Please advice


On Wednesday, October 23, 2019 at 8:28:47 PM UTC+1, Steve Hannah wrote:
Looks like you need to include the whole framework for this one.  See this answer here:

There is an update coming on Friday that will allow you to simply zip up the framework and add it to your native/ios directory. However, right now you can still do it using a custom podspec as described in that SO answer.

On Wed, Oct 23, 2019 at 8:35 AM Hasni Faiçal <hasni....@gmail.com> wrote:
I am trying to bundle .framework iOS library in codename one project, I followed steps mentioned in this link, the project can be build successfully but, unfortunately the app crash while opening it. I extracted the generated source code & run it on Xcode this is the error log trace I got:

dyld: dyld cache load error: shared cache file open() failed

dyld: Library not loaded: @rpath/MYSDKNAME.framework/
MYSDKNAME 

Referenced from: /Users/macbookuser/Library/Developer/CoreSimulator/Devices/3BFB5084-F82A-4EAA-A68A-2BEC43F0B981/data/Containers/Bundle/Application/8B105928-1F5C-4412-A2D5-98D2279C81D0/DemoApp.app/DemoApp 

Reason: image not found


I make the SDK name hidden for confidentiality reason.

Please advice!

If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Desktop OS: MacOS catalina
Simulator
Device

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

Shai Almog

unread,
Oct 25, 2019, 9:29:56 PM10/25/19
to CodenameOne Discussions
We can help with those things privately only on enterprise accounts. Otherwise it's community support so we give the same support but it's for everyone so if someone runs into a similar problem he can benefit from reading the discussion around it.

If you have a specific build error you can post that, it might help narrowing things down without exposing the library.

Hasni Faiçal

unread,
Oct 28, 2019, 5:32:34 AM10/28/19
to CodenameOne Discussions
Attached the codename one error logs, please advice!
errors CN1 Bundle Framework (1).txt

Shai Almog

unread,
Oct 28, 2019, 10:31:23 PM10/28/19
to CodenameOne Discussions
This looks related to re-signing the framework, Steve any ideas?

Steve Hannah

unread,
Oct 29, 2019, 7:51:17 AM10/29/19
to codenameone...@googlegroups.com
Hard to say.  If this were my project, I'd start by creating a simple Xcode project and include the framework using cocoapods, and see if it builds.

On Mon, Oct 28, 2019 at 7:31 PM Shai Almog <shai....@gmail.com> wrote:
This looks related to re-signing the framework, Steve any ideas?

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/6564c174-6a7b-451b-894c-7f8914344666%40googlegroups.com.

Hasni Faiçal

unread,
Oct 29, 2019, 9:36:39 AM10/29/19
to CodenameOne Discussions
It works in Xcode with local podspec without issues. By the way I switched to source hint method, the project is built successfully using this method. I am not blocked but the question is still open why this library is not working via method mentioned in Stackoverflow.

Thank you for your support.


On Tuesday, October 29, 2019 at 12:51:17 PM UTC+1, Steve Hannah wrote:
Hard to say.  If this were my project, I'd start by creating a simple Xcode project and include the framework using cocoapods, and see if it builds.

On Mon, Oct 28, 2019 at 7:31 PM Shai Almog <shai...@gmail.com> wrote:
This looks related to re-signing the framework, Steve any ideas?

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

Steve Hannah

unread,
Oct 29, 2019, 10:04:36 AM10/29/19
to codenameone...@googlegroups.com
What do you mean by "source hint method"?

On Tue, Oct 29, 2019 at 6:36 AM Hasni Faiçal <hasni....@gmail.com> wrote:
It works in Xcode with local podspec without issues. By the way I switched to source hint method, the project is built successfully using this method. I am not blocked but the question is still open why this library is not working via method mentioned in Stackoverflow.

Thank you for your support.


On Tuesday, October 29, 2019 at 12:51:17 PM UTC+1, Steve Hannah wrote:
Hard to say.  If this were my project, I'd start by creating a simple Xcode project and include the framework using cocoapods, and see if it builds.

On Mon, Oct 28, 2019 at 7:31 PM Shai Almog <shai...@gmail.com> wrote:
This looks related to re-signing the framework, Steve any ideas?

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/497ced2b-0288-4322-9823-7d42be890857%40googlegroups.com.

Hasni Faiçal

unread,
Oct 29, 2019, 1:36:14 PM10/29/19
to CodenameOne Discussions
I created a private git repo with podspec and framework private path , then I added the repo link to build hints "source= https://USERNAME:PASSWORD@MY_PRIVATE_GIT_REPO".


On Tuesday, October 29, 2019 at 3:04:36 PM UTC+1, Steve Hannah wrote:
What do you mean by "source hint method"?

On Tue, Oct 29, 2019 at 6:36 AM Hasni Faiçal <hasni....@gmail.com> wrote:
It works in Xcode with local podspec without issues. By the way I switched to source hint method, the project is built successfully using this method. I am not blocked but the question is still open why this library is not working via method mentioned in Stackoverflow.

Thank you for your support.


On Tuesday, October 29, 2019 at 12:51:17 PM UTC+1, Steve Hannah wrote:
Hard to say.  If this were my project, I'd start by creating a simple Xcode project and include the framework using cocoapods, and see if it builds.

On Mon, Oct 28, 2019 at 7:31 PM Shai Almog <shai...@gmail.com> wrote:
This looks related to re-signing the framework, Steve any ideas?

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

Steve Hannah

unread,
Oct 29, 2019, 2:12:25 PM10/29/19
to codenameone...@googlegroups.com
What OS do you use for development?  Windows, Mac or Linux?
When you are using the local podspec, what does your native/ios look like?  (I.e. what is the contents of it)

On Tue, Oct 29, 2019 at 10:36 AM Hasni Faiçal <hasni....@gmail.com> wrote:
I created a private git repo with podspec and framework private path , then I added the repo link to build hints "source= https://USERNAME:PASSWORD@MY_PRIVATE_GIT_REPO".

On Tuesday, October 29, 2019 at 3:04:36 PM UTC+1, Steve Hannah wrote:
What do you mean by "source hint method"?

On Tue, Oct 29, 2019 at 6:36 AM Hasni Faiçal <hasni....@gmail.com> wrote:
It works in Xcode with local podspec without issues. By the way I switched to source hint method, the project is built successfully using this method. I am not blocked but the question is still open why this library is not working via method mentioned in Stackoverflow.

Thank you for your support.


On Tuesday, October 29, 2019 at 12:51:17 PM UTC+1, Steve Hannah wrote:
Hard to say.  If this were my project, I'd start by creating a simple Xcode project and include the framework using cocoapods, and see if it builds.

On Mon, Oct 28, 2019 at 7:31 PM Shai Almog <shai...@gmail.com> wrote:
This looks related to re-signing the framework, Steve any ideas?

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/139134ea-9da2-4efa-b7ff-d499e74de728%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages