Post not yet marked as solved
I just upgraded to XCode15.3 and now all my projects with Assets are getting this compile error. I have tried removing DerivedData caches and rebooting but still get this error. Anyone else hit this problem with XCode 15.3? I was only Building for IOS 16.4 and 17.0.1 and Xcode 14.0 and 15.0
Build Error: Command CompileAssetCatalog failed with a nonzero exit code
*** Terminating app due to uncaught exception 'IBPlatformToolFailureException', reason: 'The tool closed the connection (AssetCatalogSimulatorAgent)
Execution Context:
<IBSimulatorToolCoreSimulatorCLIExecutionContext: 0x600003d5d260 busyCount=0, Idle for 0.0 secs, lifeTime=26.3 secs>, device=IBSimDeviceTypeiPad3x (865E7291-E467-4E8D-B535-D64F43A57F15, iOS 17.4, Shutdown), idiom=<IBIPhoneIdiom: 0x6000028b8000>
Post not yet marked as solved
I'm working on a large SDK of UI frameworks. We have hundreds of strings and an older implementation that resolves them by looking up the key in the main, then current (module) bundles. This allows clients to tailor strings and provide localisation for locales that we don't support.
I want to move to String Catalogs and have a way of doing that with a similar solution using LocalizedStringResource. But this seems pointless as I would like to have client String Catalogs show all strings from dependencies (our UI frameworks).
Stepping back a bit, the default API for LocalizedResources and Keys uses the main bundle and has bundle as a property but String Catalogs does not and cannot respect that (highlighted in this post). A possible Apple solution could be storing the module with the string in the String Catalog for that framework then the executable can correctly assess what strings it should include based on its dependencies String Catalogs.
I am looking for a way around this? Or any suggestions?
I believe it might be possible using a build tool plugin to generate the String Catalog for the clients from its dependency catalogs and this way I wouldn't need any trickery / can use the LocalizedResource API as is (main bundle).
Post not yet marked as solved
I'm using VScode to run flutter app on ios and macos. It showed this error. How can I solve this. I've been working on this with many ways but nothing can solve this.
Post not yet marked as solved
I am starting a new Xcode Project for macOS app. During the initial development I found that some part of the app should be shared between different targets like macOS App, Quick Look etc. The goal was to user Framework. By selecting Project in Project navigator and using the plus icon, I have created a new Framework target and called it Shared.
Next, in my App Project I have added it into the project and checked if it is correctly linked. The framework was Embedded and Signed. Both targets have the same Signing & Capabilities settings.
After I move a code into Shared framework it was time for first run. Unfortunately, the app is crashing instantly, and I am getting the error:
dyld[65044]: Library not loaded: @rpath/Shared.framework/Versions/A/Shared
Referenced from:
<2B03FB61-86B3-31E5-A2A4-F18F43AEC875> /Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/AppName e.app/Contents/MacOS/AppName
Reason: tried:
'/Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/Shared.framework/Versions/A/Shared'
(code signature in <DD201FE7-57E2-33B1-AD7C-E61BA1345673> '/Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/Shared.framework/Versions/A/Shared'
not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs),
'/Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/AppName.app/Contents/Frameworks/Shared.framework/Versions/A/Shared'
(code signature in <DD201FE7-57E2-33B1-AD7C-E61BA1345673> '/Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/AppName.app/Contents/Frameworks/Shared.framework/Versions/A/Shared'
not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs),
'/Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/AppName.app/Contents/Frameworks/Shared.framework/Versions/A/Shared'
(code signature in <DD201FE7-57E2-33B1-AD7C-E61BA1345673>
'/Users/{User}/Library/Developer/Xcode/DerivedData/AppName-fjfbylcqrxaiobgohprplbaohgbw/Build/Products/Debug/AppName.app/Contents/Frameworks/Shared.framework/Versions/A/Shared'
not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs)
The Team ID is set properly in Build Settings for both targets. The Bundle Identifier is different and the rest of the settings seems to be correct. I tried changing and juggling the settings related to signing the framework, but it didn't help.
I am totally lost without any other idea to fix it... I will be glad for some help.
Post not yet marked as solved
On my shop and content views of my app, I have a shopping cart SF symbol that I've modified with a conditional to show the number of items in the cart if the number of items is above zero. However, whenever I change tabs and back again, that icon disappears even though there should be an item in the cart.
I have a video of the error, but I have no idea how to post it. Here is some of the code, let me know if you need to see more of it:
CartManager.swift
import Foundation
import SwiftUI
@Observable class CartManager {
/*private(set)*/ var products: [Product] = []
private(set) var total: Int = 0
private(set) var numberofproducts: Int = 0
func count() -> Int {
numberofproducts = products.count
return numberofproducts
}
func addToCart(product: Product) {
products.append(product)
total += product.price
numberofproducts = products.count
}
func removeFromCart(product: Product) {
products = products.filter { $0.id != product.id }
total -= product.price
numberofproducts = products.count
}
}
ShopPage.swift
import SwiftUI
struct ShopPage: View {
@Environment(CartManager.self) private var cartManager
var columns = [GridItem(.adaptive(minimum: 135), spacing: 0)]
@State private var searchText = ""
let items = ["LazyHeadphoneBean", "ProperBean", "BabyBean", "RoyalBean", "SpringBean", "beanbunny", "CapBean"]
var filteredItems: [Bean] {
guard searchText.isEmpty else { return beans }
return beans.filter { $0.imageName.localizedCaseInsensitiveContains(searchText) }
}
var body: some View {
NavigationStack {
ZStack(alignment: .top) {
Color.white
.ignoresSafeArea(edges: .all)
VStack {
AppBar()
.environment(cartManager)
ScrollView() {
LazyVGrid(columns: columns, spacing: 20) {
ForEach(productList, id: \.id) { product in
NavigationLink {
beanDetail(product: product)
.environment(cartManager)
} label: {
ProductCardView(product: product)
.environment(cartManager)
}
}
}
}
}
.navigationBarDrawer(displayMode: .always))
}
}
.environment(cartManager)
}
var searchResults: [String] {
if searchText.isEmpty {
return items
} else {
return items.filter { $0.contains(searchText)}
}
}
}
#Preview {
ShopPage()
.environment(CartManager())
}
struct AppBar: View {
@Environment(CartManager.self) private var cartManager
var body: some View {
NavigationStack {
VStack (alignment: .leading){
HStack {
Spacer()
NavigationLink(destination: CartView()
.environment(cartManager)
) {
CartButton(numberOfProducts: cartManager.products.count)
}
}
Text("Shop for Beans")
.font(.largeTitle .bold())
}
}
.padding()
.environment(CartManager())
}
}
CartButton.swift
import SwiftUI
struct CartButton: View {
var numberOfProducts: Int
var body: some View {
ZStack(alignment: .topTrailing) {
Image(systemName: "cart.fill")
.foregroundStyle(.black)
.padding(5)
if numberOfProducts > 0 {
Text("\(numberOfProducts)")
.font(.caption2).bold()
.foregroundStyle(.white)
.frame(width: 15, height: 15)
.background(Color(hue: 1.0, saturation: 0.89, brightness: 0.835))
.clipShape(RoundedRectangle(cornerRadius: 50))
}
}
}
}
#Preview {
CartButton(/*numberOfProducts: 1*/numberOfProducts: 1)
}
Post not yet marked as solved
Hi, I use Xcode Instruments to Profile my app, but I don't know why Instruments can not find the right source code path, like the screensh ot shows, the path is wrong, what is ? it looks like a placeholder, is xcode forgetting to replace this placeholder with real file name?
anyone know how to fix this? thank you in advance
Post not yet marked as solved
Generating Pods project
[!] An error occurred while processing the post-install hook of the Podfile.
[Xcodeproj] Consistency issue: build setting `IPHONEOS_DEPLOYMENT_TARGET` has multiple values: `{"Release"=>"9.0", "Debug"=>"9.0", "Profile"=>"9.0", "Debug-production"=>"14.0", "Debug-internal"=>"14.0", "Release-production"=>"14.0", "Release-internal"=>"14.0"}`
I am on CocoaPods 1.15.2 and Xcode 15.3. I've looked through all of the build settings in Xcode, etc, and cannot find any references with the version numbers in the error message. All versions are the same across build types.
Has anyone ran into this issue running pod install?
Post not yet marked as solved
Hi!
imagine this
guard let foo = bar.baz else {
print("\(foo.value)")
return foo.value
}
I get Xcode error
String interpolation produces a debug description for an optional value; did you mean to make this explicit? with the fixing option: Use 'String(describing:)' to silence this warning
When I click Fix button I got:
guard let foo = bar.baz else {
print("\(foString(describing: o.value)"))
return foo.value
}
The automatic completion is broken. Is it a known bug or there is something wrong with me? ;)
Xcode version 15.3 (15E204a)
macOS Sonoma 14.4.1 (23E224)
Apple M1 Pro
Post not yet marked as solved
I got this SSML from w3. org. AVSpeechUtterance(ssmlRepresentation:) is not complying with the contour. It doesn't change hz.
<?xml version="1.0"?>
<speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
http://www.w3.org/TR/speech-synthesis11/synthesis.xsd"
xml:lang="en-US">
<prosody contour="(0%,+20Hz) (10%,+30%) (40%,+10Hz)">
good morning
</prosody>
</speak>
override func viewDidLoad() {
super.viewDidLoad()
guard let localUtterance = AVSpeechUtterance(ssmlRepresentation: self.speechSML) else {
print("SML did not work.")
return
}
self.utterance = localUtterance
self.utterance.voice = self.voiceNoelle
}
self.synthesizer.speak(self.utterance)
Post not yet marked as solved
Starting from Xcode 15.3, previously set custom fonts can no longer be found in XIB files. Sometimes they reappear after deleting and setting the font again, but after a while, they disappear again. Can Xcode please be more stable and considerate of the user experience we developers are trying to create? I'm really frustrated.
Post not yet marked as solved
as a long time macosx user (since NeXT), my favorite text editor is xcode.
this started recently. every time i open a .pdb (a protein data bank not a debug symbols file) in xcode, it shows an icon instead of text.
how do i set up to open .pdb files as PLAIN TEXT ??
it's really annoying to have to go to file inspector every time i open a .pdb file, scroll down multiple pages to select to "plain text"
i looked into xcode.app/contents/info.plist, nothing there
Post not yet marked as solved
Since version 14, Instruments cannot find the binary to show disassembly of executable or library.
It says: Error - Binary file for selected symbol is expected to be here: /Users/<user>/Library/Developer/Xcode/DerivedData/<project>/Build/Products/Release/<project>.
The thing is that the path shown by Instruments is actually the right one, and of course the binary exists in this directory.
Am I missing something somewhere ?
Post not yet marked as solved
Archive a package.
[Window] -> [Organizer] -> select package just archived -> click [Distribute App]
select [App Store Connect] -> click [Distribute] -> CRASH!
crash log
Process: Xcode [12835]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 15.3 (22618)
Build Info: IDEApplication-22618000000000000~2 (15E204a)
App Item ID: 497799835
App External ID: 863955376
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2024-04-15 11:05:05.6599 +0800
OS Version: macOS 14.4.1 (23E224)
Report Version: 12
Anonymous UUID: E74ED973-D26C-0B5C-FDB1-837215F4F6B9
Sleep/Wake UUID: 6627EBDD-D3B7-4988-B9E5-BEDB5E1ED228
Time Awake Since Boot: 92000 seconds
Time Since Wake: 11424 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: Xcode [12835]
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x194e6aa60 __pthread_kill + 8
1 libsystem_pthread.dylib 0x194ea2c20 pthread_kill + 288
2 libsystem_c.dylib 0x194dafa20 abort + 180
3 libswiftCore.dylib 0x1a4f049f4 swift::fatalErrorv(unsigned int, char const*, char*) + 128
4 libswiftCore.dylib 0x1a4f04a14 swift::fatalError(unsigned int, char const*, ...) + 32
5 libswiftCore.dylib 0x1a4f04be0 swift::swift_abortRetainUnowned(void const*) + 48
6 libswiftCore.dylib 0x1a4f08f10 swift_unownedRetainStrong + 140
7 SwiftUI 0x1c1cea47c 0x1c075f000 + 22590588
8 SwiftUI 0x1c1cea42c 0x1c075f000 + 22590508
9 AppKit 0x198c517d4 -[_NSQuickActionAutovalidationScheduler windowDidUpdate:] + 140
10 CoreFoundation 0x194f76b1c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
11 CoreFoundation 0x19500adb8 ___CFXRegistrationPost_block_invoke + 88
12 CoreFoundation 0x19500ad00 _CFXRegistrationPost + 440
13 CoreFoundation 0x194f45648 _CFXNotificationPost + 768
14 Foundation 0x196061464 -[NSNotificationCenter postNotificationName:object:userInfo:] + 88
15 CoreFoundation 0x194fadd4c -[NSArray makeObjectsPerformSelector:] + 212
16 AppKit 0x1987dccb4 -[NSApplication(NSWindowCache) _updateWindowsUsingCache] + 108
17 AppKit 0x1987dcc0c -[NSApplication updateWindows] + 64
18 AppKit 0x198c19a3c __38-[NSApplication setWindowsNeedUpdate:]_block_invoke_2 + 56
19 AppKit 0x198c1eb6c ___NSRunLoopObserverCreateWithHandler_block_invoke + 64
20 CoreFoundation 0x194f81254 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
21 CoreFoundation 0x194f81140 __CFRunLoopDoObservers + 536
22 CoreFoundation 0x194f8076c __CFRunLoopRun + 776
23 CoreFoundation 0x194f7fe0c CFRunLoopRunSpecific + 608
24 HIToolbox 0x19f71b000 RunCurrentEventLoopInMode + 292
25 HIToolbox 0x19f71ac90 ReceiveNextEventCommon + 220
26 HIToolbox 0x19f71ab94 _BlockUntilNextEventMatchingListInModeWithFilter + 76
27 AppKit 0x1987d8970 _DPSNextEvent + 660
28 AppKit 0x198fcadec -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
29 DVTKit 0x10313f858 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 300
30 AppKit 0x1987cbcb8 -[NSApplication run] + 476
31 DVTKit 0x10313eb24 -[DVTApplication run] + 60
32 AppKit 0x1987a2f54 NSApplicationMain + 880
33 dyld 0x194b1a0e0 start + 2360
Post not yet marked as solved
I’m currently developing an iOS application and I’ve encountered an issue with Xcode. Whenever I try to modify the Bundle Identifier of my application, Xcode crashes. The crash happens specifically when I click on the “Signing” option after changing the Bundle Identifier.
Here’s the error message I get: “The app identifier ‘com.BikeTest.BikeRoute’ cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.”
Then I changed ‘com.BikeTest.BikeRoute’ to 'com.wuwuma.BikePowerRoute',and xcode crashed.
I don’t have a paid Apple Developer account, and I’m wondering if this could be causing the issue. However, I believe I should still be able to modify the Bundle Identifier without Xcode crashing.
I’ve tried restarting Xcode and my computer, but the issue persists. I’m using Xcode version 15.2 on macOS 14.3.1.
Any help or suggestions would be greatly appreciated. Thank you!
Below is part of error log
Process: Xcode [48073]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 15.2 (22503)
Build Info: IDEApplication-22503000000000000~3 (15C500b)
App Item ID: 497799835
App External ID: 862131722
Code Type: X86-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2024-03-13 11:59:19.0371 +0800
OS Version: macOS 14.3.1 (23D60)
Report Version: 12
Bridge OS Version: 8.3 (21P3049)
Anonymous UUID: B3E5B466-52E3-9C6A-EDCA-8E3FA8DEAD88
Sleep/Wake UUID: 4CD9CCBF-B1F5-4EE3-B4F2-C1A2721F9579
Time Awake Since Boot: 190000 seconds
Time Since Wake: 2974 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: Xcode [48073]
Application Specific Information:
abort() called
Application Specific Signatures:
0
Kernel Triage:
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x7ff802fed7a2 __pthread_kill + 10
1 libsystem_pthread.dylib 0x7ff803025f30 pthread_kill + 262
2 libsystem_c.dylib 0x7ff802f44a49 abort + 126
3 IDEKit 0x114bd1bbb +[IDEAssertionHandler _handleAssertionWithLogString:assertionSignature:assertionReason:extraBacktrace:] + 1178
4 IDEKit 0x114bd20b7 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] + 1060
5 DVTFoundation 0x11108c527 _DVTAssertionHandler + 463
6 DVTFoundation 0x11108c737 _DVTAssertionFailureHandler + 306
7 DVTFoundation 0x110e659d0 -[DVTMacroDefinitionTable _setLiteralValue:forMacroName:conditionSet:wantsCheckForDVTMacroExpansionConformance:] + 522
8 DVTFoundation 0x110e67a18 -[DVTMacroDefinitionTable setObject:forKeyedSubscript:] + 239
9 DevToolsCore 0x120d9a992 __52-[PBXTarget _adjustBuildSettingsForProductSettings:]_block_invoke + 1502
10 CoreFoundation 0x7ff8030c6927 NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK + 7
11 CoreFoundation 0x7ff803103aae -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 246
12 DevToolsCore 0x120d9a31b -[PBXTarget _adjustBuildSettingsForProductSettings:] + 188
13 DevToolsCore 0x120d9acf8 -[PBXTarget writeProductSettings:configuration:] + 310
14 DevToolsCore 0x120d9b55f -[PBXTarget setProductSettings:configuration:] + 279
15 DevToolsCore 0x120d9cac8 -[PBXTarget setProductSetting:forKey:configuration:] + 402
16 DevToolsCore 0x121010e17 -[Xcode3TargetInfoPlistCoordinator setValue:forPlistSetting:] + 158
17 DevToolsCore 0x120fd95b7 -[Xcode3Target setBundleIdentifier:forConfigurationNamed:sdk:] + 221
18 IDEFoundation 0x10f9ebc78 __74-[IDEProvisionableManager setBundleIdentifier:forConfigurationsNamed:sdk:]_block_invoke + 376
19 IDEFoundation 0x10f9e9d84 -[IDEProvisionableManager delayEvaluationUntilAfterPerformingBlock:evaluateImmediately:] + 117
20 IDEFoundation 0x10f9ebac8 -[IDEProvisionableManager setBundleIdentifier:forConfigurationsNamed:sdk:] + 169
21 IDEFoundation 0x110094b40 SigningEditorMainProvisionable.bundleIdentifier.setter + 224
22 IDEFoundation 0x110094a4f @objc SigningEditorMainProvisionable.bundleIdentifier.setter + 63
23 Foundation 0x7ff8040639b3 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 705
24 Foundation 0x7ff80408daae -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 68
25 Foundation 0x7ff8040a9bd2 _NSSetObjectValueAndNotify + 273
26 Foundation 0x7ff80406e719 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 316
27 Foundation 0x7ff8040ac2a0 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 269
28 AppKit 0x7ff806937864 -[NSBinder _setValue:forKeyPath:ofObject:mode:validateImmediately:raisesForNotApplicableKeys:error:] + 440
29 AppKit 0x7ff80693765c -[NSBinder setValue:forBinding:error:] + 237
30 AppKit 0x7ff8072fc81e -[NSValueBinder _applyObjectValue:forBinding:canRecoverFromErrors:handleErrors:typeOfAlert:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert:] + 217
31 AppKit 0x7ff8072fcb30 -[NSValueBinder applyDisplayedValueHandleErrors:typeOfAlert:canRecoverFromErrors:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert:error:] + 544
32 AppKit 0x7ff8072fcc92 -[NSValueBinder _applyDisplayedValueIfHasUncommittedChangesWithHandleErrors:typeOfAlert:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert:error:] + 105
33 AppKit 0x7ff806a6153b -[NSValueBinder validateAndCommitValueInEditor:editingIsEnding:errorUserInterfaceHandled:] + 462
Post not yet marked as solved
I am woking on a project for a client and they have an individual apple developer account. They added me to their team as an admin sometime back but the team is still not showing up in Xcode. Only my personal team is visible. Is this because it's an Individual account? Any way to fix this? Appreciate your help.
Post not yet marked as solved
when switch branch in terminal, the package dependencies alway disappear. I have to restart Xcode to resolve this issue every time I switch the branch.
Post not yet marked as solved
I have an iOS (Swift/SwiftUI) project. It has several dependencies managed via SPM. When I build my project the dependencies disappear from the project navigator. I have to reset package cache to get them to return. After I build/run, they disappear again. Has anyone faced this issue?
I've tried deleting derived data
I've tried resetting package caches (this makes them return until the next build)
I'm using the latest stable Xcode release.
Post not yet marked as solved
Hello, im a new Apple developper since 2 years. I have Been working hard to learn and trying to publish my first IOS , iPad OS and Mac OS app.
My app is taking form but I have few problems with the Xcode simulator to run ''on device'' for my iPad and iPhone. My devices began to disconnect and now I can't connect it anymore to run my code and debug. the are constantly in the state ''Trying to reconnect to '' and "preparing device".
I have already reset all my device and deactivate developper mode etc.
i have a iPad 7th gen and an iPhone 14 Pro Max .
they both have iOS 17.5 beta 2 (trying to fix the problem by keeping those up to date as much as possible.)
my Xcode version is 15.4 beta
My Mac book air 13 inch 2018 is running Sonoma 14.4.1 and the is no new os version bus its not an apple M family chip. I think there is a Sonoma 14.5 beta version but for apple architecture.
I really need your help plz
Post not yet marked as solved
Hi,
For our app development company we are looking for a proper Mac Cloud solution, preferable M1 or M2. Anyone experiences with these providers? Anything to be taken into account? And which parties are in Europe available?
Post not yet marked as solved
DemoCode:
import SwiftUI
import UIKit
import PencilKit
class PencilKitViewController: UIViewController, PKCanvasViewDelegate, PKToolPickerObserver {
lazy var canvasView: PKCanvasView = {
let canvasView = PKCanvasView()
canvasView.drawingPolicy = .anyInput
canvasView.translatesAutoresizingMaskIntoConstraints = false
return canvasView
}()
lazy var toolPicker: PKToolPicker = {
let toolPicker = PKToolPicker()
toolPicker.showsDrawingPolicyControls = true
toolPicker.addObserver(self)
return toolPicker
}()
let drawing = PKDrawing()
override func viewDidLoad() {
super.viewDidLoad()
canvasView.drawing = drawing
canvasView.delegate = self
view.addSubview(canvasView)
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
canvasView.frame = view.bounds
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
toolPicker.setVisible(true, forFirstResponder: canvasView)
toolPicker.addObserver(canvasView)
canvasView.becomeFirstResponder()
}
// canvas
func canvasViewDrawingDidChange(_ canvasView: PKCanvasView) {
print("drawing")
}
func canvasViewDidFinishRendering(_ canvasView: PKCanvasView) {
}
func canvasViewDidEndUsingTool(_ canvasView: PKCanvasView) {
}
func canvasViewDidBeginUsingTool(_ canvasView: PKCanvasView) {
}
}
// UIRepresentable for SwiftUI
struct PencilKitView: UIViewControllerRepresentable {
class Coordinator {
var parentObserver: NSKeyValueObservation?
}
var onSubmit: ((UIImage?, Error?) -> Void)? = .none
func makeUIViewController(context: Context) -> PencilKitViewController {
let pencilKitViewController = PencilKitViewController()
context.coordinator.parentObserver = pencilKitViewController.observe(\.parent, changeHandler: { vc, _ in
})
return pencilKitViewController
}
func updateUIViewController(_ uiViewController: PencilKitViewController, context: Context) {
}
func makeCoordinator() -> Self.Coordinator { Coordinator() }
}
struct ContentView: View {
var onSubmit: ((UIImage?, Error?) -> Void)? = .none
var body: some View {
PencilKitView()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
iOS:
macCatalyst: