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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Xcode 12.5 Multiple commands produce framework and ProcessXCFramework
Hi, I'm from the App Center SDKs team. After updating Xcode from 12.4 to 12.5 our team faced build issues similar to this: Multiple commands produce '/Users/user/Library/Developer/Xcode/DerivedData/AppCenter/Build/Products/Debug-iphonesimulator/AppCenter.framework': 1) Command: ProcessXCFramework /Users/user/appcenter-sdk-apple/AppCenter-SDK-Apple/XCFramework/AppCenter.xcframework /Users/user/Library/Developer/Xcode/DerivedData/AppCenter/Build/Products/Debug-iphonesimulator/AppCenter.framework ios simulator 2) Target 'AppCenter iOS Framework' has create directory command with output '/Users/user/Library/Developer/Xcode/DerivedData/AppCenter/Build/Products/Debug-iphonesimulator/AppCenter.framework' Repro steps: Build AppCenter iOS Framework target. Build AppCenter target which creates an xcframework for iOS, macOS, and tvOS platforms. Build AppCenter iOS Framework and/or AppCenter Analytics iOS Framework target. Build SasquatchPuppet target (it uses AppCenter iOS Framework and AppCenter Analytics Framework targets). After the issue happened only Product > Clean build folder can help. We've tried to automate cleaning the build artifacts (BUILD_DIR) etc, but it doesn't help. Also, we've tried to use separate Product Names for XCFramework and mere Frameworks, but it was not possible for us in the end because of the xcconfig variables visibility. Similar issue: https://developer.apple.com/forums/thread/679542
3
1
46k
Jun ’21
Xcode 13.0 can't pair to Apple TV 4K (tvOS 15.0)
On Xcode 13.0, I can no longer pair with an Apple TV 4K (tvOS 15.0). Until now it has always worked but since the new update to tvOS 15.0 and Xcode 13.0 I can no longer connect. I have gone through the following steps to connect: Open remote app and devices settings on Apple TV 4K (tvOS 15.0). Open Devices and Simulators in Xcode 13.0. Select Apple TV in the list and press "Pair". Code appears on the Apple TV and I can enter it in an Xcode window. After the code input, there is a short loading sign that a connection is being established. After a few seconds, the whole thing stops without an error message and the "Pair" button is visible again. Does anyone have the same problem? I would like to optimize my apps for tvOS 15 and test them on a physical device.
24
1
21k
Jun ’21
Unable to add Swift Package dependency URL in Xcode 13.0 beta
I'm working on a simple iOS app and am trying to add a Swift Package dependency to my project (in my case, Alamofire) and I'm getting an error when I paste their GitHub URL into the box asking for it. It reads The operation couldn't be completed. (PackageCollections.JSONPackageCollectionsProviderError error 3.). I also tried to see if the error was because Alamofire isn't updated for Xcode 13, but a package generated locally for development and pushed to GitHub also has the same error (That url is: here on Github). Any help would be great!
4
2
12k
Jun ’21
If i sell my iphone, Can i still develop apps on the appstore?
to whom this may concern, I am an apple developer, fully registered and subscribed, and currently dont have one released on the appstore but has one on the testflight, and 2 internal testers are using it, but the main question is, as the iphone is registered on my account, if i sell my iphone, can i still develop and release apps on the testflight or appstore? is the registration one time only? do i need to have an active iphone?
1
0
729
Jul ’21
Xcode Application Continuous (OSX) Indexing Crash Problem
Xcode indexing will cause my Mac Mini (M1) to crash when indexing is active (ON). ===> Xcode Version 12.5.1 (12E507) To test the following, I created a smaller OSX desktop application, compared to my main OSX desktop application, which is significantly larger in scope, and size. That said, I enter the following code in the terminal to activate and deactivate Xcode Indexing: 1. Indexing is active (ON) when applied in the terminal : defaults write com.apple.dt.XCode IDEIndexDisable 0 2. Indexing is NOT active (OFF) when applied in the terminal : defaults write com.apple.dt.XCode IDEIndexDisable 1 The application causing the crash with Xcode Indexing turned (ON), creates a PList file for my main application to use, which is an array of dictionary tuples. This application for the moment, creates a baseline array of 4,000+ dictionary objects with eight (8) tuple objects per dictionary. I use the same design with different, and significantly less information to create other PList array of dictionary objects, such as creating a PList array of dictionary objects for one column of objects instead of my application’s eight tableView columns. The smaller PLlist array of dictionary objects for an identified tableView column contains numeric information, which my application analyses to provide statistical data, such as mean, median, mode, maximum, minimum, number of occurrences, histograms, charts, et al. The smaller PList column application does not crash when Xcode Indexing is active (ON). When Xcode Indexing is active (ON) for the larger PList application the following occurs: 1. Xcode quickly usurps all the RAM in my Mac Mini (M1 - 16 GB). 2. Activity Monitor shows “SourceKitService” climbs steadily to (20 GB) from (140 MB). 3. Activity Monitor shows “swift-frontend” climbs steadily to (80 GB) from (1 GB). 4. Activity Monitor shows “Physical Memory: 16 GB” 5. Activity Monitor shows “Memory Used: 14.01 GB” 6. Activity Monitor shows “Cached Files: 1.91 GB” 7. Activity Monitor shows “Swap Used: 29.49 GB” 8. Activity Monitor shows “App Memory: 3.69 GB” 9. Activity Monitor shows “Wired Memory: 1,012.5 MB” 10. Activity Monitor shows “Compressed: 8.53 GB” 11. Activity Monitor shows “Memory Pressure: Max” My Mac Mini (M1) does not hesitate to show the Force Quit Modal: “Your system has run out of application memory.” Xcode ===> (“Xcode set at 309.0 MB”) Finder ===> (“Finder set at 158.2 MB”) Boom, I must restart my computer. When Xcode Indexing is NOT active (OFF) the following occurs: 1. The Mac Mini (M1) does not crash. 2. My application will NOT allow me to connect to any viewController outlet in my application from any IB. 3. Attempting a connection from IB to the associated properly named “viewController” presents the following error message: ===> Could not insert new action connection: could not find any information for the class named “blah blah blah …” <=== This exercise to turn “ON” and turn “OFF” Xcode indexing for my situation is repeatable. Turning (OFF) Xcode indexing introduces the above "Could not" error message, and turning (ON) Xcode indexing prevents the error message from showing with my smaller indexed applications. So, for the moment, I can manually create an outlet in the “viewController” with copy and paste, “change” the new outlet name and function, then “connect” the IB item to the new viewController outlet, using “control-drag.” This “get-by-product” effort allows me to continue making connections without frustration. For me, and my Mac Xcode programming experience, when Xcode Indexing is “OFF,” all the other internet suggestions to fix the “Could not insert new action connection” failed miserably. Those suggestions obviously worked for the individual poster, but unfortunately not for me. When Xcode crashes with this error, my computer asks to send the issue to Apple, so I say “Yes.” This experience blindly took me more than two months to isolate my application issue, through trial and error, trying to follow the numerous suggestions on the internet to no avail. I turned OFF Xcode Indexing a few months ago to prevent the larger indexing application from crashing. My efforts to resolve the “Could not insert new action” message included: 1. Creating new view controllers. 2. Copying the original viewController code into the new viewController. 3. Clean and rebuild. 4. Delete derived folders. 5. Reviewing possible “Automatic and Manual” assistant editor issues. 5. Believing my suspect object copy methods from one IB to another IB, caused the issue, therefore causing me to rebuild an IB or two from scratch. The Xcode Index crashing issue, and the subsequent “Could not insert new action” issue happens to be annoying, but I am able to continue programming my application without Xcode indexing. My main concern and my current dilemma right now happens to be, what will become of my application, since I cannot index the application without Xcode indexing causing my Mac Mini (M1) to crash … ? Just curious … :] All suggestions, as always, are welcome. Best regards, jim_k
2
0
2.2k
Jul ’21
Xcode 13 beta | Failed to build module 'Network' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
I have a project which has iOS 10.0 deployment target in which I import Network framework in some class and conditionally using it depending on the host app’s iOS version.   With Xcode 13 beta 4(13A5201i), I am able to compile and run the project successfully while debugging on iPhone device but it gives below error. This was working fine with Xcode 12.5.1 /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/lib/swift/Network.swiftmodule/armv7-apple-ios.swiftinterface:1254:19: 'NWConnection' is only available in iOS 12.0 or newer /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/lib/swift/Network.swiftmodule/armv7-apple-ios.swiftinterface:1254:1: Add @available attribute to enclosing extension /Application/NWBrowserManager.swift:10:8: Failed to build module 'Network' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
12
0
11k
Aug ’21
Xcode 13 "Missing package product" using local Swift Packages
I have a project I've been working off of for a few years now that makes use of local Swift Packages. In my workspace, I have a "Kit" project that generates a framework using several local Swift Packages as dependencies. In Xcode 12, the local Swift packages resolve correctly and compiles, but each beta of Xcode 13 gives me the error: "[ProjectName].xcodeproj Missing package product '[LocalSwiftPackage]'" Clearing the package cache, derived data, or restarting the application does not resolve the issue. Only Swift Packages that are remotely loaded from a URL are compiled correctly. Using local packages to separate module code, while still being able to edit in the same project, has been essential to my workflow and would hate to see Xcode 13 release with these breaking changes, and I have not seen this issue listed in the known issues for the Xcode 13 release notes. Has anyone else experienced this issue or found a workaround?
18
13
64k
Aug ’21
Java Runtime not found
Hi there, I run Flutter in VS Code, and have been having no issues until today. All of a sudden I cannot build to Android. I've been building to 3 different Android devices (1 emulator; 2 devices (one USB; one wireless)) since I got my MBP (came with Big Sur) a couple months ago. Today it can't find Java. Research says to check the Java icon in the System Preferences. But there is no Java icon in my System Preferences. The error is: The operation couldn’t be completed. Unable to locate a Java Runtime. Please visit http://www.java.com for information on installing Java. I also tried a different project via Android Studio, and it says the same thing. But I've BEEN building to Android, so I'm completely confused why today it all of a sudden can't find Java. When I type which java or which javac they both point to /usr/bin/java and /usr/bin/javac. But typing java -version or /usr/bin/java -version gives that same error. I went to Oracle, but they mention about costs. And this again makes me wonder... why am I even here?? Where did my Java go? I also don't surf the web or download/install stuff on my Mac. I only do Flutter development on the Mac. So do I just not think about how it disappeared, and go ahead and just install the JRE or JDK from Oracle? Or is there a way to tell the Mac to "please fix this"? Thanks for any insights. -Keith
5
0
51k
Aug ’21
Posting a Crash Report
If you need help investigating a crash, please include a crash report in your post. To smooth things along, follow these guidelines: For information on how to get a crash report, see Acquiring crash reports and diagnostic logs. Include the whole crash report as a text attachment (click the paperclip icon and then choose Add File). This avoids clogging up the timeline while also preserving the wealth of information in the crash report. If you’re not able to post your crash report as an attachment, see Can’t Post Crash Report as Attachment below. If you want to highlight a section of the report, include it in the main body of your post. Put the snippet in a code block so that it renders nicely. To create a code block, add a delimiter line containing triple backquotes before and after the block, or just click the Code Block button. If possible, post an Apple crash report. Third-party crash reporters are often missing critical information and have general reliability problems (for an explanation as to why, see Implementing Your Own Crash Reporter). Symbolicate your crash report before posting it. For information on how to do this, see Adding identifiable symbol names to a crash report. If you need to redact the crash report, do so consistently. Imagine you’re building the WaffleVarnish app whose bundle ID is com.example.wafflevarnish but you want to keep your new waffle varnishing technology secret. Replace WaffleVarnish with WwwwwwVvvvvvv and com.example.wafflevarnish with com.eeeeeee.wwwwwwvvvvvvv. This keeps the text in the crash report aligned while making it possible to distinguish the human-readible name of the app (WaffleVarnish) from the bundle ID (com.example.wafflevarnish). Finally, for information on how to use a crash report to debug your own problems, see Diagnosing issues using crash reports and device logs. Can’t Post Crash Report as Attachment Crash reports have two common extensions: .crash and .ips. DevForums lets you attach the first but not the second (r. 117468172). To work around this, change the extension to .txt. If DevForums complains that your crash report “contains sensitive language”, leave it out of your initial post and attach it to a reply. That often avoids this roadblock. If you still can’t post your crash report, upload it to a file sharing service and include the URL in your post. Post the URL in the clear, per tip 14 in Quinn’s Top Ten DevForums Tips. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Revision History: 2024-05-21 Added some advice regarding the “contains sensitive language” message. 2023-10-25 Added the Can’t Post Crash Report as Attachment section. Made other minor editorial changes. 2021-08-26 First posted.
0
0
6.0k
Aug ’21
Why isn't an XCFramework's Info.plist "stable"?
(By "stable," I don't mean in a crashing or breaking sense; I mean it in the sense of a stable sorting algorithm, where duplicate elements will be kept in the same order in which they appeared in the unsorted collection.) I have a script that builds an XCFramework for iOS & tvOS, on simulator & device. It never changes the order in which the -framework arguments are passed to xcodebuild -create-xcframework. If I regenerate the XCFramework without any code or config changes, however, the order of entries in Info.plist always changes. Sample git diff: <string>x86_64</string> </array> <key>SupportedPlatform</key> - <string>tvos</string> + <string>ios</string> <key>SupportedPlatformVariant</key> <string>simulator</string> </dict> <dict> <key>LibraryIdentifier</key> - <string>ios-x86_64-simulator</string> + <string>ios-arm64</string> <key>LibraryPath</key> <string>Foo.framework</string> <key>SupportedArchitectures</key> <array> - <string>x86_64</string> + <string>arm64</string> </array> <key>SupportedPlatform</key> <string>ios</string> - <key>SupportedPlatformVariant</key> - <string>simulator</string> </dict> <dict> <key>LibraryIdentifier</key> - <string>ios-arm64</string> + <string>tvos-x86_64-simulator</string> <key>LibraryPath</key> <string>Foo.framework</string> <key>SupportedArchitectures</key> <array> - <string>arm64</string> + <string>x86_64</string> </array> <key>SupportedPlatform</key> - <string>ios</string> + <string>tvos</string> + <key>SupportedPlatformVariant</key> + <string>simulator</string> </dict> </array> <key>CFBundlePackageType</key> It doesn't affect the runtime in any way, as far as I know, but it's a minor irritation that I have to commit the changes to source control every time. Is there a way for xcodebuild -create-xcframework to either honor the order in which I passed the -framework arguments in, or at least keep the Info.plist file "stable" between script invocations? (This behavior is the same on Xcode 12.x & the XCode 13 beta versions.)
1
1
1.5k
Sep ’21
Unable to capture the view hierarchy
I always get an error when I try to view the interface hierarchy in Xcode.And I have no idea about this.I really need help. An error is as follows: The operation couldn’t be completed. Log Title: Data source expression execution failure. Log Details: error evaluating expression “(id)[[(Class)objc_getClass("DBGTargetHub") sharedHub] performRequestWithRequestInBase64:@""]”: error: Execution was interrupted, reason: EXC_BREAKPOINT (code=1, subcode=0x1a987b62c). The process has been returned to the state before expression evaluation. Log Method: -[DBGDataSourceConnectionLibViewDebugger _executeLLDBExpression:forRequest:onPotentialThread:iteration:]_block_invoke Domain: DBGViewDebuggerErrorDomain Code: 0 Failure Reason: Log Title: Data source expression execution failure. Log Details: error evaluating expression “(id)[[(Class)objc_getClass("DBGTargetHub") sharedHub] performRequestWithRequestInBase64:@""]”: error: Execution was interrupted, reason: EXC_BREAKPOINT (code=1, subcode=0x1a987b62c). The process has been returned to the state before expression evaluation. Log Method: -[DBGDataSourceConnectionLibViewDebugger _executeLLDBExpression:forRequest:onPotentialThread:iteration:]_block_invoke User Info: {   request = "Initial request"; }
2
0
2.1k
Sep ’21
iOS app icon not updating with Xcode 13.0 / iOS 15.0
I'm about to release an app update with a new app icon. I've changed the icons several times to try different designs with Xcode 12.x and iOS 14 and never had any issues. Today I updated to Xcode 13 + iOS 15, and no matter what I try, the device keeps showing my previous version of the app icon. Xcode displays the new icon (e.g. under "Targets" of the project settings). The correct (new) icon is being displayed when running in simulator. In the "Devices and Simulators" window, the old/wrong icon is displayed under "Installed Apps". Things I've tried: I checked all asset catalogs etc. in my project and can confirm the old icon asset is no longer there. Clean build folder. Delete the app off the device from "Devices and Simulators". Delete the app on the device itself. Restart the iPhone whilst app is still on the device. Restart the iPhone whilst app is deleted. Restart Mac. I created a new iOS icon asset and linked that from the iPhone project settings. Increased the build number of the iPhone app. No matter what I try, the old icon keeps coming back. It seems like iOS 15 caches the icon and building and running on device from Xcode is not enough. Any ideas
15
1
14k
Sep ’21
ITMS-90755: Invalid Binary
I've been trying to upload a test build using Xcode 13 to TestFlight but keep getting the following error after build is uploaded successfully: ITMS-90755: Invalid Binary - The following binaries in your app contains prohibited instructions: /Volumes/data01/app_data/awf/SWImportWorker-pv50p00ce-swpr152.cse.apple.com-400203/ff08-SoftwareImportWorker-PV_.0/VWBGHTOVAUPPUUZ65REE64UUN4/eqbyjijjamvooymq/exddmvmbsqjsrxwj/Payload/[App Name].app/[App Name]. Remove the instructions from the binaries, rebuild and resubmit. What does this error mean? What are those prohibited instructions? Where to fine them in the app binary? Any guidance is appreciated. Thanks.
2
0
1.1k
Sep ’21
Color literal not displaying as Color Swatch?
Hi, should color literals work inside Views, I am sure this used to work? Xcode Version 13.0 (13A233) Note, myColor works, but the same literal in the fill does not. let myColor = Color(#colorLiteral(red: 0.292, green: 0.081, blue: 0.6, alpha: 255)) struct TestView: View {   var body: some View {     RoundedRectangle(cornerRadius: 25)       .fill(Color(#colorLiteral(red: 0.292, green: 0.081, blue: 0.6, alpha: 255)))       .frame(width: 100, height: 100)           } }
15
5
15k
Sep ’21
Xcode 13 app archiving is modifying framework plist
When archiving & exporting App with Xcode 13. The Frameworks of the created app will have their Info.plist modified. CFBundleShortVersionString is being changed to have the same value as the application version. Steps to reproduce: Create iOS App project with v1.0.0 Add dynamic framework dependencies. ex: Framework A v3.0.0, Framework B v12.0.0. Archive Project. Distribute app AppStore Connect Export Finish the rest of the process with default values. Investigate generated IPA file Investigate .app file inside IPA Investigate frameworks inside .app file. CFBundleShortVersionString of all the frameworks is 1.0.0
12
3
18k
Sep ’21