Custom Module not found - ios

I'm a beginner in iOS development. I cloned a repo containing working code. I opened up the project in xcode, but when I build the project I receive the error Module 'Subscriptions' not found.
In my build settings, the Subscriptions.framework framework is in Linked Frameworks and Libraries. From what I've researched about module not found errors in xcode, this should be the fix for my problem. However, this is not fixing my problem. This project should normally be able to be built and compiled. Is there something I'm missing here?
Update
Here is the xcode file tree view.
Main
|-Main
|-MainTests
|-Products
|-Frameworks
|-Subscriptions.xcodeproj
|-Subscriptions
|-Products
|-Subscriptions.framework
|-Frameworks
|-Pods
Pods

Ok. I finally figured out what was going on. I dove into the directory I thought that the Susbcriptions.framework was being installed in, and it wasn't there. The directory in the build products path was set to Products/Debug-iphoneos but the Subscriptions.framework was instead being installed into Products/Debug. This made me realize that somewhere in XCode I had the build setting set to build for MacOS instead of iOS. I found the setting and rebuilt my project for an iPhone XS simulator and the module was imported successfully.

Related

React native base headers for ios not found

During the iOS linking phase, I started seeing errors for my React Native project.
React Native version: 0.41.2, 0.40, 0.39
All worked fine, I edited the Android version, React Native code didn't change, when this kind of linking errors started showing up with headers on /node_modules/react-native/React/Base/{RCTHeaderName.h} path not being found:
In file included from /Users/user/ReactNativeProject/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.h:9:
../react-native/React/Base/RCTBridgeModule.h:12:9: fatal error: 'React/RCTDefines.h' file not found
#import <React/RCTDefines.h>
^
In the Link Binary With Libraries I include the core React library
(libReact.a).
The location of the RCTLog.h is
PROJECTROOT/node_modules/react-native/React/Base/RCTLog.h, but the
import is #import <React/RCTLog.h>
Newly adding React.xcodeproj into Libraries doesn't help, Xcode's Product > Clean doesn't help, neither does restarting Xcode
react-native run-android works, react-native run-ios shows the error
File permissions set to the user executing react-native run-ios
Do you have Parallelize build option unchecked and React listed first in your build targets?
You can find this window in Xcode => Your project icon near the run button => Edit scheme => Build tab
Update:
solution on Facebook React-Native
https://github.com/facebook/react-native/issues/11813
============
This issue happened to me also.
It seems React.xcodeproj only recognise configuration Debug and Release. All of output of React.xcodeproj is written into Debug-iphonesimulator or Release-iphonesimulator.
That means if you have some configurations other than "Debug/Release", the output will still be written into Debug-iphonesimulator or Release-iphonesimulator, that is not what we want.
So the solution is to add a same configuration in React.xcodeproj to match the one of your own project.
For example, if you have "Debug/Release/Test/AppStore" 4 configurations in your own project, you have to make sure React.xcodeproj also has the same 4 configurations.
please click the "+" button of Configurations, then "Duplicate Release Configuration", and rename it according to you need.
It seems like there are a lot of reasons to be getting these 'missing headers' errors and I've tried a lot of things posted on Stack Overflow and nothing would work. Finally I stumbled upon the solution below that did work for me. Posting in case anyone else has the same issue ... its a bit obscure. For me it was caused by a build locations setting in Xcode that is apparently incompatible with vanilla React Native. The build locations setting that fixed this issue is shown here:
in XCode->Settings>Locations->Advanced... make sure your Build Location is not set to Legacy, it should be set to Unique
Note: the vanilla React Native application may have to be reinitialized from scratch with react-native init ... after changing this setting.
Add path/project folder/ios/Pods/Headers/Public in your Library's Build Settings -> Header Search Path. The issue will get resolved

XCode creating Generic Xcode Archive instead of iOS Archive

So I know this question has been asked several times before, but none of the other accepted answers solves my problem. I have an Swift/Objective-C Xcode Project that uses CocoaPods. The skip install build setting is set to yes for CocoaPods and no for my main project. When I archive my project, I get a Generic Xcode Archive and when I export the built products to a directory, I see myproject.app and myproject.zip which when I open it has many subfolders inside leading to a derive data folder and another copy of myproject.app.
When I try xcodebuild to export my archive I get the error "not a single bundle archive". Anyone have any idea what is going on?
Well, not sure what exactly went wrong, but I fixed it by creating a new Xcode project and importing all my code.

PhoneGap 2.9.0 is not working Build error

Hi i tried to download and run phoneGap-2.9.0 but it showing following error..please check the image for error
I saw several answers like
In your Target's Build Settings, find "Other Linker Flags"
Change "$(TARGET_BUILD_DIR)/libCordova.a"
To "$(BUILT_PRODUCTS_DIR)/libCordova.a"
i tried all these but its not working please refer my images
This happened with me also, and then i get to its fault. The problem is with the project folder, the project folder is not created properly.
In my case, i have some path issue, for which the application can't able to find the cordova lib folder.
it needed to recreated the whole project, then it worked fine for me.
Try to recreate the application folder, you can have a look into this while creating the application.

xCode will not parse project from Unity

I am working on a different iOS project in Unity and I have built it by exporting to Xcode (like I always have).
Whenever I try to open the "Unity-iPhone.xcodeproj" in Xcode, it gives me the following error:
Project cannot be opened because the project file cannot be parsed.
I have looked everywhere but cannot figure it out.
The project name does not have any spaces in it.
I have checked the .plist and everything looks fine.
The bundle identifier matches that in .plist.
This has worked in previous projects but now I am getting this error for some reason. What gives?
Today, I've been facing this problem (Unity Ver. 5.5 Windows Based system).
When I try to open my windows exported iOS project, i got "(..)the project file cannot be parsed". So, I decided to explore the project file, located in:
{Project path}/Unity-iPhone.xcodeproj/project.pbxproj
It is a plain text file, so you can use any text editor.
I found a line with a mismatched quotes. It was:
shellScript = "\"$PROJECT_DIR/MapFileParser.sh\""\nrm -rf \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Data/Raw/QCAR\"";
To fix the problem, simply remove the quotation mark located at:
(...)MapFileParser.sh\" " \n(...)
It should be:
(...)MapFileparser.sh\" \n(...)
and it will be parsed correctly in xCode.
It's an automated typo error!
Good luck!
Well, after a couple days I have found the problem and it all has to do with the naming of the *.a files that the plugins import.
XCode does not allow for files to have spaces in their names (of course) but I had not caught that 3 of the *.a files from plugins had spaces in them.
After removing these plugins (I have different plugins that do the same thing anyways) xCode was able to parse the build and create a project for me!
Be careful of spaces!
Incompatable version of Xcode?
Are you using plugins? Most modify the project.
Try creating a new project and creating a build. If it works, it's a plugin, otherwise an Xcode version.
Faced the same issue today (Unity 2017.1.1).
Nothing related with the answers above. I just made a mistake in the Profile ID in the Player Settings of iOS : Edit > Project Settings > Player > iPhone, iPod Touch and iPad Settings > Other Settings > Identification.
I was getting this issue in Unity 2017.2 this week (building on Windows and then copying the build files over to the Mac for use in Xcode), and can confirm that the fix to the shell script line to remove the double quote as described by Anibal Itriago above worked in my case. Even an entirely blank iOS project with Vuforia disabled was failing to parse, but the line fix seems to resolve it.
My issue was related to dropbox.
I use a pc for development and a mac to build in xcode, so I store my project in dropbox. Sometimes dropbox can corrupt .pbxproj or even .plist files going from pc to mac, so when I attempt to open a project on my mac, xcode will throw the above parse error.
I had to zip the xcode project folder on the pc side, then on the mac side pull it out of the dropbox folder and unzip it. Then move it back to its original location. It's a pain but it worked.

File not found when archiving iOS project

I am trying to archive my app into an .ipa file with Xcode 4.3.2 to send to the app store but I am getting this error when attempting to archive it:
'KKGridView/KKGridView.h' file not found
KKGridView is a different project in my workspace producing a single target which is a static library.
When performing a regular build it works well, also when deploying to a device.
I have read alot about this issue, I have tried setting Skip Install to YES on the static library project but that doesn't help.
I have encountered some tips regarding user headers or something but it wasn't very clear to me since I am not very familiar with the whole headers concept of Xcode.
Should I change the setup of my workspace or is there some configuration I am missing?
Eventually I just copied the entire source code of the library into my project and deleted the second project.

Resources