i got some problem when i trying to include framework within framework. i try to make subframework in swift language. when i run in simulator work perfectly but in device i have error “Reason: no suitable image found. Did find:”
the following is an error message:
dyld: Library not loaded: #rpath/xxx.framework/xxx Referenced from:
/private/var/containers/Bundle/Application/81D1C716-915E-4DCA-893D-F934D56C8BAD/customDemo.app/Frameworks/custom.framework/custom
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/81D1C716-915E-4DCA-893D-F934D56C8BAD/customDemo.app/Frameworks/custom.framework/Frameworks/xxx.framework/xxx:
mmap() error 1 at address=0x00169000, size=0x000E8000 segment=__TEXT
in Segment::map() mapping
/private/var/containers/Bundle/Application/81D1C716-915E-4DCA-893D-F934D56C8BAD/customDemo.app/Frameworks/custom.framework/Frameworks/xxx.framework/xxx
You are not allowed to submit an app to the App Store with a framework embedded inside another framework. All frameworks must be inside the main app bundle's Frameworks folder. This does not mean you cannot link one framework against another, though. Just specify framework B inside framework A's Link Binary With Libraries build phase, and don't embed it.
Related
I have started a small collection of helper code in a Swift Package for my own needs. If i include this package in my main project using Swift Package Manger and try to build it using Xcode Cloud, i get the following error:
ITMS-90334: Invalid Code Signature Identifier - The identifier
'AppulizeStandardTools-55554944b34e30d285943c0fa8b9aecb5744a53e'
in your code signature for 'AppulizeStandardTools_BFA0AAD86B154A1_PackageProduct'
must match its Bundle Identifier 'AppulizeStandardTools'
I haven't set any identifiers or code signing manually with regards to the package and the Package.swift is very simple.
What am i doing wrong here?
I lost half a day trying to figure this out, documentation is not plentiful on it atm.
It appears to be related to how XCode Cloud handles the signing for dynamically embedded frameworks... Not ideal if you are using a microcomponent architectural pattern.
Fix for this:
Go into your main target (executable) -> Frameworks, Libraries and Embedded Content section -> Change your frameworks to:
Embed & Sign => Do Not Embed
Go to Build Settings for each Framework and change the Mach-O Type from Dynamic to Static
There are some implications about how this would effect device memory, I found it to be pretty negligible in my case.
I am building private framework CustomSDK.framework that uses embedded frameworks inside like PKHUD.framework. The issue is that client app that uses my framework doesn't see frameworks that are embedded in my framework such as
CustomSDK.framework -> PKHUD.framework
It gives error Missing required module 'PKHUD'
How can I fix it?
Thanks
dyld: Library not loaded: #rpath/AFNetworking.framework/AFNetworking
Referenced from: /var/containers/Bundle/Application/
Reason: No suitable image found.
Explanation of the error:
Your app could not able to find the AFNetworking Dynamic Framework in #rPath. This is the place (rPath), where we should need to place our third party or our custom Dynamic Frameworks for the system to search for Dynamic Frameworks. So that system will search the rPath folder and will load them lazily instead of statically.
Solution:
If you are using Cocoapods, then cocoapods will itself do this step for you. Let me know if you are not using Cocoapods. If you still face the problem, just run Pod install once again..
if you are building your own libraries then you should place them in embedded binaries.
It seems what you are using in AFNetworking is iOS11+, yet you've required it for your project, so when iOS10 searches its directories to find it, it finds nothing. The fact that the error says 'image' is just a fault on Apple's end.
Fix:
Under your project settings go to included frameworks, find AFNetworking and set the status flag from required to optional. Then, wherever you would use AFNetworking in your project, wrap it in the following:
if (#available(iOS 11.0, *)) {
//your AFNetworking code here (for iOS11+)
} else {
//comparable non-AFNetworking code here (for iOS10-)
}
Or just make your project require iOS11 under the deployment target flag.
I had the same issue, in my case the problem was that I had a certificate expired and marked as "always trust". I fixed it using the default setting for the certificates and deleting the expireds
I'm trying to make midroll ads work with DFP on Roku and I'm having some trouble.
I'm reading the docs on using the Roku Advertising Framework (RAF) and it says to put Library "Roku_Ads.brs" into the code where I want to use RAF. Since it uses the Library call, it leads me to assume that the library is included in Roku and doesn't have to be downloaded separately.
However, when I put Library "Roku_Ads.brs" at the top of my lib/ads.brs file, I always get the following error:
*** ERROR compiling /pkg:/source/lib/ads.brs:
Error loading file. (compile error &hb9) in pkg:/source/lib/ads.brs(1) 'Roku_Ads.brs'
What am I missing here? Is there some Roku_Ads.brs file that I need to download from somewhere first?
Thanks for the help!
Be sure to add the following line to your manifest:
bs_libs_required=roku_ads_lib
I needed to create a framework (which requires a static library) for a project I'm working on. I used this tutorial to create the framework, then copied the static library into the project and it worked.
But, when I dragged the framework to an iOS project, it shows a ton of errors.
`Undefined symbols for architecture i386:"_OBJC_CLASS_$_SomeClassFromTheStaticLibrary",referenced from:_OBJC_CLASS_$_AnotherClass in MyFramework`
What I think is happening is that the iOS project wants to recompile the framework and it cannot, because it can't locate the static library. All errors disappear if I add the static library to the iOS project. This is what I want to avoid.
Basically I want to have the iOS project -> Framework -> Library instead of having the library in both the project and the framework.
I have tried adding the static library as a resource in the framework, but it didn't work.
I doubt this is possible. When you think about what is happening you will see the problem.
The framework is compiled and the static library is processed so that things like extra symbols are stripped out
The app is now compiled and linked against the framework which may or may not have had the symbols that the app is requiring
I did get this to work if ONLY the framework was using the static library (logical) but I can't find a way to share the code across the framework & the app.
If a symbol is hidden (either via Symbols Hidden by Default/GCC_SYMBOLS_PRIVATE_EXTERN being set to YES or __attribute__ ((visibility ("hidden"))) being applied to certain symbols), then that symbol will be available when statically linking the library, but not when dynamically linking the framework.
Ensure that the static library's symbols are not hidden, and you should be able to access them from your app.
I have followed this link to create custom framework. I have static library inside my framework and it works fine with that.
I have copied his steps in my blog for my understanding along with a script to make it universal.