I know there are ways to do it with XCode 5 but is it possible with my infrastructure?
I'm using Visual Studio 2012 and MonoTouch.
In XCode I can go under Debug > "Simulate Background Fetch" or there is also a second way: XCode Menu, "Product" => "Scheme" => "Edit Scheme" enable the option "Background Fetch".
Unfortunately this is currently not possible in Xamarin Studio/Visual Studio.
But we're working on it, and it will be included in a future release.
I noticed the new update of Xamarin Studio 5.0 included Background Fetch support. (http://docs.xamarin.com/releases/studio/xamarin.studio_5.0/xamarin.studio_5.0/)
When debugging using the simulator, go to Run->Simulate IOS Background Fetch
This can now be done in Xamarin Studio only and only using the iOS Simulators. Make sure your iOS project already has the Background Fetch permission selected (in your iOS project properties or manually in your info.plist). Then, in Xamarin Studio, you choose Run -> Run With -> Custom Configuration -> Select Background Fetch -> Run
That will launch your app in the background and will force a background fetch to happen.
Once you do that, you should not have a separate option listed under your configuration dropdown for iOS. There should not be a .iOS and an ProjectName.iOS - Background Fetch option in the dropdown. The nice thing about this is that, after selecting ProjectName.iOS - Background Fetch and running the app, while the app is still running, you can go to Run -> Simulate iOS Background Fetch to run the fetch multiple times. This option is always greyed out for me if I run my app using the Custom Configuration window though.
Related
I repeatedly run into the problem, that Android Studio is not deploying the app on the mobile device.
When I hit the play button it shows the following message in the 'Run'-Tab:
02/16 12:08:06: Launching 'App' on Physical Device.
Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: No outputs for the main artifact of variant: debug
Normally, I can fix this by hitting the "Sync project with gradle files"-Button or just trying to deploy again. So this is not the main problem.
The annoying part is, that Android Studio shows the green "Success. Operation succeeded"-Bubble next to the run tab, even if nothing was deployed to the device.
Is this a problem in the IDE? Can it somehow be configured to show an error instead?
I am using Android Studio 4.1.2
run -> edit configuration -> before launch
click on add button and select gradle-aware make
then press apply and then OK
by above step my app run successful
I'm running Android Studio 2.1.2 on Ubuntu 14.04. When installing I chose to download API 24 without thinking and now it gets selected every time I start a new project. Because umake provided Android Studio with JDK 1.7, the Design View always shows an error 'Android N requires JDK 8'.
I can get past this by unchecking 'Automatically Pick Best' and choosing a lower API, but now the Design View is blank. I have to edit the xml and remove the following line;
app:layout_behavior="#string/appbar_scrolling_view_Behavior"
Now I can finally see the Activity I'm building in the Design View.
What I'm looking for is a way to stop Android Studio from always having 'Automatically Pick Best' checked and API 24 selected every time i start a new project. Is this possible? It's a pain to have to go through all those steps each time.
Android Studio installs API 24 by default there is no way around this when you first install (at least that's the way it is with my ubuntu distro - you cannot uncheck API 24 even when you choose to do custom installation settings). sudo umake android
After the install, and before I created a new project I clicked the cog to open 'Configure' which allowed me to open the SDK Manager. In here I was able to install API 23 Marshmallow and delete API 24 Android N.
Now when I create a new project API 23 is selected and the Design View works fine.
I've got an application I've been working on and am having an issue with android studio. When I click "build->run" and then select my device, the application never runs on my phone (and the log in android-studio that automatically comes up does not have anything, whereas in the past when I have used this feature it usually says something like, "waiting for phone..." and then the application pops up and automatically opens on the phone and you get some other pertinent information). I have the phone already in developer mode with the install from unknown sources set to on. When I manually move the application from its gradle build location to the phone and then install it manually in file explorer, all is well and the application performs as expected. As I need to debug, however, this is not a very viable solution. Anybody have any advice as to how to get it to run from the IDE? I have tried rebuilding and invalidating the cache/restarting android studio, to no avail.
When I click the run tab at the bottom I have an empty window. When I click the debug tab, I see:
Waiting for device.
Target device: samsung-samsung_sm_g920a-randomIntegerId
Uploading file
local path: /home/eric/Documents/class/OOSE/final_project/2015-group-17/project_code/android/Place2B/app/build/outputs/apk/app-debug.apk
remote path: /data/local/tmp/oose2017.myApp
Note: I am building the application on a LUbuntu 15.04 VM on a windows 8 host, and am using the latest version of android studio.
EDIT: gradle console indicates a successful build as well (obviously since moving the .apk manually to the device works properly).
Open 'Run->Edit Configurations...', and look for your app module in the column on the left-hand side.
Select it, then go to the 'General' tab.
Under the 'Activity' section, there are a couple of radio buttons. Make sure that 'Launch default activity' is selected.
I can't find any documentation on how to publish your app to the app store from Visual Studio? Is this a case of having to use Xamarin Studio once you are ready to submit your app?
It seems a bit odd that xamarin gives you the opportunity to use Visual Studio but then has absolutely no instructions on how to create a bundle to submit your app to the app store..
Any tips on how to do this with Visual Studio would be great.
As far as I know, there's no way of submitting to AppStore (or even TestFlight) from VS.
I believe that you can only submit builds to the App Store using Xcode or Application Loader. Both Mac programs.
Personally I make a release build in Visual Studio, and then click the 'Show IPA File In Build server' button.
If the buttons greyed out, right-click your iOS solution, select properties. Then go to 'iOS IPA Options' and check 'Build ad-hoc/enterprise package (IPA)'
Then I go to my Mac and start up Application Loader and drag the IPA file there.
I'm having real trouble when I try to use the IOS emulator from the visual studio. So I created a hello world app in VS using xamarin (latest stable version), I set the project as main project, and When I refresh the connexion with the mac, I can't select the device that should be shown in the selectList. The message is "No device attached" :
And if I try to use xamarin studio on the host mac, all is okay, the sample app builds on the iphone emulator:
Thanks to help me !
I know this question has already been answered, but i found it when i had a problem, and it did not help... but i did find the solution:
Under the debugging menu in VS2012, click on Configuration Manager
make sure that iPhone Simulator (or iPad, if you want) is set...
Default seems to be looking for a physical device...
hope this helps.
Are you sure the device is connected to the Mac and not the Windows machine? Have you tried debugging from that same device from Xamarin Studio on the Mac?
Had the same problem. Issue was when i loaded my solution, visual studio 2012 decided to choose a library project as the 'Startup project'.
Rt Clicked the ios project, chose 'Set as StartUp Project' and the device list was populated.
P.S: Visual Studio you should be old enough to figure this out by now.
When I ran into this problem, I had another instance of visual studio running which was connected to the Mac.
Apparently you can only have on VS instance connected at a time.
Check your server log in Visual Studio output window for some more clues:
Closing the other instance of Visual Studio allowed me to connect in the instance I wanted to debug in
I discovered something missing. For me, in Visual Studio 2013, for some reason they have removed Solution Platforms from the toolbar. This makes it impossible to switch from iPhone to iPhoneSimulator without opening Configuration Manager. So, to fix this.
Click TOOLS/Customize then select the 'Commands' tab then select the 'Toolbar:' radio button and click the dropdown to the right of it and select 'Standard' as the toolbar you're working on.
Now, click 'Add Command' and select 'Build' from the catagories on the left and then scroll down commands until you find 'Solution Platforms'. Select that one and click OK. Then click the 'Close' button. You will now see an additional dropdown next to the Solution Configurations dropdown on your Standard Toolbar.
This will allow you to easily switch from iPhoneSimulator and iPhone. Use iPhone when you want to plug in an actual device, and use iPhoneSimulator when you want to pick a simulated device.
Hope this helps somebody out. I too have spent lots of time trying to figure this one out when I went from a device and was trying to use the simulator instead.
Restarting of Visual Studio 2010 worked for me.
Different things worked for me (Windows 8.1 & Visual Studio 2013):
Restart Visual Studio
Set 'iPhoneSimulator' as platform (only working one)
In Properties - iOS Application change 'Deployment Target' version to some lower number (6.0 worked for me).
As well as checking you have the right startup project selected as per #Chamkila's answer, check that you haven't accidentally broken your project's Info.plist file by attempting to open it through Visual Studio.