I am working on a lung cancer scanning app in for iOS with a CoreML model and when I test my app on a physical device, the model results in the same prediction 100% of the time. I even changed the names around and still resulted in the same case. I have listed my labels in cases and when its just stuck on the same case (case 1)
My code is below:
https://github.com/ShivenKhurana1/Detect-to-Protect-App/blob/main/DetectToProtect/SecondView.swift
I couldn't add the code as it was too long so I hope github link is fine!
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Posts under Xcode tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
The macOS app with AppGroup suddenly cannot upload; it was working fine before.
I am working on an iOS app using Flutter that tracks outgoing calls using CallKit. The call tracking functionality works perfectly in Debug mode but does not work when the app is published to TestFlight.
I have already added Background Modes (voip, audio, processing, fetch) in Info.plist. I have added CallKit.framework in Xcode under Link Binary With Libraries (set to Optional).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>production</string>
</dict>
</plist>
These are the necessary permission which I used in info.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>com.agent.mygenie</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>MyGenie</string>
<key>CFBundleDocumentTypes</key>
<array/>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>mygenie</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCallKitUsageDescription</key>
<string>This app needs access to CallKit for call handling</string>
<key>NSContactsUsageDescription</key>
<string>This app needs access to your contacts for calls</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app needs access to microphone for calls</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs access to photo library for profile picture updation</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>voip</string>
<string>processing</string>
<string>fetch</string>
<string>audio</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
[code.txt](https://developer.apple.com/forums/content/attachment/0a327dbd-652e-41d5-8811-c462d09e0567)
</dict>
</plist>
And below is the file are AppDelegate.swift, call_tracking_mixin.dart, & main_call.dart file for full knowledge
I'm quite new to Xcode development, and I've been having an issue test-running my app. When I run the app on my iPhone from my Mac, the app launches properly and works initially. However, when I close the app fully and try to reopen it, it keeps crashing. This occurs whether I test on a physical device or an iPhone simulator.
Somehow, this issue does not occur when the app is run on Profile mode.
I would appreciate any pointers to debug this.
Hello, I need a little bit of help. My game keeps crashing on launch no matter what I do. I’ve tried running it in Xcode on my Mac, on my iPhone, and through TestFlight, but I get the same result every time.
I’ve tried everything I could find on the internet, and nothing worked. Asking here is my last resort because I’m completely stuck.
The game runs fine in Unity, but not so much in Xcode.
Can someone help me figure out what I’m doing wrong?Any help would be greatly appreciated.
Here is the error log I found by connecting my iPhone to my Mac. To view the logs, I used the Console in the Devices and Simulators section of Xcode.
➤ SecKeyVerifySignature failed: Error Domain=NSOSStatusErrorDomain Code=-50 "rsa_pub_crypt failed"
[10:27:36.034791+0200] kernel
➤ Sandbox: [App] deny(1) sysctl-read kern.bootargs
[10:27:36.043389+0200] SpringBoard
➤ Live host view super view[(null)] not matching container view
➤ Frame not updated
[10:27:36.050473+0200] backboardd
➤ Cycle detected
[10:27:36.100799+0200] SpringBoard
➤ Live host view super view[(null)] not matching container view
[10:27:36.538361+0200] akd
➤ Error fetching keychain item - Error Domain=NSOSStatusErrorDomain Code=-25300 "no matching items found"
[10:27:36.545734+0200] akd
➤ Failed to set last known MID with error (Error Domain=NSOSStatusErrorDomain Code=-25300)
[10:27:36.603384+0200] rtcreportingd
➤ Gap in hierarchy:
[10:27:36.604536+0200] cloudd
➤ TCP input flags=[R.] state=LAST_ACK
[10:27:36.613317+0200] cloudd
➤ TCP input flags=[R] state=CLOSED
[10:27:36.648449+0200] kernel
➤ 1 duplicate report for Sandbox: [App] deny(1) sysctl-read kern.bootargs
[10:27:36.648484+0200] kernel
➤ Sandbox: [App] deny(1) file-test-existence /private/var/Managed Preferences/mobile/com.apple.CoreMotion.plist
[10:27:36.900275+0200] CommCenter
➤ Client is not entitled for request
[10:27:37.131555+0200] storekitd
➤ AMSURLSession: Session decoder failed. Error = Error Domain=AMSErrorDomain Code=301 "Invalid Status Code"
[10:27:37.131761+0200] storekitd
➤ AMSURLSession: Task completed with error = Error Domain=AMSErrorDomain Code=301 "Invalid Status Code"
[10:27:38.137847+0200] kernel
➤ System Policy: [Process] deny(1) file-read-metadata /private/var/mobile/Library/Biome/FlexibleStorage
[10:27:38.779536+0200] kernel
➤ Sandbox: [App] deny(2) file-test-existence /private/etc/localtime
[10:27:38.942342+0200] mobileassetd
➤ TCP input flags=[R] state=LAST_ACK
[10:27:38.963596+0200] kernel
➤ Sandbox: [App] deny(2) file-test-existence /bin/bash
[10:27:40.152019+0200] mobileassetd
➤ TCP input flags=[R] state=LAST_ACK
[10:27:40.280661+0200] assetsd
➤ Warning: cache_handle_memory_pressure invokedPreformatted text```
I'm trying to debug on my iPhone 16e and I'm running into this error:
Error mounting image: 0xe800010f (kAMDMobileImageMounterPersonalizedBundleMissingVariantError: The bundle image is missing the requested variant for this device.)
Since all of my other devices are working fine, I assume this is due to outdated XCode, which is something I see mentioned in other threads.
What is the specific XCode version needed to build onto the 16e and is there any workaround for XCode 16.1?
Thanks!
Case-ID: 12591306
Use Xcode 16.x to compile an iPhone demo app and run it on an iPad (iPadOS 18.x) device or simulator.
Launch the iPhone app and activate Picture-in-Picture mode.
Attempt to input text; the system keyboard does not appear.
Compare the output of [[UIScreen mainScreen] bounds] before and after enabling Picture-in-Picture mode, notice the values change unexpectedly after enabling PiP.
This issue can be consistently reproduced on iPadOS 18.x when running an app built with Xcode 16.0 to Xcode 16.3RC(16E137).
Beginning April 24, 2025, apps uploaded to App Store Connect must be built with Xcode 16 or later using an SDK for iOS 18, iPadOS 18, tvOS 18, visionOS 2, or watchOS 11.Therefore, I urgently hope to receive a solution provided by Apple.
I've been trying to upload my app to the App Store with Xcode 16.3 RC but I keep getting these error messages. When will Apple start allowing Xcode 16.3 submissions?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store Connect
Xcode
Organizer Window
I've used SPM to install some dependencies, however for one of them, CocoaLumberjackSwift the Embed section is blank and attempting to click in it doesn't brink up any dropdown menuetc.
Why is that, how can I change it or check what its set to if its blank?
(Code 16.2)
I want to build an ios .xcframework (for external delivery) and .framework(for internal debugging) in order to package some code to a customer for incorporation into their app.
My framework has a dependency upon RealmSwift, which I've added using SPM.
There is a warning saying
Module RealmSwift was not compiled with library evolution support.
And when building SwiftVerifyEmittedModuleInterface fails with an error saying
"missing required modules: 'Realm.Private', 'Realm', 'Realm.Swift'"
By default, Build Libraries For Distribution was set to YES, however if I turn it off then the warning and error go away and I can cleanly build the framework.
I've been attempting to get a good understanding of this flag and if it should be used or not, most material says yes but doesn't go a good job of explaining why.
However anyway I can't get the framework to build with RealmSwift as a dependency without turning off this flag. Therefore is that ok to proceed down that route?
Does the fact the xcframework will only ever be distributed to one consumer affect decisions (i.e. binary compatibility etc.)
Thanks
I'm seeing a build failure when archiving for TestFlight due to removing landscape support from the project. I see tons of apps that lock portrait in the app store. Is this a new requirement for apps compatible with both iPhone and iPad? What is the best approach if I am focused on portrait? Make the app iPhone only?
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags:
Design
Xcode
Interaction Design
Accessibility
Gradients with colors that have alpha are not rendered correctly anymore. I made a simple project to illustrate that. Just create Objective C project and paste this code inside the ViewController.
`#import <UIKit/UIKit.h>
@interface CustomView : UIView
@property (nonatomic, strong) NSArray<NSNumber *> *colorsArray; // The color components array
// Custom initializer that accepts an NSArray of color components
(instancetype)initWithFrame:(CGRect)frame colors:(NSArray<NSNumber *> *)colorsArray;
@end
@implementation CustomView
// Custom initializer
(instancetype)initWithFrame:(CGRect)frame colors:(NSArray<NSNumber *> *)colorsArray {
self = [super initWithFrame:frame];
if (self) {
_colorsArray = colorsArray; // Store the colors array
}
return self;
}
(void)drawRect:(CGRect)rect {
// Get the current context
CGContextRef context = UIGraphicsGetCurrentContext();
// Convert NSArray to a C-style array of CGFloats
size_t count = self.colorsArray.count;
CGFloat colors[count];
for (size_t i = 0; i < count; i++) {
colors[i] = [self.colorsArray[i] floatValue];
}
// Create a color space
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
// Create the gradient with the passed colors
CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, colors, NULL, count / 4);
// Define the start and end points of the gradient
CGPoint startPoint = CGPointMake(rect.origin.x, rect.origin.y);
CGPoint endPoint = CGPointMake(rect.origin.x, rect.origin.y + rect.size.height);
// Draw the rectangle with the gradient
CGContextSaveGState(context);
CGContextAddRect(context, rect);
CGContextClip(context);
CGContextDrawLinearGradient(context, gradient, startPoint, endPoint, 0);
CGContextRestoreGState(context);
// Release resources
CGGradientRelease(gradient);
CGColorSpaceRelease(colorSpace);
}
@end
@interface ViewController : UIViewController
@end
@implementation ViewController
(void)viewDidLoad {
[super viewDidLoad];
// Get the screen bounds
CGRect screenBounds = [UIScreen mainScreen].bounds;
// Define the size of each custom view
CGFloat customViewWidth = screenBounds.size.width * 0.75;
CGFloat customViewHeight = screenBounds.size.height * 0.75;
// Define a dynamic set of colors for the first custom view (red to blue)
NSArray<NSNumber *> *colorsArray1 = @[
@1.0, @0.0, @0.0, @1.0, // Red
@0.0, @0.0, @1.0, @1.0 // Blue
];
// TODO: This is the bug, there is no transparency
NSNumber *alpha = @0.0;// this is the ***** bug ****
// Define a dynamic set of colors for the second custom view (green to yellow)
NSArray<NSNumber *> *colorsArray2 = @[
@0.0, @1.0, @0.0, alpha, // Green
@1.0, @1.0, @0.0, @1.0 // Yellow
];
// Calculate the position for the first view (centered horizontally and vertically, with slight offset)
CGRect frame1 = CGRectMake((screenBounds.size.width - customViewWidth) / 2 - customViewWidth * 0.25,
(screenBounds.size.height - customViewHeight) / 2 - customViewHeight * 0.25,
customViewWidth, customViewHeight);
CustomView *customView1 = [[CustomView alloc] initWithFrame:frame1 colors:colorsArray1];
// Calculate the position for the second view (slightly shifted from the first view to partially overlap)
CGRect frame2 = CGRectMake((screenBounds.size.width - customViewWidth) / 2 + customViewWidth * 0.25,
(screenBounds.size.height - customViewHeight) / 2 + customViewHeight * 0.25,
customViewWidth, customViewHeight);
CustomView *customView2 = [[CustomView alloc] initWithFrame:frame2 colors:colorsArray2];
// Set autoresizing so they adjust with the screen size
customView1.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
customView2.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
// Add the custom views to the view controller's view
[self.view addSubview:customView1];
[self.view addSubview:customView2];
}
@end`
I created a package using "File > New > Package" and now I want to add a new Asset Catalog to this package. With my package selected in the project navigator I select "File > New > File" but it creates a Swift file instead of showing the Template Selection dialog
Ref: https://developer.apple.com/documentation/xcode/managing-assets-with-asset-catalogs#Create-a-new-asset-catalog
For the last 2 years, our team at Panda has had one goal in mind: to change the failing connection application industry. The business model is severely flawed - evidenced in decline of users in match group etc (all public info).
We are building the only connections app in the market without paid features – "We Don't Play Games”. This in itself revolutionizes a space which currently commodifies human connection; true connections aren’t forged through super-likes, platinum memberships and such pay-to-win models, where users that don’t pay are unfairly disadvantaged.
Key Differentiators:
Never having paid features
50/50 Male-Female Ratio: Our app will ensure a balanced male-to-female ratio, something not found in other apps, especially in countries like India, where dating apps are dominated by men. This helps create a healthier, more equitable user experience for all genders. In a country like India, how can any connections app succeed with 99.9% men and 0.1% women?
Panda Duos: A first-of-its-kind feature where two sets of best friends can match with each other – an industry-first that no other major connections app offers.
These elements, along with the app's core ethos, make Panda unique in an otherwise saturated market. The traditional models used by Match Group/Bumble are failing, as shown in their earnings reports, because they rely on a pay-to-win approach that doesn't deliver real value.
Given these unique aspects, having received 4,550+ pre sign-ups, and our backing by a top VC, we strongly believe that Panda will offer an entirely different experience to users and remake a failing industry.
This is not what Apple stands for, goes against fairness, and undermines the trust and respect that it should have as the only app store for iOS phones.
Topic:
App Store Distribution & Marketing
SubTopic:
App Review
Tags:
App Store
App Review
Xcode
Accessibility
I want to release a Framework F, containing several other frameworks (such as Realm, Appetitive, Cocoalumberjack, PhoneNumberKit) for use by app A.
According to this article: https://medium.com/@bittudavis/how-to-create-an-umbrella-framework-in-swift-ca964d0a2345
They write, without referencing a source: "Although Apple discourage creating umbrella framework".
Is that true, do Apple discourage umbrella frameworks, if so why and is it a very strong discourage or a mild one?
If not discouraged, then how can this be achieved with Xcode 16?
I've been attempting to follow a few tutorial to achieve this, such as https://medium.com/john-lewis-software-engineering/adding-a-third-party-framework-inside-a-first-party-framework-in-xcode-3ba58cfd08da
however so far without any success. This last article mentions the Link Binary With Libraries section, which doesn't exist in Xcode 16.
There's the Frameworks, Libraries, and Embedded Content section where I have been attempting to add the frameworks into my Framework F (choosing Embed without Signing).
I'm able to successfully build Framework F, but when app A attempts to use it (adding F to the Frameworks, Libraries, and Embedded Content section with option embed and sign, or embed and don't sign, makes no difference) then I get run time errors about the umbrellaed frameworks not being able to be found.
Since upgrading from Xcode 15 to 16, we have been experiencing a build error during compilation. Building on Xcode 15 still works with no issues. The error happens only on the first build after a clean. Subsequent builds succeed. This is an issue because our CI process archives the project from a clean slate, and this causes it to fail every time. I will attempt to describe the issue and include information I believe is relevant in this document.
The error occurs on this import line within an Objective-C file during the Scan Dependencies step of compiling. This line imports our custom Objective-C to Swift bridging header file - "Swift2Objc.h".
Our custom Objective-C to Swift bridging header file is simply wrapping the project’s auto-generated Objective-C to Swift bridging header file - "KWISwift.h".
The error is specific to the import of the OfflineServices Swift Package.
Specifically, the OfflineServices-Swift.h file - the Swift Package’s auto-generated Objective-C to Swift bridging file.
Module JRE not found - the exact error (Also included as text on the bottom of the post)
JRE is a third-party library provided to us as an xcframework. It is placed directly into our Swift Package as a binary target.
The xcframework itself is composed of .a file and a Headers folder which includes header files and a module.modulemap.
The module.modulemap file looks like this.
I tried \s+$ to find trailing spaces, but it seems the IDE code editor behaves strangely - it locates random lines that obviously has no trailing spaces.
Did I misunderstand regex in the editor?
Hi,
I have an app that has a different name in en-GB and en-US. In the past I have created localised InfoPlist.strings files,
InfoPlist.strings (English)
InfoPlist.strings (English (United Kingdom))
InfoPlist.strings (English (United States))
and added
CFBundleName = "Default Name",
CFBundleName = "UK Name", and
CFBundleName = "US Name",
for example to each of the three files respectively.
After building/installing/running this has worked as expected; if you set the device language to en_GB the display name on the iOS Home Screen is "UK Name", if you set it to en_AU for example it would be "Default Name" and if you set it to en_US it would be "US Name".
Furthermore, when the name appears in system modals the correct name would appear based on locale too. For example, with the device language set to en_US, if you long press the app icon on the iOS home screen and tap Remove App, a modal will appear which says 'Remove "US Name"?'.
This no longer appears to work correctly. For that same project having made no changes, simply running it on an iOS 17 or iOS 18 device; with the language set to en_US, the name on the home screen will be "Default Name", however, if you again long press and tap remove app, it will say 'Remove "US Name"'. It works correctly for en-GB.
Like I said, I remember this working in the past, so I checked on an old device I have running iOS 15.8.2 as well as a simulator running iOS 15.2 and it does work as expected in both of those cases.
I tried to create a new minimal project to see if something had changed and therefore if the setup I have is now incorrect and saw that the preferred method of localization now involves making a string catalog instead of multiple strings files. For a new project; duplicating the setup at the top of this post using a string catalogue file named InfoPlist.xcstrings results in the same incorrect behaviour when setting the device language to en_US.
I guess my question is, is this a bug in iOS? Or is it likely that I am doing something wrong here?
Hi all,
Can anybody assist in how we make an 'app update required' message appear when somebody opens our current app once we have put an updated version on the app store?
Our developers are telling us the way the current app was built does not include a feature that makes it possible for users to see the app update required message.
Is there any way we can enable this rather than the current version just crash when somebody opens it with no indication that an update is required? thanks!!
I’m experiencing an issue in Xcode 16 where the app randomly builds and runs in the simulator while I’m designing items in the storyboard.
Here’s what I’ve tried so far to stop this behavior:
Disabled "Show Live Issues" in the General settings
Removed all key bindings related to Build & Run in the Key Bindings settings
Checked for unintentional shortcut triggers, but nothing seems to be causing it
Update XCode from 16.1 to 16.2
Delete Derived Data
Despite these actions, Xcode still automatically builds and launches the simulator at unexpected times, disrupting my workflow.
Is there any setting or hidden configuration that could be causing this?
How can I completely prevent Xcode from running the simulator automatically while editing UI in the storyboard?
Would really appreciate any guidance on this!