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

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

Related

Missing entitlement - 'UIBackgroundModes' value 'workout-processing' without the required entitlement 'com.apple.developer.healthkit'

I have released my app a couple of times and had the process under control until most recently when I updated from XCode 9 to XCode 10 due to a 3rd party lib requirement.
Everything seems fine when I compile and run on the emulator; but, when I come to the "Validate" (Archive) the app prior to uploading to the app store I am getting an error.
My Setup:
MacOS 10.14.2 (Mojave)
Using XCode 10.1 (10B61)
Error message:
Missing entitlement. watchOS extension
'XXX.app/Watch/aw-xxx.app/PlugIns/aw-xxx Extension.appex' uses
'UIBackgroundModes' value 'workout-processing' without the required
entitlement 'com.apple.developer.healthkit' signed into the bundle.
Watch Extension Capabilities:
The app is built using cordova-8.1.1 and cordova-ios-4.5.5
cordova build ios --buildFlag='-UseModernBuildSystem=0'
In addition to that, the project on XCode 10 has been set to 'Legacy Build System' on File -> Project Settings.
Lastly, the 'aw-xxx Extension.entitlements' has the 'HealthKit' key value set to 'YES' under the 'aw-xxx Extension' folder as one could expect.
Any help or pointers would be much appreciated.
I'm happy to provide more info, logs, etc as well, thanks!
After following the comment below I managed to get my app to validate once again on XCode 10:
Hi #guikeller Just wondering if it is related. I had similar issue while doing a ionic cordova app release. I figured the
com.apple.developer.healthkit
is missing in my platforms/ios/myApp/Entitlements-Release.plist. It does exist in Entitlements-Debug.plist. All I did is copied the key from the debug file to release and app store accepted it.
Source: https://github.com/apache/cordova-ios/issues/475#issuecomment-450174628
In addition to that, I was also able to submit my app into the app store.

(Already did study but still) Qt Creator - Project ERROR: Xcode not set up properly

Others encounters the same problem of building Qt5.7 on XCode8.0 which gives out
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
And I did follow this answer to change to xcodebuild and I also agreed the license:
Qt Creator - Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild
However I still get the same error when building.
One different thing is that instead of downloading XCode from AppStore I downloaded XCode from Apple Deleveloper's site. I am not allowed to login to AppStore in my office.
I can build Xcode applications by it alone.
Does anyone have any ideas?
MacOS 10.12
XCode 8.0
Qt 5.7
This seems to be a known bug:
QTBUG-56004
Greetings
Marco

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

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

PhoneGap 2.1.0 iOS Mac Xcode CordovaLib

Trying to get some solid documentation on how to get the iPhone emulator in Xcode running with my PhoneGap 2.1.0 project. I pulled it down from a git repo that I originally built on my Mac Pro, now want to run it on my Mac Air. There is a lot of confusion of the terminologies between PhoneGap and Cordova that make it near impossible for a beginner to figure out how to set up a project.
The problem I'm getting when I open my PhoneGap project in XCode is this error:
Lexical or Preprocessor Issue 'Cordova/CDVViewController.h' file not found
Clearly the Cordova class files aren't being seen by XCode, although I included the path to the CordovaLib classes in Preferences -> Source Trees (~/Documents/CordovaLib/.
Just want to get this thing running! Thanks!
Not sure if this will help you, but I am starting to try to get to grips with PhoneGap/Cordova, and found this excellent guide on getting it going.
It uses Cordova, which I am led to believe is the source of PhoneGap (Still SLightly Confused tbh), hopefully it will help you in one way or another, it certainly got me up and running :)
https://docs.google.com/viewer?a=v&pid=forums&srcid=MDUyNDQxMjA3MzY2NzYzNDU0MjgBMTAxMDE4ODcyODc5Njc4NDQwMzQBOWNxRFF3Z0UyX29KATQBAXYy

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