Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PlugInKit: -[PKService run] iOS Keyboard extension error

I have developed a iOS keyboard and i am getting some wired error in my crash logs i have search in every where but i didn't find any solution. This is the error i am getting in my error console.

PlugInKit: -[PKService run] + 752

enter image description here

Here is screenshot of the error. can anyone tell me how can i solved this error. error log

#0  (null) in mach_msg_trap ()

#1  (null) in mach_msg ()

#2  (null) in __CFRunLoopServiceMachPort ()

#3  (null) in __CFRunLoopRun ()

#4  (null) in CFRunLoopRunSpecific ()

#5  (null) in GSEventRunModal ()

#6  (null) in UIApplicationMain ()

#7  (null) in _xpc_objc_main ()

#8  (null) in xpc_main ()

#9  (null) in -[NSXPCListener resume] ()

#10 (null) in -[PKService run] ()

#11 (null) in +[PKService main] ()

#12 (null) in +[PKService _defaultRun:arguments:] ()

#13 (null) in NSExtensionMain ()

#14 (null) in start ()
like image 413
Kamal Upasena Avatar asked Oct 06 '17 11:10

Kamal Upasena


2 Answers

Looks like a problem with the memory. From the documentation

Memory limits for running app extensions are significantly lower than the memory limits imposed on a foreground app. On both platforms, the system may aggressively terminate extensions because users want to return to their main goal in the host app. Some extensions may have lower memory limits than others: For example, widgets must be especially efficient because users are likely to have several widgets open at the same time.

Are you building an extension keyboard? Are you loading images there?

If you are loading images make sure to use lower resolution and check the color bitmap for each image (sometimes png uses 24bit). Try with jpeg images (you are gonna lose transparency but at least will work) so when you load them it won't take too much memory. For more info about PNG vs JPEG and memory concerns take a look at https://www.cocoanetics.com/2011/10/avoiding-image-decompression-sickness/

like image 56
denis_lor Avatar answered Oct 05 '22 23:10

denis_lor


Open up the actual crash log file (right click / show in finder from Xcode) and post it here. It contains a lot more info such as exception type, notes and so on that will help you diagnose.

Read up a bit here to give you an idea of what you’ll find in the crash log and how to use it.

https://developer.apple.com/library/archive/technotes/tn2151/_index.html

(Just realized how old this post is, oh well :))

like image 45
Alex Avatar answered Oct 05 '22 23:10

Alex