XCode error running react-native project 'JavaScriptCore/JavaScriptCore.h' file not found - xcode

I am trying to run a react-native project in Xcode (version 4.6.0). I have done the following:
react-native init helloWorld then open the 'helloWorld.xcodeproj file in
Xcode Run using simulator (e.g. iphone 7) in XCode
I keep getting build failure, with this ....Desktop/helloWorld/node_modules/react-native/React/Base/RCTJavaScriptExecutor.h:10:9: 'JavaScriptCore/JavaScriptCore.h' file not found
I have tried to see how to add the library but cannot find out how.
Could anyone please point me in the right direction, any comments would be much appreciated

most probably JavaScriptCore framework is missing, try to add it (Adding Framework in Xcode 4)
Your XCode is too low, consider updating it. And BTW - React Native doesn't support iOS 6 (https://github.com/facebook/react-native/issues/330) so be sure that you are using iOS 7 or 8

Related

Swift 3 mode has been deprecated

In Xcode 10.1 whenever I build my app I get the warning
Swift 3 mode has been deprecated and will be removed in a later
version of Xcode. Please migrate "My Appp" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'My App')
How can I suppress the warning?
I tried to convert but conversion fails and besides that my app depends on some Pods / libraries that I can not convert any way.
Is there a way to stop seeing the warning?
Unfortunately, there's no way to remove this. You'll need to manually update your Pods / libraries to Swift 4.x or wait until someone does the job for you. Otherwise, you won't be able to build your project with a newer Xcode version at some point in the future.
From https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes:
Xcode 10 is the last release that will support Swift 3. Migrate your projects from Swift 3 code to Swift 4.2 syntax by opening the project and choosing Edit > Convert > To Current Swift Syntax… (43101816)
Download Xcode 10.1 to be able to compile your code with Swift 3 or Pod decencies:
https://developer.apple.com/download/more/?name=Xcode

xcode 4.5.2 upgrade issue

With previous version of xcode works perfectly for my cocos2d and box2d project
but today i upgrad it(to xcode 4.5.2) because my iphone device was having os version issue.
and then all of my upgrade progress finished
i have some trouble with in it
when i run the project in new xcode, it started complain me that i have no Default.png
but i'am already have defalult.png in my project
so why this happening ? and how can i figure it out...
i've already clean and rebuild
and also delete default.png and recopy from original arsenal
but same problem occurred
(as you guess .. i'm not good at explain my opinion in english.. sorry for that.. )
I expect you mean this:
Missing - "Default-568h#2x.png" launch image"
That is the startup image for the iPhone 5 screen. If you click on the warning it will create one for you.

Facebook SDK for iOS6/Xcode 4.5 not working [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
file is universal (3 slices) but does not contain a(n) armv7s slice error for static libraries on iOS, anyway to bypass?
Recently upgraded Xcode and my iOS devices to the latest respective versions and i'm now unable to build an app using the Facebook SDK (version 3.0.8) for a device - building on the Simulator works fine.
Error I'm receiving whilst trying to build:
file is universal (3 slices) but does not contain a(n) armv7s slice: ....FacebookSDK.framework/FacebookSDK for architecture armv7s
I've noticed that on the iOS SDK landing page (http://developers.facebook.com/ios/) they have this peice of text..
Upgrade to 3.0 SDK. We will be adding support for the much anticipated iOS 6 integration to the SDK in the coming weeks.
So.. is that it? Am i literally unable to continue to work for potentially weeks until they support iOS6?
I'm hoping there is a quick fix for this, surely I can't be the only one in this situation.
Thanks for any help you can offer.
For a temporary fix you can do what Sudhakar said, but the app won't run on an iPhone 5, (or atleast with my tests it didn't). You really need a properly compiled SDK.
The current Facebook SDK is build for armv6. I hear they are working on getting a new version out asap that is build for armv7.
In the meantime you can clone down the facebook SDK from github and compile the SDK to work with armv7 yourself. Below are the instructions:
Download or clone a copy of the source code from the git hub page (https://github.com/facebook/facebook-ios-sdk)
Open up the xcode project and in the build settings change the architecture to armv7.
Save and close
Navigate to /scripts and in terminal run build_all.sh
This will then compile the source and output builds/FacebookSDK.framework
To get this to work I had to clone the git repository to /Desktop/iOS
I replaced the FacebookSDK.framework that was within my app with the newly created version and it worked like a charm.
good luck!
Click the your are Xcode Project -> in Architures tab -> valid Architures -> keep armv7 only and remove armv7s.
In my case it working fine, this is only temparary solution.

XCode 3 - core compile errors with clean installation and iPhone 4 SDK

This is a copy of another question from AskDifferent, since I'm being adviced to put this question here instead.
This has been asked once elsewhere but nobody could give the guy an answer... and I Google seem to only know that single occurrence of the problem!
So I'm the second guy in history to experience this and my problem is:
I'm running XCode 3.2.3 on Snow Leopard 10.6.4 (I think, it's the minimal required OS version for this XCode version) with iOS SDK 4.0.2
I create a new empty Cordoba (PhoneGap) project
I set up my Base SDK in Project Settings to iPhone Simulator 4.0 per instructions on PhoneGap's website
I don't change any other setting at all
when I hit "Build and Run" button, XCode starts compilation and finished with 3 errors and 10 warnings
Now, I don't mind those warning, but I cannot successfully compile because of those 3 errors now. No idea how to fix this, I'm totally new to PhoneGap or Mac OS for that matter.
The errors I get are:
/Users/[name]/Documents/CordovaLib/Classes/CDVLocation.m:123:32 /Users/[name]/Documents/CordovaLib/Classes/CDVLocation.m:123:32: error: use of undeclared identifier 'kCLAuthorizationStatusAuthorized'
/Users/[name]/Documents/CordovaLib/Classes/CDVCapture.m:783:70 /Users/[name]/Documents/CordovaLib/Classes/CDVCapture.m:783:70: error: use of undeclared identifier 'NSEC_PER_MSEC'
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
I would appreciate any advice from you guys, as I'm completely at a dead-end here.
CLAuthorizationStatus, and thus kCLAuthorizationStatusAuthorized are only available in 4.2 and later.
Check this for more info: https://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/c/econst/kCLAuthorizationStatusAuthorized
As to your other error, google pulls up this: How to resolve Phonegap error while Building the app

Getting "Missing SDK in target picChoice: iphoneos4.0" error when building a test release of my app in Xcode 4, pvw 5

I have opened a functioning Xcode 3x project in Xcode 4.0 pvw 5 and am getting the following error whei I try to build a debug version of the app: "Missing SDK in target picChoice: iphoneos4.0"
I am trying to find where and how to remedy this, and I am coming up with bupkus.
I apologize if this is not very clear, but I am rather flummoxed by Xcode 4 so far....
Your problem was probably that Xcode 4 only came with SDK 4.2, and the project pointed to 4.0.
It's pretty common!
The solution is to go to the project info | Build settings | Base SDK and setting it to "Latest iOS" so that you don't have to touch it for future updates.
When you close the window, you'll have to switch config from debug to release or distribution and back so that it updates and Xcode removes the "Missing SDK" problem.
I just wanted to put the full answer up here to help others who have the same problem ;)
Ok...I resolved this, but I did not properly track HOW I resolved it....
I think my Target's Base SDK was not set, and I set it to: Latest iOS (iOS 4.2)....
I think that's how I did it....
But, now it builds with no errors and loads onto my iPhone as expected.
That is exactly what you needed to do. Xcode 4 introduced the Latest iOS. If you wish to test the app for older versions, select target > summary > deployment target and set that to an older iOS version and then in simulator you will see more version options available to you.

Resources