How to use ServiceCore framework from salesforce in a Xamarin forms app? - xamarin

I am getting a warning in my console when I try building the app in Release configuration. The warning reads The ServiceSDK frameworks have not been prepared for release.
Please ensure the "prepare-framework" script is run after the "Embed Frameworks" build phase.
From the documentations, I understand that a build phase script has to be run to fix the issue.
Here is how I use the framework in my solution:
I am creating a binding library which refers the framework through a Native Reference. Then I run the library project and build a .dll with I use in the iOS project within my Xamarin forms application. All this is working fine. I am able to use the intended features from the framework.
However, there is this warning which appears in the console when I run the App in Release configuration. Also, when I tried submitting the App to App Store, it throws error, which is apparently the same mentioned above.
I tried by adding Custom commands which I think is the equivalent of Xcode build phase scripts, but the warning doesn't simply go away.
Any help would be really appreciated.

Sample Repos - https://github.com/XamarinUniversity/ENT302
Youtube Video Link - https://www.youtube.com/watch?v=HEypPXVoYnY&feature=youtu.be
Gudie Here - https://xamarinuniversity.github.io/ENT302/

Related

Regenerate XCFramework if there is a code change

I have a Demo project and Framework which can be integrated with multiple ways(Cocoapods, SPM - using generated XCFramework, directly integrate with XCFramework)
For distributing Demo app to external users we integrate the Framework with SPM.
Problem with this approch is during development its makes really hard to regenerate XCFramework after each change, so I have decided to drag and drop the Framework's project to Demo app, but cant understand how to recompile XCFramework if there is a change.
Could you please help me with understading how to handle this scenario.
Create an .xcworkspace that contains the framework project and the demo app project side by side, then inside the demo app target General settings (see screenshot), add the .framework file from the framework project within the workspace instead of depending on the .xcframework binary file directly.
After that, add a "Copy File" build phase that embeds the framework file.

Google iOS SDK fails to archive (use of undeclared identifier errors)

I have attempted to archive my project for submission to App Store, however, every time I get errors "use of undeclared identifier" for everything related to google iOS SDK. The application itself runs and builds flawlessly with the discussed SDK integrated, the only thing that fails is the archive process. I have tried both cocoa pods and manual method of integration (separately, of course). Furthermore, I used the latest xCode versions (6.4 and 7 beta 4) on two different macs running OS X 10.10.4. This is the guide I have been using.
Your issue has something to do with the configuration of archiving in combination with your Release settings. If you change the scheme settings Command + < to use the Debug configuration for archiving, you may be able to successfully archive your app. This means that somewhere you are probably not matching the Debug and Release configurations.
See the following screenshot for example project Build Settings that are missing the Swift bridging header in release:
Add bridge.h to the release configuration and you will be able to build with the Release schema and you will be able to archive under release configuration.

Checked Out New Project in XCode 6.1 but XCTest and other libraries are missing

Today I checked out a new copy of stable project from gitHub to my home computer using Xcode 6.1. After doing so, I see that many of the frameworks and libraries, including XCTest, are missing (shown in red). I have added Framework and Header Search Paths, but they are still not found.
To make things stranger, I can build the project to a simulator or device, but when I try to run an individual test, I get clang or missing file error for the libraries/frameworks shown in red.
As it turns out, the reason for my errors was that I had not run "Build for Testing" before trying to run the individual Unit Tests. As such, the proper library dependencies had not been generated.

LibGDX Build Model error

I am trying to create a LibGDX project using Gradle. I have already "created" the project using the Gradle setup app, but when I try to import it on Eclipse, I receive the following error:
org.eclipse.osgi.internal.framework.EquinoxConfiguration$1
I prompted me to see the error log, but (I know this is embarrassing) I can't locate the error log.
So I am stuck at the very last hurdle. One thing I may have done to cause the error was not downloading the Android component (I am not interested in creating apps, only desktop applications). I have unchecked the Android app box in the Gradle setup though. The "root folder" I created my project using the setup is in
C:[Name]\Programming\Game
Inside game were all my files like gradle, .gradle, core, desktop. The import box seemed to find it ok. It's just that build error that stops me (The progress bar barely went past %5 before giving me the error)
To develop your application via Eclipse, you need to install the following pieces of software. You can find an in depth guide HERE:
Java Development Kit 7+ (JDK) (6 will not work!): http://www.oracle.com/technetwork/java/javase/downloads/index.html
Android SDK: http://developer.android.com/sdk/installing.html
Android Development Tools for Eclipse:
https://dl-ssl.google.com/android/eclipse/ (use this link as update site for eclipse)
Eclipse Integration Gradle:
http://dist.springsource.com/snapshot/TOOLS/gradle/nightly (for
Eclipse 4.4) or http://dist.springsource.com/release/TOOLS/gradle (for
Eclipse < 4.4)
Then you will need to download the project generator from here:
http://libgdx.badlogicgames.com/download.html
Last but not least, you will need to import the project as Gradle project in Eclipse.
See also:
https://github.com/libgdx/libgdx/wiki/Setting-up-your-Development-Environment-(Eclipse,-Intellij-IDEA,-NetBeans)
https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle

Organizing Android Gradle Project for Inherited Builds

I have a set of apps which are basically white labels of one app. The basic app has a web backend. With ant, when I ran the debug build of a white label app, the library project was compiled as debug with dev_server parameters and when I compiled a release build, the live_server parameters were used. Other parameters (and resources) were overridden by the white label app and it all worked pretty well.
So basically, if I compiled a white label for app 1 and debug build, the app was compiled for <dev_server>/1 as the basic service address and so on.
With gradle, I've tried different strategies but can't get it to work quite as conveniently without setting each parameter in each app's build.gradle.
The basic problem seems to be that a library project with gradle always builds in release so I can really change backend parameters based on what build I'm using.
Any ideas how to set up the project structure to make it work that way?
Instead of library project, try going for the productFlavour concept as mentioned here http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Product-flavors

Resources