Welcome to the Apple Developer Forums

Post your questions, exchange knowledge, and connect with fellow developers and Apple engineers on a variety of software development topics.

For questions about using Apple hardware and services, visit Apple Support Communities

Posts

Sort by:
Post not yet marked as solved
27 Replies
12k Views
Hello,I have an app available on iPhone, iPad, iPod Touch, that is dowloaded a maximum a few times per day.On 20 July, there was a peak on iTunes Connect sales report, with 10K downloads! All the downloads were on Desktop platform, and only 4 iPad and 6 iPhone.The next day, the downloads returned to normal levels, no more Desktop download.What is the explanation for these 10K Desktop downloads? A bug in iTunes Connect?Thanks,Patrick
Posted
by Patr1ck.
Last updated
.
Post not yet marked as solved
2 Replies
56 Views
HI - I'm trying to implement a Barnes-Hut N-Body simulation code in Metal. The code requires construction of a tree. The CUDA implementation uses locks to allow insertion of new nodes into the tree. I've tried using an array of atomic ints in a test case, but this doesn't seem to work: kernel void binning_compute_function( device MyArgument *arg1 [[ buffer(0)]],        constant float *ranarr      [[ buffer(1) ]],         device volatile atomic_int *flagArr [[ buffer(2) ]],         device int *bins [[buffer(3)]],          uint   index [[ thread_position_in_grid ]]) {     int expected=0;     int ibin = (ranarr[index] * arg1->nbins);     for (int i = 0; i < 100000000; i++) { // Lock         expected = 0;         bool test = !atomic_compare_exchange_weak_explicit(&flagArr[ibin],&expected,1,memory_order_relaxed,memory_order_relaxed);         if (test) {             bins[ibin] += 1;             atomic_store_explicit(&flagArr[ibin], 0, memory_order_relaxed);             break;         }     } } Any other suggestions? The alternative is to use the CPU for this, but seems a shame to miss out on the processing power of the GPU. Thank you, Colin
Posted
by mcgillca.
Last updated
.
Post not yet marked as solved
3 Replies
46 Views
Hello everyone, I'm new as iOS developper, and I'm facing a WebSocket error due to my certificate... Error Name : errSSLXCertChainInvalid Error Code : -9807 I have a server on a device, on which I want to start a secure WebSocket communication (wss://10.0.1.1:8080/). The server has my certificate .pem and works very well with my android App. When I choose Debug in Xcode buildConfiguration, there is no problem for the WebSocket communication (I think Debug doesn't check certificate during the Handshake process). But when I choose Release, I have the error because I didn't add the certificate on the iOS App. I don't really know how to add it properly... But, I also tried to disable HTTPS checks (ATS) : <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict> but that din't work either. If anyone can help me? Thank you
Posted Last updated
.
Post not yet marked as solved
0 Replies
17 Views
Do i need SwiftUI to register a listener and display StoreKit messages in iOS 16? Or can it be done without SwiftUI? Maybe just Swift or even Objective-C? What's new with in-app purchase - WWDC22 - Videos - Apple Developer https://developer.apple.com/wwdc22/10007 https://developer.apple.com/documentation/swiftui/environmentvalues/displaystorekitmessage/
Posted Last updated
.
Post marked as solved
31 Replies
40k Views
Hi Dev Team, I don’t see many answers on this topic but this seems to be a real concern for many users. I went from my IPhone 8+ with 256gb and I had 39gb used, about 7gb was other storage no big deal. I decided to go with an iPhone 12 Pro Max 128gb. I now have 60gb used of which 26gb is other storage!!! I have done 3 clean installs from different iCloud backups and no change. I do not buy an iPhone to see half of my storage being used by other and system storage. Also I do not explain why I now see some gb with photos and messages as it is normally all stored on iCloud (I have 2.2tb). Same thing I do not subscribe to iCloud or AppleOne to have data store on my iPhone while it should be all on iCloud. I did not have this on my 8+. I called Apple but they were clueless...simply telling me that it is normal and that it may take a few days for things to get back to normal...it is not true. is that a bug? My iPhone flash memory corrupted?Will this be taken into consideration? Anyone else having this issue please post. Thanks much! X
Posted
by MacGiver.
Last updated
.
Post not yet marked as solved
4 Replies
3.2k Views
Hello everyone, Is there a way to make an application widget like button appears all the time, even on the home screen. I want to make a floating button which will appear on top of all the apps. I want to build an application similar to assistive which will appear on home screen and on top of other apps.
Posted Last updated
.
Post not yet marked as solved
3 Replies
865 Views
I have a UIViewRepresentable inside my ContentView as well as other SwiftUI views.When the UIViewRepresentable is touched or any SwiftUI view is receiving a gesture independently, the views respond as expected.While I am touching the UIViewRepresentable, I can still still adjust the SwiftUI views (they still accept gestures).HOWEVER, while I am doing a gesture on a SwiftUI, I cannot receive touch events on my UIViewRepresentable. I need to be able to do this.There is no overlap between any of the views (they are not graphically blocking each other).I can adjust multiple SwiftUI views at the same time, why can't I also adjust a UIViewRepresentable at the same time?My UIViewRepresentable is a musical keyboard. My SwiftUI views adjust the sound played. I need to be able to interact with both at the same time regardless of which was pressed first.
Posted Last updated
.
Post not yet marked as solved
1 Replies
40 Views
I am trying to deduplicate data created by NSPersistentCloudKitContainer in my app. I have a universal app, with Share Extensions on both macOS and iOS. On each platform I share a store between the app and the extension with an App Group. The app and the extensions are both configured to sync to CloudKit. (This means local sharing is handled when offline, and a remote share extension will sync to CloudKit work when the main app is closed) This configuration is causing duplicates to be generated. I believe this is because when the macOS app is open, both it and the macOS share extension will try and (almost simultaneously) sync a newly shared object, resulting in two copies in CloudKit. On the macOS app, I can look through the persistent history and see the insertion 'author'. The first insertion is made by the extension "macOSShareExtension", the second is made by "NSCloudKitMirroringDelegate.import". I could easily make a choice to delete the second object. However, at the same time, on the iOS app, I will get two insertions, both with the author "NSCloudKitMirroringDelegate.import". I don't want to deduplicate only on the macOS app in this case. That would mean the the iOS app has duplicate objects until the deduplication propagates. If I use CKRecord's creationDate to keep the first syncd Object, can I guarantee that if one Object has an associated CKRecord and the other doesn't, the one with out will subsequently gain a record with a later creationDate? Should I be taking a different approach? Thank you.
Posted
by Gillies.
Last updated
.
Post not yet marked as solved
0 Replies
33 Views
Hi :) Our team wants to update the way subscriptions are handled in our app. For now the iOS devices are between our and App Store servers. We want to change it so the servers will communicate directly between themselves. I have to do some research and write tasks for developers and I struggle a bit with understanding it. My question is if is it needed to handle singed transaction info on iOS device and then send it to our server? We want to use App Store Server Notifications for handling subscriptions overall. I have watched a video from WWDC and the first time subscription purchase is described. But I guess I am a beginner and do not really understand it. So basically how I understand it is that a customer buys subscription and App Store server gets this information. And then I have no clue what these two things below do but I am wondering if we could do not implement them and base our server just on SUBSCRIBED notification. So basically it would look like this: What do you think about it? I would really appreciate any feedback and help. I am not sure if it is possible to implement this the way I have drawn it on this image and if so if this is a good practice. I do not know if that information is needed but our users can buy the premium service on other platforms as well. So we have to keep that info on our server and update iOS app about user's premium service state from our server. Have a nice day! Szymon
Posted
by Szymonix.
Last updated
.
Post not yet marked as solved
0 Replies
17 Views
we need to play songs auto play but const music = MusicKit.getInstance(); return undefined try { MusicKit.configure({ developerToken: DEVELOPER_TOKEN, app: { name: 'ReflexRadioDev', build: '1978.4.1', }, }); } catch (err) { console.log("my : " + err); } // MusicKit instance is available const music = MusicKit.getInstance(); console.log(music); we use version 3 from apple music kit "https://js-cdn.music.apple.com/musickit/v3/musickit.js" browser console error :- Uncaught (in promise) TypeError: music is undefined https://dev2.api.app.reflex-radio.com/index.html:78 dispatchDocumentEvent https://js-cdn.music.apple.com/musickit/v3/musickit.js:44 setTimeout handler*dispatchDocumentEvent https://js-cdn.music.apple.com/musickit/v3/musickit.js:44 https://js-cdn.music.apple.com/musickit/v3/musickit.js:44 https://js-cdn.music.apple.com/musickit/v3/musickit.js:1 https://js-cdn.music.apple.com/musickit/v3/musickit.js:1 index.html:78:7 https://dev2.api.app.reflex-radio.com/index.html:185 dispatchDocumentEvent https://js-cdn.music.apple.com/musickit/v3/musickit.js:44 (Async: setTimeout handler) dispatchDocumentEvent https://js-cdn.music.apple.com/musickit/v3/musickit.js:44 https://js-cdn.music.apple.com/musickit/v3/musickit.js:44 https://js-cdn.music.apple.com/musickit/v3/musickit.js:1 https://js-cdn.music.apple.com/musickit/v3/musickit.js:1
Posted
by fathi.
Last updated
.
Post not yet marked as solved
1 Replies
19 Views
I have a weird problem with my app. I needed to update the metadata on App Store connect and uploaded a new build to App Store. The only thing that was changed in code is two strings with version number. Everything else is exactly the same as a version that is live on the App Store (which works fine). I got a rejection with 2.1.0 Performance: App Completeness reason, turned out my app crashes on launch on reviewers device. I thought that this maybe a one time problem and tried to upload a new build with same results. Attached crash report. crash report Looks like Facebook SDK(?) crashing the app? And what is about Realm? The problem is I can't reproduce the crash anywhere. Simulator or 5 real devices including same phone model as in crash log. Tried different combinations of Debug/Release, setting Exception Breakpoints without any luck. Will be really thankful for any insight on how to approach this problem or what is going on here. Thank you very much!
Posted
by Globuszz.
Last updated
.
Post not yet marked as solved
2 Replies
33 Views
After submitting my app for review, I received a rejection on account of it crashing in MacOS 12.4 environment. The Objective-C app was developed in MacOS 12.4 and the app runs OK in Xcode and as a standalone executable. The crash log shows the exception type as SIGABRT and documentation. indicates that the crash may arise from an uncaught exception. Part of the crash log is shown below. How can I find out where the problem is occurring in my code? Application Specific Backtrace 0: 0 CoreFoundation 0x00000001b15e5198 __exceptionPreprocess + 240 1 libobjc.A.dylib 0x00000001b132fe04 objc_exception_throw + 60 2 CoreFoundation 0x00000001b150cc98 -[__NSArrayM copyWithZone:] + 0 3 Caption Pro 0x000000010259db78 Caption Pro + 105336 4 Caption Pro 0x000000010259cc58 Caption Pro + 101464 5 Caption Pro 0x000000010259c720 Caption Pro + 100128 6 CoreFoundation 0x00000001b1558854 -[NSSet makeObjectsPerformSelector:] + 216 7 AppKit 0x00000001b40a678c -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1080 8 AppKit 0x00000001b409aa70 loadNib + 416 9 AppKit 0x00000001b4099fa0 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 800 10 AppKit 0x00000001b4099ba4 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 220 11 AppKit 0x00000001b4099974 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 388 12 AppKit 0x00000001b408b740 NSApplicationMain + 576 13 dyld 0x00000001027c508c start + 520 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x1b1462d98 __pthread_kill + 8 1 libsystem_pthread.dylib 0x1b1497ee0 pthread_kill + 288 2 libsystem_c.dylib 0x1b13d2340 abort + 168 3 libc++abi.dylib 0x1b1452b08 abort_message + 132 4 libc++abi.dylib 0x1b1442950 demangling_terminate_handler() + 336 5 libobjc.A.dylib 0x1b1338320 _objc_terminate() + 144 6 libc++abi.dylib 0x1b1451ea4 std::__terminate(void (*)()) + 20 7 libc++abi.dylib 0x1b1454c1c __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 36 8 libc++abi.dylib 0x1b1454bc8 __cxa_throw + 140 9 libobjc.A.dylib 0x1b132ff6c objc_exception_throw + 420 10 CoreFoundation 0x1b150cc98 -[__NSSingleObjectArrayI objectAtIndex:] + 140 11 Caption Pro 0x10259db78 0x102584000 + 105336 12 Caption Pro 0x10259cc58 0x102584000 + 101464 13 Caption Pro 0x10259c720 0x102584000 + 100128 14 CoreFoundation 0x1b1558854 -[NSSet makeObjectsPerformSelector:] + 216 15 AppKit 0x1b40a678c -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1080 16 AppKit 0x1b409aa70 loadNib + 416 17 AppKit 0x1b4099fa0 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 800 18 AppKit 0x1b4099ba4 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 220 19 AppKit 0x1b4099974 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 388 20 AppKit 0x1b408b740 NSApplicationMain + 576 21 dyld 0x1027c508c start + 520
Posted Last updated
.
Post not yet marked as solved
0 Replies
32 Views
Hi, I have a C++ application connected to a specific socket. The problem is that when the application is not in use, macOS idle wakeups become very low. I am quite new in Apple development but as I understand applications get low priority when the idle wakeups are low. Therefore, application only wakes up when the set period of time (say a few seconds) is reached and it does not respond to requests immediately. To improve performance, I am trying to implement an event listening mechanism in the application that would be triggered by socket activity. In the documentation, there is some information on network events (see Table 7.1): https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/Timers.html I guess every messaging app is implementing a similar mechanism i.e. rather than waiting for the idle wakeup period to wake the application, an event is triggered when user data arrives at the socket application is connected to. My questions are Is my understanding of idle wakeups mechanism correct? What options are available to solve this problem and improve app performance i.e. response time? Are there any sample code snippets showing how to register that kind of a network event listener? Many thanks
Posted
by drecco.
Last updated
.
Post not yet marked as solved
1 Replies
28 Views
Hi all, I've looked through the forums and the docs and i cant find anything about maximum loading times for games. Is there a limit on how long a loading screen ( either/both loading into the game or between screens) can be, i know in the past on various platforms there was a max limit on black screens so you had to put a loading spinner or similar in and then there was a limit to that as well, but what about on apps tore games for phones/tablets and MAC for a digital only game? Any help or links to documentation would be very much appreciated Thanks all. Ben
Posted Last updated
.
Post not yet marked as solved
0 Replies
27 Views
Hi! Trying to use notarytool for an app notarization via script on CD pipeline. Build machine has an Xcode 12.5 installed and currently it can't be upgraded. So, our team decided to use utility as standalone binary, placed in the /Applications directory. The command used for notarization: '/Applications/notarytool submit '<path>' --keychain-profile '<profile-name>' --output-format 'json' --wait'. Before running the command above, we saved keychain profile with notarytool store-credentials command. However, future runs of notarization script fail with a message: 'Error: No Keychain password item found for profile: '. But we definitely see it among Keychain entries and 'security find-generic-password -l ' command approves that profile has been saved. Did anyone encounter a similar issue? Can someone suggest what how to cope with this behavior? Thank you in advance for any ideas
Posted
by yblk.
Last updated
.
Post not yet marked as solved
258 Replies
123k Views
Hello, is it anyone here ( or on this planet ) that can help with this issue on Catalina Mac OS 10.15.5 Beta 3 (19F72f).I am using MacBook Pro 16 inches. 😟
Posted
by JoyGlory.
Last updated
.
Post not yet marked as solved
0 Replies
28 Views
Hi, According to https://developer.apple.com/videos/play/wwdc2022/10096/, agent user can disable login item on Ventura. In enterprise environment, IT admin may want some processes are always running in launch daemon. Is there a MDM rule to forbidden agent user to disable special login item? Thank you!
Posted Last updated
.
Learn More about - WWDC22.

Pinned Posts

Categories

See all