Slashdot Mirror


User: drerwk

drerwk's activity in the archive.

Stories
0
Comments
595
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 595

  1. Re:And yet... on How Apple's App Review Is Sabotaging the iPhone · · Score: 1

    You've had some nice comment on this thread. But it is pretty simple, if you look at the PhoneGap code there is an actual interpreter in there that will run code loaded from a URL. At least that is the case with the version I looked at this morning.

  2. Re:And yet... on How Apple's App Review Is Sabotaging the iPhone · · Score: 1

    It is not trivial if the language you use is Obj-C, and you have code in your app that makes use of the dynamic modification features of the ObjC runtime. With ObjC one can add methods to class, and base the implementation of that method on a pointer to a random string. So no, it is not actually very trivial. And PhoneGap makes use of these features.

    Even in C and C++ you can pass a pointer to a function, you can create a pointer to a function, and so no, static analysis of the binary will not tell you every API call that is made.

  3. Re:Just looking at PhoneGap... on How Apple's App Review Is Sabotaging the iPhone · · Score: 1
    Peter, does your html have any external links, like to an about? Even if not, you did include an easily exploitable hole in your App if you included PhoneGap. You included an interpreter which is quite explicitly against the terms of App Store approval. Apple is trying to prevent any possible malicious code, and the possibilities are pretty much open with PhoneGap.

    The more I contemplate issues like this about PhoneGap, it seems to me that any native app that makes a network call could do much the same thing. And so given that, wouldn't this technique be a danger for any native app?

    No, not generally. Any native app that makes a network call, collects a program and runs it via an interpreter, yes, which is what PhoneGap does.
    Please, before you reply, go back, look at, and understand the code I pointed you to. Convince yourself that it is a fully general interpreter. I would imagine that Apple looks closely at any code that uses the performSelector:NSSelectorFromString() method; they might even reject all apps that use it.

  4. Re:Just looking at PhoneGap... on How Apple's App Review Is Sabotaging the iPhone · · Score: 1

    Peter - Obj_C is a very dynamic language. As an Obj-C program runs you can call method like, class_addMethod(). See the Objective-C Runtime reference for details. This method modifies the currently running code by adding a method, the implementation of which is a raw pointer. If you understand enough of Obj-C to understand what the method I pointed to in PhoneGapDelegate.m does, you would know that it is a completely general interpreter; pretty neat that you can do that in a single line of Obj-C, but not really different from things you can do in LISP - see http://en.wikipedia.org/wiki/Eval.
    To go further, if anywhere in your html you point to an outside server - maybe something like an about page at your website, your app will run whatever it gets from that page. Again, go to the webView() method and you can see the code extract any "gap:" commands and prepare them for running. As I said, a clever progarmmer can make this do anything that can be done in Obj-C, effectively completely replace the App that Apple approves with an entirely different app.

    Now you know that PhoneGap has its own embedded interpreter which can make any iPhone API call at all, you should understand why your app was rejected - in fact if it was ever accepted this was probably a mistake on Apple's part.
    I have to assume you are not really familiar with Obj-C, because your claim that you only load a UIWebKitView, is clearly not true if you need to use PhoneGap.
    And why is Apple not giving you details, because it would cost too much for them to spend the time to make a clear answer.

  5. Re:And yet... on How Apple's App Review Is Sabotaging the iPhone · · Score: 1

    PhoneGap includes its own dynamic interpreter. It will read a url and convert it to Obj-C calls. And since Obj-C provides for dynamic loading of classes and methods you could have PhoneGap reprogram itself entirely.

  6. Re:And yet... on How Apple's App Review Is Sabotaging the iPhone · · Score: 1

    Do you not think it is trivial to tell which system and library calls your binary app is making? I don't know anything about which iPhone API's are allowed or disallowed, but let me assure you that it is quite simple to know exactly which calls a binary executable is making. Having the source code wouldn't make that any easier.

    Obj-C supports dynamic modification of a running app. You can add classes, you can add methods, you can change method dispatch all while the app is running. The PhoneGap code has an interpreter built in that does this. I don't know what Peter's HTML looked like, but if it included a single http link to a real server, then the PhoneGap code will interpret what is on that server, before displaying anything. So there would be no way to know what is being called.

  7. Re:Just looking at PhoneGap... on How Apple's App Review Is Sabotaging the iPhone · · Score: 1
    Peter - Did you look at PhoneGapDelegate.m and specifically the webView() method? The comment reads

    This is where most of the magic happens... We take the request(s) and process the response. From here we can re direct links and other protocalls[sic] to different internal methods.

    It took all of 5 minutes for me to find the interpreter in PhoneGap. The method constructs a method name and argument, and thanks to Obj-C, you can make a call
    [obj performSelector:NSSelectorFromString(constructedMethodName) withArguments:args withObject:options];
    This is a one line interpreter that will run any code that is downloaded.
    The summary says "simply to dump an HTML version of his book into UIWebView" and this is funny, because I did exactly this to put the instructions manual in my game Repton. It took maybe 7 lines of code. Your whole app could be 30 lines of code, and you would not need PhoneGap and you would not be having these problems. I would be willing to write this for you cheap.
    So just to summarize, PhoneGap includes an interpreter beyond Apples javascript interpreter. In fact, since Obj-C supports Dynamic Loading, the above interpreter could be used to add classes and methods to an already running program. Almost sounds like LISP; which I think is more powerful than JavaScript.

  8. Re:Summary? on Why OpenBSD's Release Process Works · · Score: 2, Insightful

    I think you mean envious .

  9. Re:Well... yeh. on Swine Flu Kills Obese People Disproportionately · · Score: 1

    ...and that some of the components of that energy burning come from water and air.

    Well, the oxygen required for cellular respiration comes from the air, yes, but that's all.

    It's even better, one breaths in O2 and out CO2. So that weight loss with every breath. He just need to breath more. Oh, and not eat so much.

  10. Re:It'll never happen on NASA Plans To De-Orbit ISS In 2016 · · Score: 1

    You could say the same thing about Hubble, the Mars Rovers, Cassini, LHC, etc. My guess is to why we hear less about ISS science is that it's harder to write in a pop-culture headline. At least with the others you get pretty pictures or the ability to wildly extrapolate (liquid water, therefor aliens) or fear-monger (black holes sound scary, microscopic ones must be even more frightening).

    Have a look through the last ten years of Nature and you will not have to guess. The reason you don't read about ISS science is because of the total dearth of ISS science. Pretty pictures do not themselves write journal articles. And if zero-g is what interests you, you can get a whole lot of it for $100 Billion without building a space station.
    I want to keep the station up there, but let's not pretend it is for science.

  11. Re:Learned nothing? on NASA Plans To De-Orbit ISS In 2016 · · Score: 1

    Best case that is engineering and diplomacy. Not a lot of science return for $100 Billion.

  12. Re:The research doesn't support you... on Swine Flu Kills Obese People Disproportionately · · Score: 1

    When was your dad at Tech?

  13. Re:Minimum mass of a Petabyte on How Heavy Is a Petabyte? · · Score: 1

    I'm just saying you don't put data "on" a photon. You may prepare the state of a photon so the photon represents some data, and then you would say you are storing data "as" photons, or "as" photon spin, or "as" photon energy. The photon is the data, not a container of the data, or parchment on which the data is written.

  14. Re:Minimum mass of a Petabyte on How Heavy Is a Petabyte? · · Score: 1

    As photons, not on.

  15. Re:No, a bettery wouldn't get any lighter on How Heavy Is a Petabyte? · · Score: 1

    In your 2 H + 0 -> H2O, won't there be a photon released, which would account for the binding energy difference and of course the change in mass? Or could it be phonons? I imagine that the water molecule might when first created have some rotational/vibrational energy which can only be dissipated if the molecule can interact with something - or release photons. And let's not forget the lower gravitational potential of the H2O compared to the component atoms.

  16. Re:"The magnetic field lines are clearly visible. on Sunspots Return · · Score: 1

    A plane is continuous, and it is made up of an infinite number of discrete lines. Just like there are an infinite number of latitude lines.

  17. Return mission on Cassini Spots Geysers On Saturn's Moon Enceladus · · Score: 1

    Looking at the size of those things makes me think a sample return will be pretty easy; we won't need a plan for leaving the surface, just good timing getting into the hole.

  18. Re:Sort of Hawking Radiation on First Acoustic Black Hole Created · · Score: 1

    I decided that it will not change the speed of light in the Casimir cavity: The cavity by it's nature prevents light of wavelength bigger than the cavity from propagating anyway. Light with wavelength small enough to be unaffected will see particles also small enough to be unaffected. Hence, any light that can propagate in the cavity will not see the cavity, no any effect of the cavity.

  19. Re:Sort of Hawking Radiation on First Acoustic Black Hole Created · · Score: 1

    Are you aware that there are particles in any vacuum and that they are the supposed source of Hawking radiation?

  20. Re:Sort of Hawking Radiation on First Acoustic Black Hole Created · · Score: 1
    The GP's point in referring to a Casimir cavity is that space is not empty. That there is a Casimir effect proves that there is a lower density of particles in the Casimir cavity than in normal vacuum. So if you are correct in your claim;

    The less it interacts with particles the faster the light travels.

    then light should travel faster in a Casimir cavity then in vacuum. Though, I would bet that it still does not allow you to send a signal faster than with light in vacuum.

  21. RTFA Much? on Palm Pre "iTunes Hack" Detailed By DVD Jon · · Score: 0, Redundant

    Two points:

    1) This is impossible for Apple to block. If according to USB it's an iPod, how can Apple distinguish? They can try to see if any little details are missing, but in the end any probing they do can easily be met by Palm.

    From TFA:
    However, it is only the Mass Storage interface that identifies itself as an iPod. The root USB node (IOUSBDevice) still identifies the device as a Palm Pre (not visible in the image above). This means that Apple can very easily update iTunes to block the Pre.

  22. Re:Free Electricity? on You've Dropped Your Landline — Now What? · · Score: 1

    Good thing you are on /. and have no friends to call you while that wire was in your mouth.

  23. Re:It's "experimental" on Java Gets New Garbage Collector, But Only If You Buy Support · · Score: 1

    http://www.sun.com/software/javaseforbusiness/faq.jsp#c2q1
    Internal/In-house use: The Java SE platform binaries (JDK and JRE) are licensed under Sun's Binary Code License (BCL) with supplemental terms. For most developers and end-users, the binary JDK and binary JRE are all that's needed to experience the world of Java technology. USE: The binary JDK and JRE are available at no fee from Sun (per terms of the BCL) for use with desktop personal computers. JDK or JRE use for embedded devices and other computing environments may require a license fee from Sun.

  24. Question on tmpfs on Microsoft To Banish Memcpy() · · Score: 1

    I've seen much discussion that with enough RAM and a smart kernel/fs, file access will be cached in RAM. Any idea why the fs you were using did not, but tmpfs did? Could it have been due to flush()? You managed a big win, so I am wondering is tmpfs just a bigger risk if ones system should go down?

  25. Re:It didn't work for microsoft... on Reports Say Apple May Manufacture Its Own Chips · · Score: 1

    Well it worked when they did the ASC "Apple Sound Chip", the IWM "Integrated Woz Machine", SWIM "Super Integrated Woz Machine" and some others. I don't know from the newfangled Intel Macs though what sorts of custom Apple chips are used any more.