Does the JavaScript.Core.Framework access the local network?

90 views
Skip to first unread message

Wayne Henderson

unread,
Oct 14, 2020, 12:11:58 PM10/14/20
to j2objc-discuss
With iOS 14 there is a new privacy protection causing headaches for developers.  I'm having that headache and I'm here as a Hail Mary in case the framework might be causing a problem in my app.

Any attempt by an app to access the user's local network now causes a user to see an alert that the app "would like to find and connect to devices on your local network".

For instance, see:

The rationale for this from Apple:

 According to Apple's presentation above:


My troubled app, the one containing the framework, does not need any local network information but does look for the user's location (which might use local network information?) and also accesses the internet. Another app of mine uses the same information to a much larger degree and is not causing any problem.  It does not contain the framework.

So that got me wondering if the framework itself might be up to something?

Tom Ball

unread,
Oct 14, 2020, 1:35:54 PM10/14/20
to j2objc-discuss
What does the JavaScriptCore.Framework have to do with J2ObjC? Here is the list of all iOS frameworks and libraries that J2ObjC depends upon:
  • Foundation
  • CoreFoundation
  • ExceptionHandling (I think this dependency is obsolete)
  • Security (java.security providers)
  • iconv li(charset support)
  • z (zip support)
If none of your sources have "JavaScriptCore" #import or #include references, I suggest removing the JavaScriptCore framework from your app and see where (or if) the link step fails (in Xcode, frameworks are listed in a target's Link Binary with Libraries build phase). Any unresolved symbol errors should point to which library or framework has that dependency.

--
You received this message because you are subscribed to the Google Groups "j2objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/j2objc-discuss/62b59e62-b9f3-40fd-bc87-3439bf2e07b7o%40googlegroups.com.

Tom Ball

unread,
Oct 14, 2020, 1:44:03 PM10/14/20
to j2objc-discuss
As a historical note, the only similarity between Java and JavaScript is in their names. Netscape developed JavaScript (first called LiveScript) in 1995 with a "Java-like" syntax, so developers are somewhat able to switch between the two languages when writing source code. The Java and JavaScript runtimes have nothing in common, however, and the similar names have been a source of confusion for twenty five years.

whende...@gmail.com

unread,
Oct 14, 2020, 2:15:29 PM10/14/20
to j2objc-discuss
One more victim of the confusion here.  I probably added the framework back when I was struggling to get things working. 

Thanks to your advice, I just removed the framework and things run just fine.  So my original question is now moot.

I have no way to know if the network error is effected.  I've asked Apple for more detail.  We'll see how that goes.  In the meanwhile I may just submit another build of my app and see what happens. 

Wayne Henderson

unread,
Jan 7, 2024, 12:30:11 PMJan 7
to j2objc-...@googlegroups.com
I’m dusting off an app I haven’t touched for quite a while. I now have an Apple silicon MacBook and an iPhone 15, both upgraded since I last touched the app. I immediately ran into a problem when trying to build to a Simulator:

Building for 'iOS-simulator', but linking in object file (myPath/Xcode_projects/j2objc-2.8/lib/libjre_emul.a[arm64][2](ErrnoException.o)) built for 'iOS'

I can build to my real phone just fine but not the Simulator device.

Searching on this problem shows it is not uncommon. But there doesn’t seem to be consensus on the right solution. Since my problem is arising in a file within the j2objc-2.8 folder, I thought maybe asking here makes sense.

Any ideas?

Tom Ball

unread,
Jan 9, 2024, 11:53:03 AMJan 9
to j2objc-...@googlegroups.com
We need to stop making pre-built releases, as developers want more features than will fit in one (or now two) maximally-sized download bundles on GitHub. Here, the j2objc-2.8 distribution was created before Apple released M1 hardware, so it's useless on new hardware. Best advice here is to just delete that directory the release bundle created when unzipped.

What most j2objc users are now doing is build from the latest source, described here. That can take a long time due to all the possible hardware combinations, but which architecture slices to build are easily configurable. So you should be able to build just the slices the M1 simulator and your device need, which speeds the build up quite a bit. The simulator64 architecture will once again work, as post-2.8 that slice is now also built for arm64.

--
You received this message because you are subscribed to the Google Groups "j2objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages