Posts

Sort by:
Post not yet marked as solved
0 Replies
9 Views
A few months back, I launched an app that operated solely on a local level. Recently, I've begun the process of integrating it with CloudKit, and so far, the model integration has been successful. I've utilized SwiftData for this task, making it relatively straightforward to adjust the models, as shown below: ` @Relationship(deleteRule: .cascade, inverse: \ItemForCategory.category) var itemForCategory : [ItemForCategory]? = [ItemForCategory]() ` In my initial version of the code, the widget functioned perfectly. However, I've encountered an error recently stating Missing return in instance method expected to return 'ItemForCategory?'. @MainActor private func getLastItem () -> ItemForCategory? { guard let modelContainer = try? ModelContainer(for: Category.self) else { return nil } let descriptor = FetchDescriptor<Category>() let appCategories = try? modelContainer.mainContext.fetch(descriptor) let lastItem = appCategories?.compactMap { $0.itemForCategory }.last return lastItem } The error surfaces at the return line of code. I'm hopeful that someone can assist me in resolving this issue. Thank you very much.
Posted
by
Post not yet marked as solved
0 Replies
3 Views
I am new to swift. This is my Item.swift. import SwiftData @Model final class Item: Codable { var id: String var soundId: String var soundAppleId: String var soundType: String var type: String var authorId: String var text: String var createdAt: Date var actionsCount: Int var chainsCount: Int var rating: Int var loved: Bool var replay: Bool var heartedByUser: Bool @Relationship var author: Author? init(id: String, soundId: String, soundAppleId: String, soundType: String, type: String, authorId: String, text: String, createdAt: Date, actionsCount: Int, chainsCount: Int, ratings: Int, loved: Bool, replay: Bool, heartedByUser: Bool, author: Author) { self.id = id self.soundId = soundId self.soundAppleId = soundAppleId self.soundType = soundType self.type = type self.authorId = authorId self.text = text self.createdAt = createdAt self.actionsCount = actionsCount self.chainsCount = chainsCount self.rating = ratings self.loved = loved self.replay = replay self.heartedByUser = heartedByUser self.author = author } private enum CodingKeys: String, CodingKey { case id case soundId = "sound_id" case soundAppleId = "sound_apple_id" case soundType = "sound_type" case type case authorId = "author_id" case text case createdAt = "created_at" case actionsCount = "actions_count" case chainsCount = "chains_count" case rating case loved case replay case heartedByUser case author } required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decode(String.self, forKey: .id) soundId = try container.decode(String.self, forKey: .soundId) soundAppleId = try container.decode(String.self, forKey: .soundAppleId) soundType = try container.decode(String.self, forKey: .soundType) type = try container.decode(String.self, forKey: .type) authorId = try container.decode(String.self, forKey: .authorId) text = try container.decode(String.self, forKey: .text) let dateString = try container.decode(String.self, forKey: .createdAt) let formatter = DateFormatter() formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" if let date = formatter.date(from: dateString) { createdAt = date } else { throw DecodingError.dataCorruptedError(forKey: .createdAt, in: container, debugDescription: "Date string does not match format expected by formatter.") } actionsCount = try container.decode(Int.self, forKey: .actionsCount) chainsCount = try container.decode(Int.self, forKey: .chainsCount) rating = try container.decode(Int.self, forKey: .rating) loved = try container.decode(Bool.self, forKey: .loved) replay = try container.decode(Bool.self, forKey: .replay) heartedByUser = try container.decode(Bool.self, forKey: .heartedByUser) author = try container.decode(Author.self, forKey: .author) } func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(id, forKey: .id) try container.encode(soundId, forKey: .soundId) try container.encode(soundAppleId, forKey: .soundAppleId) try container.encode(soundType, forKey: .soundType) try container.encode(type, forKey: .type) try container.encode(authorId, forKey: .authorId) try container.encode(text, forKey: .text) let formatter = DateFormatter() formatter.dateFormat = "yyyy-MM-dd" let dateString = formatter.string(from: createdAt) try container.encode(dateString, forKey: .createdAt) try container.encode(actionsCount, forKey: .actionsCount) try container.encode(chainsCount, forKey: .chainsCount) try container.encode(rating, forKey: .rating) try container.encode(loved, forKey: .loved) try container.encode(replay, forKey: .replay) try container.encode(heartedByUser, forKey: .heartedByUser) try container.encode(author, forKey: .author) } } @Model final class Author: Codable { var id: String var image: URL var username: String var bio: String? init(id: String, image: URL, username: String, bio: String?) { self.id = id self.image = image self.username = username self.bio = bio } private enum CodingKeys: String, CodingKey { case id case image case username case bio } required init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decode(String.self, forKey: .id) image = try container.decode(URL.self, forKey: .image) username = try container.decode(String.self, forKey: .username) bio = try container.decodeIfPresent(String.self, forKey: .bio) } func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(id, forKey: .id) try container.encode(image, forKey: .image) try container.encode(username, forKey: .username) try container.encodeIfPresent(bio, forKey: .bio) } } In my ItemView when I try to access something inside author, Swift preview crashes. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 SwiftData 0x1cb459e90 0x1cb3d3000 + 552592 1 SwiftData 0x1cb45ba7c 0x1cb3d3000 + 559740 2 SwiftData 0x1cb45e5f8 0x1cb3d3000 + 570872 3 SwiftData 0x1cb4190e4 0x1cb3d3000 + 286948 4 audition 0x100b436e0 Item.author.getter + 320 (@__swiftmacro_8audition4ItemC6author18_PersistedPropertyfMa_.swift:9) 5 ContentView.1.preview-thunk.dylib 0x105f23a20 closure #1 in closure #1 in closure #1 in closure #1 in ItemCard.__preview__body.getter + 820 (ContentView.swift:89) 6 SwiftUI 0x1cba41308 0x1cb47b000 + 6054664 7 ContentView.1.preview-thunk.dylib 0x105f22ee4 closure #1 in closure #1 in closure #1 in ItemCard.__preview__body.getter + 472 (ContentView.swift:84) 8 SwiftUI 0x1cc2e6c40 0x1cb47b000 + 15121472 9 ContentView.1.preview-thunk.dylib 0x105f228b8 closure #1 in closure #1 in ItemCard.__preview__body.getter + 388 (ContentView.swift:83) ...
Posted
by
Post not yet marked as solved
0 Replies
11 Views
I need to obtain the user's EID within my app. We are a mobile network operator and have also applied for Apple's eSIM development. Does Apple provide a certified developer access to an API for obtaining EID? I understand that there is no public API available, but I'm unsure if approved operators can access EID. If so, how can I apply for this private API?
Posted
by
Post not yet marked as solved
0 Replies
17 Views
概述 应用的数据中心在海外 群名称:”CDC 大家樂集團 體驗群“ 群成员A、群成员B、群成员C 问题描述: ”CDC 大家樂集團 體驗群“聊天群里的成员A给成员C发群消息,C可以收到推送消息; 成员B给C发消息,C收不到推送消息;C不是一直都收不到B的消息,而是频繁出现收不到的情况。 B给C发送消息时,服务端调用APNs服务报异常:Notification rejected by the APNs gateway。 麻烦帮查一下是什么原因导致的服务端调用APNs服务报异常。
Posted
by
Post not yet marked as solved
0 Replies
14 Views
How do GPS lat and lon get written to .MOV files on iPhones? Is it programmed to export the coordinates as soon as you press record, when you press end, some other time? If you are recording and walking or driving what location will the GPS affix to the file? I thank you all so much for your time and help. It appears that this is the file that the location gets written to? com.apple.quicktime.location.ISO6709
Posted
by
Post not yet marked as solved
1 Replies
29 Views
When I search for "recipes", my app should come up, but it doesn't show in the list anywhere. I've tried a bunch of different keywords and even put 'recipes' in the title-still nothing. It's not even last in the list when I scroll through the 50+ recipe apps... I can type in the name of my app (morphood) and it finds it, but how is that useful? I am trying to get new people to find my app who are looking for "AI, Recipes, Ingredients, Nutrition, Cooking, Diet, Food, Health, Keto, Gluten-Free, Vegan, Compare" If you know the name of the app, then you already know about it.... Any help would be appreciated
Posted
by
Post not yet marked as solved
0 Replies
21 Views
The model name of my iPhone is SE3, and the iOS version is 17.3.1. Also, I am using a Samsung laptop with Windows 11. I uploaded photos from my iPhone to my laptop using an 8-pin USB. But the photo folder address is strange. It's written in unknown Chinese. -> f䴀M* This is the file name. It says 0 bytes out of 257TB are available. My iPhone has 6 4GB. Do you know what file that is?
Posted
by
Post not yet marked as solved
0 Replies
26 Views
Hello, This is the first time for me as a developper that I have to work deeply on Xcode, I am a Unity / Unreal developper. I am experiencing a bug, And I cannot have access to the call stack, because the bug is not a crash, it is not blocking the app, and I do not have access to the related Files. When I try to use the VisionOS simulator, I see the debugger print this : " MEMixerChannel.cpp:1006 MEMixerChannel::EnableProcessor: failed to open processor type 0x726f746d AURemoteIO.cpp:1162 failed: -10851 (enable 1, outf< 2 ch, 0 Hz, Float32, deinterleaved> inf< 1 ch, 44100 Hz, Int16>) MEMixerChannel.cpp:1006 MEMixerChannel::EnableProcessor: failed to open processor type 0x726f746d " thus, I cannot put a breakpoint here (MEMixerChannel.cpp), because I don't have access to this file... Kind regards.
Posted
by
Post not yet marked as solved
0 Replies
25 Views
Hi Team, We were using Xcode 14 and were getting feedback for the builds submitted to Testflight. We recently moved to Xcode 15. After this movement, we stopped getting the review feedback when we are submitting the app to Testflight. Please suggest. This is happening with one particular application's submission.
Posted
by
Post not yet marked as solved
0 Replies
27 Views
In our app we use the following function for inverting a CGImageRef using vImage. The workflow is a obj-c version of the code in the AdjustingTheBrightnessAndContrastOfAnImage sample from Apple: CGImageRef InvertImage( CGImageRef frameImageRef ) { CGImageRef resultImage = nil; CGBitmapInfo imgBitmapInfo = CGImageGetBitmapInfo( frameImageRef ); size_t img_bPC = CGImageGetBitsPerComponent( frameImageRef ); size_t img_bPP = CGImageGetBitsPerPixel( frameImageRef ); vImage_CGImageFormat invIFormat; invIFormat.bitsPerComponent = img_bPC; invIFormat.bitsPerPixel = img_bPP; invIFormat.colorSpace = (img_bPP == 8) ? gDeviceGrayColorSpaceRef : gDeviceRGBColorSpaceRef; invIFormat.bitmapInfo = imgBitmapInfo; invIFormat.version = 0; invIFormat.decode = 0; invIFormat.renderingIntent = kCGRenderingIntentDefault; vImage_Buffer sourceVImageBuffer; vImage_Error viErr = vImageBuffer_InitWithCGImage( &sourceVImageBuffer, &invIFormat, nil, frameImageRef, kvImageNoFlags ); if (viErr == kvImageNoError) { vImage_Buffer destinationVImageBuffer; viErr = vImageBuffer_Init( &destinationVImageBuffer, sourceVImageBuffer.height, sourceVImageBuffer.width, img_bPP, kvImageNoFlags ); if (viErr == kvImageNoError) { float linearCoeffs[2] = { -1.0, 1.0 }; float expoCoeffs[3] = { 1.0, 0.0, 0.0 }; float gamma = 0.0; Pixel_8 boundary = 255; viErr = vImagePiecewiseGamma_Planar8( &sourceVImageBuffer, &destinationVImageBuffer, expoCoeffs, gamma, linearCoeffs, boundary, kvImageNoFlags ); if (viErr == kvImageNoError) { CGImageRef newImgRef = vImageCreateCGImageFromBuffer( &destinationVImageBuffer, &invIFormat, nil, nil, kvImageNoFlags, &viErr ); if (viErr == kvImageNoError) resultImage = newImgRef; } free( destinationVImageBuffer.data ); } free( sourceVImageBuffer.data ); } return resultImage; } The function works fine for 8-bit monochrome images. When I try it with 24-bit RGB images, although I get no errors from any of the calls, the output shows only the 1/3 of the image inverted as expected. What am I missing? I suspect I might have to use a different function for 24-bit images (instead of the vImagePiecewiseGamma_Planar8) but I cannot find which one in the headers. Thanks.
Posted
by
Post not yet marked as solved
0 Replies
31 Views
Hi all, I'm attempting to generate an XCFramework that must maintain ABI stability. The framework is created from an SPM using the attached script generate-FK.sh. I does not work. Removing the flag BUILD_LIBRARY_FOR_DISTRIBUTION=YES and adding the flag -allow-internal-distribution to xcodebuild -create-xcframework everything is fine. Despite this resolves the problem, it results in the generated module not being ABI stable. However, when attempting the script approach, it generates the XCFramework but when used it raises an error in arm64-apple-ios-private.swiftinterface with no such file or module as soon as it encounters an import statement for ModuleX reading it. The package structure is attached as Package.swift and te obtained result XCFramework structure is as follows: MyLibrary.xcframework ├── Info.plist ├── ios-arm64 │ └── MyLibrary.framework │ ├── Headers │ │ ├── ModuleH-Swift.h │ │ ├── ModuleH.modulemap │ │ ├── ModuleC-Swift.h │ │ ├── ModuleC.modulemap │ │ ├── ModuleA-Swift.h │ │ ├── ModuleA.modulemap │ │ ├── MyLibrary-Swift.h │ │ └── MyLibrary.modulemap │ ├── Info.plist │ ├── Modules │ │ └── MyLibrary.swiftmodule │ │ ├── arm64-apple-ios.abi.json │ │ ├── arm64-apple-ios.swiftdoc │ │ └── arm64-apple-ios.swiftmodule │ └── MyLibrary └── ios-arm64_x86_64-simulator └── MyLibrary.framework ├── Headers │ ├── ModuleH-Swift.h │ ├── ModuleH.modulemap │ ├── ModuleC-Swift.h │ ├── ModuleC.modulemap │ ├── ModuleA-Swift.h │ ├── ModuleA.modulemap │ ├── MyLibrary-Swift.h │ └── MyLibrary.modulemap ├── Info.plist ├── Modules │ └── MyLibrary.swiftmodule │ ├── arm64-apple-ios-simulator.abi.json │ ├── arm64-apple-ios-simulator.swiftdoc │ ├── arm64-apple-ios-simulator.swiftmodule │ ├── x86_64-apple-ios-simulator.abi.json │ ├── x86_64-apple-ios-simulator.swiftdoc │ └── x86_64-apple-ios-simulator.swiftmodule ├── MyLibrary └── _CodeSignature └── CodeResources It's worth mentioning that the library must be compatible with both Objective-C and Swift, and Modules A, C, and H are imported into the MyLibrary module as @_exported modules, that is why I've included the headers and module maps. What is wrong? Thank you in advance for your assistance. Files: generate-FK.sh Package.swift
Posted
by
Post not yet marked as solved
0 Replies
56 Views
Hi, I am running into an error on XCode 15 (iOS 17+). When I am trying to play an iframe on the app. I see this error popup. Warning: -[BETextInput attributedMarkedText] is unimplemented Failed to request allowed query parameters from WebPrivacy. How do I fix this issue? I never saw this before so I am sure it is new. The app use to run fine as well.
Posted
by
Post not yet marked as solved
0 Replies
35 Views
Both view and modifier versions of the FamilyActivityPicker crash randomly when selecting some items (usually the other option) throwing these in the console: [com.apple.FamilyControls.ActivityPickerExtension(1150.1)] Connection to plugin invalidated while in use AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:22091 ( 0 AXRuntime 0x00000001c603b0fc _AXGetPortFromCache + 800 1 AXRuntime 0x00000001c603cce0 AXUIElementPerformFencedActionWithValue + 700 2 UIKit 0x0000000230de3ec8 DDE6E0C5-2AC3-3C73-8CFE-BC88DE35BB5F + 1453768 3 libdispatch.dylib 0x0000000103ef0b98 _dispatch_call_block_and_release + 32 4 libdispatch.dylib 0x0000000103ef27bc _dispatch_client_callout + 20 5 libdispatch.dylib 0x0000000103efa66c _dispatch_lane_serial_drain + 832 6 libdispatch.dylib 0x0000000103efb408 _dispatch_lane_invoke + 408 7 libdispatch.dylib 0x0000000103f08404 _dispatch_root_queue_drain_deferred_wlh + 328 8 libdispatch.dylib 0x0000000103f07a38 _dispatch_workloop_worker_thread + 444 9 libsystem_pthread.dylib 0x00000001f0824f20 _pthread_wqthread + 288 10 libsystem_pthread.dylib 0x00000001f0824fc0 start_wqthread + 8 ) This also happens in production apps like the Opal. The questions are: At least how to detect it to be able to manually reload the sheet (like what Opal does and shows an alert when this happens) How to prevent it in the first place? I really appreciate any help you can provide.
Posted
by
Post not yet marked as solved
0 Replies
34 Views
THE ISSUE - Hi there guys we have been through documentation and gone back and forth on forums and we can not get universal links / Deep link to work for us. OUR SETUP - We are running Flutter and are looking to post images from the Gallery into the app only issue is it does not pick up the page its meant to open once the share button is clicked. We have tired all the steps meticulously and still can not get it to work. Are they any known issues with this ?
Posted
by
Post not yet marked as solved
0 Replies
50 Views
Obviously I am a developer, I was also one back in the day with Borland when they came out with great alternatives to Microsoft! Back then we had two people in a garage trying to develop a tinkerer version of this revolutionary small version of a device to rival the big bucks vaz and huge mainframes. Prts were cheap, we didn’t have disk drives, just tapes. And in concert with someone with Apple in charlotte We d v loped a contacts database to be saved on tape. Then later with Borland I met with a developer to install the correct hp laser jet driver to print. I was main online Compuserve to support a programmable word processor which had its own language. then the Internet came, RjJ Reynolds donated multimultiple lIBM IPCs to our ham club, Grinos came out in C, so I modified it for packet radio across th the repeaters in NC. So I left law school and went working on an Apple //e at a local retailer. I’d replace power supplies and graphics chips for 16 and 64 k computers, occasionally the accountant who needed amore screen. All great but bills were just bareable at that income level. Like the Raspberry Pi’s of today (which I just created. again unfortunately my MacBook Pro 16” display developed a screen went south but plugging in an hdmi to close monitor works, almost. So I call Apple support send me to Greensboro Apple Genius Bar because I have AppleCare, but she continently forg ts to write that in her notes. So when I’m at the store, the do find an issue with my brand new iPhone 15 with AppleCare but I have no proof so they will fix my MacBook Pro. My main development machine. I just published a new apple book last month on it. im 66 now in impermanent housing trying to make myself worthwhile to the community, yet I can’t. I can at best submit a formal complaint to Apple and “hope it gets to the right channels” just like when the first Apple Music rollout deleted 4000 songs because they weren’t in iTunes Match. Apple sent two puzzled techs out for Pinkerton had thousands of followers, but not me. I got from executive support “ we don’t need user input”. And it’s now true: woz is gone, all feedback goes to a robot and the live people ”forget to write down crucial info”. so it all boils down to how will I learn swift with Xcode and use the 15 to upload to the Vision Pro (when I can afford it) when even the newest Mac beta was too big to fit on my MacBook Pro with moving files to the cloud.
Posted
by
Post not yet marked as solved
2 Replies
58 Views
While this isn't an issue directly related with programming, I would like to share my frustration with Apple Care and their knowledge of how App Store and third-party apps work. Perhaps someone at Apple can do something about it. Every now and then a user of one of my apps contacts me asking why they get an error when downloading or updating the app in the App Store ("Unable to Download App. “App” could not be installed. Please try again later."). I tell them that third-party developers have no power over the App Store or its download/update process, and this is an issue they have to solve with Apple Care. But when they contact Apple Care, they are told that since it's an issue with a third-party app, they have to contact the app developer. Sometimes the user is more inclined to believe what Apple Care tells them and they get angry at me. In any case, I feel helpless and frustrated, because I would love to help them, but have no means of doing so. There is something about the concept of App Store that makes some users believe that third-party developers have more power than they actually have: sometimes, for example, users contact me directly, or even leave reviews on the App Store, asking for a refund, which of course only Apple can do. Have you had a similar experience? Can some engineer at Apple instruct Apple Care that third-party developers cannot help with App Store download/update issues, so that App Store users don't get mad at the app developers for not being able to install/update their app?
Posted
by
Post not yet marked as solved
0 Replies
37 Views
We have a food delivery app. Now we want to add a prize competition. After every three successful orders, an entry will be created for the users. User can have unlimited entries. Now I am not sure if these requirements comply with AppStore especially No purchase necessary .
Posted
by
Post not yet marked as solved
0 Replies
50 Views
This app or its metadata appears to be misrepresenting itself as another popular app or game already available on the App Store, from a developer's website or distribution source, or from a third-party platform. Apps should be unique and should not attempt to deceive users into thinking they are downloading something they are not.... I have faced multiple rejections for my app due to the same issue. However, the Apple reviewer has not provided any specific information about where the issue lies, making it difficult for me to address it. In the subsequent steps, I was instructed to thoroughly review the app store review guidelines and ensure compliance with them, which I have done. I have also reached out to the app review team but have not received a response yet. It is frustrating that the email does not mention the exact content that is being considered as copied. It feels like a generic message, and I am unsure about the next course of action. If anyone has been in a similar situation or has insights into what might be happening, I would greatly appreciate your input. Thank you.
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all