'JSONKit.h' not found when I run 'Test' of my Project in Xcode 5 - objective-c

I used CocoaPods to add JSONKit to project.
Now I want to create a unit test of a function in my project which uses JSONKit function.
When I hit ⌘U to run the test, I got this error message:
I am positive the project can compile can run without problem when I hit ⌘R ('Run')
What is the reason for the error message? How can I fix it?
I am using XCode 5.0.2

It is actually a Pod file setup problem.
I need to add the following as the first line in my podifle.
link_with ['Questions', 'QuestionsTests']
Then rerun pod install and reopen workspace in xcode.

Related

expo error installing or running app

when I try to run my app on the iOS simulator I get the error :
Error running xcrun simctl openurl booted exp://localhost:19000: An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=60):
The operation couldn’t be completed. Operation timed out
Operation timed out
Error installing or running app. Error: Process exited with non-zero code: 60
any idea how to solve this error ?
This usually is an error with the Simulator. If you remove expo (delete the app) from the simulator and run the command again, it should build fine.
However, if it still fails, Erasing all content and settings on the simulator does the trick too.
FOUNT IT!
you must have a .watchmanconfig file (like below)
File example
When you initialize a project with expo init "projectname", there is no .watchmanconfig file.
So, create one and in this file, just initialize an empty object like this : {}
Then you can start with expo start or yarn/npm start
It solved all my problem.
Hope it does for you too.
For anyone like me also searching this issue, it is possible to un-eject your app and run again like normal. From the docs, Delete the ios and android directories from your project. Delete the isDetached and detach keys from your project's app.json. You can now use your project like a normal Expo project (with no ExpoKit). Read more at https://docs.expo.io/versions/latest/expokit/advanced-expokit-topics/
It may be an issue with some outdated simulators in your simulator cache. On MacOS remove the sub-directories in the following directory:
~/Library/Developer/CoreSimulator/Caches/
check if you have .watchmanconfig file present in root, if not create one .watchmanconfig and initialize empty object and run command npm start again

React Native Android fails: error 3

Hope you could help me here:
I'm currently building an app which I created through CRNA and then ejected. I get the ios version right on but I'm currently struggling a lot with the android version.
When running react-native run-android all I can get is the following error:
Error type 3
Error: Activity class {com.myapp/com.myapp.MainActivity} does not exist.
I've checked app/build.gradle, app/src/main/AndroidManifest.xml, app/src/main/java/com/myapp/MainActivity.java and app/src/main/java/com/myapp/MainActivity.java for name errors on package. I've tried moving from com.myapp to com.mebius.myapp and com aswell.
Seems this comes from the only plugin I'm using. I'm keeping on the investigation
Any hints?
There are 3 possible reasons for the android app build fails to make
1. You need to define sdk path in android/local.properties
if local.properties doesn't place then make a file names with that
add
sdk.dir = home/user/AndroidApp/local/Sdk
You can match with their system path..
2. Your genymotion or avd must enable with the android studio
3. You must have to go with the following command
npm start
in new terminal .
Please go through with it.
Thanks
Actually I had a problem with my gradle config which look like:
include ':react-native-sensors'
project(':react-native-sensors').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sensors/android')
rootProject.name = 'accelapp'
I needed to add: include ':app'
I don't know if it's due to the process of ejecting from CRNA or if it's due to react-native link react-native-sensors though.
EDIT After some investigation, I couldn't reproduce this issue. This leads me to say it was a faulty copy/paste...

Twitter Kit for iOS Objective C Installation Problems. 'TwitterKit/TwitterKit.h' file not found error

I followed the instruction of
https://dev.twitter.com/twitterkit/ios/installation
Install Twitter Kit Manually (Objective C)
Did all the steps:
Downloaded and unzip Twitter Kit.
Draged contents to the root of your project in Xcode, and made sure ‘Copy items if needed’ is checked
Initialized the kit inside AppDelegate (with valid key and secret as described)
Modified Info.Plist entries as described
=> Trying to compile it gives me an 'TwitterKit/TwitterKit.h' file not found error:
(I tried it several times...)
Some step(s) seam(s) to be missing?
Thanks for inputs on that.
If you have followed all the instructions, try to do each of the following before trying to build again, as it worked for me once.
Clean the Project, Cmd + Shift + K
Restart Xcode
Restart Computer
If nothing works, then install Twitter Kit through Cocoapods, as it does a clean installation for your frameworks.
Since I couldn't edit the original question I add my latest state.
after following instructions of neuhaus and Sau93 I ran into new issues.
Steps 1-5:
<= Here is where I stack know ?

flowtype errors in base AwesomeProject

I recently wanted to reset a react-native project to most recent version, and so I initialised the seed project - "AwesomeProject"... The problem is that it comes with 19 flowtype errors "out of the box"
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationCardStackStyleInterpolator.js
lines:91,94,97,104,107,137,142,148
node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/NavigationHeaderStyleInterpolator.js
lines:57,68,74,87,94
node_modules/react-native/Libraries/Experimental/WindowedListView.js
lines:629, 629, 665,665
node_modules/react-native/Libraries/Image/Image.ios.js
line:272
I am reluctant to make changes to these files as it may create knock on effects. Does anyone have a work around?
In general, whenever you want flow to ignore a file, you can just specify that file under the [ignore] section of your .flowconfig.
That said, I just react-native init'd a project, using react-native-cli 1.0.0 and react-native 0.29.1, and ran a flow server on the root of my project, and didn't get any errors.

Cocoa error 3840 Parse Code iOS7 only

Background: I decided a couple days ago that I was going to update Facebook SDK to FBSDKCoreKit from Facebook-iOS-SDK v3.24. I updated my Podfile accordingly and installed all libraries fine. I then began updating some of the code to work with the updated SDK spec.
After working on it for a short amount of time, I changed my mind and decided to rollback to the old version. I made all necessary cocoapods changes and installs, discarded all local changes in Xcode, recompiled and ran. Everything worked fine... or so I thought.
The Problem: Now, when I try to run on my old iOS7 test device, I get an error whenever the app launches. Below is the exact console output:
2015-10-15 20:14:31.271 hiatus[184:6003] [Error]: Failed to run command eventually with
error: Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be
completed. (Cocoa error 3840.)" (JSON text did not start with array or object
and option to allow fragments not set.) UserInfo=0x14d67d20 {NSDebugDescription=
JSON text did not start with array or object and option to allow fragments not set.}
After this error is displayed in the console, no Parse functionality works. Which means, in my case, that a user is unable to login. An empty error is displayed instead.
Everything works fine on iOS8, and iOS9 (simulators and real devices). I'm working with Parse v1.9. I've tried cleaning the project, resetting, etc, but without any success.
I've been able to track this down to a specific function within PFEventuallyQueue.m. It seems to occur within (void)_runCommandsWithRetriesCount:. I just have no way of knowing how to fix it.
This is a known issue with SDK v1.9.0 (https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/388). It has been fixed but not released yet (it will be part of the 1.9.1 release).
You have 3 options :
Use 1.8.5 until 1.9.1 is released.
Fix the bug yourself by making this change : https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/commit/edde3bfa8a4476ba460dddbef6f75772960e1718
Use the master branch of the git repository to get the latest commits. If you're using cocoapods you can do it by setting your pod like this : pod 'Parse', :git => 'https://github.com/ParsePlatform/Parse-SDK-iOS-OSX.git'
Now is available Parse 1.9.1 but I recommend using CocoaPods for any Framework: https://cocoapods.org/pods/Parse