Building and debugging static library in Xcode using external build system - ios

I'm trying to embed a set of static libraries that are made by an external build system into a project. I can get the external build system to build the libraries just fine in Xcode and I can use them in another project.
However, the project I am compiling (ffmpeg) produces several static libraries and I'm not clear at all how I should set this up in Xcode such that it can be referenced by another project and when I change the ffmpeg source it is rebuilt and can be debugged. Any pointers?

Related

How to avoid build and lipo of Universal Framework everytime project is built?

I have a project that uses a custom framework I've built. This framework provides a clean API based on Objective-c which hides c++ code.
The framework has a universal builder target that uses a Run Script to run xcodebuild and then lipo the binaries for the framework to include.
I realize that the project always wastes a lot of time calling the universal builder target which builds and lipos the binaries. My question is how can I avoid xcodebuild and re-lipo if the source files if they haven't changed?
Well, after much research and getting down and dirty I realized two things.
I did not need a universal build script target. The reason being that the framework project was included on the app I was working with. So xCode automatically is building the correct architecture for the framework. This speeds up the build process since now framework building will only happen when something changes.
So if you are still in need of using a universal build script use the Input Files and Output Files to define your script variables. This then allows xCode to check if the files need to be built and thus executing the script. More on that here: https://patrickbalestra.com/blog/2018/08/27/improving-your-build-time-in-xcode-10.html

Use native framework inside Unity in standalone build

I have a Unity project that uses a native ios framework from C# scripts. When I compile it for iOS app (.ipa), everything works fine.
I want to compile it for macOS, too, that means Standalone build.
To enable that, I check Standalone in import settings:
Then build the app for Standalone platform:
It builds an app, but it is unable to access native framework, and I don't see it inside package contents:
What am I missing?
unable to access native framework, and I don't see it inside package
contents:
The structure is:
Project-Name/Assets/SDK-Name/Plugins/iOS/SDK.framework
There are two issues:
1.The directory you put the plugin.
You put the iOS plugin the Plugins/iOS folder which works fine.
For Mac OSX, you put it in the Assets/Plugins folder. This is also where you put plugins for Windows and Linux.
2.You must convert or build the plugin or framework into a bundle. This bundle is what you should place in the Assets/Plugins folder.

Slow compile times with react-native iOS app

I am currently working on a react-native iOS app. While developing I noticed that the compile times for the app are really slow. I got a CI hooked up which roughly does the following:
clean git checkout of the applications workspace
run unit tests
run UI tests build the app
Since this is a clean checkout the app always recompiles all of the react static libraries which come with the React.xcodeproj like libyoga.a, libReact.a, etc. This means that a clean CI build roughly takes ~8min only to build all of the react dependencies (~4min * 2 because the UI test target rebuilds React again).
I wondered whether it would be possible to speed up the compile times. I came up with the following idea but need your advice to tell me if it would work or if I am on the wrong track.
Compile all static libraries for iphoneos and iphonesimulator
Put them together in a single file via lipo
Move them to a folder
Put that folder into version control
Link the libraries in that folder into the Xcode project
This way it would only be necessary to build a new set of static libraries if I update the react-native version in the package.json, right ?
Another idea which came to my mind is to build a dynamic framework of react-native. The framework could be build only once and then added to the application via carthage or manually. The dynamic framework would link all the react static libraries and add the correct headers to the header search paths.
Does anyone can give me a hint if this could work or has an idea how to improve the build architecture in order to speed up the compile time ?
Check these two checkbox
1 Show environment variables in build log
2 Run script only when installing
but when you run first time then uncheck it because this load script for first time otherwise you can not open get loading script in packager.

PLCrashReporter frameworks integration produce "Could not inspect the application package." error

I am actually trying to integrate PLCrashReport using either a Framework (the one given on the official website) or Carthage.
Carthage won't compile the framework, and the manual drag & drop with the one downloaded from the website would produce the following error when installing the app on the device (Run build)
App installation failed
Could not inspect the application package.
I use a build target of iOS8, I linked the framework as an embedded binary to ship it with the app ; and this error is very annoying.
Xcode is in 7.3
Right now, I tried manual build for the framework, clean of the project. None would work.
By curiosity, I tried Cocoapod integration for this library, it worked, but Cocoapod is NOT an option on my project so I can't go with it.
Does anyone have had the same issue, any ideas for correcting it ?
Finally found a way to make it work :
PLCrashReporter should NOT be in embedded frameworks, just in linked frameworks. Works like a charm now, debug and release builds !

In XCode 6 is there a simple way to build an iOS universal application and 32/64 static library subprojects?

The common wisdom seems to be that to build a subproject as a static library so that it will link and run on all iOS architectures it is necessary to build an Aggregate target for the library, by running a build script which includes a lipo call to package the various binaries.
Is this still necessary in XCode 6?
Setting "Build Active Architecture Only" to NO sounds like it should do this without the need for a separate lipo script or an explicit Aggregate target.

Resources