Search results for

“offloading”

183 results found

Post

Replies

Boosts

Views

Activity

Reply to Are Multiple UI Threads Possible?
I understand that UIKit is not designed to be thread safe, and that generally long running tasks need to be offloaded to other threads to avoid blocking the main thread.I'm just currently making UIKit do a lot of work - animations, autolayout etc. Which cannot be offloaded to another thread - therefore being a prime candidate for the creation of another UI thread and everything that goes along with that.So what I want is sounding to be unlikely.I want to be able to duplicate my application into another window and have the second window not interfere with performance of the main window.Without significant rewriting effort.Another UI thread working on the separate window would solve my problem immediately and gracefully.I do appreciate all of the comments though.So, thank you.
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’17
Reply to Are Multiple UI Threads Possible?
Let's be plain about it: UIKit (which basically cover all of the UI Thread territory) isn't thread safe and the things that draw the view hierarchy run on the main thread. The rare exceptions are outstanding enough that they get mentioned explicitly in the documentation as being thread safe or being designed to run in another thread/queue.On the other hand, it really depends on what you're doing and what sorts of latency you're allowing for how much you can offload to another thread. Because the straight forward way of offloading things that were originally done on the main thread to a background thread ends up looking a lot like this: You've got an action method that's responding to the user tapping a button. Gather up all of the relevant parameters and dispatch a block to the worker queue.Inside that worker block, do the computation and work. Gather up the relevant results and dispatch a block to the main queue. Inside this second block, use the passed in results to update the user interfa
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’17
Reply to iOS 10 - App is not working in background mode after 3 minutes
If there is a way to achieve, then How can I upload/download data after 30 minutes of app went backgrond?.Two things:iOS provides no general mechanism for an app to schedule itself to be resumed at a specific time.If an app is running, it has full access to the network, regardless of whether it’s in the foreground or background. The only gotcha is that devices with WWAN will typically shut down Wi-Fi when the device is locked.I’m confused about your upload requirement. If you’re suspended in the background there should be no need to upload data because you can’t possibly have generated new data that warrants uploading.As far as downloads are concerned, my standard recommendation in this space is to have your app offload the decision about what data needs to be dowloaded to a server. When the server decides that the app needs some data it can send it a silent push notification to the app, in response to which the app can kick off the download.IMPORTANT You can use silent push notifications as a mechan
Topic: App & System Services SubTopic: Core OS Tags:
Apr ’17
Reply to How to receive UDP packets that have no checksum
Honestly that sounds like a bug in the driver; it seems obvious that the driver’s checksum offload should behave the same as kernel’s.I don’t know if there’s a way around this; if you want a definitive answer, you should open a DTS tech support incident and I, or one of my colleagues, can dig into it.Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Feb ’17
Reply to How to receive UDP packets that have no checksum
Thanks for the prompt reply.The problem however, seems to be that the checksum verification is offloaded to the NIC. There are kernel parameters (ending in hwcksum_rx for example) that indicate this. This means that the NIC does not even deliver the UDP packets with a zero checksum to the system and the function udp_input_checksum is not even called.It also seems that the involved kernel parameters cannot be altered. (not even when the System Integrity Protection is switched off, which would not have been a viable solution anyway).So the question remains, how to get the UDP packets with their checksum set to zero?
Feb ’17
Reply to Can an app update without being open?
My app lets you know if there are upcoming events in your area and it would be nice if it could check every week or so with my server to see if there were any and update the users local Notifications. So this would require it to run in the background and access the web.iOS has a mechanism for this, namely background fetch. You learn more about it in the Background Execution section of the App Programming Guide for iOS.However, if your app is not being run regularly by the user then it’s likely that your app will fall off the background fetch radar. The best way to meet your requirements is to offload this periodic work to a server. That is, have your server poll the event database and, if there’s anything relevant for this user, post a push notification. That is power efficient (no code needs to execute on the user’s device) and reliable.Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’16
Reply to Does Xcode use GPU to build?
Xcode is not itself a compiler, it just hosts the compiler. For Obj-C, the current (preferred) compiler is clang. You can visit clang.llvm.org and if your question isn't answered by the information on the site, there are mailing lists where you can ask about implementation details and strategy.My guess, though, is that the compiler isn't designed to use the GPU.>> No reason for it to need the GPU when buildingNo particular reason, but it's certainly possible that it might use something like OpenCL to offload some processing onto the GPU.
Nov ’16
How to implement mDNS offload function in NIC driver
Hi,I was looking for a guide about implemtation of mDNS offload function in NIC driver. For mDNS_offload_capable support, what should I do in addition to adding the properties (mDNS_KEY and mDNS_Keepalive) and implementing a user client to handle cmd_mDNSOffloadRR command? Is mDNSOffloadUserClient open source? Can anyone help me?Thanks a lot.
0
0
1k
Aug ’16
Reply to Copying NSMutableArray within a NSOperation?
No, atomicity doesn't change anything. The value of the property is a pointer (to a mutable array), so atomicity would protect only the accessing of the pointer, not the data structures pointed to.It's a complete waste of time looking for a generic solution, such as encasing random blocks of code in a synchronizing construct. You'll either leave hard-to-find bugs in the edge cases, or hard-to-find deadlocks.In this case, we can't even speculate on a real solution, because we don't know what's going on. We don't even know if scanQueue is serial or concurrent. We don't know what the point of using NSOperation is: is it to get parallel processing, to offload long tasks from the main thread, etc? Maybe NSOperation isn't the best API to use for this, perhaps direct use of GCD is easier. The code you showed has each NSOperation using, or not using, the resulting array of the previous operation, according to the timing of the block placed back on the main thread. We don't know the consequences of this sort
Topic: UI Frameworks SubTopic: AppKit Tags:
Apr ’16
Help Me: SpotlightNetHelper Hijacks System is this a Virus?
To Whom It May Concern:I apparently have a self propagating virus that was introduced to my network by purchase of a used Mac computer from Amazon.com on approximately December 24, 2015. That is when I first started noticing erratic behavior on my machines. I have clean formatted and reinstalled OS from computers on an isolated network that was not infected. As soon as I connect the newly reinstalled OS iMacs to the infected network they become reinfected on first boot. I've spent something like 40 labor hours on this so far and I can't afford anymore resource allocation to this issue until there are some steps to cure the system.This activity on my computer appears to be a nasty virus. From what I can tell, it tries injecting itself in every executable it can locate. It trys to obtain the icloud login credentials, it attempts to obtain administrator credentials, and on one computer it appears to have secured and stolen my credentials to completely hijack the computer. Once it hijacks the computer it deletes
2
0
5.2k
Jan ’16
Help Me: SpotlightNetHelper Hijacks System is this a Virus?
To Whom It May Concern:I apparently have a self propagating virus that was introduced to my network by purchase of a used Mac computer from Amazon.com on approximately December 24, 2015. That is when I first started noticing erratic behavior on my machines. I have clean formatted and reinstalled OS from computers on an isolated network that was not infected. As soon as I connect the newly reinstalled OS iMacs to the infected network they become reinfected on first boot. I've spent something like 40 labor hours on this so far and I can't afford anymore resource allocation to this issue until there are some steps to cure the system.This activity on my computer appears to be a nasty virus. From what I can tell, it tries injecting itself in every executable it can locate. It trys to obtain the icloud login credentials, it attempts to obtain administrator credentials, and on one computer it appears to have secured and stolen my credentials to completely hijack the computer. Once it hijacks the computer it deletes
2
0
6.7k
Jan ’16
Need Resources: Kernel and SpoghtlightNetHelper Unauthorized System Access
To Whom It May Concern:I apparently have a self propagating virus that was introduced to my network by purchase of a used Mac computer from Amazon.com on approximately December 24, 2015. That is when I first started noticing erratic behavior on my machines. I have clean formatted and reinstalled OS from computers on an isolated network that was not infected. As soon as I connect the newly reinstalled OS iMacs to the infected network they become reinfected on first boot. I've spent something like 40 labor hours on this so far and I can't afford anymore resource allocation to this issue until there are some steps to cure the system.This activity on my computer appears to be a nasty virus. From what I can tell, it tries injecting itself in every executable it can locate. It trys to obtain the icloud login credentials, it attempts to obtain administrator credentials, and on one computer it appears to have secured and stolen my credentials to completely hijack the computer. Once it hijacks the computer it deletes
0
0
1.5k
Jan ’16
Need Resources: Kernel and SpoghtlightNetHelper Unauthorized System Access
To Whom It May Concern:I apparently have a self propagating virus that was introduced to my network by purchase of a used Mac computer from Amazon.com on approximately December 24, 2015. That is when I first started noticing erratic behavior on my machines. I have clean formatted and reinstalled OS from computers on an isolated network that was not infected. As soon as I connect the newly reinstalled OS iMacs to the infected network they become reinfected on first boot. I've spent something like 40 labor hours on this so far and I can't afford anymore resource allocation to this issue until there are some steps to cure the system.This activity on my computer appears to be a nasty virus. From what I can tell, it tries injecting itself in every executable it can locate. It trys to obtain the icloud login credentials, it attempts to obtain administrator credentials, and on one computer it appears to have secured and stolen my credentials to completely hijack the computer. Once it hijacks the computer it deletes
0
0
2.3k
Jan ’16
CLLocationManager and WatchKit Extension Best Practices
Can anyone here point me in the right direction if I want to continuously update the user's location in my WatchKit Extension? I know the interface exposed in CLLocationManager in watchOS 2 only allows for one-shot updates, so presumably I'll need to offload that to the iOS app. The Potloc sample code is a good starting point for doing that, but is there anywhere that explicitly spells out the requirements? Do I need to include the usage key in the info plist in both my extension and the iOS app? Do I need to set allowsBackgroundLocationUpdates to YES in the iOS app and include the background mode for the iOS app to get location updates to provide to my extension? (I assume yes to both, but just want to check)
0
0
371
Dec ’15
Reply to Are Multiple UI Threads Possible?
I understand that UIKit is not designed to be thread safe, and that generally long running tasks need to be offloaded to other threads to avoid blocking the main thread.I'm just currently making UIKit do a lot of work - animations, autolayout etc. Which cannot be offloaded to another thread - therefore being a prime candidate for the creation of another UI thread and everything that goes along with that.So what I want is sounding to be unlikely.I want to be able to duplicate my application into another window and have the second window not interfere with performance of the main window.Without significant rewriting effort.Another UI thread working on the separate window would solve my problem immediately and gracefully.I do appreciate all of the comments though.So, thank you.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
May ’17
Reply to Are Multiple UI Threads Possible?
Let's be plain about it: UIKit (which basically cover all of the UI Thread territory) isn't thread safe and the things that draw the view hierarchy run on the main thread. The rare exceptions are outstanding enough that they get mentioned explicitly in the documentation as being thread safe or being designed to run in another thread/queue.On the other hand, it really depends on what you're doing and what sorts of latency you're allowing for how much you can offload to another thread. Because the straight forward way of offloading things that were originally done on the main thread to a background thread ends up looking a lot like this: You've got an action method that's responding to the user tapping a button. Gather up all of the relevant parameters and dispatch a block to the worker queue.Inside that worker block, do the computation and work. Gather up the relevant results and dispatch a block to the main queue. Inside this second block, use the passed in results to update the user interfa
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Apr ’17
Reply to iOS 10 - App is not working in background mode after 3 minutes
If there is a way to achieve, then How can I upload/download data after 30 minutes of app went backgrond?.Two things:iOS provides no general mechanism for an app to schedule itself to be resumed at a specific time.If an app is running, it has full access to the network, regardless of whether it’s in the foreground or background. The only gotcha is that devices with WWAN will typically shut down Wi-Fi when the device is locked.I’m confused about your upload requirement. If you’re suspended in the background there should be no need to upload data because you can’t possibly have generated new data that warrants uploading.As far as downloads are concerned, my standard recommendation in this space is to have your app offload the decision about what data needs to be dowloaded to a server. When the server decides that the app needs some data it can send it a silent push notification to the app, in response to which the app can kick off the download.IMPORTANT You can use silent push notifications as a mechan
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’17
Reply to How to receive UDP packets that have no checksum
Honestly that sounds like a bug in the driver; it seems obvious that the driver’s checksum offload should behave the same as kernel’s.I don’t know if there’s a way around this; if you want a definitive answer, you should open a DTS tech support incident and I, or one of my colleagues, can dig into it.Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Replies
Boosts
Views
Activity
Feb ’17
Reply to How to receive UDP packets that have no checksum
Thanks for the prompt reply.The problem however, seems to be that the checksum verification is offloaded to the NIC. There are kernel parameters (ending in hwcksum_rx for example) that indicate this. This means that the NIC does not even deliver the UDP packets with a zero checksum to the system and the function udp_input_checksum is not even called.It also seems that the involved kernel parameters cannot be altered. (not even when the System Integrity Protection is switched off, which would not have been a viable solution anyway).So the question remains, how to get the UDP packets with their checksum set to zero?
Replies
Boosts
Views
Activity
Feb ’17
Reply to Can an app update without being open?
My app lets you know if there are upcoming events in your area and it would be nice if it could check every week or so with my server to see if there were any and update the users local Notifications. So this would require it to run in the background and access the web.iOS has a mechanism for this, namely background fetch. You learn more about it in the Background Execution section of the App Programming Guide for iOS.However, if your app is not being run regularly by the user then it’s likely that your app will fall off the background fetch radar. The best way to meet your requirements is to offload this periodic work to a server. That is, have your server poll the event database and, if there’s anything relevant for this user, post a push notification. That is power efficient (no code needs to execute on the user’s device) and reliable.Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’16
Reply to Does Xcode use GPU to build?
Xcode is not itself a compiler, it just hosts the compiler. For Obj-C, the current (preferred) compiler is clang. You can visit clang.llvm.org and if your question isn't answered by the information on the site, there are mailing lists where you can ask about implementation details and strategy.My guess, though, is that the compiler isn't designed to use the GPU.>> No reason for it to need the GPU when buildingNo particular reason, but it's certainly possible that it might use something like OpenCL to offload some processing onto the GPU.
Replies
Boosts
Views
Activity
Nov ’16
mDNS Offload On OS X
Hi, Is there a guide about implementation of mDNS offload function in NIC driver? If anyone has any information about it, please advise. Thanks.
Replies
0
Boosts
0
Views
508
Activity
Aug ’16
How to implement mDNS offload function in NIC driver
Hi,I was looking for a guide about implemtation of mDNS offload function in NIC driver. For mDNS_offload_capable support, what should I do in addition to adding the properties (mDNS_KEY and mDNS_Keepalive) and implementing a user client to handle cmd_mDNSOffloadRR command? Is mDNSOffloadUserClient open source? Can anyone help me?Thanks a lot.
Replies
0
Boosts
0
Views
1k
Activity
Aug ’16
Reply to Copying NSMutableArray within a NSOperation?
No, atomicity doesn't change anything. The value of the property is a pointer (to a mutable array), so atomicity would protect only the accessing of the pointer, not the data structures pointed to.It's a complete waste of time looking for a generic solution, such as encasing random blocks of code in a synchronizing construct. You'll either leave hard-to-find bugs in the edge cases, or hard-to-find deadlocks.In this case, we can't even speculate on a real solution, because we don't know what's going on. We don't even know if scanQueue is serial or concurrent. We don't know what the point of using NSOperation is: is it to get parallel processing, to offload long tasks from the main thread, etc? Maybe NSOperation isn't the best API to use for this, perhaps direct use of GCD is easier. The code you showed has each NSOperation using, or not using, the resulting array of the previous operation, according to the timing of the block placed back on the main thread. We don't know the consequences of this sort
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Apr ’16
Help Me: SpotlightNetHelper Hijacks System is this a Virus?
To Whom It May Concern:I apparently have a self propagating virus that was introduced to my network by purchase of a used Mac computer from Amazon.com on approximately December 24, 2015. That is when I first started noticing erratic behavior on my machines. I have clean formatted and reinstalled OS from computers on an isolated network that was not infected. As soon as I connect the newly reinstalled OS iMacs to the infected network they become reinfected on first boot. I've spent something like 40 labor hours on this so far and I can't afford anymore resource allocation to this issue until there are some steps to cure the system.This activity on my computer appears to be a nasty virus. From what I can tell, it tries injecting itself in every executable it can locate. It trys to obtain the icloud login credentials, it attempts to obtain administrator credentials, and on one computer it appears to have secured and stolen my credentials to completely hijack the computer. Once it hijacks the computer it deletes
Replies
2
Boosts
0
Views
5.2k
Activity
Jan ’16
Help Me: SpotlightNetHelper Hijacks System is this a Virus?
To Whom It May Concern:I apparently have a self propagating virus that was introduced to my network by purchase of a used Mac computer from Amazon.com on approximately December 24, 2015. That is when I first started noticing erratic behavior on my machines. I have clean formatted and reinstalled OS from computers on an isolated network that was not infected. As soon as I connect the newly reinstalled OS iMacs to the infected network they become reinfected on first boot. I've spent something like 40 labor hours on this so far and I can't afford anymore resource allocation to this issue until there are some steps to cure the system.This activity on my computer appears to be a nasty virus. From what I can tell, it tries injecting itself in every executable it can locate. It trys to obtain the icloud login credentials, it attempts to obtain administrator credentials, and on one computer it appears to have secured and stolen my credentials to completely hijack the computer. Once it hijacks the computer it deletes
Replies
2
Boosts
0
Views
6.7k
Activity
Jan ’16
Need Resources: Kernel and SpoghtlightNetHelper Unauthorized System Access
To Whom It May Concern:I apparently have a self propagating virus that was introduced to my network by purchase of a used Mac computer from Amazon.com on approximately December 24, 2015. That is when I first started noticing erratic behavior on my machines. I have clean formatted and reinstalled OS from computers on an isolated network that was not infected. As soon as I connect the newly reinstalled OS iMacs to the infected network they become reinfected on first boot. I've spent something like 40 labor hours on this so far and I can't afford anymore resource allocation to this issue until there are some steps to cure the system.This activity on my computer appears to be a nasty virus. From what I can tell, it tries injecting itself in every executable it can locate. It trys to obtain the icloud login credentials, it attempts to obtain administrator credentials, and on one computer it appears to have secured and stolen my credentials to completely hijack the computer. Once it hijacks the computer it deletes
Replies
0
Boosts
0
Views
1.5k
Activity
Jan ’16
Need Resources: Kernel and SpoghtlightNetHelper Unauthorized System Access
To Whom It May Concern:I apparently have a self propagating virus that was introduced to my network by purchase of a used Mac computer from Amazon.com on approximately December 24, 2015. That is when I first started noticing erratic behavior on my machines. I have clean formatted and reinstalled OS from computers on an isolated network that was not infected. As soon as I connect the newly reinstalled OS iMacs to the infected network they become reinfected on first boot. I've spent something like 40 labor hours on this so far and I can't afford anymore resource allocation to this issue until there are some steps to cure the system.This activity on my computer appears to be a nasty virus. From what I can tell, it tries injecting itself in every executable it can locate. It trys to obtain the icloud login credentials, it attempts to obtain administrator credentials, and on one computer it appears to have secured and stolen my credentials to completely hijack the computer. Once it hijacks the computer it deletes
Replies
0
Boosts
0
Views
2.3k
Activity
Jan ’16
CLLocationManager and WatchKit Extension Best Practices
Can anyone here point me in the right direction if I want to continuously update the user's location in my WatchKit Extension? I know the interface exposed in CLLocationManager in watchOS 2 only allows for one-shot updates, so presumably I'll need to offload that to the iOS app. The Potloc sample code is a good starting point for doing that, but is there anywhere that explicitly spells out the requirements? Do I need to include the usage key in the info plist in both my extension and the iOS app? Do I need to set allowsBackgroundLocationUpdates to YES in the iOS app and include the background mode for the iOS app to get location updates to provide to my extension? (I assume yes to both, but just want to check)
Replies
0
Boosts
0
Views
371
Activity
Dec ’15