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
49 Views
Trying to generate dynamic library (framework), in Debug build I can see the local path to my source code inside the framework or Unix Executable File. This is not the case with Release build. How can I prevent the path getting exposed in the framework file? I tried perl command to replace the occurrences of the path inside file. But when I do that and try to use framework within my iOS application, I got ld: malformed universal file: slice extends beyond end of file file '/path/to/my/Sample.framework/Sample' Framework file got corrupted, is there any proper way from XCode or xcodebuild command to achieve this?
Posted Last updated
.
Post marked as solved
1 Replies
90 Views
Hello, I've been trying for a few days to import a local XCFramework into my Swift code, with no success. Xcode keeps erroring with: "No such module". I've made a minimal reproducible example on GitHub. Interestingly, it does work with an Obj-C project with no issue. Both projects were created with pod lib create. I've tried adding a random module.modulemap to my XCFramework, no success. After browsing forums / documentation for a few days, I yield and post here. Hope someone can help :pray:
Posted Last updated
.
Post not yet marked as solved
1 Replies
119 Views
Hi, My question is not how to use a dylib but I am wondering whether if they are allowed to use in an app released in AppStore or not. My company develops c/c++ cross platform libraries to be used in different environments and now we are trying to use dylibs in iOS, so far we can embed them and call the functions from the libraries successfully, how ever when we submit the app including the dylib to the AppStore, the Apptore validation fails because of the dylib, We tried below ways, wrapping dylib into framework (dylib is inside the Frameworks folder of framework) (Result: Framework contains disallowed file 'Frameworks') wrapping dylib into framework (dylib is in root folder of framework) (Result: your app can't contain standalone executables or libs other than a valid CFBundleExecutable) converting dylib into a fake framework (Result: invalid bundle, framework doesn't support the minimum OS version specified in the info.plist file.) So, if the dylibs are allowed to use in iOS, we need a documentation about where to put them correctly that will make our app pass the AppStore validation, thanks
Posted
by ms-nova.
Last updated
.
Post not yet marked as solved
3 Replies
345 Views
As of Xcode 13.3, binary SPM dependencies are no longer included in our app's Frameworks folder. When our app is launched on a device, it crashes with a Library not loaded: @rpath/... error with the list of attempted framework search paths. Is this a known issue with Xcode 13.3 and 13.3.1? Is there a workaround?
Posted Last updated
.
Post not yet marked as solved
7 Replies
4.4k Views
We have an SDK project that contains a static library (.a) with binaries for arm64, armv7 (Device) and x86_64, i386 (Simulator). When we run in M1 Macbooks we are unable to run on arm64 simulators and get the following error: building for iOS Simulator, but linking in file built for iOS Our SDK is built into an XCframework bundle, however this issue still persists. We have tried building the static library into its own XCframework as well by separating the architectures into two different binaries, one for Device and one for Simulator, however we still didn't get it to work. We would like to know if this is a limitation or current issue on Xcode or if there are certain steps we need to follow to get this static library to be supported on arm64 simulators.
Posted
by andre7.
Last updated
.
Post not yet marked as solved
0 Replies
67 Views
I'm getting this error trying to compile my framework, which I newly added some Swift code to: <module-includes>:1:9: note: in file included from <module-includes>:1: #import "LibcOverlayShims.h"         ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/lib/swift/shims/LibcOverlayShims.h:80:15: error: declaration of 'sem_t' must be imported from module 'Darwin.sys.semaphore' before it is required static inline sem_t *_stdlib_sem_open2(const char *name, int oflag) {               ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/semaphore.h:43:13: note: declaration here is not visible typedef int sem_t;             ^ <unknown>:0: error: could not build Objective-C module 'SwiftOverlayShims'
Posted
by kode54.
Last updated
.
Post not yet marked as solved
0 Replies
127 Views
Hello I have a very simple feature that tries to remove the background from a web camera video stream using VNGeneratePersonSegmentationRequest and VNImageRequestHandler. let personSegmentationRequest = VNGeneratePersonSegmentationRequest() personSegmentationRequest.qualityLevel = .balanced let imageRequestHandler = VNImageRequestHandler(ciImage: ciImage) // a frame from the camera try? imageRequestHandler.perform([personSegmentationRequest]) guard let result = personSegmentationRequest.results?.first else { return nil } On Mac computers with M1 processors works great (60 fps without any issue). The same code/app on MacBook Pro Intel i7 2.7GHz and AMD Radeon the performance is only 10 fps, much lower. Any thoughts? Thank you
Posted Last updated
.
Post not yet marked as solved
4 Replies
1.7k Views
Hi, this is the scenario: I have a framework (my own pod) that defines image sets as assets. They are exported as a bundle in the framework, and images are read inside by the framework itself. Prior to Xcode 13.0: all works flawlessly. In Xcode 13.0, while debugging on simulator or real hw: all works flawlessly. In a Testflight build from Xcode 13.0: images from that framework's bundle seems nil (dot not appear in app) Things to consider: The size between the archive builds on Xcode 13 and 12.5 have the same size. The archive builds on Xcode 13 and 12.5 do show the same Asset.car within the framework's bundle. Image filenames do appear listed, case sensitively correct. The framework's bundle also uses other non image files (.strings, .storyboards) with no problem. Issue affects image sets from assets (.svg, .pdf, .png, all file extensions effected) I could provide a demo project to repro, but the attachment in the forum doesn't allow it :S
Posted Last updated
.
Post not yet marked as solved
1 Replies
451 Views
When embedding a framework in an iOS application I noticed some differing behavior when running on an actual device and simulator which I couldn't find an explanation for anywhere in the documentation. The embedded frameworks are loaded from outside (adjacent) to the app package when running on simulator whereas they are loaded from within the app package, within the Frameworks directory when running on an actual device. Here's a link to an example project which logs the path at which the dylib within the framework is loaded: https://github.com/R4N/simulatorLoadFrameworkExample The sample outputs are as follows: On simulator: /Users/username/Library/Developer/Xcode/DerivedData/simulatorLoadFrameworkExample-gmxyfcrvpmdfgqepjbbysebvysmh/Build/Products/Debug-iphonesimulator/libsimple.dylib On device: /private/var/containers/Bundle/Application/9D22C144-848A-4E40-B5B3-707B1CFD3151/simulatorLoadFrameworkExample.app/Frameworks/libsimple.dylib Is this the correct/expected behavior and if so is there any documentation which references this? These are the documentation pages which I've reviewed so far trying to find an answer/explanation: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/CreationGuidelines.html https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1 https://developer.apple.com/library/archive/technotes/tn2435/_index.html
Posted
by R4N.
Last updated
.
Post not yet marked as solved
0 Replies
127 Views
I am trying to add a framework to my project but I am facing 'Could not find module 'StandardCheckoutKit' for target 'arm64-apple-ios'; found: x86_64-apple-ios-simulator' Error This framework works perfectly in Simulator but didn't work on real devices (iPhone XS Max) Added framework using drag and drop (downloaded from the browser) I am not installing the framework via pods (not available)
Posted Last updated
.
Post not yet marked as solved
0 Replies
90 Views
We are creating a framework to distribute to other application, our framework contains multiple third party library with pods. We are able to successfully generate the framework. But we are getting error when that framework is used and generating Ad hoc build. Below is the pod file for the framework project pod 'Alamofire', '> 4.9.0' pod 'RealmSwift', '> 3.19.0' pod 'ObjectMapper', '> 3.5.1' pod 'ObjectMapper+Realm', '> 0.6' pod 'ZIPFoundation', '> 0.9.9' #(0.9.9) pod 'NMSSH', '> 2.3.1' post_install do |installer| installer.pods_project.targets.each do |target|       if ['ObjectMapper','ObjectMapper+Realm','Alamofire'].include? target.name    target.build_configurations.each do |config|     config.build_settings['SWIFT_VERSION'] = '4.2'    end   end target.build_configurations.each do |config|    # set valid architecture #   config.build_settings['VALID_ARCHS'] = 'arm64 armv7 armv7s i386 x86_64'    # build active architecture only (Debug build all) #   config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"    config.build_settings['ENABLE_BITCODE'] = 'YES'    if config.name == 'Release' || config.name == 'Pro'      config.build_settings['BITCODE_GENERATION_MODE'] = 'bitcode'     else # Debug       config.build_settings['BITCODE_GENERATION_MODE'] = 'marker'    end    cflags = config.build_settings['OTHER_CFLAGS'] || ['$(inherited)']    if config.name == 'Release' || config.name == 'Pro'      cflags << '-fembed-bitcode'    else # Debug      cflags << '-fembed-bitcode-marker'    end    config.build_settings['OTHER_CFLAGS'] = cflags   end  end end
Posted
by mayur.etm.
Last updated
.
Post not yet marked as solved
1 Replies
168 Views
Hello, I'm trying to port my framework CI to xCode Cloud and i have to create the release build that contains iOS ios-arm64 and ios-arm64_x86_64-simulator architectures for being able to build the XCFramework on iOS devices and Simulators. I looked in the Archive Action in the Xcode Cloud options but the Platform selector has iOS but not not Simulator. Currently i achieved the results that i needed by adding a ci_scripts/ ci_pre_xcodebuild and working with old fashion xcodebuild archive command and works fine . Can i achieve what i want without the sh script by using predefined actions from Xcode Cloud ? Thanks, Florin
Posted
by AngryS.
Last updated
.
Post not yet marked as solved
0 Replies
134 Views
We’ve been attempting to reliably update contacts in iCloud and Gmail containers. Having tried several approaches (bulk writes, batched writes, one-by-one writes with sleeps in between, etc.), we’ve found flakiness in all approaches that is never exposed to the app. Diving a little deeper, we’ve found that this appears to be due to internal server-client failures between iOS and the relevant CardDAV servers. From our analysis, we seem to be seeing 2 key types of failure: When the client-server interaction is interrupted, contact update requests appear to be discarded and not resumed for whichever container was currently in progress. After a variable period of time, the server wipes the newer client state and reverts to an older, stale state. We’re trying to understand if there is something we are doing wrong with our writes or if this is an iOS level bug. This is easily reproducible for any device connected to an iCloud or Gmail account with circa. 100+ contacts: for each container for each contact in container create CNSaveRequest update any field in contact and add to save request execute save request
Posted Last updated
.
Post not yet marked as solved
1 Replies
190 Views
We imported pure Swift XCFramework into Swift application. On setting the breaking point and trying the po command the following error is seen error: virtual filesystem overlay file '/Users/rakshitha/Library/Developer/Xcode/DerivedData/ABC-agkiherlqdmvaeakrqtfvsowceuq/Build/Intermediates.noindex/ArchiveIntermediates/ABCDE/IntermediateBuildFilesPath/ABC.build/Release-iphonesimulator/ABCDE.build/all-product-headers.yaml' not found error: virtual filesystem overlay file '/Users/rakshitha/Library/Developer/Xcode/DerivedData/ABC-agkiherlqdmvaeakrqtfvsowceuq/Build/Intermediates.noindex/ArchiveIntermediates/ABCDE/IntermediateBuildFilesPath/MoEngage.build/Release-iphonesimulator/ABCDE.build/all-product-headers.yaml' not found error: couldn't IRGen expression. Please check the above error messages for possible root causes. Solutions Tried: XCFramework was created with dsym and BCSymbolMaps XCFramework created without dsym and BCSymbolMaps Set the Other Swift Flags to -Xfrontend -no-serialize-debugging-options None of the above solutions worked Note: The XCFramework was generated in Xcode 13.4. The Swift version for generated XCFramework is Swift 5. XCFramework contains support for iOS and tvOS. The Sample application was tested in the same Xcode and swift version. Below is the script used to generate XCFramework XCFramework.sh
Posted Last updated
.
Post not yet marked as solved
2 Replies
330 Views
Hi, I'm working on a project and I remember that the "Internet Accounts" section in System Preferences exists, and I figure that would be the way to store relevant information. I found the Accounts framework page in the documentation, but everything appears to be deprecated. Is there any explanation and/or alternative for this?
Posted
by GalaxyX.
Last updated
.
Post not yet marked as solved
1 Replies
226 Views
We have a binary framework built with Xcode 13.0 with module stability (BUILD_LIBRARY_FOR_DISTRIBUTION) enabled. As such, the framework can be used on all versions of Xcode 13.x. When using the same binary framework in Xcode 14.0 beta (14A5228q), we get the following error and the app doesn't compile: Failed to build module 'OurFramework'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)', while this compiler is 'Apple Swift version 5.7 (swiftlang-5.7.0.113.202 clang-1400.0.16.2)'). Please select a toolchain which matches the SDK. Is there a change to how module stability works in Xcode 14, or is this a temporary limitation (or bug) in Xcode 14.0 beta that will be addressed in future updates?
Posted Last updated
.
Post marked as solved
4 Replies
436 Views
"This bundle is invalid. The bundle at path [path] has an invalid CFBundleIdentifier 'com.gdnative.framework.libwebrtc_native.ios.release.arm64' There are invalid characters (characters that are not dots, hyphen, and alphanumerics) that have been replaced with their code point 'com.gdnative.framework.libwebrtc_native.ios.release.arm64' ". This is framework that has been added before running and/or archiving. I am able to build and run on a device as well as archive the project but cannot distribute the app to the store. When I change the name of the framework to remove the "_" (which is what I believe the issue is), the app will not run on a build device and will not archive. Any ideas on what I should do? Any feedback or suggestions is greatly appreciated.
Posted
by flipside.
Last updated
.