Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS build fails when trying to compile on physical device #3

Closed
chris24elias opened this issue Sep 18, 2019 · 23 comments
Closed

iOS build fails when trying to compile on physical device #3

chris24elias opened this issue Sep 18, 2019 · 23 comments
Labels

Comments

@chris24elias
Copy link

Hey there,

Whenever i try compiling for my physical device, i run into the error "Please specify target machine."

I've research and tried several things but no luck, any help would be much appreciated

Thanks

@jbro-io
Copy link

jbro-io commented Nov 27, 2019

@chris24elias How did you solve this? I'm running into the same issue now.

@tuna1207
Copy link

Hi @chris24elias @jbroquist , is there any solution for this ? i'm also having the same problem.

@tuna1207
Copy link

tuna1207 commented Dec 18, 2019

Hmm i just updated to 2.8.8 and got a different error this time

'VialerPJSIP/pjsua.h' file not found

not sure why the maintainer removed post install step ( which download and build the vialerpjsip package ) in new version

@jbro-io
Copy link

jbro-io commented Dec 18, 2019

@tunguyenbhtech I switched over to the react-native-pjsip library and was able to get that working.

florindumitru added a commit that referenced this issue Dec 18, 2019
@oojikoo
Copy link

oojikoo commented Dec 29, 2019

I think it fails to build since this fix. @florindumitru which rn version is working? I've tried with 0.61.4. it didn't work.

@oojikoo
Copy link

oojikoo commented Dec 30, 2019

@jbroquist which version of react-native-pjsip worked? I tried pjsip but still failed to build on Physical devices.

@tuna1207
Copy link

@jbroquist @oojikoo newest version of this library v2.9.0 is working but you need docker installed on your machine, it takes quite some time to install the library and also when building sometimes i'm getting weird cyclic dependency errors but it goes away after several clean build folders and rebuild project.

@oojikoo
Copy link

oojikoo commented Dec 30, 2019

@tunguyenbhtech thank you for the reply! I have docker install on my machine? why do I need docker for react native library? is there a link for a reference?

@tuna1207
Copy link

@oojikoo no problem, it's being used in react native pjsip builder, which this library download and run in libs.sh
https://github.com/florindumitru/react-native-pjsip-builder/blob/master/build_ios.sh

@oojikoo
Copy link

oojikoo commented Dec 30, 2019

@tunguyenbhtech wow! thank you, man! you saved my day!!

@oojikoo
Copy link

oojikoo commented Dec 30, 2019

@tunguyenbhtech how did you mange to make it work? what should I do after build?
I tried copying it to /node_modules/react-native-sip/ios to replace the original one.
and /ios/pod install. but it failed.

@tuna1207
Copy link

tuna1207 commented Dec 30, 2019

@oojikoo what error are you having ?, after installing the library, i also just did normal pod install in ios folder.
also, i'm not sure what you mean by this step

copying it to /node_modules/react-native-sip/ios to replace the original one

@oojikoo
Copy link

oojikoo commented Dec 30, 2019

@tunguyenbhtech oh you just added this library and run the project as below. and it worked, right?

$ yarn add react-native-sip
$ cd ios; pod install; cd ..;
$ react native run-ios

in my case, this way didn't work. so I tried copying it

$  cd react-native-pjsip-builder
$ ./build_ios.sh
$ copy -r dist/ios/VialerPJSIP.framework ../myproject/node_module/react-native-sip

I know the latest version of react-native-sip use VialerPJSIP.framework to build libraries.
but it didn't work...

I'm getting something like this

fatal error: could not build module 'Darwin'
#include <stdbool.h>
 ~~~~~~~~^
1 error generated.
While building module 'UIKit' imported from /Users/nainxo13/Work/Atlaslabs/Dev/projects/switch/SwitchMobile/ios/Pods/Target Support Files/react-native-sip/react-native-sip-prefix.pch:2:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h:11:10: fatal error: could not build module 'Darwin'
#include <stdbool.h>

I'm using

"react": "16.9.0",
"react-native": "0.61.4",

env is

OS X : 10.15.2(Katalina)
Xcode: 11.3

@tuna1207
Copy link

@oojikoo ah right, that's the error i was talking about

when building sometimes i'm getting weird cyclic dependency errors but it goes away after several clean build folders and rebuild project.

you should try using xcode and clean build folder then rebuild several times

@oojikoo
Copy link

oojikoo commented Dec 30, 2019

@tunguyenbhtech oh, the same error? so It's not just me 😌
I usually use this https://github.com/pmadruga/react-native-clean-project to clean the project.
I will definitely try xcode clean build!

@tuna1207
Copy link

@tunguyenbhtech oh you just added this library and run the project as below. and it worked, right?

$ yarn add react-native-sip
$ cd ios; pod install; cd ..;
$ react native run-ios

in my case, this way didn't work. so I tried copying it

$  cd react-native-pjsip-builder
$ ./build_ios.sh
$ copy -r dist/ios/VialerPJSIP.framework ../myproject/node_module/react-native-sip

I know the latest version of react-native-sip use VialerPJSIP.framework to build libraries.
but it didn't work...

I'm getting something like this

fatal error: could not build module 'Darwin'
#include <stdbool.h>
 ~~~~~~~~^
1 error generated.
While building module 'UIKit' imported from /Users/nainxo13/Work/Atlaslabs/Dev/projects/switch/SwitchMobile/ios/Pods/Target Support Files/react-native-sip/react-native-sip-prefix.pch:2:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:10:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h:11:10: fatal error: could not build module 'Darwin'
#include <stdbool.h>

I'm using

"react": "16.9.0",
"react-native": "0.61.4",

env is

OS X : 10.15.2(Katalina)
Xcode: 11.3

@florindumitru do you know what could have caused the cyclic dependency error in here ?

@oojikoo
Copy link

oojikoo commented Dec 30, 2019

image

@tunguyenbhtech I guess the error you had was this one? after uninstalling & reinstalling XCode, now Im get the same as you did.

@tuna1207
Copy link

@oojikoo yes, that's the one.
It goes away after several clean build folder and rebuild again.

@oojikoo
Copy link

oojikoo commented Dec 30, 2019

@tunguyenbhtech it didn't go away after lots of clean and build..
anything else you did?

@tuna1207
Copy link

tuna1207 commented Jan 6, 2020

@oojikoo right, that's weird, it's also happening on my coworker's machine but not on mine, i'm not sure what's missing.

@oojikoo
Copy link

oojikoo commented Jan 19, 2020

@tunguyenbhtech I solved this!
#6 (comment)

@tuna1207
Copy link

Great @oojikoo 👍

@romreed
Copy link

romreed commented Mar 17, 2020

@tunguyenbhtech @oojikoo can someone share working project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants