I’m trying to follow the steps outlined in this post to create my own bindings using 1.3:
When I try to build, either with gradle on the command line or in XCode, I get this error:
/bin/sh -c /Users/psiegel/code/svn/lanternboy/glitterdeep/client/ios/build/moe/xcodebuild/obj/ios-moe.build/Release-iphoneos/ios-moe.build/Script-5E89E920E595824A50811BF5.sh diff: /Podfile.lock: No such file or directory diff: /Manifest.lock: No such file or directory error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
When I have XCode spit out the environment variables before running the script, I can see those two variables are not defined. Any thoughts on why those are missing?
Well, I got a little farther. Turns out running pod install was telling me the exact problem:
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target ios-moe to Pods/Target Support Files/Pods-ios-moe/Pods-ios-moe.debug.xcconfig or include the Pods/Target Support Files/Pods-ios-moe/Pods-ios-moe.debug.xcconfig in your build configuration (ios-moe/build.xcconfig).
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target ios-moe to Pods/Target Support Files/Pods-ios-moe/Pods-ios-moe.release.xcconfig or include the Pods/Target Support Files/Pods-ios-moe/Pods-ios-moe.release.xcconfig in your build configuration (ios-moe/build.xcconfig).
I modifed the file ios-moe/build.xcconfig to include the lines:
#include "../Pods/Target Support Files/Pods-ios-moe/Pods-ios-moe.debug.xcconfig"
#include "../Pods/Target Support Files/Pods-ios-moe/Pods-ios-moe.release.xcconfig"
And that at least is allowing it to build on the command line and via Android Studio. When I try to build right from XCode though I get the error:
framework not found Pods_ios_moe
Running from AndroidStudio at least builds and I see the initial launch screen, but then it chokes with:
/Volumes/SSD/Android/moe-final/moe/natj/natj/src/main/native/natj/ObjCRuntime.mm:1478 WARNING: Binding class refers to class Crashlytics, but it can not be found. Fallback to indirect super class.
/Volumes/SSD/Android/moe-final/moe/natj/natj/src/main/native/natj/ObjCRuntime.mm:1478 WARNING: Binding class refers to class Fabric, but it can not be found. Fallback to indirect super class.
2017-04-26 08:20:55.821 ios-moe[7015:105752] +[NSObject with:]: unrecognized selector sent to class 0x6578028
org.moe.natj.objc.ObjCException: +[NSObject with:]: unrecognized selector sent to class 0x6578028
at apple.uikit.c.UIKit.UIApplicationMain(Native Method)
at com.lanternboy.glitterdeep.IOSLauncher.main(IOSLauncher.java:119)
Seems like the pods framework is not getting properly linked in. FYI - this is a project that was previously working with MOE 1.2. I’ve been trying to upgrade it to 1.3 to use the new method of binding 3rd party libs.
One more follow-up, I just tested this with a fresh project using LibGDX 1.9.6. I get the same errors as above when running pod install, but in this case there is no build.xcconfig to modify. I’ll keep mucking with this clean project to see what I can figure out, but any insights from the MOE folks sure would be appreciated.
Wait, figured it out, I was missing workspace 'xcode/ios-moe.xcworkspace' from my build.gradle. Note, this causes it to work when built via gadle command line or AndroidStudio. Attempting to run it directly from XCode still generates the framework not found error above.