Hi
I use JSObjectMakeTypedArrayWithBytesNoCopy(JSContextRef ctx, JSTypedArrayType arrayType, void *bytes, size_t byteLength, JSTypedArrayBytesDeallocator bytesDeallocator, void *deallocatorContext, JSValueRef *exception) to create a JSObjectRef, and [JSValue valueWithJSValueRef: inContext:] to create a JSValue. I then pass the JSValue to the JSContext.
I have noticed that even if I don't pass the JSValue to the JSContext, the JSTypedArrayBytesDeallocator is always called after the deallocation of the JSContext. In my understanding, it should be released by the JS garbage collection when there are no references to it.
Since I have a large amount of data to pass to the JSContext, if the JSTypedArrayBytesDeallocator is called too late, it may cause memory issues. Where am I mistaken in this case?
Thanks.
Post
Replies
Boosts
Views
Activity
Is it a bug? It’s troublesome to modify the version in Build Settings.
Hi,
I have an extension using NEPacketTunnelProvider, I need bind both lan address and localhost so that other apps can connect it and transfer data.
I found that if I bind INADDR_LOOPBACK, other apps on the phone can connect it using the localhost(127.0.0.1)
If I bind INADDR_ANY, other apps on the phone can connect it using the lan address but not the localhost(127.0.0.1)
My question is why other app on the phone can not connect using localhost(127.0.0.1) when binding INADDR_ANY?
Thank you.
NEPacketTunnelNetworkSettings:
Exclude route: 192.168.0.0/16, 127.0.0.0/8, 169.254.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 255.255.255.255/32, 239.255.255.250/32, fc00::/7, fe80::/10, ff02::c/128, ff05::c/128, ff08::c/128, ff0e::c/128
Include route: [NEIPv4Route defaultRoute]
NEProxySettings with HTTPEnabled and HTTPSEnabled to localhost (a http server)
NEProxySetting exception: 192.168.0.0/16, 127.0.0.0/8, 169.254.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 255.255.255.255/32, localhost, *.local, captive.apple.com
NEProxySetting excludeSimpleHostnames: YES
I have a continuous data stream encrypted by aesgcm, I did not find a way to decrypt it using CryptoKit unless I have the full data.
My question is Can CryptoKit decrypt or encrypt a stream without a complete read? Like EVP_***_Update in OpenSSL.
Thank you.
When I "profile" my app in Xcode and launch instruments, everything seems ok.
But when I xcodebuild the app, install the app in my iPhone and launch it, use instruments attach it, it shows only addresses not the symbolicated names.
I have made sure that the UUID matches.
It seems that the instruments already found the symbols because when I select locate symbols it shows "No new libraries to symbolicate"
When I right click the stack, Located dSym greyed out
When I hover the Load dSyms, the right dSym path is showed
When I click the Load dSyms, nothing happened.
How do I obtain the symbolicated trace? Thanks!
Since I can not post images here, I also write a question in stack overflow: https://stackoverflow.com/questions/66319599/xcode-instruments-does-not-show-a-symbolicated-trace
When my developing app crashes, there is nothing in the device log. But I finally find the crash information in the device console, and with a line says
This report is abbreviated for syslog inclusion because it could not be saved to disk. Symbolication may be possible by manually cleaning up and including the
Binary Image section of a full report from this same device -- good luck! But why it could not be saved? The disk is not full.
Thx
I am using NEPacketTunnelProvider to write a VPN app. When the vpn is off, I could use res_9_getservers to get the current network DNS server, so that when the vpn is on, I could choose whether I reply the dns query or drop the query to the default dns server.
My question is when the vpn is on and the network changes, I did not found a way to get the new network's default DNS server, res_9_getservers returns the dns server which I was setting up.
So how can I get the new DNS when network changes?
Thank you!