Posts

Sort by:
Post not yet marked as solved
0 Replies
12 Views
In session wwdc2023-10194 Design dynamic Live Activities at 04:53, it mentioned that we should use 'content replace transition' for animating in and out graphic elements and text. The video shows some kind of animation combined with blurring and opacity changes. But I can't seem to find code for doing this in SwiftUI or UIKit. Does anyone know the API to achieve this? 🤔 Thank you for your help!
Posted
by
Post not yet marked as solved
3 Replies
39 Views
I'm am planning to use CoreGraphics for its low-level functionality, so I wrote up a small snippet that I expected to work: #include <CoreGraphics/CoreGraphics.h> int main() { double rot = CGDisplayRotation(0); printf("Rotation %f\n", rot); return 0; } Unfortunately, it seems that the call CGDisplayRotation blocks. When I tried writing a similar snippet in XCode though, it works just fine but I will not be able to use XCode for unrelated reasons. Am I compiling incorrectly? Could this be a permission issue? I compiled with clang -Wall -framework CoreGraphics core.c -o core.o
Posted
by
Post not yet marked as solved
0 Replies
38 Views
I bought a MacBook Air M2 a few days ago. Today I started using Xcode 15 to learn iOS development. But as soon as I turn on the simulator, I notice that my mac gets very hot and drains a lot of battery. Is there any solution for that? I repeat the MacBook is brand new.
Posted
by
Post not yet marked as solved
0 Replies
18 Views
private struct TransactionItemsView: View { init(journal: Journal, budgetMode: Bool) { let journalID = journal.id! _entries = .init(filter: #Predicate { $0.journal!.id! == journalID }, sort: \.date, order: .reverse) // HERE: Query encountered an error: SwiftData.SwiftDataError(_error: SwiftData.SwiftDataError._Error.unsupportedPredicate) } @Query var entries: [Entry] ... } My model: // unimportant code like `init` is hidden @Model final class Journal { ... var id: UUID! @Relationship(deleteRule: .cascade, inverse: \Entry.journal) var entries: [Entry]! = [] } @Model final class Entry { ... @Relationship(deleteRule: .nullify) var journal: Journal! }
Posted
by
Post not yet marked as solved
1 Replies
36 Views
SwiftUI preview hangs on "Preparing iPhone Simulator for Previews". Also simulator hangs when trying to build and run. This occurred after I installed iOS 17 simulator. I tried reverting back to an iOS 16 version of the simulator, but haven't figured out how to do that. Build and run to an iPhone device works fine. Any ideas would be appreciated. Thanks.
Posted
by
Post not yet marked as solved
0 Replies
22 Views
annotation.js file [ { "filename": "image1.jpg", "annotations": ["terminal airport", "two people"] }, { "filename": "image2.jpg", "annotations": ["airport", "two people"] }, { "filename": "image3.jpg", "annotations": ["airport", "one person"] }, { "filename": "image4.jpg", "annotations": ["airport", "two people", "more people"] }, { "filename": "image5.jpg", "annotations": ["airport", "one person"] } ]
Posted
by
Post not yet marked as solved
0 Replies
18 Views
I followed the WWDC session and Im not able to add breakpoint to the Macro for my unit tests.
Posted
by
Post not yet marked as solved
0 Replies
20 Views
Hello, On Mac Intel I update to ventura 13.6 and I use command line tools with clang 15.0. I have a test making some computations. The compiled code with this last version of clang is 4X times slower. I don't understand why or the source of this regression my command line is : clang++ -Ofast -march=native -funroll-loops -flto -DNDEBUG -o a myprog No chance very slow 4 times slower than clang 13.0 . So I reverted to 13.0. Is there a way to improve the performance or should wait clang 16.0 or above ?
Posted
by
Post not yet marked as solved
0 Replies
25 Views
Sandbox: rsync.samba(7767) deny(1) file-read-data /Users/***********/Library/Developer/Xcode/DerivedData/PostalMapApp-gkhrsemmhkdxtdajrijrbopefuez/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/GoogleUserMessagingPlatform/UserMessagingPlatform.framework/Headers User Script Sandboxing をNoにしましたが、他のエラーが発生してしまった。 誰か解決方法を教えてください。
Posted
by
Post not yet marked as solved
1 Replies
63 Views
Hi everyone, I following 100 days of SwiftUI course , I used same idea of iExpense project exactly but without .sheet method, The list isn't updating when I add new item from AddView. struct MainView: View { var body: some View { TabView { ContentView() .tabItem { Image(systemName: "1.lane") Text("One") } AddView(expenses: Expenses()) .tabItem { Image(systemName: "2.lane") Text("Two") } } } } other codes same as iExpense project... How to fix that ? The project in GitHub: https://github.com/mahoozi97/iExpense-project Thanks in advance
Posted
by
Post not yet marked as solved
1 Replies
29 Views
Prior to updating, during development of my ios app with watch os companion app, the watch app would install itself onto the watch every time i built the ios app. Since updating, it no longer does this. No code has changed. I have tried resetting the watch, reconnecting, clearing support files, restarting, etc. Any one else been experiencing this? It totally breaks the development workflow.
Posted
by
Post not yet marked as solved
0 Replies
22 Views
https://docs-assets.developer.apple.com/published/a3e438f759/EqualizingAudioWithDiscreteCosineTransformsDCTs.zip Example builds but does not run properly under Sonoma (23A344) on MBP with Intel hardware. (drum beat sound track is not played) It does run properly under iPadOS 17.0.1 on iPad Air 5 (M1 chip)
Posted
by
Post marked as solved
3 Replies
45 Views
I've been stuck on this one for quite a while now, and I'm starting to become more and more convinced this is an issue with Xcode 15 Beta RC. Just to give you some context I seem to be getting the following crash after modifying my schema (adding new properties) for the the second time. Below is the crash that is occurring on my device & simulator. Unresolved error loading container Error Domain=NSCocoaErrorDomain Code=134130 "Persistent store migration failed, missing source managed object model." UserInfo={URL=file:///Users/xxxxx/Library/Developer/CoreSimulator/Devices/23B8CDDD-CC5F-4A1C-B0F4-CF89C77B7ECF/data/Containers/Data/Application/235A14D7-6492-439F-BB4D-B18498D80970/Library/Application%20Support/default.store, metadata={ NSPersistenceFrameworkVersion = 1327; NSStoreModelVersionChecksumKey = "dia3s8Q2+lqw669j9+RcPLQ+06yu0x6BBTZ4cXoQ1os="; NSStoreModelVersionHashes = { Category = {length = 32, bytes = 0x187754bb 36c51a62 85ede16f 4b2a3912 ... 57326030 2de7ef77 }; Item = {length = 32, bytes = 0xa7e4be4d ddd86d36 f71799b0 bc69dcb4 ... 83d47dfe d433fc01 }; }; NSStoreModelVersionHashesDigest = "G/Tk4lzyeNBXzf5+7qxbd+isF8uFnSaC5LtUCCkC8GQwaG1d9Di0eJ10NQEyPgwRczoYeYAMYG8ai4RooEhH9w=="; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers = ( "1.2.0" ); NSStoreType = SQLite; NSStoreUUID = "A99894EA-FA7B-4CA7-AEB7-6DEE42843EC0"; "_NSAutoVacuumLevel" = 2; }, reason=Can't find model for source store} I currently have 5 versions of my Schemas there's two of them Item Category Below is a minified changelog of what has changed between versions. Version 1 (Initial Version) Version 2 (Lightweight Migration - Property is renamed in Item) Version 3 (Custom Migration - New Property is added to Item both are bools) Version 4 (Custom Migration - New Property is added to Category which is a transformable) Version 5 (Custom Migration - New Property is added to Item which is a string) It's quite a large file with all of the version schema's etc so i've created a gist here for you to see all of the changes that have been made between Version 1 up until Version 5. The problem that I'm seeing is that between migration for V1 up until V4 everything is fine. It's only until SwiftData attempt to migrate V4 to V5 and I get the crash that I have provided above, and V5 only has a new string property which shouldn't be causing a crash since I've done 2 custom migrations that were all fine before V5 so this seems really strange even tho my migration plan is setup properly which you can see below. enum ToDosMigrationPlan: SchemaMigrationPlan { static var schemas: [VersionedSchema.Type] { [ToDosSchemaV1.self, ToDosSchemaV2.self, ToDosSchemaV3.self, ToDosSchemaV4.self, ToDosSchemaV5.self] } static var stages: [MigrationStage] { [ migrateV1toV2, migrateV2toV3, migrateV3toV4, migrateV4toV5 ] } // V1 to V2 static let migrateV1toV2 = MigrationStage.lightweight( fromVersion: ToDosSchemaV1.self, toVersion: ToDosSchemaV2.self ) // V2 to V3 static let migrateV2toV3 = MigrationStage.custom( fromVersion: ToDosSchemaV2.self, toVersion: ToDosSchemaV3.self, willMigrate: nil, didMigrate: { context in let items = try? context.fetch(FetchDescriptor<ToDosSchemaV3.Item>()) items?.forEach { item in item.isFlagged = false item.isArchived = false } try? context.save() }) static let migrateV3toV4 = MigrationStage.custom( fromVersion: ToDosSchemaV3.self, toVersion: ToDosSchemaV4.self, willMigrate: nil, didMigrate: { context in let categories = try? context.fetch(FetchDescriptor<ToDosSchemaV4.Category>()) categories?.forEach { category in category.color = UIColor(possibleColors.randomElement()!) } try? context.save() }) static let migrateV4toV5 = MigrationStage.custom( fromVersion: ToDosSchemaV4.self, toVersion: ToDosSchemaV5.self, willMigrate: nil, didMigrate: { context in // TODO: Handle setting some custom data here with defaults }) } Has anyone come across this or got any ideas as to what the problem may be?
Posted
by
Post not yet marked as solved
0 Replies
28 Views
Since Xcode Version 15.0 (15A240d) I can no longer use my iPhone as a network run destination. Connect via IP Address also does not work. USB works and the iPhone 7, iOS 15.7.9 is prepared for development. Restarting the iPhone or Mac Book Pro 2019 does not help. If I run Xcode 14, the phone is automatically prepared for development over the network and I can run and debug apps.
Posted
by
Post not yet marked as solved
1 Replies
35 Views
Sorry for the rudimentary question, SwiftData question.
In the case of Xcode standard sample code, @main struct SwiftDataTestProjectsApp: App { var sharedModelContainer: ModelContainer = { let schema = Schema([ Department.self,. ]) let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) do { return try ModelContainer(for: schema, configurations: [modelConfiguration]) } catch { fatalError("Could not create ModelContainer: \(error)") } }() var body: some Scene { WindowGroup { ContentView() } .modelContainer(sharedModelContainer) } } and create a ModelContainer for the Scene, #Preview { ContentView() .modelContainer(for: Item.self, inMemory: true) } However, if SwiftData is not used in the ContentView, and only if the transition is made to the other view using NavigationLink, as shown in the code below, a ModelContainer is created and a ModelContainer is specified for the ContentTwoView, If I want to specify a separate container for ContentTwoView, how should I create .modelContainer(sharedModelContainer) and specify .modelContainer(for: Item.self, inMemory: true)? Should I continue to create the ModelContainer for the Scene as before? Or is there a way to create it only for the specified View and specify it there? struct ContentView: View { var body: some View { NavigationStack { NavigationLink("ContentTwoView") { ContentTwoView()) } } } } struct ContentTwoView: View { @Environment(\.modelContext) private var modelContext @Query private var items: [Item]. var body: some View {
Posted
by
Post not yet marked as solved
0 Replies
23 Views
In Xcode 14, I had somewhat usable counterpart navigation available for the C++ files in my Swift package -- https://github.com/bradhowes/SF2Lib It was not perfect and would sometimes get confused, but from an include file I could use ^⌘↓ to show the related C++ file. Now in Xcode 15, this no longer works. When I click on the "Navigate to Related Items" icon in the editor window, it shows various files but the "Counterparts" entry is greyed out. I now have to use "Open Quickly", type a file name and locate the right one. I suspect this is due to my code layout and/or some missing setting in my Package.swift file that is not enabling this, but I am at a loss as to what it could be. I have erased the derived data for the project and rebuild everything from scratch. Everything builds and all test pass, but the Xcode navigation among related files is for now not working. Hope someone has a fix for this. Thanks! Brad
Posted
by
Post not yet marked as solved
0 Replies
30 Views
Since I started using XCode Cloud, my builds regularly failed due to networking issues, which is really just embarrassing. How can a company like Apple, which praises itself with a high-quality standard, ***** this up so badly? However, since two months ago literally every single build started failing for "connection reset by peer" My ci_post_clone.sh runs this code and surprisingly enough that step succeeds most of the time. #!/usr/bin/env bash set -e brew install cocoapods curl -s "https://get.sdkman.io" | bash source "$HOME/.sdkman/bin/sdkman-init.sh" sdk install java 20.0.1-tem # cd into actual project root cd ../../../ ./gradlew app:ios:podinstall However in the archive task the errors start rolling in 2023-08-30T22:27:24.108163427Z Could not resolve com.google.devtools.ksp:symbol-processing-api:1.9.0-1.0.11. 2023-08-30T22:27:24.108168428Z > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/devtools/ksp/symbol-processing-api/1.9.0-1.0.11/symbol-processing-api-1.9.0-1.0.11.pom'. 2023-08-30T22:27:24.108173676Z > Could not GET 'https://repo.maven.apache.org/maven2/com/google/devtools/ksp/symbol-processing-api/1.9.0-1.0.11/symbol-processing-api-1.9.0-1.0.11.pom'. 2023-08-30T22:27:24.108181057Z > Got socket exception during request. It might be caused by SSL misconfiguration 2023-08-30T22:27:24.108186894Z > Connection reset by peer 2023-08-30T22:27:24.108206745Z Could not resolve com.google.devtools.ksp:symbol-processing-api:1.9.0-1.0.11. 2023-08-30T22:27:24.108213605Z > 2023-08-30T22:27:24.108219500Z Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/devtools/ksp/symbol-processing-api/1.9.0-1.0.11/symbol-processing-api-1.9.0-1.0.11.pom'. 2023-08-30T22:27:24.108234940Z > 2023-08-30T22:27:24.108239423Z Could not GET 'https://dl.google.com/dl/android/maven2/com/google/devtools/ksp/symbol-processing-api/1.9.0-1.0.11/symbol-processing-api-1.9.0-1.0.11.pom'. 2023-08-30T22:27:24.108662595Z Got socket exception during request. It might be caused by SSL misconfiguration 2023-08-30T22:27:24.108669328Z 2023-08-30T22:27:24.108716268Z 2023-08-30T22:27:24.108725059Z > 2023-08-30T22:27:24.108732903Z Connection reset by peer 2023-08-30T22:27:24.108740596Z 2023-08-30T22:27:24.108748688Z > 2023-08-30T22:27:24.108759002Z Could not resolve com.google.devtools.ksp:symbol-processing-api:1.9.0-1.0.11. 2023-08-30T22:27:24.108820147Z > 2023-08-30T22:27:24.108829571Z Could not get resource 'https://maven.pkg.jetbrains.space/public/p/compose/dev/com/google/devtools/ksp/symbol-processing-api/1.9.0-1.0.11/symbol-processing-api-1.9.0-1.0.11.pom'. 2023-08-30T22:27:24.108837310Z > 2023-08-30T22:27:24.108844471Z Could not GET 'https://maven.pkg.jetbrains.space/public/p/compose/dev/com/google/devtools/ksp/symbol-processing-api/1.9.0-1.0.11/symbol-processing-api-1.9.0-1.0.11.pom'. 2023-08-30T22:27:24.108860417Z 2023-08-30T22:27:24.108866956Z > Got socket exception during request. It might be caused by SSL misconfiguration So because it is highly unlikely or actually statistically impossible that repo.maven.apache.org, dl.google.com and maven.pkg.jetbrains.space all always decide to crash simultaneously whenever I run an XCode build for the past 3 months, this has to be an issue on their part. Did they suddenly stop allowing internet connections in the archive step? Apple Support was just useless and aksed for irrelevant and impossible information like: my browser my ipa file (of a failing build?!) Does anyone have any idea what causes this or has contacts to someone at apple which can fix this?
Posted
by
Learn More about - WWDC22.

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all