Frameworks

RSS for tag

Ask questions about APIs that can drive features in your apps.

Frameworks Documentation

Pinned Posts

Posts under Frameworks tag

211 Posts
Sort by:
Post not yet marked as solved
0 Replies
99 Views
Dear Apple, Following your guide on Refactor Your Targets to Improve Parallelism, we've recently introduced modularity into our iOS app. We were able to create granular modules containing features and shared functionality. The dilemma we encountered was what should be the type of the modules? Is it static library or dynamic framework? Because we wanted to consume our internal libraries from multiple targets, and we didn't want it to become part of each and every executable inflating the size of our app and creating duplication (which is the case with static libraries.), we went full power with dynamic frameworks. However, the significant amount of dynamic modules has drastically increased the launch times of our app. The tradeoff we're not ready to live with. Is there any other module type that can be consumed directly from multiple targets, not being copied into executables on the one hand but not affecting the app launch times on the other? Any guidance would be appreciated. Regards, German
Posted
by GeRyCh.
Last updated
.
Post not yet marked as solved
6 Replies
746 Views
I'm getting what seems to be a dynamic linker error, but can't seem to resolve it. dyld[541]: Library not loaded: @rpath/TCore.framework/TCore  Referenced from: /private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/FaceSDK.framework/FaceSDK  Reason: tried: '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/TCore.framework/TCore' (no such file), '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/FaceSDK.framework/Frameworks/TCore.framework/TCore' (no such file), '/usr/lib/swift/TCore.framework/TCore' (no such file), '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/TCore.framework/TCore' (no such file), '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/TCore.framework/TCore' (no such file), '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/TCore.framework/TCore' (no such file), '/usr/lib/swift/TCore.framework/TCore' (no such file), '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/TCore.framework/TCore' (no such file), '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/TCore.framework/TCore' (no such file), '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/TCore.framework/TCore' (no such file), '/System/Library/Frameworks/TCore.framework/TCore' (no such file) Library not loaded: @rpath/TCore.framework/TCore  Referenced from: /private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/FaceSDK.framework/FaceSDK  Reason: tried: '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/TCore.framework/TCore' (no such file), '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/FaceSDK.framework/Frameworks/TCore.framework/TCore' (no such file), '/usr/lib/swift/TCore.framework/TCore' (no such file), '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/TCore.framework/TCore' (no such file), '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/NavigationApp.app/Frameworks/TCore.framework/TCore' (no such file), '/private/var/containers/Bundle/Application/EEBCD2F1-3A25-4BCE-A151-04EC09374288/Navigatio So far I've tried embedding it and linking it in both "General" and "Build Phase" of the Settings. I've tried setting Dynamic Library Install Name Base to @rpath as well as setting Always Embed Swift Standard Libraries to YES, but none seem to work.
Posted
by Ovis.
Last updated
.
Post not yet marked as solved
4 Replies
1.6k Views
Hi, I am writing a Swift framework that primarily serves as a wrapper for a linear algebra library written in C. The framework therefore is a mixture of Swift and Objective C (the Objective C part is there to serve as a bridge to allow the Swift code to talk to the C I have reviewed the documents on Clang modules and looked at various code examples on the Web. However, I am still not finding a clear path and have had difficulties getting the code to compile (I am also unclear what the official recommendations are for achieving the goal I desire). Here are a few questions: 1) Is it good practice to create mixed languages frameworks that are a combination of Swift and Objective C++? If so, are there examples available that show best practices? If not, what is a workaround? 2) I don’t want to expose the Objective C++ part of the code to the consumer of my framework. I am not clear how to do this. I have read about private modules. However, I am unclear about how to properly use private modules in this context and again lack clear examples. 3) What is the recommended practice when creating module.map files in XCode when XCode itself generates a default module.map file when building a framework? Again, there are some examples on the Web, but I am unclear whether they are correct an none of them explicitly suits my goals. 4) Where is the official documentation on how to properly use module.map files in XCode especially with respect to building frameworks that rely on both Swift and Objective C++? 5) Although I know that if this weren’t a framework, I could create a bridging header to allow Swift to talk to Objective C++. However, in the case of a module there is an umbrella header. My understanding of the umbrella header is that it pertains to code that will consume the framework, not for other code in the framework itself. Can you somehow combine an umbrella header and a bridging header in a framework? Thanks in advance
Posted
by jon2718.
Last updated
.
Post not yet marked as solved
0 Replies
151 Views
I have a framework which imports RealityKit. Minimum deployment target for the framework is iOS 13 and the app which uses the framework has iOS 12 as minimum deployment. RealityKit and RealityFoundation is set to optional in the build phases of the framework and the framework is optional in the app as well. But on launching the app in iOS 12 simulator I keep getting the following crash. DYLD, can't resolve symbol _$s10RealityKit10HasPhysicsMp If I change the minimum deployment of the framework to iOS 15, the same code works in iOS 12 simulator. No issues. Also if I try with any other module like SwiftUI, which has min iOS 13 deployment, I don't find the issue and app launches without any issue. Similarly, if I use ARKit instead of RealityKit, it works fine. No issues. Although ARKit min deployment is iOS 11 but it is also not available in simulators. So why does weak linking RealityKit not work when the parent framework targets iOS 13 and iOS 14, but works alright when targeting iOS 15? * * X code version: 13.3.1**
Posted
by ommkar23.
Last updated
.
Post not yet marked as solved
1 Replies
377 Views
In Xcode 13+ When I create a framework, there is no "Products" folder as it used to be there prior to that version same like the below image Even when I build the project, I still cannot find the ".framework" file anywhere. All tutorials on google follow the same flow of creating the framework project, building then extracting the .framework binary from the Products folder, but that doesn't seem to be available in Xcode 13+ Any one have a clue?
Posted
by MosCD.
Last updated
.
Post not yet marked as solved
1 Replies
329 Views
Hello. We are facing an issue with Xcode 13.3.1. We have an application with a "large" number of integrated frameworks. We use those frameworks to modularize smalls parts of our app. Currently we have more than 200 modules. With Xcode 13.2.1 we have no problem with this number of frameworks. But with Xcode 13.3.1 out app crashes when launching on a device but on simulators it works just fine. The error that we get is: dyld[458]: unknown library ordinal -15 in /private/var/containers/Bundle/Application/B1B4B241-A959-4BAB-91F0-57D3A786EC84/AppName.app/AppName when binding '_$s2os0A4_log_3dso0B04type_ys12StaticStringV_SVSgSo03OS_a1_B0CSo0a1_b1_D2_tas7CVarArg_pdtF' After different attempts out we found that this issue was related to the amount of frameworks embebed in our app. We use Cocoapods to integrate our modules but this issue happens even if the frameworks are integrated directly on Xcode, without Cocoapods. We checked this by creating a sample project. Unfortunately the forum won't allow me to attach the project here. This is what I mean with "integrate the frameworks directly on Xcode": It crashes with Xcode 13.3.1 and 224 frameworks. This is an image of the crash: If you remove just one framework, the app starts correctly. And if you run the project with Xcode 13.2.1 and 224 frameworks, the app starts just fine. I think this issue may be related with this other question on the forum
Posted Last updated
.
Post not yet marked as solved
0 Replies
98 Views
Does anyone know if we can access DVLA API free to get vehicle basic information? Has anyone done this ?
Posted
by raju1974.
Last updated
.
Post not yet marked as solved
2 Replies
6k Views
There is a question on stackoverflow for that too: https://stackoverflow.com/questions/66143815/xcode-12-5-spm-dependency-cache-location Xcode 12.5 release notes mention the "per-user-basis" cache for SPM dependencies: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_5-beta-release-notes Is the location outside of DerivedData folder so cache still persists somewhere in ~/Library/Caches and can be reused even for clean build? It's very important to know for CI performance! Any guidance/help is appreciated.
Posted Last updated
.
Post not yet marked as solved
1 Replies
135 Views
Hi friends, I'm new to Apple Development environment, I'm developing an app in flutter, my problem appears after adding flutter_unity_widget 2022.1.0+2, I'm building a mini game that is integrated in my app with Unity framework, I'm able to build and archive the app but not to Distribute or Validate it on store? What can cause this issue? Screenshots attached! Thanks in advance!
Posted Last updated
.
Post not yet marked as solved
1 Replies
556 Views
We are developing 8 SDKs, which are to be shared as XCFrameworks. The SDKs are interdependent on each other and also we have dependency on third party XCFrameworks which they have shared as Cocoapods. Below is a simple demo of how the dependency graph looks, (@Apple - image attachment will be very helpful here) A -> B, C B -> D, E, F C -> G, H D, E, F -> H H -> I, J I -> K here G and J are third party XCFrameworks. K is a third party FAT framework, written completely in Objective C. other letters denote the SDKs we are writing fully in Swift with Objective-C compatibility. You can read the first line as A is dependent on B and C. We started developing the SDKs by adding all these as Development Pods to a sample iOS Client. The only issue we faced was that even a small change in any of the pods required to clean build the entire project. We got around this setting "Legacy Build System" in Workspace settings. When we approached release, we generated XCFrameworks and tried adding them to the Client. We faced the following issue in almost all our frameworks. Because we had class names matching the SDK names, just like the old FAT framework. ‘FrameworkName’ is not a member type of ‘FrameworkName’ errors inside swiftinterface - https://forums.swift.org/t/frameworkname-is-not-a-member-type-of-frameworkname-errors-inside-swiftinterface/28962 Then we renamed all the frameworks and got struck with the following issue. XCFramework requires to target iOS 13 for inter-framework dependencies with Objective-C compatibility - https://forums.swift.org/t/xcframework-requires-to-target-ios-13-for-inter-framework-dependencies-with-objective-c-compatibility-tested-with-xcode-11-beta-7/28539 We are supporting from iOS 9. So moving to iOS 13 is not even an option. We were not able to find the exact cause of this issue for so long even after exploring the generated .swiftinterface file which was throwing these issues. We found that issue could be because of using inheritance in the following way. X is a Swift class, made Objective C compatible by inheriting NSObject. When we have another class Y from any of the other SDKs, inheriting X like below, this issue will be thrown. For example, we have in Framework H. @objc class X: NSObject { } and then in framework D, which depends on H, we have class Y: X { } We removed it in one place and the issue resolved. We had this pattern all over the eight SDKs and we removed all those. Then when we tried to build, we ran into the following issue. '@objc' instance method in extension of subclass requires iOS 13.0.0. We moved all @objc extension methods to the class. Those were mostly delegates and data source methods from common UIKit classes. After facing these issues with XCFrameworks in the Client app, we decided to remove the development pod setup and manually drag and drop the xcodeproj files of all the SDKs into the Client app. Also we had to manually add the third party frameworks. This way, some of the above issues can be identified during development instead of release time. Now, the situation is that, when we make changes to any of the SDKs, it will be not be reflected unless we do a clean build, which takes a lot of time and is not desirable. Even then, in some cases, the client app just throws Unable to import D or any other framework, in which we have made some changes. Then we to select that framework in the scheme, build it once and then select on to the Client App and build it again to see the change in our app. This workflow is cumbersome and painful in the long run. Kindly suggest better alternative setups for developing multiple XCFrameworks. Our next problem is when generating XCFrameworks, we need each SDK to use the XCFramework of the other dependent SDKs. For this, we have to work our way from the bottom most framework. Generate it, add to the one above it and then move on to the next. This also feels like a burden in the long run. We seriously hope there are better ways to do it. Kindly suggest those. We have not used Swift Package Manager (SPM) because most of our customers use Cocoapods for dependency management and the remaing few just drag the frameworks manually into their projects. If SPM can act as a magic pill and solve all these issues at once, then we can consider using it.
Posted
by imthath_m.
Last updated
.
Post not yet marked as solved
0 Replies
335 Views
Hi, I've updated Xcode to 13.3 and I've been getting below errors on creating build. I'm running my React-Native app with version 0.66 'cstdarg' file not found. Could not build module 'Darwin' Could not build module 'CoreFoundation' Could not build module 'Foundation' Kindly please help me with this issue.
Posted Last updated
.
Post not yet marked as solved
1 Replies
259 Views
I have been working with a framework to add multiplayer support to my app. The app runs on test devices, simulators, and archives perfectly fine and the app is fine without the framework. But when I go to distribute the app, I see get this error related to the multiplayer framework I have added. I have tried updating the minimumOSVersion to 9.0, 10.0, 12.0, and 13.0 everywhere (info.plist, deployment info, build settings, etc) and they all match with each build/archive but no matter what I can't get fix this error. This error only shows up when I go to distribute the app to the store. Any ideas on what to try or how to fix this issue? I've attached a screenshot of the issue below.
Posted
by flipside.
Last updated
.
Post not yet marked as solved
1 Replies
195 Views
Hello, I faced a weird problem with my framework imported into my app. MyFramework uses some other frameworks like OpenSSL etc. I build MyFramework with the script: FrameworkName="MyFramework" rm -rf build/ xcodebuild archive -scheme "$FrameworkName" \   -configuration Debug -destination 'generic/platform=iOS' \   -archivePath "./build/$FrameworkName.framework-iphoneos.xcarchive" \   SKIP_INSTALL=NO \   BUILD_LIBRARIES_FOR_DISTRIBUTION=YES xcodebuild archive -scheme "$FrameworkName" \   -configuration Debug -destination 'generic/platform=iOS Simulator' \   -archivePath "./build/$FrameworkName.framework-iphonesimulator.xcarchive" \   SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES xcodebuild archive -scheme "$FrameworkName" \   -configuration Debug -destination 'generic/platform=macOS' \   -archivePath "./build/$FrameworkName.framework-macos.xcarchive" \   SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES # Fix https://bugs.swift.org/browse/SR-14195 (caused by https://bugs.swift.org/browse/SR-898) pattern="./build/$FrameworkName.framework-iphoneos.xcarchive/Products/Library/Frameworks/$FrameworkName.framework/Modules/$FrameworkName.swiftmodule/*.swiftinterface" grep -rli "$FrameworkName.$FrameworkName" $pattern \    | xargs sed -i '' "s,$FrameworkName.$FrameworkName,$FrameworkName,g" # end fix xcodebuild -create-xcframework \   -framework "./build/$FrameworkName.framework-iphoneos.xcarchive/Products/Library/Frameworks/$FrameworkName.framework" \   -framework "./build/$FrameworkName.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/$FrameworkName.framework" \   -framework "./build/$FrameworkName.framework-macos.xcarchive/Products/Library/Frameworks/$FrameworkName.framework" \   -output "./build/$FrameworkName.xcframework" # Wait for process completion and verify result pid=$! wait $pid echo "Process with PID $pid has finished with Exit status: $?" [[ ! -d "./build/$FrameworkName.xcframework/" ]] && {   msg="[ERROR] expected ./build/$FrameworkName.xcframework/ to exist"; echo -e $msg   exit 1 } As you can see, it is also built framework for the macOS platform. A little digression: I prefer using Carthage to build xcframeworks, but here it doesn't work, I don't the reason. The aforementioned build solution works great, all frameworks included in MyFramework don't have any issues when I use MyFramework in my iOS App. The problem starts with using MyFramework in macOS target App. It shows two related errors, I tried some solutions but didn't find a proper way... Errors: blablabla/DerivedData/MyApp-hdzvzxtsnsdivzcialzikxjdwidw/Build/Products/Debug/MyFramework.framework/Modules/MyFramework.swiftmodule/arm64-apple-macos.swiftinterface:9:8: error: no such module 'OpenSSL' import OpenSSL And the second one: blablabla/Helpers/Injected/Services.swift:10:8: error: failed to build module 'MyFramework' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug import MyFramework I can import the OpenSSL framework to the macOS app and then I faced the same problem with the next framework from MyFramework's importing list - it isn't a solution... What causes that problem? Thanks in advance for any help... 🥺
Posted Last updated
.
Post marked as solved
1 Replies
334 Views
Hello guys! I faced a problem with building... My device suddenly updated to iOS 15.4.1, my Xcode was 13.2 and I had to update it to the latest version (13.3.1) to build the app. After the update, I had a few problems which were successfully solved but one of them stopped me for a few hours. The problem is with Bridging Headers or Swift Compiler, I really don't know what I did badly, and what causes problems. On several forums I often read that is important to set: Build Settings > Build Options > Build Libraries for Distribution But in any case it doesn't work, on yes: error: using bridging headers with module interfaces is unsupported on no: (line with import framework SWXMLHash) /Users/blablabla/SSLModel.swift:9:8: error: module compiled with Swift 5.5.1 cannot be imported by the Swift 5.6 compiler: /Users/blablabla2/Build/Products/Debug-iphoneos/SWXMLHash.framework/Modules/SWXMLHash.swiftmodule/arm64-apple-ios.swiftmodule import SWXMLHash It will be important that I use Carthage. What should I do? Clone all 10 frameworks that I use and re-build them with a new Xcode which includes compiler 5.6? That may be a bad solution... Any answers on similar topics don't help..
Posted Last updated
.
Post not yet marked as solved
7 Replies
323 Views
In my app I need to solve a set of 3 equations. But I really struggle, because these 3 equations contain 4 unknown. So the result would be some function of a fith variable. Very simple Example: u = cos(s) v = sin(s) 1 = t I really don‘t know a method how to solve it. I think it can‘t be solved numerically ,because the result is a function. I thought about to convert the this functions into Fourier series and solve than the set of equations. But I am not sure if this works either. Does anyone know any framework for this. I have looked on the the internet but found nothing.
Posted Last updated
.
Post not yet marked as solved
2 Replies
197 Views
Hi, I develop a desktop GUI application. This application is written in Python and is cross-platform. I have tried to sign and notarize the Mac .dmg installer for months, but for now without any success. Below I have prepared a small example of the kind of code I need to notarize and sign. Thanks in advance for your help! Miloš MVP: MVP (Minimum viable product) = pack .dmg + sign + notarize basic portable Py runtime (portable conda based) with “Hello world” in Tk runtime. To create (and run) the MVP code, run this in console (requires echo, curl and .tar.xz compression support - usually built-in in MacOS): cat > test.py << EOF from tkinter import * from tkinter import ttk root = Tk() frm = ttk.Frame(root, padding=10) frm.grid() ttk.Label(frm, text="Hello World!").grid(column=0, row=0) ttk.Button(frm, text="Quit", command=root.destroy).grid(column=1, row=0) root.mainloop() EOF curl https://files.sdat.solargis.com/venv3.9_mac_amd64.tar.xz | tar xvJf - . ./venv3.9/bin/activate2 python test.py  # this runs the MVP app Pls, I need to know HOW to create a signed + notarized .dmg installer of the program above in the automated way.
Posted Last updated
.
Post marked as solved
1 Replies
255 Views
Previews don't work when are inside of a static framework. Has anyone experimented it also? MessageSendFailure: Message send failure for update ================================== |  RemoteHumanReadableError: Unknown preview provider "Provider_Previews_" |   |  XCPreviewAgent does not contain a preview provider named "Provider_Previews_". Check your build settings to ensure the preview provider is compiled into your product. |   |  Mangled name: 0012Provider_0021Provider_Previews_V Thanks in advance
Posted
by JesusMG.
Last updated
.
Post not yet marked as solved
2 Replies
174 Views
It's that able to limit my sharing framework only been used by specific applications or not. I would like to know if there's any way to protect the framework's security.
Posted
by Shortz79.
Last updated
.