Regarding Framework Addition Error

47 views
Skip to first unread message

Akhil Arora

unread,
Aug 13, 2021, 6:00:58 PM8/13/21
to Chromium-dev
Hi 
I am building a chromium based browser for iOS and I have a custom .framework which needs to be added to my chrome project.
I have added the framework to project and written below code in Build.gn

config("miniApp_config") {

  framework_dirs = [ "//ios/chrome/app" ]

  frameworks = [

    "iOSMiniAppSDK.framework",

  ]

}

group("miniApps") {

  public_configs = [ ":miniApp_config"]

}

I am able to build the project but while running I am getting error :

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

  Reason: image not found

Can anyone help resolving this

Sylvain Defresne

unread,
Aug 23, 2021, 7:37:07 AM8/23/21
to ts-akhi...@rakuten.com, Chromium-dev

You need to add a bundle_data target to inform the build system that the framework needs to be copied into the app bundle, and have your app depends on the bundle_data target.
-- Sylvain

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/ee7f68a4-6919-458d-b6e8-d7d4e41eaeafn%40chromium.org.

Arora, Akhil

unread,
Aug 23, 2021, 7:20:53 PM8/23/21
to Sylvain Defresne, Chromium-dev

Thanks Sylvain for your reply
I tried the same approach and was able to successfully incorporate the framework.

 

From: Sylvain Defresne <sdef...@chromium.org>
Date: Monday, 23 August 2021 at 5:05 PM
To: Arora, Akhil <ts-akhi...@rakuten.com>
Cc: Chromium-dev <chromi...@chromium.org>
Subject: Re: [chromium-dev] Regarding Framework Addition Error

[EXTERNAL] This message comes from an external organization.

Akhil Arora

unread,
Aug 27, 2021, 11:13:08 AM8/27/21
to Chromium-dev, Akhil Arora, Chromium-dev, Sylvain Defresne
Hi
After adding framework , my application was successfully running on simulator but while running on real device i was facing an error for signing the application with the embedded frameworks and i am not able to launch app on device.
Any support on creating a signed bundle with .framework file

Mike Dougherty

unread,
Aug 30, 2021, 3:59:56 PM8/30/21
to ts-akhi...@rakuten.com, Chromium-dev, Sylvain Defresne
Can you run on device without the added embedded framework?

If not, check the comments on the code signing gn args here. (and pasted below). I would start by setting ios_app_bundle_id_prefix using "gn args {out_dir}"
 
# Explicitly select the identity to use for codesigning. If defined, must
# be set to a non-empty string that will be passed to codesigning. Can be
# left unspecified if ios_code_signing_identity_description is used instead.
ios_code_signing_identity = ""
# Pattern used to select the identity to use for codesigning. If defined,
# must be a substring of the description of exactly one of the identities by
# `security find-identity -v -p codesigning`.
ios_code_signing_identity_description = "Apple Development"
# Prefix for CFBundleIdentifier property of iOS bundles (correspond to the
# "Organization Identifier" in Xcode). Code signing will fail if no mobile
# provisioning for the selected code signing identify support that prefix.
ios_app_bundle_id_prefix = "org.chromium"



Arora, Akhil

unread,
Sep 10, 2021, 4:37:25 PM9/10/21
to Mike Dougherty, Chromium-dev, Sylvain Defresne

Hi Mike,

I am able to run the application without adding the embedded frameworks.

 

Could you please share some info, how did to solve this issue by using create_signed_build. I am trying to use this template but no success so far.

My scenario: Added custom framework from outside, without using DEPS entry. I copied it to the inside Frameworks/ folder in App bundle. It works fine on simulator, but as soon as I try to run on device, I get some error : installation failed. I know that we need to embed and sign it, embed is working fine, but don't how to inject signin part in this flow.

Using below script to solve embed part:

 

config("CustomFrameworks_config") {

 

  framework_dirs = [ "//ios/chrome/app/CustomFrameworks/CustomApps/Device" ]

 

 

 

  frameworks = [

 

    "iOSCustom1.framework",

 

    "iOSCustom2.framework",

 

  ]

 

}

 

bundle_data("CustomFrameworks") {

 

    

 

 

 

  sources = [ "//ios/chrome/app/CustomFrameworks/CustomApps/Device/iOSCustom1.framework",

 

             "//ios/chrome/app/CustomFrameworks/CustomApps/Device/iOSCustom2.framework", ]

 

 

  outputs = [ "{{bundle_resources_dir}}/" +

 

              "Frameworks/{{source_file_part}}" ]

 

             

 

  public_configs = [

 

   ":CustomFrameworks_config",

 

   ]

 

 

 

 

Regards,

Akhil

Reply all
Reply to author
Forward
0 new messages