Frameworks

RSS for tag

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

Posts under Frameworks tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

【Urgent/ Please help me out】Is it OK to encapsulate xcframeworkA into xcframeworkB (encapsulation of xcframework only)?
We are considering the development of a new service, We would like to ask for detailed information on the feasibility of the following. Is it possible to encapsulate only xcframework, such as encapsulating xcframeworkA into xcframeworkB? If the above is possible, will the application incorporating the xcframework in the above state pass the review of apple?
1
0
182
16h
Xcode 16.2 ncurses no longer works
I have a very large terminal project that relies on the ncurses library. As of the update on Dec. 11, 2024, the ncurses (and forms) API's no longer work when the app is launched from Xcode. If I run the app by double-clicking on the executable from Finder, the API's work as expected - but of course, that does not allow for debugging - which is the purpose of running within Xcode. I have tested on a simple project that simply outputs "Hello World" and waits for the input of CR before ending. What should happen, is that "Hello Word" is output on the terminal, but instead no output occurs. I stress that everything worked prior to the update on Dec.11. The code for main is simply this: #include <iostream> #include "stdlib.h" #include "stdio.h" #ifdef __cplusplus #include <iostream> #endif #include <cassert> #include <ncurses.h> #include <form.h> using namespace std; int main(int argc, const char * argv[]) { // cout << "Hello, World!" << endl; // Basic test initscr(); printw("Hello World !!!"); refresh(); int ch = 0; while (ch != 10) { ch = getch(); } endwin(); return 0; } To link to libncurses.tbd, in Build Phases, add the libncurses.tbd from the list of Frameworks. To output on the terminal, select the Product menu item in Xcode, then Edit Schema. Under the Options tab, change the Console selection to Terminal. When the application runs, the terminal will launch, but no output will occur. I have Googled every topic imaginable for 2 days now but have not come up with a solution. Is there something that I need to update? It looks to me like the libraries have been updated on Dec. 11 as well, but is there something else I need to do? For a more detailed image of one of the many screens I have working prior to this issue:
5
0
129
3d
Reproducible Builds on iOS
Dear Apple Developer Forum! I'm in need of help regarding an issue that has to do with binaries. I'm building an iOS App that needs a fingerprint of its binaries, exclusively based on the source code written. A "reproducible" build, meaning that when I compile it on my machine and run checksum on it, the output (hash) will be the same, as if another device clones the project, compiles and checksums the values. The App depends on swift packages which depends on Swift Packages, which I've managed to compile to .o files, convert to .a files (static frameworks) and create xcframeworks, which the App depends on. They work great, once compiled, their checksum value does not change when App is compiled (unless source code of them is changed of course), but the Apps executable (checksummed inside the IPA) changes every time it's compiled. I'm guessing that perhaps the Xcode compiler injects a timestamp or other unique identifier in the binaries? Is there any way to have "reproducible" builds on iOS (Swift Xcode)? All input is greatly appreciated, Thank you very much, Kind regards Johan.
4
0
131
5d
Privacy manifest related deadlines - inconsistent communication by Apple
Please help me clarify the current situation regarding the necessity of a privacy manifest file in 3rd party SDKs. It would be nice to have a reply from someone working at Apple, to have a reliable answer. A quick summery of the events from last year https://developer.apple.com/support/third-party-SDK-requirements/ : "Starting in spring 2024, you must include the privacy manifest for any SDK listed below when you submit new apps in App Store Connect that include those SDKs, or when you submit an app update that adds one of the listed SDKs as part of the update." Last autumn, we started receiving warning emails from Apple after initiating app reviews, even when our apps did not have a newly added SDK: ITMS-91061: Missing privacy manifest - Starting November 12, 2024, if a new app includes a privacy-impacting SDK, or an app update adds a new privacy-impacting SDK, the SDK must include a privacy manifest file. Please contact the provider of the SDK that includes this file to get an updated SDK version with a privacy manifest. According to this warning message, app updates which do not contain any new SDKs are still not affected. Since then, at one point in time the deadline changed, as now we have February 12, 2025 in the privacy manifest documentation: https://developer.apple.com/documentation/bundleresources/adding-a-privacy-manifest-to-your-app-or-third-party-sdk However, this page does not contain any mention of the circumstances, it only states in general that apps you submit for review in App Store Connect must contain a valid privacy manifest file for a certain number of commonly used third-party SDKs. My questions Does the February deadline apply to every app update, even if they do not contain any newly added SDKs? Or does it still affect only the app updates "that adds one of the listed SDKs as part of the update." ? If the former, the 3rd party requirements page should be updated in my opinion. And if the latter, why does the documentation not contain this important piece of information? We have a basic product which then gets customised for the clients so we upload several different apps based on the same code with the same dependencies. How is it possible that during autumn, Apple sent ITMS-91061: Missing privacy manifest warnings for some of our apps, but did not send it for others? Does Apple not validate all the apps but only some of them randomly? Also, the warning still states that it should be relevant if "an app update adds a new privacy-impacting SDK", but that was not the case for us, we did not add anything newly to our apps - why did we even get these warnings then? Just in general: when the deadlines change, is there any channel where Apple communicates these, besides the warning emails? I did not see any posts on the Apple Developer site's News page about this February date, I just found it by accident. I don't even remember seeing a notice about the original November deadline, we just started receiving the email warnings without expecting them. Thank you in advance for anyone sharing an answer.
0
2
191
1w
UITabBarController y psoition issue for iOS 18
I am trying to give bottom padding to tabbar i.e ** tabBarFrame.origin.y = view.frame.height - tabBarHeight - 30** but it is not moving up from bottom, it gets sticked to bottom = 0 and the tabbar content moving up taher than tabbar itself.. Code snippet is - `i override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() let tabBarHeight: CGFloat = 70 // Custom height for the capsule tab bar var tabBarFrame = tabBar.frame tabBarFrame.size.height = tabBarHeight tabBarFrame.size.width = view.frame.width - 40 tabBarFrame.origin.y = view.frame.height - tabBarHeight - 30 tabBarFrame.origin.x = 20 tabBar.frame = tabBarFrame tabBar.layer.cornerRadius = tabBarHeight / 2 tabBar.clipsToBounds = true view.bringSubviewToFront(tabBar) }` Can anyone please help to resolve the issue for iOS 18, it is coming in iOS 18 rest previous versions are fine with the code.
0
0
140
1w
Clarification on Entitlements, Privacy Manifest, and Info.plist for System-Wide Mouse Click Monitoring and Typing Simulation in macOS App
I am currently developing a macOS application that listens for system-wide mouse clicks to simulate typing with user-provided text. The app requires Accessibility permissions to function properly, and I want to ensure compliance with Apple’s latest privacy and security guidelines. The app listens to global mouse clicks. It simulates keyboard input with user-provided text I would like detailed guidance on the following aspects: What specific entitlements are required to allow system-wide mouse click monitoring and simulating user input ? App Sandbox enable or disable? what keys required to explain global mouse click monitoring and keyboard input simulation in the info.plist What will be the configuration of Privacy Manifest
0
0
211
2w
Error downloading the Predictive Code Completion Model
Hi, I'm setting up Xcode and after updating MacOS to 15.2 and Xcode to 16.2, I cannot download the Predictive Code Completion Model. I've done some research and I haven't found any solution, specially since most people suggest that it randomly fixed itself, which for me hasn't been the case. I've tried restarting my Mac, uninstalling and reinstalling Xcode multiple times, I've also reinstalled MacOS from Recovery and haven't found any success (I'm also not running Xcode inside a VM, as I've seen this can cause some problems in this case). This is the error that I receive when I attempt to download the model: And here are the details: The operation couldn’t be completed. (IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $11eba9a90).DownloadError error 3.) Domain: IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $11eba9a90).DownloadError Code: 3 User Info: { DVTErrorCreationDateKey = "2024-12-26 23:09:25 +0000"; } -- There was an error processing the asset. Domain: IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $11eba9a90).DownloadError Code: 3 -- System Information macOS Version 15.2 (Build 24C101) Xcode 16.2 (23507) (Build 16C5032a) Timestamp: 2024-12-26T17:09:25-06:00 For the record, I'm a new developer and I'm still learning, so thank you very much!
1
1
248
3w
App built with Xcode 16.2 is greater then 100 mb vs the app built with Xcode 15.4
I have an app written in swift. It has multiple pods dependencies installed. When the app is generated with Xcode 15.4 the size of app is ~148Mb and when the same app is generated with Xcode 16.2 the size is ~246MB When I extracted and analysed the app, it was observed that one of the framework installed via pods Dependencies("DocumentReaderCore") was consuming more size(42.9 MB vs 215 MB) the DocumentReaderCore present in the Payload/.app/Frameworks/DocumentReaderCore.framework/DocumentReaderCore was of type linux executable when generated using Xcode 15.4 vs the other was od document type and size was 215MB.
0
0
180
3w
"No such module" error when trying to create module
Am running Xcode 16.1 on Sequoia and am getting "No such module" error. Here are my steps: Create workspace in Xcode and name it AccessControl2 Create Project named OrangeInc and add it to AccessControl2 group. Create blank playground named AccessControl and add it to AccessControl2 group Error message in playground after I add "import OrangeInc" reads "No such module" Have tried repeating this several times; get same error message.
0
0
129
4w
Metal-cpp-extensions isn't working inside frameworks
I am making a framework in C++ using metal-cpp, basically a small game engine. I am also consequently using metal-cpp-extensions provided in LearnMetalCPP to make applications work. For one of my classes, I needed to add AppKit.hpp inside a public header file, so I moved it and its associate headers(NSApplication.hpp, NSMenu.hpp, etc.) from Project headers to Public in Build Phases' Headers, however, it started giving me the error "cast of C pointer type 'void *' to Objective-C pointer type 'Class' requires a bridged cast" at several points in the AppKit headers. They don't appear when AppKit and its associates are in the Project headers, or when they are in the Private headers and no headers import it. I imagined that disabling Objective-C ARC and Using __bridge casts outside of ARC in Build Settings would solve it, but it didn't budge. I imagined it wouldn't involve actively changing the headers would be the answer, but even if I try to put __bridge before the problematic casts, it didn't recognize __bridge. How do I solve this? And why is it only happening in Public and not Project headers?
1
0
267
Dec ’24
Strange Behavior of UITabBarController selectedIndex and UINavigationController pop
UITabBarController | | VC_Tab1 --------------------------- VC_Tab2 | | | | VC_Tab1_Child VC_Tab2_Child | (HeaderView) | (MyButton) The structure of the view controllers and views in the project is as described above. <case 1> self.navigationController?.popToRootViewController(animated: false) tabBarController.selectedIndex = 1 When popToRootViewController(animated: false) is called in VC_Tab1_Child, followed by setting the tab controller’s selectedIndex = 1, the following results are observed: viewWillAppear(_:), <VC_Tab2_Child> deinit, <VC_Tab1_Child> viewDidAppear(_:), <VC_Tab2_Child> The originally expected results are as follows viewWillDisappear(_:), <VC_Tab1_Child> viewDidDisappear(_:), <VC_Tab1_Child> deinit, <VC_Tab1_Child> deinit, <HeaderView> deinit, <MyButton> headerView.backButton.rx.tap -> Event completed headerView.backButton.rx.tap -> isDisposed viewWillAppear(_:), <VC_Tab2_Child> viewDidAppear(_:), <VC_Tab2_Child> The HeaderView belonging to VC_Tab1_Child was not deallocated, and the resources associated with that view were also not released. Similarly, VC_Tab1_Child.viewWillDisappear and VC_Tab1_Child.didDisappear were not called. <case 2> self.navigationController?.popToRootViewController(animated: false) DispatchQueue.main.async { tabBarController.selectedIndex = 1 } After performing the pop operation as shown in the code and waiting for a short period before testing, the expected results were generally achieved. (However, rarely, the results were similar to those observed when called without async.)” <case 3> self.navigationController?.popToRootViewController(animated: false) DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { tabBarController.selectedIndex = 1 } When a sufficient delay was ensured as described above, the expected results were achieved 100% of the time.” The abnormal behavior is more pronounced in iOS versions prior to 18 and varies depending on the iOS version. I couldn’t find any documentation explaining the unexpected behavior shown in the results above. What could be the cause? The simulation code is provided below. https://github.com/linusix/UITabBarController_Test2
0
0
156
Dec ’24
ITMS-90429: Invalid Swift Support
Build the archive, validating and uploading it to App Store Connect - TestFlight is successful from Xcode (16.0, macOS 15.1.1). Although after that the build is rejected stating : ITMS-90429: Invalid Swift Support - The files libswiftCoreFoundation.dylib, libswiftCoreData.dylib, libswiftCore.dylib, libswiftFoundation.dylib, libswift_Concurrency.dylib, libswiftObjectiveC.dylib aren’t at the expected location /Payload/Runner.app/Frameworks. Move the file to the expected location, rebuild your app using the current public (GM) version of Xcode, and resubmit it. Cross checked the Archive and .ipa file, where we found that the mentioned .dylib files are actually present inside the "/Payload/Runner.app/Frameworks" folder, and all the ".dylib" files are also present in the "SwiftSupport/iphoneos" folder. Scenario : using tdLib compilation "libtdjson.xcframework" (embedded & signed) for ios arm64 placed under "Framworks", in my Flutter application, calling methods via "Method Channels", interacting with AppDelegate.swift file where the tdLib methods are being called from the compiled library. All "swift support settings" are enabled in Xcode while archiving and building the application.
3
0
427
2w
Common blocks in Swift?
I am porting an old app from ObjC. The app uses many defined constants such as: #define COM_OFFSET 12.5 and many variables that are read and/or written throughout the App, such as: PCDate* Dates[367]; @class PCMainView; PCMainView* MainView; in one file called "PCCommon.h" How do I duplicate this function in Swift? I have looked around and have found no help. Thanks in advance.
1
0
248
Dec ’24
App Rejected: Non-Public Symbols _lzma_code and _lzma_end in Payload/Hogs.app/Hogs
I recently submitted my app, Hogs, to the App Store, but it was rejected due to references to non-public symbols: _lzma_code _lzma_end I am using the LZMA compression library in my app, and these functions are part of that implementation. Here's a breakdown of my usage: Library Used: liblzma (custom wrapper around LZMA functions) Error Message: "The app references non-public symbols in Payload/Hogs.app/Hogs: _lzma_code, _lzma_end." Steps I’ve Taken: I’ve wrapped the LZMA functions in my own functions (my_lzma_code, my_lzma_end) to prevent direct references. I have checked the build settings and included -lzma in the linker flags. I’ve tried using a custom framework to encapsulate LZMA, but the issue persists. I would greatly appreciate any help or suggestions on how to resolve this issue and get my app approved. Is there any workaround or adjustment I can make to avoid using these non-public symbols? Thank you in advance for your assistance.
1
0
158
Dec ’24
Optimizing React Native App for Fast API Calls Using Expo
I'm developing a grocery delivery app using React Native and Expo. The app uses Node.js and MongoDB for the backend APIs. While integrating dashboard APIs, I've noticed a delay in API response times, particularly with the product filtering and sorting features. I'm looking for best practices or tools to optimize API calls in React Native, especially with Expo. Additionally, are there ways to implement efficient caching for repeated queries? Any advice or recommendations would be greatly appreciated!
0
0
168
Dec ’24
Detecting DarkWake and Maintainance Sleep transitions
On a macOS machine running v15.0, I have a daemon run by launchd which subscribes to the sleep and wakeup notifications using the IORegisterForSystemPower method. void PowerCallBack(void* refCon, io_service_t service, natural_t messageType, void* messageArgument) { switch (messageType) { case kIOMessageSystemWillSleep: logger->Debug("Received sleep notification from macOS"); if (refCon) { //Handle Sleep } IOAllowPowerChange(root_port, (long)messageArgument); break; case kIOMessageSystemHasPoweredOn: logger->Debug("Received wakeup notification from macOS"); if (refCon) { // Handle Wakeup } break; default: break; } } void MacOSNotification::RegisterNotifications() { logger->Debug("Registering for notifications from macOS"); powerNotificationThread = [[NSThread alloc] initWithBlock:^{ // Notifier object, used to deregister later root_port = IORegisterForSystemPower(this, &notifyPortRef, PowerCallBack, &notifierObject); if (root_port == 0) { return; } logger->Debug("Registered for system power notifications from macOS"); // Add the notification port to the application runloop CFRunLoopAddSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(notifyPortRef), kCFRunLoopCommonModes); CFRunLoopRun(); }]; //END OF THREAD BLOCK [powerNotificationThread start]; } Using this mechanism, I am getting notifications for normal sleep and wakeup transitions like closing and opening the lid. I need these notifications to terminate/reconnect my connection to a cloud service when we go to sleep/wakeup respectively. I have noticed from the power logs at /private/var/log/powermanagement that the after the sleep initiated by lid closing or clicking sleep in the top apple menu (both of which I can detect as they generate power notification), the macOS machine wakes up with the following message from powerd logs: DarkWake from Deep Idle [CDNP] : due to SMC.OutboxNotEmpty smc.70070000 wifibt/ I do not get any notification for this wakeup and my application threads start running. This happens every 15 to 16 mins from my observation. After this DarkWake, we go back to 'Maintenance' sleep in under a minute as can be seen by the following powerd log: Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active I do not get any notifications for this either. Is there a way to track and get notified of these DarkWake -> Maintenance sleep cycles? At the very least I would like to log when we go into and come out of these states. Currently I just rely on seeing a 15 min window of no logs to know this must have a DarkWake -> Maintenance sleep cycle. Also is there a way to make sure my application and its threads are not woken up by DarkWake (like an opt-out)? I would like to make it so that my application only runs when we are properly sleeping and waking.
4
0
388
1w
Can Xcode still link with libcurl.{#}.tbd?
I created a new iOS project (storyboard if it matters) and added a bunch of C files to it. Some portion of the C files depend on libcurl. I would like to be able to build for both simulator and device if possible. Google claims that Xcode can provide the dependency as part of the inbuilt libraries however I do not see libcurl.4.tbd (or any version) as an option to choose. Is this feature no longer available or is there something I am missing here? For context here is a screen shot of my build error situation
4
0
232
Dec ’24
iOS18.childViewController lifecycle of UITabbarController does not execute
I have encountered a tricky problem and hope to receive help. My APP process does not exist, and then I click on the notification message of the APP to open it. At this time, my APP will first configure uitabbarccontroller, and then push the first (index=0) viewcontroller (A) from the tab to the notification message list viewcontroller (B). However, I found that on iOS18, the lifecycle of A (viewDidLoad) did not execute at the end of this process. I am sure this problem will occur stably on iOS18.1.1. Versions lower than iOS18 will not. Can someone tell me why this is?
0
0
213
Dec ’24
Third party frameworks are not found
Hi, Can someone please suggest a answer for my problem. I am developing an iOS app using Qt and I am trying to implement AdMob. I installed using below Pod file. # Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'apptesting' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! # Pods for apptesting pod 'FirebaseAnalytics', '10.27.0' pod 'Google-Mobile-Ads-SDK', '11.5.0' end and these are installed correctly and testing.xcworkspace is created successfully. but when I run the build for xcworkspace in Xcode, it is showing below errors 'GoogleMobileAds/GoogleMobileAds.h' file not found 'FirebaseCore/FirebaseCore.h' file not found please see CMakeLists.txt file for your reference cmake_minimum_required(VERSION 3.16) project(testing VERSION 0.1 LANGUAGES CXX) set(CMAKE_AUTOMOC ON) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 6.5 REQUIRED COMPONENTS Quick Core Widgets) qt_standard_project_setup(REQUIRES 6.5) qt_add_executable(apptesting main.cpp AdMobManager.m ) # qt_add_qml_module(apptesting # URI testing # VERSION 1.0 # QML_FILES # Main.qml # ) # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. # If you are developing for iOS or macOS you should consider setting an # explicit, fixed bundle identifier manually though. set_target_properties(apptesting PROPERTIES # MACOSX_BUNDLE_GUI_IDENTIFIER com.example.apptesting MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE ) target_link_libraries(apptesting PUBLIC Qt6::Quick Qt6::Core Qt6::Widgets "-framework UIKit" "-framework FirebaseCore" "-framework GoogleMobileAds" ) # Enable ARC for Objective-C++ files set_source_files_properties(AdMobManager.mm PROPERTIES COMPILE_FLAGS "-fobjc-arc") #set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_MODULES YES) include(GNUInstallDirs) install(TARGETS apptesting BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) qt_generate_deploy_qml_app_script( TARGET apptesting OUTPUT_SCRIPT deploy_script MACOS_BUNDLE_POST_BUILD NO_UNSUPPORTED_PLATFORM_ERROR DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM ) install(SCRIPT ${deploy_script}) Also please see AdMobManger.m below #import <UIKit/UIKit.h> #import <FirebaseCore/FirebaseCore.h> #import <GoogleMobileAds/GoogleMobileAds.h> // Static variables for banner ads static GADBannerView *bannerView = nil; void initializeAdMob() { // Initialize Firebase if ([FIRApp defaultApp] == nil) { [FIRApp configure]; } // Initialize Google Mobile Ads SDK [[GADMobileAds sharedInstance] startWithCompletionHandler:nil]; } void showBannerAd() { UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow; UIViewController *rootViewController = keyWindow.rootViewController; if (!bannerView) { // Create the banner ad view bannerView = [[GADBannerView alloc] initWithAdSize:GADAdSizeBanner]; bannerView.adUnitID = @"ca-app-pub-3940256099942544/2934735716"; // Test Ad Unit ID bannerView.rootViewController = rootViewController; // Position the banner at the bottom of the screen CGSize screenSize = [UIScreen mainScreen].bounds.size; bannerView.frame = CGRectMake( (screenSize.width - bannerView.frame.size.width) / 2, screenSize.height - bannerView.frame.size.height, bannerView.frame.size.width, bannerView.frame.size.height ); [rootViewController.view addSubview:bannerView]; } // Load the ad GADRequest *request = [GADRequest request]; [bannerView loadRequest:request]; } void hideBannerAd() { if (bannerView) { [bannerView removeFromSuperview]; bannerView = nil; } } I also implemented below change > In project's build settings: > Add the /usr/lib/swift path to Runpath Search Paths. > Add the -ObjC linker flag to Other Linker Flags. Thanks
1
0
248
Dec ’24