2 Replies
      Latest reply on Feb 14, 2019 12:58 AM by eskimo
      desarrollador.0001 Level 1 Level 1 (0 points)

        Hi,

         

        I'm trying to build an iPhone App to monitor data traffic and get data consumed per app per month and I'm struggling to find a way to do this. If any of you could give me some ligth on this subject, even to tell me it's not possible, it would help a lot! If there is no possible and acceptable way to do it, I need to present evidence to the company I work for.

         

        The app is like a really closed environment, so I couldn't find any function on Apples Frameworks that could give me that information. We thought of a work-around to this by using a VPN server.

         

        I found this app, "My Data Manager", that uses a VPN server to hear all traffic and save data consumption information to the app. I thought it used a VPN server outside the device to save that information and once the app is running then harvest it from that server and save it on the app's data base; BUT apparently that's not exactly the way they are doing it. They are turning the device into a VPN Server (localhost), saving data traffic information somewhere inside the device but outside the app and when the app is executing it gets that info from the local VPN Server and saves it inside the app.

         

        If every app are closed environments I don´t get how this would work. Can you create an app that runs like a local VPN server?

         

        Any idea on how to do something similar? or if this is acceptable for the App Store?

         

        I would really appreciate any information or facts provided.

         

        Cheers.

        • Re: Monitor device's data traffic
          RenanGarcia Level 1 Level 1 (0 points)

          Hello

           

           

          I am researching how to create this localhost VPN, did you find any solution?

           

           

          Thanks

            • Re: Monitor device's data traffic
              eskimo Apple Staff Apple Staff (11,025 points)

              I am researching how to create this localhost VPN …

              I presume you’re talking about a NetworkExtension packet tunnel provider here.  If so, I recommend against using that tech to implement anything other than VPN.  This presents both technical and business challenges.

              On the technical side, which is all I’m qualified to talk about, the packet tunnel provider architecture was designed to support VPNs, and it’s not a great match for this task.  You may be able to get things working, but I’m deeply concerned about long-term binary compatibility.

              Share and Enjoy

              Quinn “The Eskimo!”
              Apple Developer Relations, Developer Technical Support, Core OS/Hardware
              let myEmail = "eskimo" + "1" + "@apple.com"