how to add libc++.dylib to a Xcode project created by trigger.io forge - trigger.io

How to add libc++.dylib to a Xcode project created by trigger.io forge
I add the libc++.dylib file to the Xcode project "ForgeInspector", but it will removed when i update from website.
How can i add the libc++.dylib to the project file made by trigger.io?

You can do this by adding a build step in module/ios/build_steps.json. See https://trigger.io/docs/current/api/native_modules/native_build_steps.html
For libc++.dylib the file should contain the following:
[
{ "do": { "add_ios_system_framework": "libc++.dylib" } }
]

Related

Will changing the info.plist of custom framework manually create problems in installing on device?

I made a custom framework from a xcode project with "example.com.a" bundle identifier using lipo -create command by joining simulator and iphone architecture frameworks. So it has a bundle identifier "example.com.a" in it's info.plist file by default. I am able to use this framework in my app and my app installs on device without any error
Now when i try to change the bundle identifier of the custom framework to something like "myapp.custom.framework" by manually editing the info.plist inside the framework folder instead of xcode project .
By doing this I am unable to install the .ipa in the device. It shows "Unable to install the app".
So my question is
1) Is manually changing the bundle identifier or adding keys to custom framework's info.plist affects the custom framework functionality ?
2) For changing the bundle identifier of custom framework do we need to change it in the main xcode project? Right now i am changing and adding keys in the info.plist which is there in framework folder.
After long research and trial i found that if we change the bundle identifier in info.plist inside the custom framework folder, it will create error while adding in a sample project, instead we need to change the bundle identifier from the XCode project for framework and then generate iPhone and Simulator .framework and use lipo -create output to combine them and create a universal library.
Following are the steps :
To build and distribute universal/fat frameworks:
In the framework project:
Build xcode framework project for simulator and build for device, this will produce two frameworks in the derived data folder.
Find the derived data path for the project. Look for the folder Build->Products. Inside it should be '-iphoneos' and '-iphonesimulator'. Inside each is a .framework folder. Copy one of those to some nice folder. From each of those .frawework folders, copy the binary that is in there to one folder.
In Terminal:
In terminal run the command lipo -create -output <outputName> <binaryFromiphoneos> <binaryFromiphonesimulator>. This will create a fat binary with all architectures for both simulator and devices. Replace the one in the copied .framework directory with the newly generated one preferably inside the folder of iPhone platform framework.
Run lipo -info <framework path> in terminal to know about the architecture of the framework . Eg: X86 denotes simulator , arm64, arm7 denotes iphone devices.
To use the framework in another app:
Select the Project in the Project Navigator, select the target, and select General tab.
drag the .framework folder onto where it says 'Add embedded binaries here'.
In the build settings of the target, add the path to the .framework folder to 'Framework Search Paths'.
Import files in your source code using #import <frameworkName/frameworkName.h>

CoreText.framework: No such file or directory

When i built a xcode project with CoreText.framework, but get the following error.
error: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/CoreText.framework: No such file or directory.
At the same time, there is
"iPhoneOS.sdk" and "iPhoneOS10.3.sdk -> iPhoneOS.sdk", below /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs only.
I fixed the problem.
Because i added the framework into "Embedded Binaries".

Not able to link a Carthage framework to Xcode project

I am trying to link a new framework downloaded via Carthage to one of my project but getting a linker error:
I'm following these steps:
Updated the Cartfile with the framework location.
Run carthage update command to fetch the framework.
Under project target -> Build Phase added a new Run script and renamed it to Framework Copy.
Added the script to copy the framework from the file system : $(SRCROOT)/Carthage/Build/iOS/CleanroomLogger.framework.
Dragged and dropped the framework from the mentioned location under Link Binary With Libraries section of project target -> Build Phase.
Double checked the Framework Search Path under build settings and it seems to be set correctly : $(PROJECT_DIR)/Carthage/Build/iOS.
Am I missing something?
Eventually it turned out to be deployment target issue. The framework I was linking was supported with minimum deployment target as 8 and I was running with 7 :). I wish the build error could be more descriptive.

can't find ios framework headers in react native module library

I've included an iOS framework in the xcode project for the React Native module library I'm creating. Everything compiles fine when I build the ios project in the RN library itself, but once I npm install the library into my main RN project, running react-native link <project-name>, and then build in xcode, the included framework headers are not found.
I checked the normal build settings (Header, Framework, and Library search paths) and they all have $(inherited) listed.
Repo for the react native library that is WIP https://github.com/bsy/react-native-pollfish
Download SDK file from here . May be owner removes the SDK from github.
Please add this line in your package.json file.
"rnpm": {
"ios": {
"sourceDir": "./ios"
}
}
Also, unable to install your plugin with "npm install".
The solution to this issue was to make sure that both your Xcode subproject and your main Xcode project both point to a relative path to the SDK.
Steps to take:
Open your application's Xcode project.
If you don't have a Frameworks group in your project, create one.
Open ~/Documents/PollfishSDK using Finder.
Drag the pollfish.framework file into the Frameworks group of Xcode's Project Navigator. In the displayed dialog, choose Create groups for any added folders and deselect Copy items into destination group's folder. This references the SDK where you installed it rather than copying the SDK into your app.
For 3rd party framework set the framework search path in the library project-
$(SRCROOT)/../../../ios/Pods/3rd_party_framework_folder_name

[Possible Duplicate]: Undefined symbols for architecture i386:

I know there are lot of questions and answers are available like this but since 2 days I tried to figure out this issue and not got any success.
I have added the below listed frameworks in my projects,
libSqlite3.dylib
AddressBook.framework
AssetsLibrary.framework
AVFoundation.framework
CoreMotion.framework
MediaPlayer.framework
but not getting any success
I think you've copied the Frameworks into your project, rather than just linking to them, so they only contain the library compiled for device. Xcode will normally locate the Simulator version of the framework for you.
Delete any of the .framework folders in your project and Finder, then follow Step 6 of this tutorial with the frameworks you listed in your original post: http://quickblox.com/developers/IOS-how-to-connect-Quickblox-framework#Framework
This library AssetsLibrary.framework in Step 3, is not included in your project, that's why you are getting this error.
Try these:
You need to add the AssetsLibrary framework to the “Link Binary With Libraries” build phase of your target.
Try cleaning your project using Command+Shift+K and adding the required frameworks again. Hope it will start working
Copy files into your project but forgot to check the target to add the files to. To resolve: Open the Build Phases for the correct target, expand Compile Sources and add the missing .m files.
Another cause, may be:
You include a static library that is built for another architecture like i386, the simulator on your host machine. To resolve:
If you have multiple library files from your libraries vendor to include in the project you need to include the one for the simulator (i386) and the one for the device (armv7 for example).
Missing library or missing .m file
Check and add:
TargetSettings -> Build Phases -> Compile Sources -> add your .m class -> Build and Run

Resources