If I have an XCode project that generates a framework when built, then I've noticed that its possible to add new additional targets to the project of type app extension.
However if I add some source code to an app extension and regenerate the framework, then that source code is not accessable from the resulting framework (i.e. if the framework is included into an app, then the app code doesn't have visibility of the code that was added to the extension in the framework).
Is this something which is possible to achieve? Ideally I would like to package the main source code that constitutes the framework content, along with the source code for a few extensions into a single framework, so that the app(s) that use the framework can include the framework into their main app target and also include it in the app extension target.
I noticed that if the scheme of the framework is changed to the extension before building, then the result is not a .framework file but a .appex file.
For client apps of the framework, can they directly include/use that .appex file?
If so how can that be achieved? Does
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Post
Replies
Boosts
Views
Activity
Hello Apple Developer Community,
I'm experiencing an issue with localization in my Xcode project that has two build targets, "Build X" and "Build Y." Both targets are set up to support the same language, but they each have slightly different wording, which is why I've created separate Localizable.strings files for each build target. Here's an overview of my setup:
Project Structure
I have a Localizable folder with two subfolders:
Localizable/OrdnerX/Localizable.strings (for Build X)
Localizable/OrdnerY/Localizable.strings (for Build Y)
Configuration
In the File Inspector, I’ve assigned each Localizable.strings file to its corresponding build target:
OrdnerX/Localizable.strings is linked to Build X
OrdnerY/Localizable.strings is linked to Build Y
Under Build Phases, I verified that each build target references the correct Localizable.strings file. The paths are all correctly set, so each target should know where to find its respective localization file.
Problem
When I build and run Build X, everything works perfectly. The app displays the correct localized strings from OrdnerX/Localizable.strings.
However, when I switch to Build Y, the app fails to find the localized strings from OrdnerY/Localizable.strings, and I’m left with placeholder text instead.
I’ve double-checked the configurations for both build targets multiple times, and they appear identical. The Localizable.strings files for both targets are configured in exactly the same way, but Build Y just doesn’t seem to recognize its assigned localization file.
Has anyone encountered a similar issue, or can anyone suggest potential fixes? I’d appreciate any advice on what might be causing this discrepancy.
Thank you in advance!
I've got a few years old app which was created using an Xcode template type of app.
I'd like to split the model part of the code (model as in model-view-controller) out into a framework.
Removed the view/controller source files to leave the model code is quick and easy, however the model code is large and complex with a couple of hundred of source files.
Rather than create a new Xcode template type of framework and move the source files into there, is it possible to simply just change the template type of the existing project from app to framework?
I am currently developing on an Intel Mac and am thinking about switching to an Apple Silicon-equipped Mac soon. When I searched the web, I found that a very complicated migration process would be required, but what exactly would be required?
Thank you for your response.
No luck with my first post in getting a response despite 24 views. Will try again.
I am trying to build/run this main() function in C language. Keep getting build fail message.
#include <stdio.h>
#include <math.h>
int main()
{
float a,b;
printf("Enter value for A: ");
scanf("%f" ,&a);
printf("Enter value for B: ");
scanf("%f" ,&b);
printf("%f + %f = %f\n",a,b,a+b);
printf("%f - %f = %f\n",a,b,a-b);
printf("%f * %f = %f\n",a,b,a*b);
printf("%f / %f = %f\n",a,b,a/b);
printf("%f to the power of %f = %f\n",a,b,pow(a,b));
printf("The square root of %f is %f\n",a,sqrt(a));
printf("The square root of %f is %f\n",a,sqrt(b));
return(0);
}
ANY feedback appreciated on why Xcode does not work here. I am a beginning programmer.
Thanks.
I am self-learning basic C programming and have installed Xcode v. 14.2 on MacOS Monterey v. 12.7.5. I cannot get any programs I write under a new project I created to build and run on Xcode. Here is an example of what I am trying to build and run:
#include <stdio.h>
int main()
{
char test_string[] = "new string text";
printf("This process will %s\n",test_string);
return(0);
}
Any guidance or feedback would be appreciated.
I'm trying to add an iMessage extension to my app, and upon adding the iMessage App Icon set, I ran into an issue with one specific icon size: 1024x768px, aka 1x 1024x768pt.
When I remove this one icon from the icon set, it compiles and runs fine, however I can't push it to the App Store as I get the error: "Asset validation failed. Missing Image Asset. Your app is missing the Large App Icon asset 'AppIcon' in 'Payload/Runner.app/PlugIns/MessagesExtension.appex'." I'm assuming this refers to 1024x768px, as this size placeholder appears upon adding a New Messages Extension Icon to my assets folder, and 1024x1024 is already included and compiles fine with it.
However, when I add the 1024x768 icon, and try to run the app, I get the error: "Command CompileAssetCatalog failed with a nonzero exit code"
The app icon's filename is correct, it is exactly 1024x768 px, and my contents.json correctly includes :
{
"filename" : "AppIcon_1024x768.png",
"idiom" : "ios-marketing",
"platform" : "ios",
"scale" : "1x",
"size" : "1024x768"
}
as is the same format for all of my other icons that work.
Why am I running into this issue upon inclusion of this one required size? How do I fix it?
I have a macOS application built via command line (xcodebuild) using Xcode 16.1. Developed on ARM but end user is on Intel (same macOS 15.1).
App crashed and they sent me a .IPS dump.
From what MacGPT tells me:
Reading an IPS (Incident Processing System) file from a macOS crash report in Xcode isn’t as straightforward as with iOS device logs.
I can open the dump using Console. I see the IPS dump is partially symbolicated.
Line in the dump says: Meteorologist 0x103e0348f 0x103d88000 + 504975
Referencing this article: Adding identifiable symbol names to a crash report | Apple Developer Documentation
I run this command and see the same UUID for x86_64 as in the dump.
dwarfdump --uuid /Users/ed/meteorologist/trunk/Build/Meteorologist.xcarchive/dSYMs/Meteorologist.app.dSYM/Contents/Resources/DWARF/Meteorologist
I run this command:
atos -arch x86_64 -o /Users/ed/meteorologist/trunk/Build/Meteorologist.xcarchive/dSYMs/Meteorologist.app.dSYM/Contents/Resources/DWARF/Meteorologist -l 0x103d88000 0x103e0348f
And it says: fg: no current job
Suggestions for what I’m missing?
I am a developer working on tvOS apps for Enterprise.
I would like to report an issue occurring in tvOS 18.1.
Workflow :
Exporting tvOS build from Xcode (Enterprise).
We have developed another Mac App to white label the tvOS App.
We are changing its Assets and bundle identifier of the app while white labeling process.
Resigning app again.
Distributing through JAMF.
Problem:
We have been facing a problem for a while.
The top shelf is not working in our white -labeled app and app icon is not appearing.
BTW App is opening and doing well.
I'm just getting following lines in console (Apple TV Device Console).
MDMProvisoningProfileTrust could not find record of managed app 'com.company.connecttv.events' with error: Error Domain=NSOSStatusErrorDomain Code=-10814 "(null)" UserInfo={_LSLine=1734, _LSFunction=runEvaluator}
Unable to create LSApplicationRecord for application: com.company.connecttv.events. error=Error Domain=NSOSStatusErrorDomain Code=-10814 UserInfo={_LSLine=1734, _LSFunction=<private>}
Top shelf content doesn't conform to TVTopShelfContentPrivate. It will not be ignored
[xpcservice<com.company.connecttv.events.Top-Shelf([app<com.apple.HeadBoard(E4023AC5-8955-4943-8AAF-9C8246A9F003)>:156])>{vt hash: 0}:328] Memorystatus failed with unexpected error: Invalid argument (22)
<0x302e2eee0-com.company.connecttv.events>: Error returned on remoteObjectProxy for loadTopShelfContentAndDelegateFlags message. error=Error Domain=NSCocoaErrorDomain Code=4097 UserInfo={NSDebugDescription=<private>}
Process state is unknown AppStateTracker, pid 328, uuid 809A68F1-76D2-396E-9CE0-5C16058FE354 display identifier com.company.connecttv.events.Top-Shelf foreground 0
Systen Information:
Machine : MacBook Pro / M1 Pro / 16 GB / 16-inch / 2021
Mac OS : Version 15.0 (15.0)
Xcode : Version 16.1 (16B40)
Apple TV Information:
tvOS : 18.1 (22J580)
Model : Apple TV 4K (3rd generation)
Capacity : 128 GB
While creating PR from Xcode I can only see first 100 branches
While trying to create a PR from Xcode I am not able to see all the branches its showing only first 100 branches. Also I did not see any option to raise PR to different remote.
I need to call xcodebuild build -scheme XYZ from a different location than Package.swift and without a navigation. Is it possible? Can I provide some argument with a path?
I've just updated to macOS 15.2 Beta and Xcode 16.2 Beta and just noticed I can't build my visionOS app as before.
I have a separate /Volumes/Development APFS volume for Xcode projects, plus utilising a Relative setting for DerivedData so that these are located in the projects' directories – in this case, subfolder on this volume mentioned.
I just found that when attempting to build the app in either Xcode 16.1 or 16.2 Beta with visionOS 2.1 SDK, I'm getting a following error:
Finished processSwiftFiles() with a failure 'You don’t have permission to save the file “CustomComponentUSDInitializers.usda” in the folder “RealityAssetsGenerated”.'
Sandbox: realitytool(6216) deny(1) file-write-create /Volumes/Development/travel-visionos/DerivedData/Tripomatic/Build/Intermediates.noindex/RealityKitContent.build/Debug-xrsimulator/RealityKitContent_RealityKitContent.build/DerivedSources/RealityAssetsGenerated/CustomComponentUSDInitializers.usda.sb-02874eb3-PS4qfZ
Failure creating schema - 'You don’t have permission to save the file “CustomComponentUSDInitializers.usda” in the folder “RealityAssetsGenerated”.'
This for sure worked previously with 15.0/16.0 or 15.1/16.1 as I've even published the app to the App Store.
It seems to be some shenanigans related to sandboxing & permissions for Xcode tools which I can hardly work around. I have Xcode added to Developer Tools and Full disk access sections in Privacy & Security, yet that doesn't really change anything in relation to this issue.
When I move the project to a subfolder in my home directory, the build succeeds. The same applies to switching DerivedData setting to the default value to that DD are generated in ~/Library/Developer folder for all projects opened in Xcode.
Thus, either macOS or Xcode now has an issue with running realitytool to generate files on my dedicated volume.
Should I consider this Xcode or macOS Beta issue? Report it via Feedback Assistant maybe?
I upgraded Xcode to 16, my Mac to Sequoia and my iphone and iPad to IOS 18.
My developer devices are my iPhone, my iPad, my Husband's iPad and iPhone, all running IOS 18. Before upgrading Xcode to 16 I could compile onto all of these devices with no difficulty.
But now, Xcode 16 recognises and compiles to all of my developer devices except my iPhone.
My Mac recognises my iPhone when I plug it into a USB-C port, but Xcode does not. Xcode does not even try to pair with it or let me try to add it as a device.
I have tried switching off dev mode on the phone, switching it back on again, plugging and replugging, rebooting Xcode. But Xcode will not recognise my iPhone, which is a 13 mini.
Any idea what to do?
I plugged my iPhone into a usb port using a vanilla Apple lightning cable and typed this into Terminal:
xcrun devicectl list devices
then lists the following. And for info, MCW's iPad and MCW's iPhone are in Shanghai at the moment, I am in the UK.
Devices:
Name Hostname Identifier State Model
EasterdownDev1 00008020-00094D403C41402E.coredevice.local DE6CB0B3-399A-4B54-9ADD-E8758D8D4837 available (paired) iPad mini (5th generation) (iPad11,1)
MCW's iPad 00008030-001E18E90AF0C02E.coredevice.local 3AE52B50-D69F-4827-82DA-E6968B0D5A5F unavailable iPad (9th generation) (iPad12,1)
MCW's iPhone 00008101-001868D20222001E.coredevice.local 13AABF38-441B-4C4D-9FE8-440D3D9472CC unavailable iPhone 12 mini (iPhone13,1)
I juste upgraded to Xcode 16.1 and macOS 15.1 and FileMerge seems to have been removed.
Where can I find it ?
Regards
David
After upgrading to Xcode 16.1 the IDE does crash on launching, using Xcode 16.1 is not possible. When 1st launching Xcode 16.1 it asks to activate the plug-ins, after agreeing it crashes. All subsequent launches do crash with this report.
This is the same issue when Xcode 15 was release, subsequent releases fixed this. See here https://forums.developer.apple.com/forums/thread/738097
Translated Report (Full Report Below)
Process: Xcode [14193]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 16.1 (23503)
Build Info: IDEApplication-23503000000000000~2 (16B40)
App Item ID: 497799835
App External ID: 869932297
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2024-11-02 17:46:02.4767 +0100
OS Version: macOS 15.1 (24B83)
Report Version: 12
Anonymous UUID: 794C407F-4930-BAA9-C41E-64C157CC3277
Sleep/Wake UUID: 0CF56A77-6F81-448D-9093-9461EE187F08
Time Awake Since Boot: 51000 seconds
Time Since Wake: 7243 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: Xcode [14193]
Application Specific Information:
abort() called
Application Specific Signatures:
0
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x194f76600 __pthread_kill + 8
1 libsystem_pthread.dylib 0x194faef70 pthread_kill + 288
2 libsystem_c.dylib 0x194ebb908 abort + 128
3 IDEKit 0x10610cdb8 +[IDEAssertionHandler _handleAssertionWithLogString:assertionSignature:assertionReason:extraBacktrace:] + 964
4 IDEKit 0x10610d248 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] + 876
5 DVTFoundation 0x1022cc040 _DVTAssertionHandler + 424
6 DVTFoundation 0x1022cc1c0 _DVTAssertionFailureHandler + 196
7 DVTFoundation 0x10241b454 -[DVTPlugInManager _registerPlugInsFromScanRecords:] + 2412
8 DVTFoundation 0x1024192fc -[DVTPlugInManager _createPlugInObjectsFromScanRecords:] + 228
9 DVTFoundation 0x102417664 __52-[DVTPlugInManager _recordNonApplePlugInDescriptor:]_block_invoke + 92
10 DVTFoundation 0x102417c2c -[DVTPlugInManager _allowNonApplePlugInsFromDescriptors:error:] + 304
11 DVTFoundation 0x102417e14 -[DVTPlugInManager _checkNonApplePlugIns] + 204
12 DVTFoundation 0x102417ef0 -[DVTPlugInManager initializePlugIns:] + 20
13 IDEFoundation 0x10a7a8cac IDEInitialize + 6632
14 IDEKit 0x1060e45dc -[IDEApplicationController applicationWillFinishLaunching:] + 364
15 CoreFoundation 0x19508a800 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 148
16 CoreFoundation 0x19511b66c ___CFXRegistrationPost_block_invoke + 88
17 CoreFoundation 0x19511b5b4 _CFXRegistrationPost + 436
18 CoreFoundation 0x19505943c _CFXNotificationPost + 732
19 Foundation 0x196201b14 -[NSNotificationCenter postNotificationName:object:userInfo:] + 88
20 AppKit 0x198bb2d30 -[NSApplication finishLaunching] + 248
21 AppKit 0x198bb29fc -[NSApplication run] + 252
22 IDEKit 0x1060dc798 -[IDEApplication run] + 60
23 AppKit 0x198b89364 NSApplicationMain + 888
24 dyld 0x194c2c274 start + 2840
Thread 1:: Dispatch queue: ConcurrentQueue: -[DVTPlugInManager _savePlugInCacheWithScanRecords:error:]block_invoke
0 libsystem_kernel.dylib 0x194f71d6c __unlink + 8
1 libsystem_kernel.dylib 0x194f71d48 unlink + 16
2 libremovefile.dylib 0x1a2a5b75c __removefile_tree_walker + 392
3 libremovefile.dylib 0x1a2a5b548 removefile + 340
4 Foundation 0x1964995f8 specialized static FileOperations.removeFile(::with:) + 224
5 Foundation 0x196762570 specialized String.withFileSystemRepresentation(:) + 308
6 Foundation 0x19635f0f8 @objc _NSFileManagerBridge.removeItem(atPath:) + 136
7 DVTFoundation 0x10241c5b4 DVTPlugInManager_removePlugInCacheAtPath + 40
8 DVTFoundation 0x10241cb68 __58-[DVTPlugInManager _savePlugInCacheWithScanRecords:error:]_block_invoke_2 + 224
9 DVTFoundation 0x1023de414 DVT_CALLING_CLIENT_BLOCK + 16
10 DVTFoundation 0x1023dee3c __DVTDispatchAsync_block_invoke + 152
11 libdispatch.dylib 0x194dfa8f8 _dispatch_call_block_and_release + 32
12 libdispatch.dylib 0x194dfc658 _dispatch_client_callout + 20
13 libdispatch.dylib 0x194dffb08 _dispatch_continuation_pop + 596
14 libdispatch.dylib 0x194dff138 _dispatch_async_redirect_invoke + 580
15 libdispatch.dylib 0x194e0e314 _dispatch_root_queue_drain + 392
16 libdispatch.dylib 0x194e0eb20 _dispatch_worker_thread2 + 156
17 libsystem_pthread.dylib 0x194fab39c _pthread_wqthread + 228
18 libsystem_pthread.dylib 0x194faa0f0 start_wqthread + 8
Thread 2:
0 libsystem_pthread.dylib 0x194faa0e8 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x194faa0e8 start_wqthread + 0
When I was on the 15.1 developer beta, I downloaded the beta version of the SF Symbols app. It worked perfectly throughout the beta, but when 15.1 was released, I downloaded the stable version of SF Symbols as well and removed the beta version. However, now when it launches I am greeted by an alert titled "Fonts need by this application are missing." It goes on to say that fonts may not display properly... etc, but I haven't noticed any issues viewing any symbols I have looked up, and they seem to show up properly when I define them in Xcode. I tried uninstalling and reinstalling the application, as well as following the advice in the alert by downloading "the latest fonts from the Apple Developer website." but the alert still shows up everytime I launch SF Symbols.
Any one else experiencing this issue or know of a way to solve it? It's not that big of an issue, it's just one extra click after all, but in case it might be in the future, I just thought I'd check with others.
Thanks!
When I try to delete an iPhone 16 Pro iOS 18.1 Simulator in XCode 16.1, I get an error message "“data” couldn’t be moved because you don’t have permission to access “Deleting-8366D3CC-37EC-49C0-8674-0599BCE1DA12”.". I had that same issue with iOS 18.0 Simulator but never with previous versions (17.5).
Note that I'm stuck using the iOS 18.1 Simulator because iCloud synchronization is paused (potentially due to low data mode).
And I cannot use iOS 18.0 Simulator as well because unit tests run hangs for some other mysterious reason.
The fallback to iOS 17.5 Simulator is not satisfactory.
I have a MacMini M2 machine running Sequoia 15.1 OS. On this machine, I am running a Virtual Machine, utilizing the Virtualization.Framework, with the same OS version, 15.1.
Logging into my account in the System Settings is successful. Next, I need to add my account in Xcode 16.1. While the initial login is successful, Xcode immediately displays the following error:
Decoding Error.
There was a failure decoding response: (HTTP 401, 60 bytes) The data couldn’t be read because it isn’t in the correct format.
As a result, I cannot see any account information, teams, etc.
A very similar bug has been reported at this issue - https://developer.apple.com/forums/thread/759877, but there has been no progress or updates there.
Is there any chance to fix this and get it working?
Hi there,
when I run any app on the Xcode 16/16.1 with iOS/tvOS 18/18.1,
it generates a crash on the AccessibilityControlsExtension process.
0x1048b8000 - 0x10493bfff dyld (*) <6beafde4-b011-3e47-8aae-4d7b6e4bb7e8> /usr/lib/dyld
0x1047fc000 - 0x104803fff com.apple.AccessibilityUIServer.AccessibilityControlsExtension (1.0) <a67e159b-253d-306c-b6fb-dd3fec38bd0f> /Volumes/VOLUME/*/AccessibilityUIServer.app/PlugIns/AccessibilityControlsExtension.appex/AccessibilityControlsExtension
If run in Catalist mode - there are no crash reports.
I also made a clean install of macOS 15.1 + Xcode and received that error again.
Device: Mac15,13
Any suggestions on how to fix it?
Full crash log in attach.
AccessibilityControlsExtension-crash.log