Using the Network Link Conditioner on iOS devices - ios

How can I simulate various network conditions directly on my iOS device? I know this is possible on a Mac thanks to the Network Link Conditioner. Is there something similar on iOS devices?

Yes, with iOS 6, it is now possible to use the Network Link Conditioner directly on your iOS device, if your device is set to be enabled for development.
Simply go to Settings > Developer > Network Link Conditioner to enable it.
If you don't see Settings > Developer, to enable it:
Connect your iPhone to your Mac.
Xcode > Organizer
Select your iPhone.
Click Use for Development.
I've noticed that sometimes the Developer menu item disappears. It reappears again when installing an app using Xcode.

Might also mention that the developer option doesn't show up in settings sometimes until you tether the device and launch Xcode.
Close Settings>tether device>launch Xcode> Open Settings

So strange thing happened for me and hopefully it'll save someone the hassle.
I had my phone set to developer mode as I've used to build multiple apps previously.
For some reason, searching "Network Link Conditioner" in Settings doesn't bring up anything. Searching "Developer" brings up the Apple Developer app (if you have it installed) that shows info about WWDC videos, news etc. about Apple development.
For a little while I thought my phone wasn't in developer mode but scrolling thru Settings to see the other "Developer" option for actual developer settings of the device, its still there.

As an update for iOS8, and for people confused about the next step, if you have already gotten to the step in which you deploy to your device, all you need to do is go to on the device > Settings > Developer > Network Link Conditioner.

Related

How do I run/test my Flutter app on a real device?

I want to run/test (not automated test) my Flutter app on a real iPhone and Android phone during development. However, Flutter docs seem to only document how to do it with the iOS simulator or Android emulators.
I think it's already a no-brainer for iOS/Android devs but I am neither and Flutter is my first foray into mobile development.
Is there any link to a beginner's guide somewhere on how to develop while running it on a real device (with all of Flutter's live-reload goodness)?
Additional context
I'm a web developer.
I use Android Studio and VS Code.
I work on a MacBook.
For Android, this is pretty easy:
Enable Developer options and USB debugging on your device. This varies slightly by Android version, but the short version is you tap on the Device Build Number 7 times. Then a "Developer Options" option comes up and you can click "enable USB Debugging." See the linked Android documentation for the most up-to-date instructions.
Then plug your phone into your computer with a USB cable. You'll probably see some popup on your phone asking if you want to allow USB debuggng with that computer. Say "yes".
Run Flutter just like you would if you had a simulator running.
Using the right cable can make a difference. If the device is charging but nothing happens, try using another cable, preferably the one that came with the device. A notification on the device (e.g. "connected as a media device") and on Windows (e.g. "Device connected and ready to go") are indications that the USB connection is working. You should then be able to see the device on the CLI with:
flutter devices
For iOS this is a little more complicated because you need an Apple ID or to sign up for a "Developer Account":
Open XCode, then open "Preferences>Accounts". Sign in with your ID.
"Manage Certificates" > click on the "+" sign and select "iOS Development".
Plug your device into your machine. Find your device in the drop down (Window > Organizer).
Below the Team pop-up menu, click Fix Issue.
In Xcode, click the Run button.
(in subsequent runs, you can deploy to the iOS device with Android Studio, VS Code, or any other IDE of choice, you just need to set up that certificate the first time with Xcode. Here's Apple's documentation on setting up Xcode to run a physical device.)
Also, you can use your android device wirelessly using scrcpy.
Visit this link and install scrcpy. https://github.com/Genymobile/scrcpy
After you install and path scrcpy on your PC/Laptop.
Make sure your phone is connected to your PC/Laptop.
Enable Developers Options and Connect your device to the WIFI.
Open CMD.
Input "adb tcpip 5555". The adb should be restarted
Next, input "adb connect ipaddressofyourdevice:5555"
Ex: adb connect 192.168.254.19:5555
Now, you can use your device wirelessly.
Attach your real device on your development PC. To check setup process, run flutter doctor command. If result success of all required criteria then hit
flutter run

Developer option missing in Setting menu ios9.1

Yesterday i updated my iphone5s to ios9.1 with help of ipsw file. Now I am not able to see Developer option in Setting menu. I want to check my application in Low Connectivity situation.
Please suggest.
Its very easy now,
You need to attach your iOS Device with Mac and select trust option in device.
Then open Xcode and select attached iOS Device . You will automatically get Developer options under Settings App.
I am using current Xcode 7.3
Download Hardware IO Tools for Xcode from here.
And there's Network Link Conditioner app, which can help to simulate low connectivity, so you can test your app in Simulator.

Bluetooth diagnostics logs on iOS

I'd like to generate Bluetooth diagnostics logs on iPhone. I've installed Bluetooth Development Profile and I can click on "Save logs". But where can I find them and how can I transfer them to PC?
Preferably without iTunes, as on Windows I have very bad experience with this SW. I'm new to Apple ecosystem.
Thank you.
Your answer can be found in the Apple documentation here.
The steps are as follows.
Download and install the profile on your device (this can be done through Safari on the device).
Restart your device.
Reproduce any bluetooth commands you would like to diagnose.
Go to Settings > Bluetooth and select Diagnostic Mode
Add short description of the problem and tap Save
Sync device via iTunes (there doesn't seem to be a way to pull them manually without a rooted device).
Windows 7, 8, and Vista logs can be found at:
C:\Users\[Your_User_Name]\AppData\Roaming\Apple Computer\Logs\CrashReporter\MobileDevice\[Your_Device_Name]\BluetoothDiagnostics\
OSX logs can be found at:
/Users/[Your_User_name]/Library/Logs/CrashReporter/MobileDevice/[Your_Device_Name]/BluetoothDiagnostics/
The logs will be saved into timestamped folders like this Logs-2015.12.8-00.50.55/.

iOS – Run/Debug/Install builds over Wi-Fi

We have iPad and iPhone devices, but short of wires. Is there any way that we can install/debug the builds over Wi-Fi in iOS?
I know the way in Android, but not of iOS.
Now by using Xcode 9 and iOS 11 it is possible to run apps by using Wi-Fi.
Connect the iPhone via USB, go into the device window (Cmd-Shift-2), select your phone, and check the connect via network box.
More thorough instructions with screenshots here
Pre-Xcode 9 answer:
Over Wi-Fi installing and debugging of applications is not possible in iOS.
But there are some websites where you can upload your builds and then download on device and test it.
(Before you read make sure your running IOS 11 and Xcode 9!) Connect your device (Via USB), once you do go on 'Add Additional Simulators' (See image 2 at the bottom), and tick 'connect via network' (See Image One). Once XCode proccesses this, disconnect the device (via USB) and it should now appear with a globe next to it (See image 2)! Also make sure the device and computer are on the same network!
Image 1
Image 2
Simple Solution: http://diawi.com
Upto Xcode 8 & iOS 10 : Through wifi its not possible.
You just upload your ".ipa" file to this website http://diawi.com & get sort link for that. After that install build by requesting that link in iphone browser.
From Xcode 9+ & iOS 11+ : Its possible install debug build through wifi.
Open your project on Xcode
Connect your ios device with USB cable.
In xcode menu open Window -> Devices and Simulators or press (Cmd-Shift-2). You should see your device as connected devices.
Select your device and enable check box “Connect via network”.
Now you can see a network icon next to your phone name. This icon confirms that you can able to run build in wifi.
Now run your build through wifi to install build in your ios devices.
Using Xcode 9 you can debug over wifi(same network).
Make sure you have at least Xcode 9 or later and a device with iOS 11 or later
1- Open your project on Xcode
2- Plugged in your iPhone with USB cable.
3- Open Window > Devices and Simulators
You should see your device as connected devices
4- Select Devices from the top, Select your device from left and Check the “Connect via network” box
5- Now if Xcode can connect to your device via network, you should see a network icon after your phone name
6- Unplug your USB cord
7- Go back to Xcode and Hit the Run button
For deployment/CI I have tried and highly recommend BuddyBuild solution, here is some of the many features it has:
Excellent user help (chat/email) system and online service.
Supports webhooks so that a build is started whenever you push to your App repository. (All Git source control repos supported)
You can arrange system to auto send your builds to a preset list of testers/users whenever builds are ready.
You can [Auto] integrate their SDK to allow user feedback and crash reports.
It auto checks your app for compatibility with latest Xcode versions.
To activate a Wireless Debugging for iOS device to Run|Debug|Install your builds over Wi-Fi, you need to take six steps:
Connect a device via USB cable to the Mac with macOS 10.12.4+ and Xcode 9+ installed.
Launch Xcode.
Press Shift-Command-2 or go to Window-Devices and Simulators menu.
In the Devices tab select the devices from the Connected section.
Select the Connect via network checkbox (and wait for a few minutes when it's finished).
Disconnect USB cable.
This Network icon in the left panel means – Wireless Debugging is OK.
On iPhone go to General–Device Management–Application to trust and press TRUST.
Now you can Run | Debug | Install your builds over Wi-Fi.
To do this, connect your iOS device to your Mac using the appropriate USB cable, and select the Window tab in the menu bar, open the Devices and Simulators window by selecting Devices and Simulators from the Window dropdown or Cmd + Shift + 2.
Ensure that your device is selected in the list farthest to the left in the Devices and Simulators window. Check the Connect via network box.
If your device is on the same network as your Mac, you’ll see a globe appear next to your device’s name within a few moments. This indicates that your device is wirelessly connected.
You can now disconnect the USB cable connecting your device to your Mac, and build and run your app wirelessly.
Please check out this tutorial,
http://honzadvorsky.com/articles/2015-10-21-17-40-xcode_server_tutorials_4_certificates__provisioning_profiles/
here you can find a way for "App Installation over Wi-Fi"
I have not get a chance to implement it yet, but may be will try it out asap. meanwhile if someone is free then can try and post their view here so others can get help. Thanks
Requirements: iOS 11 and XCode 9, iOS device and computer on same wifi network.
Connect your device with USB Cable, launch Xcode, then on Xcode menu, choose: Window->Devices and Simulators. Choose device and check "Connect via network". Now you can disconnect USB and develop on device using wifi.
ScreenShot
" http://diawi.com "
this provides you build link of your project.
Whereas with wifi its not at all possible.
Wireless debug requires Xcode 9 or later and iOS 11 or later. Check this link. Here are detail steps to connect device for wireless debugging.
Connect the iOS device via USB. Go into the device window (Cmd-Shift-2), Select your device and check [x] connect via network. Remove USB cable and IMPORTANT: Connect your device via Personal Hotspot.
Agree with Amr I have found buddybuild as Jenkins+Hockey in one. Extremely useful and so far it seems good product.
With buddybuild you dont need to ask anyones UDID of their iOS device. Also I use it for test automation, where they give you freedom to spin whatever you want as long as you know how to set it up in their postbuild and prebuild scripts
To add to the above answers, for me the Mac and the iPhone should be connected to the SAME wifi network. Otherwise it will not recognise each other.
Over Wifi app installation is possible after we generate an IPA .
Create a plist file with bundle identifier
(See apple documentation for steps )
Create a HTML file
(give the source of IPA (link tag) and bundle identifier / Provisioning profile)

Where is the iOS Developer Menu in General Settings

I have many iOS devices and someone showed me their Developer entry in Settings -> General.
None of my devices have this...
How do I enable it? Does the device have to be added to the portal through the IDE of my machine? I can't find a way to get the menu to show up.
Connect your device to your mac via USB, open Xcode → Organizer and select Use for Development.
They removed it with iOS 6 I think. You have to now go into Mobile Safari Settings and under advanced enable web inspector.

Resources