Unity iOS development build always yields non ARC Xcode Project - ios

Unity iOS Xcode build always gives a non-ARC Xcode project. I want to have unity iOS build with ARC. How can I do that?

Easiest way is to activate ARC in your project but tell XCode to deactivate it only for the Unity-generated files using the "-fno-objc-arc" option. This way you can code your own stuff with arc but dont risk any sideeffects from automatically migrating the generated code. And you can easily integrate a new export from unity without having to re-migrate it.
The -fno-objc-arc has to be set in your project settings > Build Phases > Compile Sources
regards

Related

Swift Compiler Error: use of undeclared type with framework

I'm importing a newer version of a custom framework LCCommLibrary that creates the LCConnection class and I'm absolutely perplexed why this will build but not archive after trying multiple things.
Making sure the targets are added (4 apps, 1 Test)
Cleaning and Restarting the Project
This does builds and runs to my iOS devices, but none of the targets will Archive.
Archive usually uses the Release build configuration while building/running on the device uses the Debug build configuration, this is the hint that you have an issue there.
I would say in your case you can to go into the target's build settings, then look at Other Linker Flags, Runpath Search Paths and Library Search Paths, expand them to show the Debug and Release configurations and then ensure you have the same settings for both of them, you'll most probably find something missing in release in one of those.
Finally found the issue. The culprit was framework that was included was a debug version of the framework. This causes Archive Schemes to throw this error since the archive uses the Release as the default.
The resolution was to open the LCCommLibrary Project separately, change the Framework Target's Run Scheme to Release, Run and Build, Locate the target framework, import and embed that back into main project file, and archive as usual.

How can I modify the xCode project automatic which generate by Unity?

I create a Unity project and generate an xCode project . Aways I should and some frameworks or static libs to the xCode project to make it run . So I want make this progress automatic.
I found some tools to modify the xCode project . such as "Mod PBXProj":
https://bitbucket.org/darktable/mod-pbxproj/src
My question is that how can I call the tools(such as "Mod PBXProj") to modify the xCode project after the Unity project generate the xCode project . Or are there any other method to modify the project?
If you will open unity application as a folder, there will be a folder of xCode project, wich unity just copies while build. you can add there any files you whant (or replace), and on every new build, unity you use modified files.

Using box-api in an ARC project?

How can I use the box-api in a project using ARC?
I copied the SDK folder to my project and added them, but I can't build my project since it uses ARC.
You have to disable ARC for these files:
Go to Your Project > Your Target > Build Phases
Select all Box files, press Enter and insert "-fno-objc-arc" without quotas
Clean and Build! ;)

iOS framework project breakpoints not working

I've created an iOS framework project using the famous (and excellent) iOS Universal Framework Xcode template.
But now I've encountered an annoying problem that I can't seem to fix which is that I have an iOS application project that references the framework project and when I run that and have breakpoints set in the framework they don't get it. It seems GDB doesn't have the debug symbols for the framework.
I've made sure that debug symbols are not stripped from the framework and the type is set to "DWARF with dSYM file".
Anyone have any ideas what might be wrong and how to fix it?
My setup:
Xcode 4.2.1
iOS SDK 5.0
I ran into this issue while linking a dynamic framework to a test application in Xcode 7. I was able to avoid the error by ensuring the following in the build settings of my dynamic framework:
"Generate Debug Symbol" - 'Yes'
"Strip Debug Symbols During Copy" - 'No'
Several things comes to my mind regarding your problem. Give them a try and see which ones work for you:
Make sure to have the "Other Linker Flags" on the "Linking" section of the framework's "Build" Info.
Make sure that you have the framework's built in the correct configuration (ie, if you compiled the framework's in Release and are using it with your project set to Debug you might get issues)
Make sure you added the correct framework .a file to your project (actually two issues here: you can have added the Release version - so no debug symbols in there - AND you have to make sure that your projec is not pointing to some old build version)
Check that both the framework's and your project have the "Level of Debug Symbols" on the "Code Generation" section of the "Build" Info set to "All Symbols [full, -gstabs+ -fno-eliminate-unused-debug-symbols]"
If all alse fails try to empty the XCode caches and remove the framework reference from your project. Then clean and rebuild the framework (all configs: device-debug, device-release, simulator-debug, simulator-release, ...) and add it again to you project. Clean and rebuild your project and cross your fingers... :-)
I have also experienced this issue. One way that I have been able to work around this by merging both projects into a single workspace.
Instructions on how to do this can be found at http://developer.apple.com/library/ios/#recipes/xcode_help-structure_navigator/articles/adding_a_project_to_a_workspace.html.
NOTE: I have also experienced a bug adding projects to workspaces where there appears to be no files in the recently added project to the workspace. I have found this is easily remedied by restarting Xcode after all of the projects have been added to the workspace.

How do you build and use the plcrashreporter in XCode 3?

How do you build and use the http://code.google.com/p/plcrashreporter/ PL Crash reporter tools for iOS in Xcode 3?
I downloaded the Google code project and it is the most complicated and confusing X-Code project I've ever seen. What are the artifacts to build or copy out of the project to use in your own project to report code?
I built a simpler catch/email tool, but it doesn't give me the state of other threads. Does anyone have a simple tutorial or explanation of how to use the more advanced features of the PLcrashreporter tool?
The target used to build the disk image is 'Disk Image'; this will build the Mac OS X and iOS frameworks, documentation, and a standalone release disk image.
If you want to build the framework alone, the 'CrashReporter' target will build the iOS and Mac OS X frameworks, and the 'CrashReporter-iOS' target will build just the iOS framework.
You might need to hold down the option key and select 'Use Base SDK' when selecting the above build targets.

Resources