Recently we received several reports that Apple started rejecting apps that use iOS Advertising Identifier, but do not show advertisements. If you was affected by this issue there are instructions how to remove use of this API from Xcode project produced by Unity.
Locate DeviceSettings.mm file in your Xcode project (you should find it under Classes/Unity/)
Make following modifications there:
a)Remove following functions:
P.S. many other 3rd party libraries are using this API too, so consider contacting their providers if solution posted above doesnât help.
P.P.S. we are working to release this fix ASAP
P.P.P.S.
Solution posted above needs to be applied for every fresh build when Xcode project gets replaced from scratch or is deployed to new folder. To make these changes permanent for all future builds you should update master template for this file, which you can find at /Applications/Unity/Unity.app/Contents/PlaybackEngines/iPhonePlayer/iPhone-Trampoline/Classes/Unity
I want to ask this to Unity that is it confirmed that after changing the DeviceSettings.mm file as you mentioned, apple will not reject the app anymore?
I tried the above but now I receive compiler errors in Xcode. Please help.
/Classes/Unity/DeviceSettings.mm:31:13: Function âQueryDeviceIDâ has internal linkage but is not defined
Undefined symbols for architecture armv7:
â_UnityAdvertisingTrackingEnabledâ, referenced from:
IsAdvertisingTrackingEnabled() in libiPhone-lib.a(LibEntryPoint.o)
HardwareInfoReporter::ReportHardwareInfo() in libiPhone-lib.a(ReportHardware.o)
â_UnityAdvertisingIdentifierâ, referenced from:
GetAdvertisingIdentifier() in libiPhone-lib.a(LibEntryPoint.o)
HardwareInfoReporter::ReportHardwareInfo() in libiPhone-lib.a(ReportHardware.o)
âQueryDeviceID()â, referenced from:
_UnityDeviceUniqueIdentifier in DeviceSettings.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using chartboost SDK in my unity3D engine. I am not getting any help from chartboost help community. I am not understanding now that this issue (iAd rejection) is now regarding to chartboost integration or is it bug from Unity iteself. Please help because we are at the submission of the app and getting already very late.
First, itâs not nice to post all in large size font. Second this is not really Unity only issue and Mantas already provided everyone a solution for Unity base code however they are not responsible or canât resolve 3rd party plugin problems. You need to get a solution from Chartboost or you need to stop using it. That means you postpone your release until they fix it or you try to fix it yourself if they provide code or find other product to do the same.
The problem relates to Apples new policy the enforce the rule they have told about before:
Iâve did everything according to the FAQ but when i launch the game (debug mode), splash screen comes up, bloody error comes up (debug mode says that error comes up in âcheckBytesâ ) how can i fix this?
I believe your error is unrelated. Most probably you are on iOS Free license and have inappropriate splashscreen installed. Maybe you were on iOS Pro trial when started your project?
I get this result when I try to build the build after modifiying the .mm source to what was described.
Undefined symbols for architecture armv7:
â_UnityDeviceUniqueIdentifierâ, referenced from:
systeminfo::GetDeviceUniqueIdentifier() in libiPhone-lib.a(iPhoneSettings.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Iâve already implemented this fix on our project, but at one part, we use SystemInfo.deviceUniqueIdentifier(for Push notification-related purposes). Will this give us trouble if we use the device ID even if we are not using ads on our app?