How to install an app by drag-and-drop onto the Simulator window? - xcode

I have seen the following feature in the change log for Xcode 8.2
https://itunes.apple.com/us/app/xcode/id497799835?mt=12
Simulator installs an app by drag-and-drop onto the Simulator window
But I have tried drag-and-drop with .app file built for the Simulator, but nothing happens. Does anyone know how this feature is supposed to be used?

I wrote a small blog post about this.
In brief: use an .app that is built for iphonesimulator.

Related

Archived macOS app launches with blank window

I have a macOS app with a ViewController that renames and resizes the app window, has several buttons, and a WKWebView that loads a default webpage on launch.
The project itself is an .xcworkspace file, since it includes the CocoaPod SwiftSoup for HTML scraping.
The app runs great in the simulator. When it launches, it looks like this:
I want to run this app on my Mac outside of Xcode. I am not planning on releasing it to the App Store, it is just for my personal use.
I archive the project with Products > Archive, then select "Distribute App", then "Copy App" to create a directory with the archived app. This all works great.
When I launch the app, I just get an incorrectly sized blank title-less window, without the buttons or WKWebView from my Storyboard:
The app isn't hanging. I can open the "About" menu item, etc., so I know the app is running. it just doesn't seem to be using my Storyboard to draw the UI.
What would cause an archived app to differ from the app running in the simulator?
The funny thing is that I WAS able to archive this same app back in November under High Sierra, so I'm guessing the issue is either Cocoa Pods and/or Mojave related.
My debugging leads me to suspect either CocoaPods or Mojave related
My debug:
1) While debugging, I restored a version of the project from November. When I archive that restored project, I get the same blank non running app.
2) I AM able to archive another brand new project that doesn't use Cocoa Pods, so my guess is that this is either CocoaPods and/or Mojave related issue...
Any suggestions on how to proceed debugging, or help resolving this would be greatly appreciated!
I am using Xcode 10.2.1 under Mojave 10.14.5.
This problem is caused by WKWebView.
So, you need remove WKWebView from IB and then create it with code and add it to the view.
REFER:
https://forums.developer.apple.com/thread/116047
http://www.openradar.me/23699297

Xcode storyboard showing osX object library. I want IOS object library

I develop mainly IOS apps but, recently, I worked on an OSX app. Both are possible with Xcode (I use 8, with swift).
Unfortunately, when I switched back to my already-existing IOS project (after restarting Xcode), the storyboard selection menu for the object library shows only OSX objects, not IOS (e.g. UIImageView).
I have googled without success and tried restarting Xcode, also without success. Can anyone help me fix this?
I did a lot more searching and came up with:
Xcode is loading in OS X objects instead of iOS objects
There there are other solutions proposed but the one that worked for me was to close the assistant editor and then, in the file list ( leftmost window in Xcode 8), I double clicked on the storyboard file. Problem solved. I am surprised that this bug still exists in this latest version...it is very troublesome.

Xcode 5 - "iOS Simulator failed to install application" every time I switch simulators

Using Xcode 5 GM, anytime I switch to the 5.1, 6.0 or 6.1 simulators to test, I get the error "iOS Simulator failed to install application." When I reset the simulator it works, but this is getting very tiring.
Anybody have a permanent fix or workaround?
Looks like this is a known issue. From the Xcode 5 release notes:
After switching the minimum deployment target of an application from
iOS 7.0 to a release prior to iOS 7.0, building and running the
application may fail with the message “iOS Simulator failed to install
the application.”
Go to the iOS home screen, click and hold the application icon, then tap the hovering “X” button to delete the application. 13917023
Another release note:
iOS Simulator
If an iOS app is detached, relaunching the same app from Xcode will
result in a black screen in the Simulator even though the new app is
launched. Terminate the app in the Simulator or relaunch it for the
second time. 14648784
Delete the old version app in your simulator (usually iOS 6.x).
Alternatively, header over to iOS Simulator - Reset Content and Settings.
This can be easier when you have a lot of apps on the simulator and can't remember which one you're currently working on.
You need to do this for every iOS Simulator version that causes the problem.
None of the other suggestions worked for me. However, after comparing my existing app settings to a new vanilla project, I noticed that the "Build" field for my Target was blank. Once I put something in that field, the app installed just fine!
if you have already developed project and you used xib to develop views then
X-Code > Inspector Selector Bar > Interface Builder Document > opens in > and change from Xcode Default(5.o) to Xcode 4.6 .
Build and Run your app it will run successfully, if it won't run again then, header over to iOS Simulator - Reset Content and Settings. delete old app from simulator then Run again.
i got the same problem but solved by following way....
Launch the iOS Simulator
Go and click "iOS Simulator" menu
Click "Reset content and settings"
Close simulator and rebuild your app.
Above screen shot is showing the way how you can do this...
I think this works for you...!!!
Deleting the app in the simulator works for me.
just wanted to add that this happen only if I open xib that created in xcode 4.6
If it's other files, this not happen
try this ....
in my case nothing have worked for me , after resetting the content simulator also , i am not able to install the app on simulator . after that i just changed my project location . i just moved the project to other location . then it installed successfully.
None of the above things worked for me. I just reinstalled xcode and it worked.
Ran into this issue today. Found it was an empty Reference Folder (blue folder) causing this. Removed the folder from Resources in Build Phase... cleaned build folder for the heck of it, and it went away.
/Users/YOURUSERNAME/Library/Developer/Xcode/ --> remove all contents of this folder, then simply launch the app from Xcode.
To check your Executable file settng ex.$(EXECUTABLE_NAME)
(Project setting - info property page)
I have different issue when getting error message “iOS Simulator failed to install application”, the reason is because I have added a property in App-Info.plist without any value. For instance, [Application Category] with no value. Thus the error will show up as well.
When I got this error, the image of the phone actually appeared, but the image of the app I wanted to test did not. Instead, I was on the main page of the phone that shows the apps you have. I fixed this problem by deleting the many icons that appeared on the start screens - about 30 of them. These had been created when I testing apps over the months. So, not saying its a solution, but it started working after I deleted the old app images.
For me it was -framework XCTest.
It made the app die with iOS Simulator failed to install application
and on the device Could not inspect the application package.
Removed it and now works.
You are using Xcode GM which is under beta stage. Use latest Xcode 5.1.1 available.
Also, these error occur while switching between simulator (32 bit and 64 bit).
Quit the simulator and re-build the application. OR
Reset simulator from "iOS simulator" -> "Reset content and settings.."
I changed my app name and bundle id midway. I happened to delete the Executable File name in my plist. I changed it back to "${EXECUTABLE_NAME}" (no quotes) and I'm back in business.

How to launch an iOS application in Simulator from Terminal and AppleScript

I have made an iOS application in Xcode and built it. It has created an .app bundle. I am able to launch the app in Simulator or on the device successfully from Xcode or iTunes, but now I want to launch it in Simulator through AppleScript from Terminal.
I am able to build the app from Terminal, but unable to launch it in Simulator. Somehow I found out that an .ipa file is needed to run the app from Terminal.
Is there a way to launch an iOS app I built in Simulator from Terminal?
I found an .ipa file that I wanted using iTunes and copied it over to my desktop. After that I changed the extension to .zip and extracted it. Next I found the Payload folder and moved the application inside to my desktop. Finally I moved that application to my iPhone simulators applications folder found at: "Your disk name">Developer>Platforms>iPhoneSimulator.platform>Developer>SDKs> iPhoneSimulator4.3.sdk>Applications
Hope this helps! (Note: Some apps crash more often than others.)

No iphone simulator folder in home library > Application support

I installed the xcode_4.3.1_for_lion.dmg on my mac 10.7.3. I need an iphone simulator folder to install the iapps. No iphone simulator folder in Application support
~/Library/Application Support/?
Checking in home library only.. ~/Library/...
Is there any way to check this?
I think this is a duplicate of How to install iPhone application in iPhone Simulator. I don't see any method of flagging a question as duplicate, though.
See my answer at following post.You should clear your trash folder and reset it.For more detail click below link.
No iphone simulator folder in Application support

Resources