Import a file from own project in pod library - ios

I've installed an open source library with Cocoapods where I can make adjustments but I can't import a file in my own project into the open source file. Is it possible?
Below are the possibilities that I tried
// In the open source file
#import "MyClassFileInOwnProject.h" -- Error: file not found
#import <MyClassFileInOwnProject.h> -- Error: file not found
#import "ProjectFolderName/MyClassFileInOwnProject.h" -- Error: file not found
#import <ProjectFolderName/MyClassFileInOwnProject.h> -- Error: file not found

Related

Xamarin IOS binding

I am creating binding with Pod , After running Sharpie command i frequently get error regarding , Header not found in the File. I have checked the file after opening but header was already there. Let me know if anyone face the same issue.
Error Details are below:-
'Realm/Realm.h' file not found
#import <Realm/Realm.h>
^~~~~~~~~~~~~~~
/private/var/folders/y4/n93ks58x7vd1dl2fr7j9v6mw0000gn/T/com.xamarin.ObjectiveSharpie/11d3f185b30343fe978184fe0a7e4722.h:1:9: fatal error:
could not build module 'MatrixSDK'
#import MatrixSDK;
Binding...
846 warnings and 2 errors generated.
Error while processing /private/var/folders/y4/n93ks58x7vd1dl2fr7j9v6mw0000gn/T/com.xamarin.ObjectiveSharpie/11d3f185b30343fe978184fe0a7e4722.h.
Done. Exiting with error code 1.

add extra include directories config on podspec file

In plugin ios, I import library as below
Currently I have some .h file like tflite-dist/include/tensorflow/lite/c/model.h.
In ImageSegmentator.cpp. I want to import like below
#include "tensorflow/lite/c/model.h"
But when I compile it throws errors fatal error: 'tensorflow/lite/c/model.h' file not found .
I try to set up folder tflite-dist/include/tensorflow/lite/ as same Classes folder
s.source_files = 'Classes/**/*', 'cpp/include/**', 'tflite-dist/include/**'
s.resources = ['cpp/include/**', 'tflite-dist/include/**']
It did not work. In CMakeLists.txt I see they can config like
# add extra include directories
target_include_directories(
./src/main/cpp/include
${Tensorflowlite_DIR}/include
)
But I dont know how we can config like this on podspec file.

RealmSwift import error

I have installed RealmSwift's dynamic frameworks in version 0.98.2.
(CocoaPods didn't work.)
I get the following error:
module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Users/adambella/Documents/Pesti_I.munka/FrontSide/FestivalApp-iOS/./Realm.framework/Headers/Realm.h"
^
/Users/adambella/Documents/Pesti_I.munka/FrontSide/FestivalApp-iOS/./Realm.framework/Headers/Realm.h:21:9: error: 'Realm/RLMArray.h' file not found
#import <Realm/RLMArray.h>
^
<unknown>:0: error: could not build Objective-C module 'Realm'
How can I fix it?
Try to import the import the framework not with an absolute path, but just as seen below.
#import <Realm/Realm.h>
In addition please navigate to your target’s “Build Settings”, and make sure that the parent path to RealmSwift.framework is included in the “Framework Search Paths” section.
Have you tried install it statically?
Just drag and drop the "Realm.framework", "RealmSwift.framework" files to your xcode project and check "copy items if need".
Then add the frameworks to the Embedded Binaries in your target project.
http://s8.postimg.org/6cmfwglkj/Captura_de_pantalla_2016_02_25_a_las_9_42_20_a_m.png
Clean build folder
Build folder location is
Users/{home_directory} /Library/Developer/Xcode/DerivedData/{app_name} -bxffdjvuyjrewicuwaxocbbgxzrq

Can't debug my iOS project since updating to cocoa pods to use_frameworks! for Swift

After cocoapods 0.38.0 I updated my project to use_frameworks! so that I can make use of Swift modules.
Now whenever I try and debug via lldb I get the following error:
error: Error in auto-import:
failed to get module 'my-app-name' from AST context:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Path/To/Project/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h"
^
/Path/To/Project/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h:6:9: note: in file included from /Path/To/Project/Pods/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-umbrella.h:6:
#import "FBSDKAppLinkResolver.h"
^
/Path/To/Project/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/FBSDKAppLinkResolver.h:26:10: error: include of non-modular header inside framework module 'FBSDKCoreKit.FBSDKAppLinkResolver'
# import <Bolts/BFAppLinkResolving.h>
^
could not build Objective-C module 'FBSDKCoreKit'<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Path/To/Project/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-umbrella.h"
^
/Path/To/Project/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-umbrella.h:3:9: note: in file included from /Path/To/Project/Pods/Target Support Files/FBSDKLoginKit/FBSDKLoginKit-umbrella.h:3:
#import "FBSDKLoginButton.h"
^
A fatal parse error has occurred. LLDB may become unstable; please restart your debug session as soon as possible.
I did a bit of digging and found that if you set Allow Non-modular Includes in Framework Modules to yes for the FBSDKCoreKit target in the Pods project, that fixes the LLDB errors.

Include AVFoundation Framework in Theos application

I am writing an application for my iPhone 5 using Theos tools and I want to use AVFoundation framework.
I've included AVFoundation in FRAMEWORKS section of my Makefile:
include theos/makefiles/common.mk
APPLICATION_NAME = appName
appName_FILES = main.m appNameApplication.mm RootViewController.mm StandardPlaybackVC.mm
appName_FRAMEWORKS = UIKit CoreGraphics AVFoundation
include $(THEOS_MAKE_PATH)/application.mk
But it doesn't seem to work and give the following error:
error: unknown type name 'AVAudioPlayer'
I've also tried to include this line in my header file:
#import <AVFoundation/AVFoundation.h>
But this gives a lot of confusing errors:
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/objc.h:31:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/types.h:75:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/cdefs.h:680:2: error:
Unsupported architecture
#error Unsupported architecture
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/objc.h:31:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/types.h:78:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/machine/types.h:37:2: error:
architecture not supported
#error architecture not supported
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/objc.h:31:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/types.h:79:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/machine/_types.h:34:2: error:
architecture not supported
#error architecture not supported
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/NSObjCRuntime.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/objc/objc.h:31:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/types.h:81:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/machine/endian.h:37:2: error:
architecture not supported
#error architecture not supported
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:12:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0/include/limits.h:38:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/limits.h:64:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/machine/limits.h:8:2: error:
architecture not supported
#error architecture not supported
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/signal.h:63:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/signal.h:81:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/machine/signal.h:34:2: error:
architecture not supported
#error architecture not supported
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/signal.h:63:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/sys/signal.h:145:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/machine/_mcontext.h:31:2: error:
architecture not supported
#error architecture not supported
^
In file included from RootViewController.mm:3:
In file included from ./StandardPlaybackVC.h:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioBuffer.h:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVAudioTypes.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/libkern/OSByteOrder.h:45:10: fatal error:
'libkern/machine/OSByteOrder.h' file not found
#include <libkern/machine/OSByteOrder.h>
^
8 errors generated.
I do not use #import pragmas for UIKit and Core Graphics so I thought that modifying the Makefile should be enough...
What am I doing wrong here? And what is the right way of including frameworks in Theos? I'm using iPhone SDK 8.1.
Thank you!
I had same error on my tweaks,but solved this error.
Cause is the StandardPlaybackVC file.
UIKit CoreGraphics AVFoundation,
Don't write all "#import Framework" in StandardPlaybackVC.

Resources