Cannot import RMMapView - ios

I downloaded route-me library to use Openstreetmap in iPhone. I followed the instruction of the github and goggle code but my xcode5 cannot recognise it.
My project settings are like below:
Header search path
$(inherited)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
../route-me-master/MapView
What do I need to fix?

Related

react-native-fbsdk FBSDKCoreKit and FBSDKShareKit not found

I have installed the facebook SDK properly. (This is different from the other not found error because it is specifically for react-native-fbsdk and none of the solutions worked.)
I have tested that I have the SDK installed by importing both the FBSDKCoreKit header and FBSDKShareKit header into AppDelegate.m and it compiled and ran with no issue.
However when I installed react-native-fbsdk and linked it and compiled, I get the error of 'FBSDKCoreKit/FBSDKCoreKit.h' not found. similarly with FBSDKShareKit.
The troubleshooting on the github page gives 3 options to check when this occurs:
Make sure that the Facebook SDK frameworks are installed in ~/Documents/FacebookSDK.
Make sure that FBSDK[Core, Login, Share]Kit.framework show up in the Link Binary with Libraries section of your build target's Build Phases.
Make sure that ~/Documents/FacebookSDK is in the Framework Search Path of your build target's Build Settings.
Which I have checked and verified that I had all of these there was no solution found. The strange thing is that I can import them in AppDelegate.m and it works fine.
You need to make sure you have the SDK frameworks saved under the folder ~/Documents/FacebookSDK
Because react-native-fbsdk iOS project have the value "~/Documents/FacebookSDK" hardcoded in its own definition of Framework Search Paths
If you are like me and don't want to do what Facebook tells you (or you don't want to put random stuff on your Documents folder):
Replace every instance of ~/Documents/FacebookSDK in the QuickStart tutorial with the place you do want to store the SDK, in my case ~/Library/FacebookSDK. That means, unzip the downloaded SDK there and add that route to your project's Framework Search Paths. *
In Xcode's file tree, expand the Libraries group and click on RCTFBSDK.xcodeproj. On that project click Build Settings and add your route to its Framework Search Paths.
And that's it. Just remember you did this when you update the node module, 'cause this change won't be versioned on your project.
*Note: If there are other people working on the project, do not remove ~/Documents/FacebookSDK from your project's Framework Search Paths. This is to be consistent with the module installation and the rest of the team can easily npm install and use the installation guide as documentation.
Drag & drop in Xcode the FacebookSDK files, for example try with FBSDKCoreKit.h

Using private framework generated by RuntimeBrowser in Xcode 7.3

I have generated all the private framework API's using RuntimeBrowser and I add them to my test project in Xcode.
I just did an import of the "RadiosPreferences.h" header file and try a build with several errors. Please see attached screenshot.
I'm having some problem understanding how I can add the AppSupport.framework and specifically use methods in the RadiosPreferences header file. If anyone could point me in the right direction I would appreciate it.
Thanks in advance.
First lets start by how to link those frameworks
lets assume you want to use SpringBoardServices framework
go to https://github.com/nst/iOS-Runtime-Headers/ and download the headers
search for SpringBoardServices.framework folder and copy all headers inside
go to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework
and create a folder named Headers
replace iPhoneOS.platform with iPhoneSimulator.platform an paste the headers in simulator SDK folder too if you want to try apps on the simulator
paste the files you just copied inside
Now you can link the SpringBoardServices Framework
Now how to use SpringBoardServices
#include <SpringBoardServices/SpringBoardServices.h>
void openMailApp(){
SBSLaunchApplicationWithIdentifier(CFSTR("com.apple.MobileMail"), false);
};
this will open the mail application
SBSCopyNowPlayingAppBundleIdentifier();
to get the name of the app that currently playing music

Creative SDK Image component - IOS

How can I integrate Creative SDK Image component in swift? I followed all step given by "Using the Image Editing Component - Adobe".
And I also import "<AdobeCreativeSDKImage/AdobeCreativeSDKImage.h>" in "Bridging-Header.h" , But when I import Adobecreativesdkimage in AppDelegate it gives me error like "Framework not found".
Try copying the framework into your project folder, import the framework from this location, then check the Framework Search Paths setting in the Search Paths section under Build Settings. The values you want are:
$(inherited)
$(PROJECT_DIR)/AdobeCreativeSDKDynamicFrameworks
$(PROJECT_DIR)
If this doesn't work, verify your headers are imported from [].framework/Versions/A/Headers.
These steps helped fix our first projects using the CreativeSDKs where we followed the documented steps to the letter.
Make sure the framework search path points to the CSDK Frameworks folder. If that does not work let me know.

opencv2/opencv.hpp file not found in Xcode

I have built openCV to get opencv2.framework. I added this to my xcode iOS project by going to "build phases->Link Binary With Libraries", then tried to include "opencv2/opencv.hpp" in my project.
I get the error "opencv2/opencv.hpp" not found. But the file exists in the framework. I have tried to find a solution online but nothing has worked for me.
The file I'm trying to include it in is a .mm file. I have made "compile sources as" objective-c++. Any help would be great.
What worked for me was very simple:
*NOTE THE DIFFERENCE FOR IOS vs. OS X PROJECTS
FOR IOS:
Put the opencv download (for 3.0.0 it is just a drag and drop kind of thing) into the project specific Xcode folder. Then set the Frame Search Paths to $(PROJECT_DIR). The Frame Search Path is located under the Build Settings. No other paths need to be set.
Lastly, right click in the navigator pane and click "Add Files to..." in order to add in the opencv library from the project folder.
FOR OSX:
check out Tim's tutorial: https://www.youtube.com/watch?v=OVSPfUmNyOw
I solve the problem by adding to the FRAMEWORK_SEARCH_PATHS the absolute path were I had the framework I needed to use:
You should use your own path obviously. ;-)
Took me 4 hours to figure this out. This is how I got this to work :
Along with the opencv framework add the following frameworks in the build phases:
Accelerate, AssetsLibrary, AVFoundation
, CoreGraphics
, CoreImage
, CoreMedia
, CoreVideo
, QuartzCore
, UIKit
, Foundation.
Then, in the .pch file add these lines before UIKit and Foundation imports :
#ifdef __cplusplus
#import <opencv2/opencv.hpp>
#endif
In my case the symbolic links to the header files were broken. This was caused by cloning the following great example project:
https://github.com/BloodAxe/OpenCV-Tutorial
In the cloned project, the header files were not reachable anymore. After reimporting the opencv2.framework from the official opencv ios download site (OpenCV for iOS), the headers were available again. XCode should look as follows:
The following is a screenshot of a Xcode project with broken headers.
With broken header files, the xcode project looks as follows:
Make sure in Build Settings for the Target, you have the Framework Search Path in the Search Paths section set to the correct path to where your framework is located in your directory. You can do this by clicking to the right of Framework Search Path in the white space, click the + sign and add $(PROJECT_DIR) then click + again and add $(inherited). Make sure the framework is located in your main directory for your project at hand. This worked for me, as I encountered the same problem.
Hope this helps!
I used openCV in my project and implementing it with cocoapods was impossible because version of library was too old, so i decided to implement it as static library. create folder in your project and add library there, in build settings find library and framework search path and add link to your openCV folder. It will work without any error. Also you should add openCV header file in prefixPatch.
More Detail Instruction 100% Works:
1) Download framework from official website: OpenCV
2) In Project Directory create folder named: External_SDK
3) Put Opencv framework inside this folder and drag&drop it in Xcode Project (Folder) with Target Membership of your App (Not App_test).
4) In Xcode Project search for yourPrefixHeaderFileName.pch and in the top of the file add this lines:
#ifdef __cplusplus
#import <opencv2/opencv.hpp>
#endif
5) after that you should import or include it in .h file, why include? because it's CPP library. If you want to access library with import keywoard than you should do like this: #import <EXAMPLE>
6) In build settings search for library and framework search path and add link to your EXTERNAL_SDK folder. To read framework directly from your folder. Find and change ALWAYS_SEARCH_USER_PATHS = YES
and in HEADER_SEARCH_PATHS add $(inherited) and /usr/include/FRAMEWORK_PATH
Hope this answer will help someone.
And the best practice is to call
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
Only header files.
From my experience, it is not necessary to add so many other frameworks. Instead, only need opencv2 and add "#import " in prefixheader.pch
The thing is that MUST set correct Framework Search Paths as mentioned above unless opencv2 framework folder is in your project directory.
Notice: don't set wrong location in Framework Search Paths as there are two "YourProjectName". Set the 1st one (belongs to TARGETS), not the 2nd one(belongs to PROJECT). I made the mistake.
Here is my answer for this.
Environment: XCode 8.1
Download page: http://opencv.org/downloads.html. Choose any link for iOS.
Important step: while downloading opencv2.framework, you must use ".zip" format, not ".framework" format, afterwards, unzip it to opencv2.framework. It is weird, but it should work. Meanwhile, you have to rename it to opencv2.framework if the unzipped one is not.
just drag and drop the framework to your iOS project. No any settings are required. You could refer to this for testing : www.youtube.com/watch?v=ywUBHqxwM5Q.
I ran into some issues when I went to Target-->Build Phases-->Link Binary With Libraries. When I added opencv2.framework from there, my app would not launch.
Instead, I just dragged and dropped the framework under the directory "Frameworks" in XCode and that worked. I didn't change anything else.

Trouble with an .h import

As a beginner in ObjectiveC I need some help.
I'm working on a phonegap plugin for IOS (so, written with objective C). I use some open source code but I got an error with an .h import.
My architecture look like:
myFmk.framework/
myFmk.framework/ABCDE/myFmk.h <== in a sub folder
myFmk.framework/myFmk <=== this is a file
myPlugin.h
myPlugin.m
In myPlugin.h I have #import and in "myFmk.framework/myFmk" file I have only one line "ABCDE/".
I thought that this file do a redirection of the absolute import (with brackets) but my complier told me that "myFmk/myFmk.h" is not found.
I tried to find some documentation about this feature but I wasn't able to find its name... do you have this documentation or the feature name?
Thks.
Is the framework added using a cocoapod? If not, did you follow the instructions properly for adding it to your project? It would probably help if you posted the framework you are experiencing problems with.
If this is a framework that is added to your project properly and you are unable to import there are a few things you should check. First, go to your project settings (click on the project at the very top of your file tree in the left column) and then look for "linked libraries". See if the library is listed there. If not click the + and try to add it.
If this framework was added via cocoapods another thing to check is search your file structure for libPods.a. If it is red, I find sometimes it is helpful to delete it, close the project and run pod install again.
Also if you installed the project via cocoapods remember to open the workspace and not the old xcode project file.
I have also experienced this problem when my header search paths and other linker flag paths were wrong. Linker Flags should be $inherited if this is a cocoapod. In my projects most Header search paths are $inherited too.
If none of this is helpful please provide more information such as how this framework was added to your project and what the framework is. Also let us know if you get any error messages.

Resources