Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building remote config for iOS #72

Closed
tharak opened this issue Mar 24, 2017 · 8 comments
Closed

building remote config for iOS #72

tharak opened this issue Mar 24, 2017 · 8 comments

Comments

@tharak
Copy link

tharak commented Mar 24, 2017

I'm having a really annoying problem building for iOS, every time I build on unity I have to use Replace instead of Append, otherwise I will get
ld: 616 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
And every time I use Replace I have to remove install! 'cocoapods', :integrate_targets => false from the podfile or it wont create the xcworkspace.

Any ideia on how to not have to do this?

Also, every time I build on unity pod stops working on any open terminal window, I have to open a new one to use pod install. O_o

I'm running the remote_config testapp
Xcode version 8.2.1 (8C1002)
Unity 5.5.2f1
firebase_unity_sdk_3.0.1

@johnb003
Copy link

Hi tharak, thanks for all the info.
I'll see if I can reproduce any of these issues.

By the way, we are intentionally not using workspaces.

Pods are designed to write a separate config in a pod xcode project and loads that into the original by creating a parent workspace, but the problem is that build and run from Unity has no knowledge of that, and we can't tell Unity it should be trying to open the workspace instead of the project file.

To work around that, we really only use pods to download the dependencies, and then we try the best we can in the plugin to inject all of the necessary dependencies directly in the generated xcodeproject.

So, does it work if you build and run? Can you just use the xcodeproj if you don't hack the podfile?

What happens if you try?

@johnb003
Copy link

We had the option of just going for the workspace and having to tell users not to build and run, and only to build and manually open the workspace, but this seemed too manual to get to a working build, so this is what shaped our decision.

Now that we're at this point though, I'm willing to consider writing an option in the IOSResolver settings, to generate the workspace file instead (and as long as the user knows if they set that option that they have to load the workspace and not the xcodeproj file).

You might be able to tune that podfile generation in the settings right now to something more to your liking.
image

image

@tharak
Copy link
Author

tharak commented Mar 27, 2017

How is the ios resolver supposed to look for build and run?
Mine look the same as the one you sent, and if I check "Use shell..." I get the same result.
If I build and run from unity:

`Showing Recent Issues
Ld /Users/tharak/Library/Developer/Xcode/DerivedData/Unity-iPhone-cqzhuojnldnmpdbszdzcexjxrtip/Build/Products/ReleaseForRunning-iphoneos/test.app/test normal arm64
cd /Users/tharak/Documents/testAppBuildAndRun
export IPHONEOS_DEPLOYMENT_TARGET=8.2
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -L/Users/tharak/Library/Developer/Xcode/DerivedData/Unity-iPhone-cqzhuojnldnmpdbszdzcexjxrtip/Build/Products/ReleaseForRunning-iphoneos -L/Users/tharak/Documents/testAppBuildAndRun -L/Users/tharak/Documents/testAppBuildAndRun/Libraries -L/Users/tharak/Documents/testAppBuildAndRun/Libraries/Plugins/iOS/Firebase -F/Users/tharak/Library/Developer/Xcode/DerivedData/Unity-iPhone-cqzhuojnldnmpdbszdzcexjxrtip/Build/Products/ReleaseForRunning-iphoneos -F/Users/tharak/Documents/testAppBuildAndRun/Frameworks -filelist /Users/tharak/Library/Developer/Xcode/DerivedData/Unity-iPhone-cqzhuojnldnmpdbszdzcexjxrtip/Build/Intermediates/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/arm64/test.LinkFileList -Xlinker -map -Xlinker /Users/tharak/Library/Developer/Xcode/DerivedData/Unity-iPhone-cqzhuojnldnmpdbszdzcexjxrtip/Build/Intermediates/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/test-LinkMap-normal-arm64.txt -miphoneos-version-min=8.2 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tharak/Library/Developer/Xcode/DerivedData/Unity-iPhone-cqzhuojnldnmpdbszdzcexjxrtip/Build/Intermediates/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/arm64/test_lto.o -fembed-bitcode-marker -stdlib=libc -fobjc-arc -fobjc-link-runtime -weak_framework CoreMotion -weak-lSystem -ObjC -liPhone-lib -framework CoreText -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework CoreMedia -weak_framework CoreMotion -framework CoreVideo -framework Foundation -framework MediaPlayer -framework OpenAL -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -framework UIKit -liconv.2 -lRemoteConfig -lApp -weak_framework Metal -Xlinker -dependency_info -Xlinker /Users/tharak/Library/Developer/Xcode/DerivedData/Unity-iPhone-cqzhuojnldnmpdbszdzcexjxrtip/Build/Intermediates/Unity-iPhone.build/ReleaseForRunning-iphoneos/Unity-iPhone.build/Objects-normal/arm64/test_dependency_info.dat -o /Users/tharak/Library/Developer/Xcode/DerivedData/Unity-iPhone-cqzhuojnldnmpdbszdzcexjxrtip/Build/Products/ReleaseForRunning-iphoneos/test.app/test

ld: warning: directory not found for option '-F/Users/tharak/Documents/testAppBuildAndRun/Frameworks'
ld: warning: arm64 function not 4-byte aligned: ltmp0 from /Users/tharak/Documents/testAppBuildAndRun/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/tharak/Documents/testAppBuildAndRun/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
"OBJC_CLASS$_FIROptions", referenced from:
objc-class-ref in libApp.a(app_ios_c76c7d869e568a9b561ea55e25a7dcc0.o)
"OBJC_CLASS$_FIRRemoteConfigSettings", referenced from:
objc-class-ref in libRemoteConfig.a(remote_config_ios_53531e292e202c8e07f4ebe5b73bbec1.o)
"OBJC_CLASS$_FIRRemoteConfig", referenced from:
objc-class-ref in libRemoteConfig.a(remote_config_ios_53531e292e202c8e07f4ebe5b73bbec1.o)
"OBJC_CLASS$_FIRApp", referenced from:
objc-class-ref in libApp.a(app_ios_c76c7d869e568a9b561ea55e25a7dcc0.o)
"_FIRRemoteConfigThrottledEndTimeInSecondsKey", referenced from:
____ZN8firebase13remote_config5FetchEy_block_invoke in libRemoteConfig.a(remote_config_ios_53531e292e202c8e07f4ebe5b73bbec1.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)`

@johnb003
Copy link

How is the ios resolver supposed to look for build and run?
The defaults are the same as in the image I've provided, and should work fine.

Have you previously installed the firebase plugin at a different version before installing the latest?

Could you try deleting the Assets/Plugins/iOS/Firebase content and PlayServicesResolver/
and reimport remote config, and try again?

@tharak
Copy link
Author

tharak commented Mar 29, 2017

Only installed one version.
Deleted the things and nothing changed.

I will try on another mac when I have the time.

@johnb003
Copy link

Ok, so, this is likely a problem with pods running.

There were no errors in the Unity Console? You can get more visibility on what's going wrong by going into the iOS Resolver Settings and turning on verbose logging. Please try that, build and run again and post the log you get in Unity.

@stewartmiles
Copy link
Contributor

@tharak any update on your progress providing logs from the IOSResolver?

FYI: The code for the project is here https://github.com/googlesamples/unity-jar-resolver if you're interested in what it's doing.

@stewartmiles
Copy link
Contributor

@tharak we'll assume you've resolved your issue, please reopen if you still have a problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants