DocC documentation archive not recognised by Xcode in a CocoaPod - ios

While developing the internal project for a CocoaPod, I can successfully add a .docc documentation archive, build documentation and see the changes reflected in the Xcode documentation viewer. However, when I include the pod in another project (and run pod install), the documentation archive is treated as a normal folder and its customisations are not reflected when building documentation. From the icon, it looks like Xcode does not recognise it:
The pod's internal project directory
The pod's directory inside the project that installed it
Am I doing something wrong?

Looks like Cocoapods does not currently support DocC and will incorrectly build the pods project, treating the .docc directory as a normal folder. A fix has been submitted and looks like it will be included in the next version (1.12.0).

Related

'FBSDKShareKit/FBSDKShareKit.h' file not found

I've made an IOS build on Unity for an App we're making after adding the facebook SDK, moved the build on a hard drive and tried to build it on xcode on the mac we have at the office, as I always do before uploading it to the app store. I ran into this error and I've been stuck on this issue for 2 full work days and it's driving me a bit crazy, here are the thing's I've tried:
-Install cocoapods, both on the default terminal directory and on the project's directory (I'm not too experienced with cocoapods so I don't know if that made a difference. I also did pod update while standing on the project directory).
-I saw that the IOS resolver has an option called "generate pod files" that people said needed to be checked when building to solve this issue. It was checked by default on my project, so that wasn't it.
-Added the framework path on the build settings to where the facebook SDK is at (though the way it looked on my xcode seemed a bit different than the way I've seen it on other people's xcode screenshots)
-Tried commenting out some #include lines on the headers that are generating the issue. It only produced more errors.
-People said to open the project from the workspace instead of the xcodeproject but unity doesn't seem to generate a workspace file.
-Tried downgrading the Facebook SDK to a previous version but the versions people claim are working don't seem to be on the repository anymore, so it doesn't let me downgrade to them.
At the moment I'm trying to make it work with the latest Facebook SDK which is 9.0.0.
Any help would be appreciated, please let me know if I'm not being specific enough about the issue or if there's any information about my project I should include on the post
The .xcworkspace should be created by Cocoapods, not by Unity directly.
If you already have the Podfile generated, just run pod install on the project directory and open the created .xcworkspace file after Cocoapods finishes installing the external dependencies.

jonkykong/SideMenu is not working in Xcode 11.3 and iOS 13

Describe the bug
Clone and run project in xcode 11.3 with Catalina MacOS and example project will not compile.
To Reproduce
Steps to reproduce the behavior:
Clone/Download project
Open it in Xcode 11.3
Compile Example Project
See error
Expected behavior
Example project must compile without
error.
As hinted at in the comments, the project has dependencies which cannot be found.
According to the path that it is complaining about, its missing one or more Pods
So normally you would go into the project folder in your terminal and enter pod install which will install the missing libraries.
Once you have done this open the workspace (not the project) and then it should work.
Problem is related to different than expected file structure and naming conventions of the Pod
Copy a Info.plist from SideMenu folder to Pods->Target Support Files->SideMenu folder and rename it there to SideMenu-Info.plist
Copy the SideMenu.h from SideMenu folder to Pods->Target Support Files->SideMenu folder and rename it there to SideMenu-umbrella.h
Copy the SideMenu.h from SideMenu to Pods->Target Support Files->Pods-Example and rename it there to Pods-Example-umbrella.h
Rebuild the project

CocoaPods not working on framework target

Im building a IOS app that uses a third-party library.
The library project is inherited from another developer that im unable to ask anything.
It is configured to use CocoaPods to manage dependencies, it has a lot of them.
When i run "pod install" it downloads all of them and creates the workspace.
In the workspace i have set the app target as dependent from the framework project product
Then i try to build it and it says it cannot find one of the dependencies of the framework project (it is on the podfile)
Then i found the framework project is missing "[CP] Embed Pods Frameworks" in build phases (the app project has it)
Also the "Pods_[targetName].framework" is shown in red (even when it indeed is in the build products folder, the path is correct)
I found this issue that seems to be exactly my problem but im unable to see if it has been fixed or not and what could i do to workaround this.
Same effect for me, my issue was the s.source_files in the podspec did not reference a location with actual files after a refactor.

how add manually a cordova plugin to ios existing project

i've a cordova project created via cordova cli command.
i build the project for Android and iOS platform but... i copied the build project into respective workspace (eclipse/xcode) and i updated that single project.
Now i need to add a plugin.
The project into cordova project folder is now so outdate so i would add the plugin via cli and copy the plugin to the respective project.
I copied successfully the generated plugin into the android project, but i'm not able to do the same thing with iOS.
For example i added the console plugin for iOS
cordova plugin add org.apache.cordova.console
if i open and run the build project it work and i see my message in console, but if i try to copy the generated plugin into my existing project it doesn't work.
nobody could help me to understand how add manually a plugin into my existing project?
update
yes i know, i'll try to explain better
i have my cordova project under folder /Document/cordova
when i made an ios build via command line cordova put the built project under /Document/cordova/platforms/ios
well i copied the folder ios under /workspace/my-project-name
after some work under workspace i see that i need to add a cordova plugin.
i added the plugin via command line and it was added to /Document/cordova/platforms/ios
at this poin i have a project under /Document with plugin but asset outdated and one project updated without plugin under /workspace
i'm trying to copy from built project to /workspace project.
i copied
/workspace/my-project-name/my-project-name/Plugins
/workspace/my-project-name/my-project-name/config.xml
/workspace/my-project-name/www/plugins
/workspace/my-project-name/www/cordova.js
/workspace/my-project-name/www/cordova_plugins.js
but it doesn't work... i missed somethings?
After reading it several times I think I get more less the idea...
Well, I am not sure why do you want to copy the ios project outside the current location. I suppose you have a good reason to do it, however you can always tweak that project instead of going back and forward, cordova will not impact non cordova related files each time you run "cordova build".
Are you familiar with control versioning? Git, SVN, mercurial? If so it is simple just we which files were impacted once you add the plugin and copy those... If no, I suggest using control versioning anyways to help keep track of your code changes.
NOTE: Be aware if you build the cordova projet and then you just want to update the files noted above it is highly likely that it won't work, that is why you run "build" is not a simple file sync. I recommend taking the new cordova project with the plugin added and then just add you personal tweaks on the ios in the other folder. Or just tweak the ios folder inside platforms folder...
I hope you are doing for good reason. Anyway you are missing to copy below file to work
/workspace/my-project-name/my-project-name/platforms/ios/my-project-name/config.xml
Copying the cordova iOS platform folder is not a good idea. The reason is, cordova builds an Xcode project in the platform folder, and there is some sort of caching/built in references to absolute location of the original Xcode project. Therefore it would be unclear to you and to Xcode which file is being referenced from within Xcode. This may have caused some other unnoticed errors in the project as well. So therefore, instead of keeping original project path available along with the new path, I would recommend renaming the original project folder in order to remove the ambiguity. This way, you will assure that the right file versions are referenced.

Running Cocoa Pods application on machine where it isnt installed

I recently created an iOS project utilizing cocoa pods to install AfNetworking. I zipped the project and send to someone to check out. They are saying they cannot run the project and they are getting an error because the libpods.a is missing. My assumption is that they didnt open the project from the xcworkspace and tried to open via xcproj, but havent been able to confirm.
Someone who receives a cocoapods based application doesn't need to run pod:install on their machine do they?? (They do not have cocoapods on their machine. )
If the project folder (including the workspace and all subfolders such as the Pods folder) has been zipped in its entirety, and you've got it working on your machine, then the pods folder and its contents should be present, and the problem is probably that the project has been opened instead of the workspace.
You don't need Cocoapods installed at build time. You need it to create and populate the pods project and set up the workspace, but once that done, nothing else is needed until you want to update the Podfile.

Resources