libiconv.2.dylib is shown red in Xcode 7. Is this safe to ignore. I understand that Apple has changed dylib to tbd.
Yes, it should be safe to ignore.
We just hit this problem and couldn’t build without removing ‘libiconv.2.dylib’ and adding ‘libiconv.2.tdb’ in Xcode.
iam building a project in Xcode from Unity, but the registration and login script, does not work. Here the xcode message
2015-10-15 15:57:41.510 RankingSystem[5179:2091125] → registered mono modules 0x100ec9b00
→ applicationDidFinishLaunching()
→ applicationDidBecomeActive()
Requesting Resolution: 1080x1920
Init: screen size 1080x1920
Initializing Metal device caps
Initialize engine version: 5.2.0f3 (e7947df39b5c)
Setting up 1 worker threads for Enlighten.
Thread → id: 16e8a7000 → priority: 1
We’re having the same issue here and we need to build the project automatically, but there’s no way to remove libiconv.2.dylib and add libiconv.2.tbd from post process script. Is there any other workaround for this problem?
Here’s the post-process script we’re using:
public static void OnPostprocessBuild(BuildTarget buildTarget, string path) {
if (buildTarget == BuildTarget.iOS) {
string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject proj = new PBXProject();
proj.ReadFromString(File.ReadAllText(projPath));
string target = proj.TargetGuidByName("Unity-iPhone");
proj.RemoveFrameworkFromProject(target, "libiconv.2.dylib");
proj.AddFrameworkToProject(target,"libiconv.2.tbd", false);
// Set a custom link flag
proj.AddBuildProperty(target, "OTHER_LDFLAGS", "-ObjC");
File.WriteAllText(projPath, proj.WriteToString());
}
}
Nevermind, I found a way to workaround this issue. Here’s the fixed post-process script:
[PostProcessBuild]
public static void OnPostprocessBuild(BuildTarget buildTarget, string path) {
if (buildTarget == BuildTarget.iOS) {
string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject proj = new PBXProject();
proj.ReadFromString(File.ReadAllText(projPath));
string target = proj.TargetGuidByName("Unity-iPhone");
proj.RemoveFrameworkFromProject(target, "libiconv.2.dylib");
// Set a custom link flag
proj.AddBuildProperty(target, "OTHER_LDFLAGS", "-ObjC -liconv");
File.WriteAllText(projPath, proj.WriteToString());
}
}
Edit: By the way, removing libiconv.2.dylib using RemoveFrameworkFromProject method doesn’t do anything, but it builds successfully anyway.
Cheers!
Nice automation, @McKrackeN . I should have been far less lazy myself and made and posted something earlier. I haven’t exported from the latest Unity 5.2.3f1 yet (there were a lot of fixes in the release notes) but if it hasn’t been fixed then I’m going to be ‘heavily inspired by’ your code snippet
// greg
Thanks for your comments. I’m about to test it with version 5.2.3f1, so I’ll get back to you with the results.
It worked flawlessly with version 5.2.3f1.
OK. This may sound really dim, but how and where do I use this?
Put the script in a folder called Editor. It runs automatically after a build.