Why does XCode (4.5.1, Lion) require an internet connection to connect to iOS simulator? - ios

I am developing an ios app that doesn't need an internet connection. I'm using phonegap and jquery-mobile. I'd like to develop offline, but XCode gets stuck with a status saying 'Attaching to iosproj' (iosproj is my project name). After that I cannot stop the stuck task, and have to force-quit XCode. With an internet connection however, everything works just fine. Grateful for any clues.
Edit: XCode seems to install the app fine without a network, but it gets stuck before/durimg receiving the deviceready event.
Update 1: The app runs fine on the simulator with or without the n/w. It is purely the XCode-iOS simulator interaction.
Update 2: When using phonegap (Apache cordova), there's an easy work-around to work offline. Once the project has been built and installed (with a n/w), all subsequent updates to html/js/css/img can be made directly to the www directory in the simulator's Library (under your app folder, in ~/Library/Application Support/iPhone Simulator/6.0/Applications).

The Simulator itself attempts to make an Internet connection to Apple as it launches. In particular, the itunesstored process attempts to connect to ax.init.itunes.apple.com and phobos.apple.com.
[That information comes from LittleSnitch. You would be well advised to install LittleSnitch so that you can be sure of exactly what connection is being attempted here. No one - certainly no developer - should be without it.]
If you find this troublesome (that is, if the connection failure is causing you to be unable to run your app in the Simulator at all) you should file a bug report with Apple. However, I've had no difficulty with this, so perhaps this an Xcode bug. I'd suggest first updating to Xcode 4.5.2 in case it is fixed there.

Related

Ionic 6 app getting CORS error accessing develper.google.com on iPad only

I have an ionic 6 app built with angular and cordova. I can build the app just fine for iOS and it runs on an iPhone with no issues.
But for some reason, when running the same build on an iPad I get CORS error accessing developers.google.com (I assume this is from firebase, which is in my app)
Most of the other questions I've found involve Capacitor, which I am NOT using.
Similar, but I'm not making http requests directly. I'm using AngularFire: https://forum.ionicframework.com/t/cors-issue-when-sending-request-from-ionic-to-firebase-cloud-function/185239
I've been able to repeat this scenario. If I remove the app from the iPad simulator and run it again, it works. However, if I refresh using Safari dev tools, or just re-run the app, the issue occurs. (maybe it's a timing issue?)
erorrs.
Some more information around the erorrs
The way I managed to address this was to switch from the Cordova build to the Capacitor build following the instructions here:
https://capacitorjs.com/docs/cordova/migrating-from-cordova-to-capacitor
Essentially, once I started using the newly create ios folder instead of the old platform/ios that was generated by Cordova, the error stopped.
I don't know why, but maybe this will help someone else.

Deploying Xamarin.Forms app to iOS: MT1006 EOF Error (error: 0xe800000e)

I am trying to run a Xamarin.Forms app on my iPad and getting the following error:
Launch failed. The app 'AppIOS' could not be launched on 'My iPad'. Error: error MT1006: Could not install the application '/Users/mycompany/Library/Caches/Xamarin/mtbs/builds/AppIOS/someguid/bin/iPhone/Debug/my.app' on the device 'My iPad': EOF Error (error: 0xe800000e).. Please check the logs for more details.
This app has previously ran fine on the same device. The iOS build and deployment process seems very unstable so it often takes multiple attempts so I'm used to having to restart Visual Studio, the Mac it builds on and the iPad and generally wasting a whole lot of time. I have restarted everything involved here multiple times but this error persists. I have checked the device logs and there are no related messages or even any messages at the appropriate times.
I'm using Visual Studio 2017 (15.9.4), Xamarin.iOS and Xamarin.Mac SDK (12.2.1.12), building on a Mac Mini running macOS Mojave and XCode 10.1, deploying to an iPad Air (A1474) running iOS 12.1.1. As far as I'm aware there have been no updates to any of these since I last had it working. The UWP version of the app runs fine.
I can find a lot of MT1006 issues but none with EOF Error (error: 0xe800000e) and I can find no information about this specific error at all. Can anyone enlighten me on what this means?
Sounds overly simple, but I just had this issue and I solved it by restarting the iOS device and redeploying it. Specifically, I was deploying to an iPod 6th Gen and I held the power and home buttons until the screen turned black, this is more of a hard restart. Then let the device reboot and try deploying again.
NOTE: Don't hold the power and home buttons too long, because if you do, the iPod will go into a factory reset restart.
Try pulling up the device in Xcodes' devices tab. I did and realized the device had an error within the tab. I then disabled the "Connect via network" button, then things started to work properly.
I am agree, Xamarin build environment on iOS part is very buggy.
In any case of unknown error in such config: VS<->MAC<->iOS Device try these steps:
Try to switch Off and On Mac wifi.
Reconnect VS to Macbook and Macbook to IPhone.
Delete bin and obj folders on Macbook
Check your PList and Entitlements file(as example wrong aps-environment setting can cause installing errors)
Check your sign project settings
5a. Check your provisoning profile term
unistall application from ios
rebuild and run project again
I'll appent new lines in case i'll remember something else.
What you described happened to me and solved by 1,2,7

iOS App starts but is always terminated immediately before app opens

When trying to start an app in debug mode from Visual Studio on a real iOS 10 device, VS will display "Launching app", and then immediately follow up with an "App terminated" message.
No detailed error can be found in the device logs.
I have tried several things, including deleting caches, restarting, reconnecting, rebooting devices and Mac Agent.
I have followed this bug issue to clear caches (https://bugzilla.xamarin.com/show_bug.cgi?id=43239) but with no success.
Also I made sure that all entitlements are correctly described.
After some investigation it turns out that XCode was displaying a tiny message, that this version of XCode was incompatible with the device.
This message is not carried through to Visual Studio.
Update XCode!
Second, possible solution from the bug tracker (https://bugzilla.xamarin.com/show_bug.cgi?id=43239):
Delete contents of
%AppData%\Local\Xamarin\MonoTouch\ on windows machine
$HOME/Library/Caches/Xamarin/XMA on mac machine
Hope this saves somebody else some time.

Internal API error

Since few days, every time I try to run my app on my iPhone, I get get this error message "There was an internal API error".
I'm getting this error just with one application only on my iPhone. In fact, there's no problem with the same app on simulator or on my iPad. No problem too with other apps on my iPhone...
I've tried many things mentioned in those threads:
"There was an internal API error." while running an app on any iPhone/iPod-touch device
Xcode 4.4 - There was an internal API error
like remove/re-run the app, reboot iPhone/mac, clear cache, check plist, check profiles, check build settings, restore iPhone.
I'm using xCode 7.1.1 and iOS 7.1.2
Can someone point me on what I forget to check please ?
As per my work and research I got a solution. Since I was preparing the build in manual way from product. In that case my appname.app was copying in folder from which I have to create a build, that app was not copied properly and I prepared the build and installed in my device, in that case I got this error.
I again clean the Xcode prepare the build properly and installed it, it works.
When I rename my project and delete the special character "ç", xCode success to run the app on my iPhone. It might be related to xCode 7, before there was no problem for compiling.
I also had this problem. The way I solved it was by removing the special characters from the Product Name (in Build Settings) - I had an 'æ'. Indeed, it looks related to Xcode 7, because it used to work on previous versions of Xcode.

ios Simulator Could Not Find The Application To Simulate

I'm having trouble with the iOS simulator. I'm currently on 10.7 and was using the simulator to test my website. During the testing, I switched the iOS version via the tool bar, and the application froze and quit. Upon restarting, I get the following error message, with a finder window, inviting me to choose an application:
"ios Simulator Could Not Find The Application To Simulate"
Here's what I've tried to fix the issue:
1: Attempt to identify the application it needs, but the only thing i could see to open was a printer app and the ios simulator app, which just results in a "only one iOS simulator can run at a time" error message.
2: Restart the Mac.
3: Download the new Xcode tools from the app store.
4: Restart again.
None of this has helped, and I'm really stuck without it at the moment. If anyone knows how to resolve the problem, I would be grateful to hear any suggestions. Thanks.
Give this a shot.
Open up a new shell, and shoot of this command: sudo <Xcode>/Library/uninstall-devtools --mode=all (assuming thats the location of the instal).
Then run the Xcode installer you got from the app store.
This removes all the plist files that were also installed with xcode, which aren't removed when you simply reinstall. This is as close as you can come to a complete xcode refresh without reinstalling your OS.
Here's an alternative solution that worked for me... the answer selected here did not. I created a blank, "hello world" project and simply ran it. When you run the app, it sends the app to the simulator and voila! iOS Simulator has an app to simulate. From that point forward, you should be able to open the iOS Simulator without a problem.
After a while longer trying various things, it seems like I may have fixed it.
When asking for an application to open, I opened Xcode, and (weirdly) that opened up and left the testing shell visible, with the tool bar intact. I then selected the current version from the device options and hit the home button, and suddenly everything appeared.
Weird thing to have suddenly happened, but there you go.
I still can't test in iOS 3, so that's a bit of a problem, but not a disaster either!

Resources