Build, test, and submit your app using Xcode, Apple's integrated development environment.

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Issue codesign on VS Code and XCode
Hello, I'm starting to develop a new app with Flutter on VS Code. I. struggle to start because I face constantly this error : Error (Xcode): Target debug_unpack_ios failed: Exception: Failed to codesign /Users/Nylan1/Desktop/Thoughts./Flutter Application/app_v0/app_v0/build/ios/Debug-iphonesimulator/Flutter.framework/Flutter with identity -. Can someone pleas help me to solve that ? I've checked on Xcode and the macOS signing certificate is on Development but the IOS one is not working.
0
0
503
Oct ’24
Returned from Unity games causes my app to slow and it works normal after siri or locking unlocking phone
Dear Developers, Am facing this issue on my production app. Tried everything. Removed almost everything and tested the app. Even then this issue happens. The unity games, am talking about are the slow and sluggish types, which feel like 30 fps and after returning from them, my app sounds slow and feels a little bit sluggish. As soon as i lock/unlock the device , it becomes perfectly fine. Even i was debugging with xcode, i had the issue, then i rebuild the app in xcode and opening it on device, the same issue. As soon as i locked the device or opened siri with lockbutton or moved to a native app, and came back, app is completely fine. Craziest issue, i have ever seen. Though killing the app and opening it again on iphone also works. Only anxiety is that maybe my users when returning from other slow 3rd party games which are my competitors might slow down the experience. I have tried almost everything in my app, removed all functions and just ran sounds. Retried with different ways of playing sounds. Nothing works. Dont know it is a frame rate issue, because i replaced all my animations causing framerate not to cross 60fps even then didnt work. Device on which am testing is Iphone 14 pro max.
0
0
378
Sep ’24
Not able to inspect react native drop down element in iOS
Am trying to automate below drop down but iOS Accessibility inspector is unable to detect the element. Even we tried with Appium Inspector issue is same. Drop down: https://www.npmjs.com/package/react-native-element-dropdown We tried to debug the dropdown component. In that we can see the value is rendered properly from react. We have raised the issue with Appium, but they have given few suggestions in the Appium setting but it didn't solve. Now it's something that has to be done from XCTest Framework end. Appium issue git link: https://github.com/appium/appium/issues/14825
0
0
347
Sep ’24
Core Data setting issue
After 7-8 months of intense studying, I'm working on my first App. After a couple of months coding it, I saw that Swift Data wasn't cutting it, I decided to restart the project and implement Core Data. To cut to the chase, I'm using 3 models (entities) in my app. One of those entities has 2 Transformable attributes: an array of strings and an array of doubles. I've implemented a Transformer, made sure it's added to each entity, but no matter what, I'm getting this error with random Entities and Attributes. At first it referenced the entity Quote, but then it referenced the entity MoneyElement (attribute title). This is the error: autonome crashed due to an uncaught exception NSInvalidArgumentException. Reason: -[MoneyElement setTitle:]: unrecognized selector sent to instance 0x600001736c00. I'm attaching screenshots of the different entities, as well as the code for the Entity's class that has both Transformable attributes. If anyone could help me, I'd appreciate it greatly. I'm getting the error not even making a fetch request, just trying to paint a mere and humble Text("Hello, world!") in my canvas. public class Quote: NSManagedObject, Identifiable { @NSManaged public var clientName: String @NSManaged public var quoteNumber: String @NSManaged public var dateOfCreation: Date @NSManaged public var dateOfApproval: Date? @NSManaged public var dateOfCancellation: Date? @NSManaged public var ServicesProvided: [String]? @NSManaged public var servicesCost: [Double]? @NSManaged public var netAmount: Double @NSManaged public var vatTax: Int @NSManaged public var irpfTax: Int @NSManaged public var grossAmount: Double @NSManaged public var currentStatus: String } class QuoteContainer { let persistentContainer: NSPersistentContainer init(forPreview: Bool = false) { ValueTransformer.setValueTransformer(QuoteStringArrayTransformer(), forName: NSValueTransformerName("QuoteStringArrayTransformer")) ValueTransformer.setValueTransformer(QuoteDoubleArrayTransformer(), forName: NSValueTransformerName("QuoteDoubleArrayTransformer")) persistentContainer = NSPersistentContainer(name: "Models") if forPreview { persistentContainer.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: "/dev/null") } persistentContainer.loadPersistentStores { _, _ in} if forPreview { addMockData(moc: persistentContainer.viewContext) } } } class QuoteStringArrayTransformer: NSSecureUnarchiveFromDataTransformer { override class func transformedValueClass() -> AnyClass { return NSData.self } override func transformedValue(_ value: Any?) -> Any? { guard let array = value as? [String] else { return nil } return try? JSONEncoder().encode(array) } override func reverseTransformedValue(_ value: Any?) -> Any? { guard let data = value as? Data else { return nil } return try? JSONDecoder().decode([String].self, from: data) } } class QuoteDoubleArrayTransformer: ValueTransformer { override class func transformedValueClass() -> AnyClass { return NSData.self } override func transformedValue(_ value: Any?) -> Any? { guard let array = value as? [Double] else { return nil } return try? JSONEncoder().encode(array) } override func reverseTransformedValue(_ value: Any?) -> Any? { guard let data = value as? Data else { return nil } return try? JSONDecoder().decode([Double].self, from: data) } }
0
0
304
Oct ’24
Xcode projects all no longer Clean
I compile plugins for Adobe Illustrator using CORE and Adobe SDK libraries. Xcode 14 has recently refused to clean any of my Xcode projects, system wide, although they compile and run fine. If I change Project Settings > Advanced > Build Location from Legacy to Default, it cleans fine, but when debugging, many breakpoints cannot be used. The marker has a dotted outline and a popup states that the breakpoint cannot be resolved. I'd like to stay with Legacy for the Build Location, and resolve the cleaning problem. Changing permissions or deleting contents of build folders hasn't helped. Has anyone else seen and solved this issue? macOS Sonoma 14.6.1 Xcode 14.3
0
0
160
Sep ’24
Looking to Make a Unity Plugin for VisionOS
I'm using Unity to create a VisionOS project. Using Polyspatial. I want to be able to use WeatherKit. I can not seem to create a VisionOS plugin in Unity. I've found all sorts of resources for building one for iOS. I made small changes to convert to VisionOS, but no matter what I do, I get 'Undefined Symbol' errors when I try to build the XCode project. Most recently I used this github for reference https://github.com/Robert-96/unity-swift/tree/main Am i trying to do something that just isn't possible for VisionOS?
0
0
250
Sep ’24
SSL Cert Interception | XCode Preview
Hello! My company makes use of SSL interception for its managed laptops (for various information security reasons). We've yet to find a good solution to avoid SSL cert errors in the Xcode Preview app. We've successfully installed/trusted our certs in the Xcode Simulator, but can't find any information on how to do the equivalent for the Xcode Preview. The inability to make use of the Preview App profoundly impacts productivity. It appears the Xcode Preview doesn't share the same certificate store as the Simulator, nor does it make use of the Mac's system keychain (where the certificates are also installed and trusted). If there’s anyone you can think of who might know a way around this issue it would be greatly appreciated. Many thanks!
1
0
526
Oct ’24
CMTimeMultiplyByRatio in iOS 16
let videoURL = URL(fileURLWithPath: path ?? "") let asset = AVURLAsset(url: videoURL, options: nil) let imageGenerator = AVAssetImageGenerator(asset: asset) imageGenerator.appliesPreferredTrackTransform = true let time = CMTimeMultiplyByRatio(asset.duration, multiplier: 1, divisor: 2) // THIS LINE GIVES ISSUE: "'duration' was deprecated in iOS 16.0: Use load(.duration) instead". I CANNOT FIGURE OUT THE CORRECT SYNTAX FOR CHANGING asset.duration TO REPLACE WITH load(.duration). HELP WITH THE CORRECT SYNTAX WOULD BE HELPFUL.
1
0
1.1k
Nov ’24
Gaps in Xcode build timeline
Reposting (after a while) from the Swift forums - the build timeline for our project has a lot of weird gaps in the beginning - almost 15 seconds in total, which is quite a big chunk of the total build time. Is there any way to determine why they exist or how I could fix them? I hope it's just something hidden and not the build system literally doing nothing... This is on Xcode 15.4.
1
0
413
Mar ’25
MULTIPLE problems with XCode
I am encountering multiple problems deploying an app using Xcode. First, I could not install Xcode from the App Store. I tried multiple times, rebooting etc. Finally I found a link to download an xip file from the developer site and unzip it. That worked. It took 2 hours. Now I'm trying to build my app. I get a message saying IOS 18.1 not installed. I try clicking on it an select Manage Run Destinations. It brings me to the Devices popup screen but I am unable to select anything. I tried setting up a Simulator as well. Still unable to select a desitiation. So then I tried updating my IPAd to IOS 18.1 thinking that might help. Big mistake. First I got a message saying some library were incompatible. Now I have a message saying Unknown Error. Disconnect and reconnect cables which I have done multiple times. This of course includes multiple times of clicking trust this device, then entering device password, then entering the auth code. They don't make it easy. I tried clicking the Get for IOS 18.1. I really don't want to update my machine to this. I'm actually using a friend's MAC. When I did this it tells me it requires 8gb and I don't have enough disk space. But I do have 20gb available. So about 4 hours of trying and nothing works. Two hours to install Xcode, can't select a different destination, can't connect my IPAd anymore, can't download the update. Not even sure why the device or destination is necessary. It's not necessary to build the same app for Android. I had similar issues with XCode in my initial attempts just to get the app signed until I figured out that I needed to have a device attached for the provisioning to work. That took days including trying to find a UDID from ITunes(???) and other wild goose chases. That makes no sense whatsoever. Now I can't even do that. So I guess my question is/are: Do I have a new buggy version of XCode and if so, how do I get a previous one? How do I select a different destination? How do I get past the IOS 18.1 requirement? How do I download IOS 18.1 if that's what I decide to do? How do I connect my IPad? Can I go back to previous OS on IPad if 18.1 doesn't work with XCode? How do I do certificate provisioning if I can't connect my IPad? Other than that everything works great.
0
0
396
Oct ’24
Provisioning profile doesn't match the entitlements file's values for the com.apple.developer.team-identifier and application-identifier entitlements.
Hi all. I have encountered an issue in which I failed to build the app on Xcode. It says "Provisioning profile doesn't match the entitlements file's values for the com.apple.developer.team-identifier and application-identifier entitlements". But I have checked these two values, they are exactly the same as expected.
1
0
1.5k
Nov ’24