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

Xcode Documentation

Posts under Xcode tag

3,454 Posts
Sort by:
Post not yet marked as solved
13 Replies
1.4k Views
MacBook Pro 2018 mid 13.3" Xcode 13.3 Mac OS Monterey 12.3 I had the kernelpanic bellow three time today. I had Xcode with simulator running all times. Have anyone this issue? kernel panic
Posted
by akikos.
Last updated
.
Post not yet marked as solved
1 Replies
99 Views
hello to everyone im new on this fantastic world im creating my firs game and of course i start with gamesalad im do everything perfrct(i mean) when i generate the ipa everything is fine transporter to apple connect is a problem MacOs Monteray 12.4 xcode Version 13.4.1 my error is this...anyone or something help me please Asset validation failed (90725) SDK Version Issue. This app was built with the iOS 14.5 SDK. All iOS apps submitted to the App Store must be built with the iOS 15 SDK or later, included in Xcode 13 or later. (ID: b17f0e2f-0971-4e54-ab30-7a5feed7e88e)
Posted
by OffSim.
Last updated
.
Post not yet marked as solved
0 Replies
47 Views
I'm currently trying to save a selected image in core data as a type data, but I'm getting an error in the persistence file marked with a comment. I've included my code and any questions I will gladly answer. Thanks for any help! Content View: import SwiftUI import PhotosUI struct ContentView: View {     @ObservedObject var persistence = PersistenceController.shared     @State var selectedItems: [PhotosPickerItem] = []     @State var data: Data?     var body: some View {         NavigationView{             VStack{                 Spacer()                 VStack{                     Spacer()                     if let data = data, let uiimage = UIImage(data: data) {                         Image(uiImage: uiimage)                             .resizable()                             .scaledToFit()                             .frame(width: 250, height: 500)                     }                     Spacer()                 }                 Spacer()                 PhotosPicker(selection: $selectedItems, maxSelectionCount: 1, matching: .images){                     Text("Pick Photo")                 }                 .onChange(of: selectedItems){ newValue in                     guard let item = selectedItems.first else{                         return                     }                     item.loadTransferable(type: Data.self){ result in                         switch result {                         case .success(let data):                             if let data = data{                                 self.data = data                             } else {                                 print("Data is nil")                             }                         case .failure(let failure):                             fatalError("\(failure)")                         }                     }                 }                 Spacer()             }             .navigationBarItems(trailing: addButton)         }     }     var addButton: some View {         Button(action: {             guard let item = selectedItems.first else{                 return             }             item.loadTransferable(type: Data.self){ result in                 switch result {                 case .success(let data):                     if let data = data{                         persistence.addObject(image: data)                     } else {                         print("Data is nil")                     }                 case .failure(let failure):                     fatalError("\(failure)")                 }             }         }){             Text("Add Image").bold()         }     } } Persistence: import Foundation import CoreData class PersistenceController: ObservableObject {     static let shared = PersistenceController()     let container: NSPersistentContainer     init(inMemory: Bool = false) {         container = NSPersistentContainer(name: "ReciPlanner")         if inMemory {             container.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: "/dev/null")         }         container.loadPersistentStores(completionHandler: { (storeDescription, error) in             if let error = error as NSError? {                 fatalError("Unresolved error \(error), \(error.userInfo)")             }         })         container.viewContext.automaticallyMergesChangesFromParent = true     }          func addObject(image: Data){         let context = container.viewContext         let object = Object(context: context) //Error: Thread 7: "An NSManagedObject of class 'Object' must have a valid NSEntityDescription."         object.item = image     }          func contextSave() {         let context = container.viewContext         if context.hasChanges {             do {                 try context.save()             } catch {                 print("**** ERROR: Unable to save context \(error)")             }         }     } } Data Model:
Posted Last updated
.
Post not yet marked as solved
3 Replies
278 Views
When archiving the app with Xcode 14 beta, we got some errors regarding resources bundle code signing. xxxResources does not support provisioning profiles. xxxResources does not support provisioning profiles, but provisioning profile <...> has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor... It turns out that in Xcode 14 beta, CODE_SIGNING_ALLOWED of resource bundle is being set to YES by default while it's NO in Xcode 13.x. Is this an expected change or a bug introduced by Xcode 14 beta?
Posted
by ntduyet.
Last updated
.
Post not yet marked as solved
3 Replies
293 Views
When using an Intents configuration with Widget Extension, the compiler will generate code for your configuration. But in Xcode 14, this generated code now contains warnings: Method 'confirm(intent:)' with Objective-C selector 'confirmConfiguration:completion:' conflicts with method 'confirm(intent:completion:)' with the same Objective-C selector; this is an error in Swift 6 It seems that in Xcode 14 this generated code now contains async versions of its methods, but that these methods have the same objc selectors as the non async versions: public protocol ConfigurationIntentHandling: NSObjectProtocol {     @objc(confirmConfiguration:completion:)     optional func confirm(intent: ConfigurationIntent, completion: @escaping (ConfigurationIntentResponse) -> Swift.Void)     @objc(confirmConfiguration:completion:)     optional func confirm(intent: ConfigurationIntent) async -> ConfigurationIntentResponse     @objc(handleConfiguration:completion:)     optional func handle(intent: ConfigurationIntent, completion: @escaping (ConfigurationIntentResponse) -> Swift.Void)     @objc(handleConfiguration:completion:)     optional func handle(intent: ConfigurationIntent) async -> ConfigurationIntentResponse } Is there a new way to handle widget configuration in Xcode 14? Or is this just a massive oversight? I have treat warnings as errors enabled (as everyone should) so this prevents my app from building. Filed as FB10338460
Posted
by adysart.
Last updated
.
Post not yet marked as solved
0 Replies
59 Views
Given is an app project with two SPM dependencies: one to a source code repro and one to a repro containing in XCFramework. Using "Build Documentation" in Xcode generates the documentation for the app and source framework but not for the XCFramework. Wonder, why the documentation is not generated from the symbol graph of the binary Tried to create a .doccarchive with the framework using "Build Documentation during 'Build'" build setting, but: .doccarchive is not copied when creating a XCFramework after adding .doccarchive to XCFramework, it will not be resolved and downloaded via SPM Is there any way to distribute the documentation of my binary framework over SPM to be displayed in the Documentsbrowser using the "Build Documentation" command?
Posted
by Neuwalker.
Last updated
.
Post not yet marked as solved
1 Replies
46 Views
Anyone know how I can delete a URL Type and add URL Type properties? It says click here to add properties but that does nothing.
Posted
by rhitglgl.
Last updated
.
Post not yet marked as solved
31 Replies
16k Views
Receiving this error when trying to validate any app. I've been able to successfully validate a few days ago, but it just started happening. Error Fetching App Record App record request failed with error: "Unexpected Status Code"
Posted
by Blurp.
Last updated
.
Post marked as solved
1 Replies
83 Views
I made a new command-line tool C++ project in Xcode, with the following main.cpp: #include <iostream> int main() {   std::cout << "Hello, World!\n"; } When I try to profile it in Instruments with any template, I get the following error before my program even starts: Failed to execute loader thread for /Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/liboainject.dylib in target; target process <pid> likely exited I get the same error when I try running Instruments with xctrace. How do I get Instruments to properly load my programs? Setup: Xcode version: 13.4.1 (13F100) Hardware: 2020 M1 MacBook Air
Posted
by evanacox.
Last updated
.
Post not yet marked as solved
0 Replies
47 Views
Hi Team, I have created single app project with Family controls capabilities and added respected framework. Once it's done I am not able to see App scheme in Active scheme area. When I try to run the project, Choose app to run pop-up getting shown. Any help on this please?
Posted
by Rudraa.
Last updated
.
Post not yet marked as solved
2 Replies
78 Views
productbuild.crash While doing the final .pkg file calling the tool: productbuild --distribution "$DIS_FILE" --resources "$RES_DIR" --package-path "$PKGS" --version "$VERSION" "$PKG_NAME" And the crash stack is: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libxar.1.dylib 0x00007fff2ae2c00c xar_file_new_from_parent + 190 1 libxar.1.dylib 0x00007fff2ae29d59 xar_add_frombuffer + 63 2 com.apple.PackageKit 0x00007fff3ba79a2f -[PKMutableXARArchive setData:forPath:compressed:] + 246 3 com.apple.PackageKit 0x00007fff3babb38e -[PKArchiveDistributionContainer setResourceData:forKey:forLocalization:] + 284 4 com.apple.PackageKit 0x00007fff3bab9fef -[PKMutableDistributionContainer storeResourcesAtPath:forLocalization:] + 922 5 com.apple.PackageKit 0x00007fff3baa5590 -[PKArchiveProduct(ForMutableSubclassers) addResourceDataAtPath:] + 324 6 productbuild 0x000000010efdc8a8 0x10efd8000 + 18600 7 productbuild 0x000000010efdba6e 0x10efd8000 + 14958 8 libdyld.dylib 0x00007fff204c0f3d start + 1 While using macOS 11.6.7, xcode 12.3, and CLT 11.1
Posted
by darioa.
Last updated
.
Post marked as solved
3 Replies
132 Views
Hi, I'd greatly appreciate any help with this problem. I have developed an app for both iOS and android. The app is built with Kivy and Python, it functions as expected however in Xcode I cannot find a way to prevent the phone/device from dimming and locking. I'm very new to Xcode and iOS, but I ave tried several variations of. [UIApplication sharedApplication].idleTimerDisabled = YES; in multiple areas of the m Main but I cannot get it to work, no matter what I try the phone still goes to sleep/locks. If that code above is supposed to work, I have no idea where to put it. As far as I can tell, the only places I could enter something like that is in the main.m, bridge.m and bridge.h code; or somewhere in the info.plist I'm currently lost, feels like a simple problem.
Posted
by Wormi.
Last updated
.
Post not yet marked as solved
0 Replies
54 Views
Using xCode 13.4.1, my assets catalog (assets.xcassets) has gone blank. Which is to say when I click on the icon in the left-hand Navigator, the normal OutlineView and DetailView are replaced by a large white area of screen. If I try, for example, to drag a new image file into this area, it bounces out. The existing assets are still there; when I run the app the images, etc., appear as expected. I just can't see them to manage them (or add new assets). I have restarted xCode several times to no avail. Has this ever happened before? Does anyone have a solution? BTW, in other app projects, the assets catalogs are working normally. It is just in one project where the catalog is "blank"
Posted
by Hyoryusha.
Last updated
.
Post not yet marked as solved
0 Replies
65 Views
We have a project that compiles an app for both x64 and arm64 Mac machines. This build is done via Visual Studio MSBuild with specific RIDs and Mac native code via xcode. Using the 'packages' application we build an distribution package, which contains the two pkgs for the specific architectures. The project contains settings to pick the correct PKG according to the architecture running the installation ('packages' will include a JavaScript script in the Distribution file for this). This all works just fine when running the final PKG manually. But when deploying via Intune as LOB this doesn't work well. It seems Intune will skip the complete Distribution file and will install all the PKGs included in to distribution package. The logfile shows that both x64 and arm64 are installed Install.log This will result in the x64 to be installed, and being overwritten by the arm64 installation. And a non-functional app on a x64 based Mac. We edited the preinstall.sh for both packages and do another architecture check and error-out when running on a wrong platform; but that doesn't work either: Intune will cancel the whole installation transaction when one pkg fails. Resulting in a non-installed package. What would be a good way to create an universal installation/distribution package with both architectures which would be able to be deployed via intune?
Posted
by JSdeJong.
Last updated
.
Post not yet marked as solved
4 Replies
1.5k Views
By debugging in iPhone 12 mini simulator I got different screen size than real iPhone 12 mini. Is there any chance that I can get iPhone 12 mini simulator exactly as real device? Need to debug something but don't want to buy iphone 12 mini for that purpose.
Posted
by januks.
Last updated
.
Post marked as solved
5 Replies
7.7k Views
An error error was encountered: Error Analyzing App Version (Build number request failed with error: BuildsService: ResponseErrors (1) (1): Error status: 400, code: PARAMETER_ERROR.INVALID, title: 'A parameter has an invalid value' detail: "" is not a valid filter, id ........ '
Posted Last updated
.
Post not yet marked as solved
7 Replies
16k Views
Hi I bought the new MacBook Air m1 and install Xcode 12 on that and I try to run my React Native project on that but I could run normally on intel base MacBook (my old macbook). I face with some error in my new MacBook. I see this errors: 1- building for iOS Simulator, but linking in object file built for iOS, file '/Users/hosein/Desktop/sporty-app/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a' for architecture arm64 I fixed this with adding the arm64 on Excluded Architectures 2- module map file '/Users/hosein/Library/Developer/Xcode/DerivedData/Sporty-ficshtjjzxcsgkaohfxowaxpyivr/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap' not found I get number 2 when I want run app on simulator but when I run on real device I don't have any errors. How can I fix this error (number 2)? Note: I am running the xxxx.xcworkspace and my target iOS version in pod and general in Xcode is 10.0
Posted
by xrois.
Last updated
.
Post marked as solved
3 Replies
85 Views
I have no idea how to solve this. I am not using many local variables, yet I am hitting the 512 KiB stack size limit for secondary threads. My app has already been close to hitting this, now it's definitely hitting it. How the heck do I trace this down? Instruments has nothing about stack memory usage.
Posted
by kode54.
Last updated
.