Struggling to build ios IPA on windows


#1

Hi, I’m trying to build the IPA version of my app. APK build went absolutely fine. I’ve installed admin powershell and run the command

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

However when I run ‘exp build:ios’ from my command line, It is still asking me to enable WSL on the machine despite the powershell showing as online. Do I have to use the Ubuntu app I downloaded to build the IPA file

I’m clearly doing something very wrong.

Edit: Would someone be so kind as to list the steps for an ios build on Windows, as I’m not sure whether I should even be using my windows terminal for this. Thanks


#2

Which update of Windows 10 are you on?

For Windows 10 build 16215 and later, you can just install Ubuntu from the Store and run it once is recommended I believe.

On earlier versions, you’ll have to turn on Developer mode in Windows settings and use lxrun.


#3

I have windows 10 home edition, version 1709, build 16299.

I installed WSL and then Ubuntu afterwards and created my account.

I’m a but unsure of why I need to install Ubuntu though? Do I use Ubuntu to actually generate the IPA? or can I use my standard windows terminal that I’m used to?


#4

You need to have an actual Linux distribution installed and working. That is, install it from the Windows store, open it up at least once to set your unix name & password. Then build:ios will work.


#5

Hi Edgar,

I have installed Ubuntu from the Microsoft store and have signed up with an email and password.

I have then launched windows cmd and tried the command ‘exp build:ios’ from my project dir.

This is the error I’m getting

[exp] Making sure project is set up correctly...
[exp] Your project looks good!
[exp] Checking if current build exists...

[exp] No currently active or previous builds for this project.
[exp]
Does not seem like WSL enabled on this machine. Download from the Windows app
store a distribution of Linux, then in an admin powershell, please run:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

[exp] Error while gathering & validating credentials
[exp] ENOENT: no such file or directory, access 'C:\Windows\system32\bash.exe'
[exp] Set EXPO_DEBUG=true in your env to view the stack trace.

I have also checked that WSL is enabled and I can see it is indeed ticked in my settings.


#6

Did you restart the computer after installing ?

Try doing ‘bash.exe -c ‘uname’’ in powershell


#7

Hi Edgar,

The command returns ‘Linux’

I reinstalled Ubuntu from the Microsoft store. Created a fresh account and I have the same errors again.

I have also checked my system32 folder and can see bash.exe is located there so I’m not sure why it can’t find it when I attempt to build the IOS files


#8

Hi,

Please upgrade exp, I think i removed the part that is being oddly strict on you.


#9

Hi Edgar.

Thanks for a prompt reply

I’ve just upgraded exp and tried to build ios again. Something has definitely changed this time.

[exp] Making sure project is set up correctly...
[exp] Your project looks good!
[exp] Checking if current build exists...

[exp] No currently active or previous builds for this project.
[exp]
Does not seem like WSL enabled on this machine. Download from the Windows app
store a distribution of Linux, then in an admin powershell, please run:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

? How would you like to upload your credentials?
 Expo handles all credentials, you can still provide overrides

We need your Apple ID/password to manage certificates and
provisioning profiles from your Apple Developer account.

Note: Expo does not keep your Apple ID or your Apple password.

? What's your Apple ID? myaccount
? Password? *************
[exp] Validating Credentials...
Error: spawn C:\Windows\system32\bash.exe ENOENT
    at _errnoException (util.js:1024:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

This is the error I’m not seeing. Looks to be bash once again. I cant understand why it’s doing this.


#10

Right, so I removed the prompt that checked that bash actually existed.

Do you actually have a file at C:\Windows\system32\bash.exe because so far it seems like you don’t.

In powershell try:

gcm bash.exe

Perhaps it has moved …


#11

Hi Edgar,

I can see the file located in my system32 folder and have tried the command you suggested and it’s returned
the following statement

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     bash.exe                                           10.0.16... C:\WINDOWS\system32\bash.exe

Are there any other steps that I can try?


#12

I think it might be related to your windows directory being all caps, that is WINDOWS and not Windows. I’m guessing maybe you got this Windows10 with a system upgrade from another version of windows rather than clean install?

Usually it shouldn’t matter because NTFS is case insensitive but I think there might be an issue somehow indirectly with the WSL…so for what its worth, can you rename your C:\WINDOWS to C:\Windows?


#13

Hi Edgar.

My directory is already name C:\Windows in my file explorer. It’s only when I run CMD as administrator that the folder is in capitals. Ive tried changing the name using command prompt in recover mode but to no success

You are correct that this is an upgraded version of windows from a previous windows 8.1 edition.


#14

I have a similar issue but I do not file bash.exe file under directory C:\Windows\System32, rather I find this file in some weird directory C:\Windows\WinSxS\amd64_microsoft-windows-lxss-bash_31bf3856ad364e35_10.0.16299.15_none_62878a822db68b25. Could you please help me to fix this issue?


#15

Build worked absolutely fine on my other computer with original Windows 10 installed. It looks like it possibly was due to it being a windows 10 upgrade on my other computer.


closed #16

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.