Unable to add apple device in Android studio - ios

I want to try out the Kotlin Multiplatform Mobile (KMM) in Android studio. I have installed the Plugin and when I try to add configuration for IOS, nothing shows up. I just have an IOS option but nothing shows up when I click on it. The android device is already set up, so I was able to run it in Android.

I guess you are not running Android Studio on macOS. You must have macOS to compile through XCode and use Apple Simulators.
If you are running AS on macOS and you created the project with KMM plugin it's weird that you don't have the run configuration for iOS already set up, but you can try to click on the + button on the upper-left corner. Remember that you must have XCode (and Simulators) and command line tools installed on your machine.
If you are running AS on an OS different from macOS you can only compile the non native (not macOS or iOS) part of the library.

Had the same issue. What fixed it it for me was installing Xcode command line tools with xcode-select --install.
If that doesn't work, generally check the integrity of your Xcode setup.

Related

React Native Expo Managed App doesn't launch/start on iOS simulator

I've been having hard times with my old Windows laptop while developing React Native apps so I moved to MacOS laptop. I installed Android Studio and Xcode (including Xcode command line tools). Then I initialized a blank expo managed project. I started both on Android Emulator and iOS simulator. Android one worked out with an ádb´ error (or maybe warning). But on the other hand, iOS simulator did nothing. There's no Expo Go app installed on iOS device, so it can not launch my app using it. I don't get any error or warning related to this problem, so I can't trace the problem.
I have tried deleting global expo folder located at ´~/.expo/´, I also tried to give 777 (all permissions) on that folder to my current user.
I tried uninstalling and reinstalling expo package globally.
I made sure I have selected Xcode command line tools on ´Xcode -> Preferences -> Locations -> Xcode 13.2.1 (13C100)´
I tried to launch different iOS devices like (iPhone 6, 8, 13, iPod etc.)
I tried clearing cache and starting expo with ´sudo npm start --clear-cache´
I have been trying to solve this for at least 2 hours tried everything possibly related to my problem but none of them did work. There's one thing I don't understand though. Even though I used different iOS device simulators the Expo Metro Bundler showed this ´› Opening exp://10.42.33.15:19000 on iPhone 8´ output. I have tried iPhone 13, iPhone 6, iPod etc. but this was the same output for different devices. Here's some screenshot related to probem:
https://www.youtube.com/watch?v=dvuZn6gX_Q4
This tutorial video on YouTube helped me solve my problems. I think I was missing a few things:
I haven't granted required privacy permissions on my Mac for Xcode, Android Studio and VS Code. Open System Preferences > Security & Privacy > Go Privacy Tab > Give Full Disk Access to Xcode, VS Code, Android Studio, Terminal and Watchman (Watchman is not required, but I have also installed it for solving a problem before)
You should to launch both your Android and iOS simulators before starting your expo application. Simply go to Android Studio and launch your device. To launch iOS device use bash and type open -a simulator.
If you don't have Expo Go app installed on your iOS simulator then you should first install it before starting your expo app. To install it use expo client:install:ios command.
Start your app by using expo start command. Type i and a or click on Run on iOS simulator and Run on Android device/emulator buttons to launch your app on devices.
NOTE: If you app gets stuck at New update available, downloading... stage then you can start your expo app with cleaned cache using expo start -c command. It was helpful for me.
NOTE 2: You may need to use sudo command on some of the commands I've mentioned, I'm not sure which ones are required or not.
I run into the same issue every time when I tried to set it up on a new laptop.
Its fixed after the installation of xCode cli.
Take a look at this - https://docs.expo.dev/workflow/ios-simulator/
I fixed similar issue by hard restarting simulator
Top menu -> Device -> Erase All Content And Settings...

Xamarin App running in Ios simulator using visual studio

I am facing the issue to run the xamarin app in IOS simulator. Whenever i am trying to run this app it was asking me to add or pair the Mac. Since I dont own the Mac I tried to install Xamarin.Ios in windows. In this process i need to install the XCode in my windows 10 Os. First of all i am unable to download the Xcode tool from Apple portal with valid credentials. I followed the below 2 links but no luck to download and install the Xcode. Could you guys please help me the easiest solution to download install the Xcode to do the next level of run the App in windows.
https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/windows/?pivots=windows
https://apps.apple.com/us/app/xcode/id497799835?mt=12
Bottom line is that iOS apps must be build using a licensed Mac OS, period. Visual Studio for Windows does not actually build the iOS app, what it does do is connect to a Mac (which must have XCode installed) and facilitate a remote iOS build via XCode. However, if you have a Mac, you can build both iOS and Android code directly on your Mac using Visual Studio for Mac. Yes, it is frustrating that you must have access to a Mac OS to build iOS apps, but this is a requirement and there is no way around it.

Visual Studio 2017 (Xamarin) not showing list of iPhone Simulators

I've got everything seemingly working properly with the connection between my VS 2017 and the Mac. All looks good as far as the connection, the build works fine with no errors but I can't actually debug/run it because it doesn't allow me to choose a simulator.
On the toolbar, I have selected: Debug | iPhoneSimulator | Simulator
iPhoneSimulator is the ACTIVE platform.
On the Start > button when I drop down the menu options, it gives me:
Start
Device
Unsupported Devices >
Change Deployment Target
iPhone 5s iOS 10.2
iPhone 6 Plus 10.2
iPhone 6s Plus iOS 10.2
iPhone 6 iOS 10.2
See the screenshot of my menu options
and about 10 or so more but they are all in the "unsupported" category so whenever I try to click on one, nothing happens, and when I try to run my project, I get "Please select a valid device before running the application."
The PC is running Windows 10 x64 with Visual Studio 2017 Community Edition.
The MAC is running El Capitan 10.11.6. (Can't update to Sierra (10.12+) because Apple doesn't support it on this MAC)
Xcode running is 8.2 (have also tried 8.2.1) and can't update to 8.3+ because 8.3 and up requires Sierra (o/s 10.12+)
The latest versions of Xamarin are installed on both the PC and the MAC with all corresponding updates.
I've had to change the build option "Link Behavior" in VS to "Link Framework SDK Only" as the instructions state because of the fact that I can't install Xcode 8.3 on the MAC.
Any suggestions as to why everything would seem to work EXCEPT for VS 2017 no obtaining a list of simulators from the MAC? The MAC sees the simulators. Even running the command "xcrun instruments -s devices" on the MAC returns all of the simulators. I can make a sample program in Xcode, choose a simulator and run it. It just won't pass that information to my VS 2017 so that I can launch it from there. It will even let me launch the iOS simulator from VS 2017 without error.
I've tried uninstalling and re-installing Xamarin on both the PC and MAC and creating a new iOS project. Everything builds fine. Everything else works, just not the debugging/running and the reason it won't work is because I can't choose an actual emulator.
You will need to make sure your target version is lower than your Simulator version.
Open Info.plist and select a version lower or equal to 10.2.
I ran into something similar while running VS2017 on Mac OS X. I was using multiple build configurations, and I had multiple Info.plist files. One of them (not even the one that should have been used for that build config) had two entries for CFBundleShortVersionString due to a bad git merge. I wouldn't have discovered that if I wasn't opening each of them to change the Deployment Target mentioned in #lowleetak's answer. After correcting that, I was able to debug to the simulator again.
So for other who run into this - check your Info.plist files.

Installing Appcelerator Studio OS X El Capitan

I've been using Appcelerator Studio a lot, never seen this problem before. I recently did a fresh installation of OS X, then installing Xcode (7.3.1) and Command Line Tools for Xcode 7.3.1.
When installing Appcelerator Studio (build: 4.5.0.201602170821) everything is going great, the CLI gets installed. When starting up Appcelerator Studio, I have to configure SDKs, hence I am only interested in iOS at the moment, I uncheck Android in the Platform Configuration. The following is that Configuring SDK encountered a problem:
An internal error occurred during: "Configuring SDK". java.lang.NullPointerException
I continuing, and go to Preferences>Studio>Platforms>iOS, where the iOS SDK home says Not specified, I click refresh - nothing happens.
I run xcode-select -p and the correct path to Xcode Developer folder is printed.
Anyone having a clue of solving this?
I've check all the version statuses, also tried to reinstall and deleting all information that can impact to this.
Share the directory hierarchy where you have stored Android SDK and Platform screen folder. Also try to follow the guidelines of Titanium to integrate iOS, but remember to clean the hidden folders in root directory of your OS X system.
I believe the problem might be with your Xcode. Are you having multiple Xcode's installed?
Use sudo xcode-select -switch <xcode_folder_path> switch between Xcode's.
Then,run appc ti info -t ios and check whether CLI is able to identify the selected Xcode. If your Xcode is listed here, then studio should be able to identify it.

XCode Compatibility Issue with different versions

I recently made a project using XCode 4.5.1 on iOS 10.8.
I want to run this project on a different computer using XCode 4.4.1 on iOS 10.7.5.
It is currently giving me the error:
XCode cannot run using the selected device.
No provisioned iOS devices are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to run your application or choose an iOS simulator as the destination.
Is there a way to open the project on the other computer without having to redo all the delegations and such?
I have tried turning off AutoLayout and running it on the iOS 10.7.5 computer and it is still giving the same error.
Thanks!
Change the deployment target to the ios version you want to run the project on.

Resources