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

Xcode Documentation

Posts under Xcode tag

3,451 Posts
Sort by:
Post not yet marked as solved
1 Replies
102 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
Post not yet marked as solved
0 Replies
76 Views
I have an IOS application who uses coredata As I want to develop and App extension which needs to share coredata with my app(Yes, I made a group App), I thought a good solution would be to create a framework with the, coredata model. I did it, but after that the coredata of the main app is no longer necessary. and I think I made a mistake when removing the file xcdatamodel from my app. when I refer to an entity in the main application, it doesn't use the entity of the framework. when I right click on an entity instance in my main application, I see a file which is: entity+CoreDataClass and of course I don't find it in the finder. Did I made a mistake by simply remove the xcdatamodel from my App? Do I have something to clean?
Posted
by
Post not yet marked as solved
1 Replies
59 Views
On two different Macs I get intermittent errors where SDK include files are not found. The file that contains the include statement, and the included file not found are different most times. When I check for the file it exists. A rebuild often works. Xcode 13.1 with MacOSX12.0.sdk and 13.3 with MacOSX12.3.sdk I've looked in the system console for error around the failure time, but cannot see anything. AFAIK i do not have any automatic updates selected. I checked timestamps of files/folders involved, and none are recent. Example error: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/algorithm:653:10: 'memory' file not found #include <memory>
Posted
by
wba
Post not yet marked as solved
1 Replies
71 Views
Hi there, The problem is that when I just drag and change the position of my label in xib, it does not effect properly in my app. @IBOutlet weak var Example: UILabel! is connected to the label in xib file. In total there are 3 labels, so I want to see them normal, but now it looks like the first label is inside the second label. The second and third label has huge spacing, and they are in very center. The first label is on very left side. Appreciate your ideas.
Posted
by
Post not yet marked as solved
1 Replies
55 Views
When I try to expand the Xcode 14 download file I get either one of two errors: with Archive Utility I get an error saying that the file can't be expanded due to insufficient space (I have over 100Gb available) and if I use The Unarchiver it says that the files are corrupted. Any thoughts on what I should do?
Posted
by
Post marked as solved
1 Replies
79 Views
For some time now Apple has been referring to iPadOS (eg in https://developer.apple.com/download/ ), but there is no compiler directive in Xcode to check for iPadOS - even though Xcode now has supported destinations for iPhone, iPad and Mac (catalyst). I have a couple of use cases where I'd really prefer to include/exclude large chunks of code (frameworks) based on whether the device is an iPad or an iPhone, not just because of the different user-interface characteristics - which can be accommodated using the UIUserInterfaceIdiom. Regards, Michaela
Posted
by
Post not yet marked as solved
0 Replies
74 Views
I have an App that connects to an IOT device via Bluetooth. I gave it the proper permissions in the info.plist file, and it works fine when I run it from XCode, is able to connect to and communicate with the IOT device via bluetooth. However, when I installed the App on another device via TestFlight, it does not work despite having all the same permissions and the exact same code. I do not know how to debug it since in Dev it works fine. Does anyone have any idea how I can track down what is happening?
Posted
by
Post not yet marked as solved
1 Replies
89 Views
I'm creating a multiplatform app on the Beta Xcode and have just migrated code over to set an image from the photo library. When I run the app on my iPad (with beta OS) it works fine. When running the same code on the iOS simulator I end up with a blank view without any images. There are a lot of errors outputted to the console starting with: 2022-07-12 09:59:46.037994-0700 MyAppName[10647:2080202] [UIFocus] TtGC7SwiftUI14_UIHostingViewVS_7AnyView implements focusItemsInRect: - caching for linear focus movement is limited as long as this view is on screen. objc[10647]: Class _EXRunningExtension is implemented in both myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x7ff864a43f90) and myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x1231e5d48). One of the two will be used. Which one is undefined. objc[10647]: Class EXConcreteExtension is implemented in both myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x7ff864a43fe0) and myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x1231e5d98). One of the two will be used. Which one is undefined. objc[10647]: Class EXExtensionPointCatalog is implemented in both myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x7ff864a44030) and myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x1231e5de8). One of the two will be used. Which one is undefined. and ending with: objc[10647]: Class _EXSceneSessionConnectionResponse is implemented in both myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x7ff864a45250) and myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x1231e7008). One of the two will be used. Which one is undefined. objc[10647]: Class EXService_Subsystem is implemented in both myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x7ff864a452a0) and myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x1231e7058). One of the two will be used. Which one is undefined. objc[10647]: Class _EXConnectionHandlerExtension is implemented in both myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x7ff864a45318) and myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x1231e70d0). One of the two will be used. Which one is undefined. objc[10647]: Class EXXPCUtil is implemented in both myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x7ff864a45340) and myPathway/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/ExtensionFoundation.framework/ExtensionFoundation (0x1231e70f8). One of the two will be used. Which one is undefined. 2022-07-12 09:59:47.154471-0700 MyAppName[10647:2080475] [NSExtension] Unable to setup extension context - error: Couldn’t communicate with a helper application. 2022-07-12 09:59:47.154654-0700 MyAppName[10647:2080349] [NSExtension] Async Begin using error: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.mobileslideshow.photo-picker.apple-extension-service" UserInfo={NSDebugDescription=connection to service named com.apple.mobileslideshow.photo-picker.apple-extension-service} 2022-07-12 09:59:47.154847-0700 MyAppName[10647:2080202] UIImagePickerController UIViewController create error: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.mobileslideshow.photo-picker.apple-extension-service" UserInfo={NSDebugDescription=connection to service named com.apple.mobileslideshow.photo-picker.apple-extension-service} I guess I'm wondering if someone else came across this and how you fixed it. Is it an error on my side or the beta software?
Posted
by
Post not yet marked as solved
0 Replies
51 Views
Trying to generate dynamic library (framework), in Debug build I can see the local path to my source code inside the framework or Unix Executable File. This is not the case with Release build. How can I prevent the path getting exposed in the framework file? I tried perl command to replace the occurrences of the path inside file. But when I do that and try to use framework within my iOS application, I got ld: malformed universal file: slice extends beyond end of file file '/path/to/my/Sample.framework/Sample' Framework file got corrupted, is there any proper way from XCode or xcodebuild command to achieve this?
Posted
by
Post not yet marked as solved
0 Replies
51 Views
Macos Monterey version 12.4, chip Apple M1 MAX Xcode 13.4.1 Build version 13F100 I'm trying to build a React-native/expo app through Xcode, it gets stuck trying to open the project with an endlessly spinning wheel. I tried a few solutions found in stack over flow and here, but nothing worked for me. I have removed xcode and install it again a couple of time.  i'm facing a real problem, i can't build IOS app... What is possible to do. Xcode is stuck in infinity loading, with the rainbow circle, even after a re-installation... all the time i try to build a IOS app... i have tried with a blank project building with expo cli and i have the same result. How can i debug this... which tools I can use ? Please help !
Posted
by
Post not yet marked as solved
0 Replies
75 Views
I am using the xcodebuild for creating a package for publishing The app bundle contains: the iOS app itself, the push notification extension, the watchos app with its extension. The watchOS app is using the healthkit for retrieving heart rate data. xcodebuild archive -configuration Release -workspace $(system.defaultworkingdirectory)/MyApp/MyApp.xcworkspace -scheme MyApp -archivePath $(system.defaultworkingdirectory)/MyAppArchive CODE_SIGNING_ALLOWED=NO xcodebuild -exportArchive -archivePath $(system.defaultworkingdirectory)/MyAppArchive.xcarchive -exportPath $(system.defaultworkingdirectory)/Final -exportOptionsPlist $(system.defaultworkingdirectory)/MyApp/ExportOptions.plist The ExportOptions.plist contains the info for signing the app <?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>provisioningProfiles</key> <dict> <key>fit.myapp.watchkitapp.watchkitextension</key> <string>ProvisioningProfileGUID1</string> <key>fit.myapp.watchkitapp</key> <string>ProvisioningProfileGUID2</string> <key>fit.myapp.notification</key> <string>ProvisioningProfileGUID3</string> <key>fit.myapp</key> <string>ProvisioningProfileGUID4</string> </dict> <key>signingCertificate</key> <string>Apple Distribution: MY COMPANY</string> <key>signingStyle</key> <string>manual</string> <key>method</key> <string>app-store</string> <key>teamID</key> <string>MYTEAMID</string> <key>uploadBitcode</key> <false/> </dict> </plist> The ipa file is successfully created but when the ipa file is uploaded (by Transporter app) the package analysis fails with the following errors: Asset validation failed (90701) Missing entitlement. watchOS app bundle 'MyApp.app/Watch/MyAppWatch.app/PlugIns/MyAppWatch Extension.appex' uses 'UIBackgroundModes' value 'workout-processing' without the required entitlement 'com.apple.developer.healthkit' signed into the bundle. (ID: cc87a6cd-2084-4712-9f45-b22b35e9574a) Asset validation failed (90334) Invalid Code Signature Identifier. The identifier "com.apple.WK" in your code signature for "MyAppWatch" must match its Bundle Identifier "fit.myapp.watchkitapp" (ID: bb9a56d3-949c-4b49-ad86-3cf7a26a91a2) Extra note: If the build has performed directly in Xcode/Organizer then the issue is not present. What am I missing? How can I debug this kind of issues?
Posted
by
Post not yet marked as solved
0 Replies
52 Views
The tvOS and watchOS platforms aren't installed by default using Xcode 14. This poses a problem for continuous integration if Xcode was installed with only the default platforms (iOS and macOS). Is it possible to install additional platforms through the command line?
Posted
by
Post marked as solved
1 Replies
45 Views
Hey Community, I got a bit of a problem here. My Xcode (13.4.1) decided to not launch any project as of yesterday anymore. I have had this problem before and reinstalled macOS to resolve it. But I don't want to reinstall macOS every three months. I noticed that playgrounds launch with no effort, but all Xcode projects create a beachball loading and then Xcode stops responding. This also happens when creating a new Xcode project. I tried removing Derived Data, the entire Developer folder, launching in Rosetta, reinstall Xcode, install the Xcode 14 Beta to see if that helps but to no avail. I also tried downloading a clean Xcode from the Developer website. I don't think it's memory related or anything, I have a 16-inch MacBook Pro with M1 Max, 32 Gb Ram, 512 Gb storage that is only halfway full. See logs here. Wasn't able to add it as attachment so it's a shared iCloud document.
Posted
by
Post not yet marked as solved
0 Replies
70 Views
Hi - I'm blocked by a spurious error in XCode I can't shake, in an iOS/Catalyst app project in swift with swift packages. The target has an iOS deployment version of 14.1, but XCode UI behaves like the target is set to 13.0: The package product 'LIB' requires minimum platform version 14.0 for the iOS platform, but this target supports 13.0 The command line builds fine: xcodebuild -configuration Release -scheme 'Study (iOS)' # (also Debug config) I'm sure I must be missing some configuration, but I have set the iOS/catalyst deployment version > 14 in project and target. To confirm: I'm using the same target scheme in XCode UI as the command-line build I fail in the UI using any relevant target devices (i.e., over iOS 14, mac catalyst or ipad) The project selector clearly shows target 14.1 (project/Deployment target/iOS deployment target) The project/target UI clearly shows deployment target 14.1 (project view, 'Study (iOS)' target, iOS Deployment Target) Same result when using version 15.0 instead of 14.1 Same result when disabling catalyst support and targeting iPad Same result with or without a derived mac catalyst product bundle identifier Same result for macOS targets 11..12.4 14.0 = macOS 11.0 15.0 = 12.0 Same result after creating a new run scheme. Scanning all files in the project confirms these settings and does not show a relevant 13 e.g., in "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" and IPHONEOS_DEPLOYMENT_TARGET I'm running macOS 12.4, XCode 13.4 (13F17a), default 5.6 toolchain, with packages declaring 5.6 toolchain No external xcconfig files In the XCode UI, I've done clean builds and reset the package cache I've deleted XCode's Derived Data and restarted mac I'm also developing packages (and have cleaned .build and .swiftpm directories) but app package dependencies are pulling from remote repository (i.e., not using local packages) So: Any clue as to why XCode believes the target is 13 and not 14.1? How I can debug this? Is there some way XCode can indicate the target triplet and SDK and how it is derived? Is the next step to recreate the project? Thanks!
Posted
by
Post not yet marked as solved
0 Replies
46 Views
I feel like Im loosing my mind and really could use some help to try and figure out what the H*** is going on. Phone: iPhone11 Problem: It just started to flash the apple symbol (I’ve noticed it seems to be when the phone dies and I try to connect it to the charger.) it flashes for a long time. I have tried to factory reset it.. but it will all the sudden start working again. UNUSUAL-New-on phone: tried to go through setting and apps to back up so I can factory reset my phone and noticed something new under.. I think … it was per-app preview- xcodes preview never seen that on my phone before and I have a crazy husband and have suspected him of hacking (and known he has had my messages sent to his iPad before-notn siren how) buuuut he is currently learning python.. and bought a watch looking device that is a mini motherboards or something and has to do with attacking Wi-Fi? In don’t know what its called. sooo… I guess my questions are: Do you need Mac Tom install xcodes to an iPhone? is Xcode’s apart of an iPhone update? can xcodes cause my phone to flash the apple symbol? side note: he has 2 iPads and an IPhone13 Apple Watch and 2 macs.. one of them is the newest box looking one. And yes hen hasn had plenty of access to physically have possession of my phone and other devices (iPad) (iPods ) Oh and I noticed something under iCloud that says tracking in red, and has options for apps to request permission to track, and i think it has a tab that’s says ‘apps that have permission… and notification options, but can’t remember … I just don’t remember seeing that on my phone before either… in case someone knows if that is possibly something from hacking. Uuuggghhh HELP please… !!!
Posted
by
Post not yet marked as solved
1 Replies
95 Views
I bought a new Mac book pro (M2) today and restored my Time Machine backup into the new Mac. I'm able to run XCode developed apps on a simulator fine. When I try to run the app i developed on my iPhone 12 (15.5 version of iOS) It gives me this error "This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your mac and device in order to correctly detect compatibility." I restarted both my Mac and iphone with no luck. My Mac is running System Version: macOS 12.4 (21F2081)  Kernel Version: Darwin 21.5.0 My iPhone is 15.5. I do have a developer program account. Do I need to add something in Developer Program site to allow this new mac to install apps on iPhone? Any help is greatly appreciated. I did this long time back on my old mac, and i'm totally lost how I authorize my new Mac to install apps i developed. Thank Ez
Posted
by
Post not yet marked as solved
0 Replies
100 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
by
Post not yet marked as solved
0 Replies
72 Views
Great what you did in iPadOS 16, this is a giant step towards bigger major updates, what we want now in iPadOS 17 is the following: 1- We want a “terminal” system on the iPad with the ability to use it in programming and development, and allow applications to access it in order to create professional IDE copies for the iPad. 2- We hope to have a copy of one of the professional programs on Mac, such as F CUT PRO or XCODE. 3- Improving the stage manager further to become more effective and more real. 4- Take advantage of the empty top space that lies between the battery charge number and the watch, so that there are larger items that we can take advantage of such as a Mac, or even something better than a Mac. We want you to wow us with the iPadOS 17 update. Good luck..
Posted
by