cannot see my ios device connected to access sqlite database - ios

I have my iPad connected to my Mac mini. I am doing iOS development and want to access the sqlite database on my iPad for my app. I did this in the past using sqlite-manager tool/plugin from firefox(basically its like management studio for sqlite databases). Now when I connect my device to my mac -mini (osx mavericks) i dont even see my iPad anywhere connected to my mac mini. But it is charging the battery (so it is connected). Lets say I want to copy photos from my ipad to my mac mini, how would i do that?
The database for my ipad app is located at
/private/var/mobile/Applications/C577E881-463B-481E-84F4-5C3564D0FC89/Documents/MyAPP.db3
How do i access that DB on firefox tool? If you need more info,please ask. Thanks.

The only way I know to get access to the SQLite database from a device is to save it locally to you Mac. In Xcode 6.3 you can do this via the Window->Devices screen. Choose your device, choose your app and hit the sprocket button underneath the "Installed Apps" table. Using the "Download Container..." option you can get the .xcappdata file to your computer. Right click on the file and "Show Package Contents". The SQLite database will be in the AppData/Library/Application Support/APPNAME folder.

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

Why cant I build apps on my PC but I can on my mac? Xamarin

So I got my MacBook pro yesterday in hopes of developing some local apps to build on my phone.
And after setting everything up, Visual studio on my mac and XCode, and I already had Visual Studio on my PC things started messing up.
I tried debugging my app on my phone from my PC, with the phone connected to my PC ofcourse, didnt work, so I read around on the internet for a good 4 hours and it said that I should create a blank project in XCode, and for the Signing in preferences I had to choose Team, so I did and it debugged the application on my iphone when my iphone was connected to my Mac,
However I DONT want to code on Mac computers, I want to use my PC.
But everytime I try to debug the application from my PC it keeps saying
Could not find any available provisioning profiles for iOS.
I am running a iPhone 7 with the version 10.1.1 because I dont want to update due to various reasons.
I tried changing the Deployment target to something really low but that didnt fix it.
Why is this happening?
Visual representation of what the error looks like
Not sure if this picture helps, this is the project properties > iOS Bundle Signing
And my device log is empty aswell.. Why?
ANother error message saying it doesnt support
EDIT
I plugged it into the mac and now its visible in the Device log and I can see stuff happening in the device log but I still cant boot the project on my iPhone
Apple doesn't allow developing for iphone on a non IOS device. This simply means that you can't build apps on a Linux or Windows computer/laptop the normal way. You are stuck on building your project on an IOS device.
There are 2 options to fully develop on a Windows laptop though.
One way of doing so is by using your mac as a gateway to send your app from Windows to IOS to your phone. More info about this can be found here:
https://learn.microsoft.com/en-gb/xamarin/ios/get-started/installation/windows/
The second option is a newer one called Xamarin Live Player. You don't need to use a mac at all for developing, but you still need a mac if you want to publish the app. This option also works differently from normal development as you need to download an extra program on your phone.
https://www.xamarin.com/live
You could try to do manual provisioning. Create a development provisioning profile at the Apple Developer site, and have XCode download it for you. Then it should show on your PC for you to select.
See the Xamarin documentation on manual provisioning for some more details:
https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/manual-provisioning?tabs=vsmac#creating-a-development-provisioning-profile

Mac os on VirtualBox does not recognize Iphone

I have been trying to connect an iPhone to Mac OS High Sierra, I've installed on VirtualBox for testing swift app I am trying to develop. However, even I connect the phone to the USB, I can't select the phone from the devices.The message in the device section says that No device connected to the mac.
So I have following questions,
1)Is it even possible to deploy and test iPhone app from mac os hosted on VirtualBox? and how to do it?
2)Are there any alternatives VMs to VirtualBox that allows me to connect my iPhone to virtual mac os for development purposes?
Thank you.
I've tried all the above solutions but still, my macOS on the virtual box wasn't able to recognize my physical iOS device.
For me somehow simply turning on USB tethering on my iOS device worked.
From the Home screen, tap Settings > Personal Hotspot. If you don't see Personal Hotspot, tap Carrier and you will see it.
Tap the switch next to Personal Hotspot to turn on.
Connect your device to the computer using the USB cable.
The device will automatically begin tethering after syncing is complete.
First of all you need the Virtualbox Extension Pack.
The Extensions Pack for Virtualbox allows you to use USB devices. First download the file, called "Oracle_VM_VirtualBox_Extension_Pack-4.1.6-74713.vbox-extpack", from the Virtualbox website Download here. Then open up Virtualbox and open "Preferences" from the File menu. Go to Extensions and add the extensions file. If you're using Ubuntu, you'll need to go one step further and add your user account to the "vboxusers" group. Open the System Settings from the launcher, then go to "Users and Groups." Once there, click "Manage Groups." Reboot your system.
Setting Up USB
Plug your iPhone into your computer and open up Virtualbox. Choose the machine that you want to use your iPhone with and open up the machine settings. In the left pane click the option "USB." Make sure that "Enable USB Controller" and "Enable USB 2.0 (EHCI) Controller" are both selected. Click the "Add" button on the right side of the window, which looks like a USB plug with a green plus sign, and select the iPhone. Click "OK" to close settings.
Using Your iPhone
Once you've set up the USB, start your virtual machine. In the Title bar, you will see the "Devices" menu; click this and go to "USB Devices." Select your iPhone to mount it to your virtual machine. Once mounted, you can use the iPhone as you would if you were using your native OS. You can install your APP via XCode now.
if you're still struggling how to connect your Iphone device to a virtual-box guest MacOS. I recommend installing vmware and and install macos on that. since vmware does not have this problem at all
if you went throught alot of pain installing macos on virtualbox I recommend this tutorial which also provides you with all the file you need. it's straight forward tutorial and works all the way without any problem.

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)

My iOS device not appearing in xcode device list, showing in organizer

I m having xcode 4.5,
I have connected my iTouch(registered in developer program) to Mac Machine. It is appearing in Organizer's Device list. But, it is not appearing in xcode's device list(where simulators are) in one of my project. It is also shown when i open my other proejects.
So, What may be the problem in my this project, in which device is not appearing. Is any settings should be changed??
See the image below and change the settings.
You might need to "trust" the computer - a device will not show up in the organizer if the computer is not trusted.
Restart the iPad while it is connected to the computer. When it restarts, it will ask if you want to "Trust" the computer or not. Do so, then the device will show up in the Xcode Organizer.
Restart XCode
Try Changing the USB Port.
Clean Project. Shift + command + K.
Clear Derive Data.
I tried everything and then found that my device was identified on a different Mac but not mine. Quit and Reopen XCode resolved it.
The deployment target for your project is probably too high (e.g. iOS 7 if you are using Xcode 5 DP). Change it to a minimum version compatible with your device and try again.
Go to organiser, select your device, click on remove button at bottom of organiser screen, unplug your device and connect it once again. That's it. your device should be appear in xcode.
Go to organiser and click your device in the left panel. On the right, see if it is registered for development or not. If not, click "Use for development".
Hope it helps !!
Got this problem too. I plug my phone to Apple Cinema Display. Turns out I forgot to plug in the display's USB cable to my MacBook Air, so only power goes to my device but no data transmission (/me facepalm big time).
My case, I was trying to run a sample app I just downloaded and didn't knew it was iPad only. And I had plugged-in an iPhone. :)
I’m using a MacBook Pro (13-inch, 2019, Two Thunderbolt 3 ports) and my iPhone was connected through a USB-C Digital AV Multiport Adapter. The iPhone was no longer shown as a connected device. Tried connecting the iPhone directly to the MacBook without the Adapter and now it IS a connected device. I’m going to consider using a wireless connection for development.

Resources