iOS publishing for Xcode

Hello,

I have problem with publishing build. In Unity I create empty application, add some bundle identifier, add iOS simulator. Than I will launch Xcode and try to run it.

Really please help me…

During Xcode compilation I have this error:

Ld /Users/user1/Library/Developer/Xcode/DerivedData/Unity-iPhone-facxczwwtfasnfaywfghakszfyem/Build/Products/TestApplication.app/TestApplication normal i386
cd “/Users/user1/Test Project/TestBuild”
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin”
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/user1/Library/Developer/Xcode/DerivedData/Unity-iPhone-facxczwwtfasnfaywfghakszfyem/Build/Products “-L/Users/user1/Test Project/TestBuild” “-L/Users/user1/Test Project/TestBuild/Libraries” -F/Users/user1/Library/Developer/Xcode/DerivedData/Unity-iPhone-facxczwwtfasnfaywfghakszfyem/Build/Products -filelist /Users/user1/Library/Developer/Xcode/DerivedData/Unity-iPhone-facxczwwtfasnfaywfghakszfyem/Build/Intermediates/Unity-iPhone.build/Debug-iphonesimulator/Unity-iPhone.build/Objects-normal/i386/TestApplication.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -all_load -weak_framework CoreMotion -weak-lSystem -fobjc-link-runtime -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=30103 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework OpenAL -liconv.2 -liPhone-lib -framework AudioToolbox -framework CFNetwork -framework MediaPlayer -framework CoreLocation -framework SystemConfiguration -weak_framework iAd -framework CoreMedia -framework CoreVideo -weak_framework AVFoundation -framework CoreGraphics -weak_framework CoreMotion -weak_framework GameKit -o /Users/user1/Library/Developer/Xcode/DerivedData/Unity-iPhone-facxczwwtfasnfaywfghakszfyem/Build/Products/TestApplication.app/TestApplication

0 0x102ca7280 __assert_rtn + 144
1 0x102cab312 mach_o::relocatable::Section::addRelocFixup(mach_o::relocatable::Parser, macho_relocation_info<Pointer32 > const*) + 2450
2 0x102cbecac mach_o::relocatable::Section::makeFixups(mach_o::relocatable::Parser, mach_o::relocatable::Parser::CFI_CU_InfoArrays const) + 92
3 0x102cba64f mach_o::relocatable::Parser::parse(mach_o::relocatable::ParserOptions const) + 2031
4 0x102cb0542 mach_o::relocatable::Parser::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const) + 290
5 0x102caca00 mach_o::relocatable::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const) + 128
6 0x102cd4856 archive::File::makeObjectFileForMember(archive::File::Entry const*) const + 1190
7 0x102cd3d06 archive::File::forEachAtom(ld::File::AtomHandler) const + 198
8 0x102ce9898 ld::tool::InputFiles::forEachInitialAtom(ld::File::AtomHandler) + 216
9 0x102cf434c ld::tool::Resolver::resolve() + 204
10 0x102ca7649 main + 585
A linker snapshot was created at:
/tmp/TestApplication-2012-07-21-204858.ld-snapshot
ld: Assertion failed: (src.atom != NULL), function addRelocFixup, file /SourceCache/ld64/ld64-133.3/src/ld/parsers/macho_relocatable_file.cpp, line 5436.
clang: error: linker command failed with exit code 1 (use -v to see invocation)

look up the very last line ask on the Apple Dev forums. you will probably get a repsonse a lot quicker and probably more helpful.

Is there any complete manual how to prepare MAC for iOS developmnet with Unity? Last year I spend a lots of time prepare computer for Android but this seems much more problematic. If anyone will help me I will reward him with some of my kits. The only thing what I can offer :).

Not sure, could be anything. There are a few things you must insure on Apples side. Provisioning Profile, Dev Membership.

Is you PlayerPrefs set up properly to your company name?

Go to the player settings and change it from ‘simulator’ to the actual device then do a build run from the build window and choose replace to ensure its cleaned. Then it will deploy nicely to the device.

going to the simulator only works if you don’t use any kind of 3rd party plugin and don’t intend to do so, as they normally rely on features not supported in the simulator or have ARM static libraries which will cause the compiler to fail

Right,
In XCode , make sure it is not set to simulator device. Drop down at top left.

Little problem I don´t have iOS device. My boss has it. Maybe I will have to buy something. If has anybody expirience with iOS development please send me PM, I will pay you. This problem is urgent.

Thanks

How can you test if you have no device?

Invest $200 in an iPod touch. It is very good sice it is the lowest common denominator. Meaning, if you can build on it, every other Apple device will play smoothly.

Thanks for that important piece of information. I got a linker error with Prime31 plugin when trying to run on the simulator, and the error was gone when switching to the device. Saved me a lot of potential headache.